summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta')
-rw-r--r--import-layers/yocto-poky/meta/classes/allarch.bbclass5
-rw-r--r--import-layers/yocto-poky/meta/classes/archiver.bbclass42
-rw-r--r--import-layers/yocto-poky/meta/classes/autotools.bbclass112
-rw-r--r--import-layers/yocto-poky/meta/classes/base.bbclass62
-rw-r--r--import-layers/yocto-poky/meta/classes/bash-completion.bbclass2
-rw-r--r--import-layers/yocto-poky/meta/classes/buildhistory.bbclass57
-rw-r--r--import-layers/yocto-poky/meta/classes/buildstats-summary.bbclass6
-rw-r--r--import-layers/yocto-poky/meta/classes/buildstats.bbclass9
-rw-r--r--import-layers/yocto-poky/meta/classes/ccache.bbclass2
-rw-r--r--import-layers/yocto-poky/meta/classes/chrpath.bbclass21
-rw-r--r--import-layers/yocto-poky/meta/classes/cmake.bbclass20
-rw-r--r--import-layers/yocto-poky/meta/classes/cml1.bbclass2
-rw-r--r--import-layers/yocto-poky/meta/classes/core-image.bbclass3
-rw-r--r--import-layers/yocto-poky/meta/classes/cross-canadian.bbclass23
-rw-r--r--import-layers/yocto-poky/meta/classes/cross.bbclass14
-rw-r--r--import-layers/yocto-poky/meta/classes/cve-check.bbclass265
-rw-r--r--import-layers/yocto-poky/meta/classes/devshell.bbclass5
-rw-r--r--import-layers/yocto-poky/meta/classes/distrodata.bbclass1
-rw-r--r--import-layers/yocto-poky/meta/classes/distutils-common-base.bbclass4
-rw-r--r--import-layers/yocto-poky/meta/classes/distutils-native-base.bbclass3
-rw-r--r--import-layers/yocto-poky/meta/classes/distutils-tools.bbclass4
-rw-r--r--import-layers/yocto-poky/meta/classes/distutils.bbclass4
-rw-r--r--import-layers/yocto-poky/meta/classes/distutils3-base.bbclass3
-rw-r--r--import-layers/yocto-poky/meta/classes/distutils3-native-base.bbclass4
-rw-r--r--import-layers/yocto-poky/meta/classes/distutils3.bbclass24
-rw-r--r--import-layers/yocto-poky/meta/classes/externalsrc.bbclass44
-rw-r--r--import-layers/yocto-poky/meta/classes/gobject-introspection-data.bbclass4
-rw-r--r--import-layers/yocto-poky/meta/classes/gobject-introspection.bbclass28
-rw-r--r--import-layers/yocto-poky/meta/classes/grub-efi.bbclass17
-rw-r--r--import-layers/yocto-poky/meta/classes/gtk-doc.bbclass72
-rw-r--r--import-layers/yocto-poky/meta/classes/gtk-immodules-cache.bbclass8
-rw-r--r--import-layers/yocto-poky/meta/classes/gummiboot.bbclass8
-rw-r--r--import-layers/yocto-poky/meta/classes/icecc.bbclass14
-rw-r--r--import-layers/yocto-poky/meta/classes/image-buildinfo.bbclass6
-rw-r--r--import-layers/yocto-poky/meta/classes/image-live.bbclass20
-rw-r--r--import-layers/yocto-poky/meta/classes/image-swab.bbclass94
-rw-r--r--import-layers/yocto-poky/meta/classes/image-vm.bbclass34
-rw-r--r--import-layers/yocto-poky/meta/classes/image.bbclass117
-rw-r--r--import-layers/yocto-poky/meta/classes/image_types.bbclass212
-rw-r--r--import-layers/yocto-poky/meta/classes/image_types_uboot.bbclass20
-rw-r--r--import-layers/yocto-poky/meta/classes/insane.bbclass98
-rw-r--r--import-layers/yocto-poky/meta/classes/kernel-arch.bbclass4
-rw-r--r--import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass140
-rw-r--r--import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass83
-rw-r--r--import-layers/yocto-poky/meta/classes/kernel-uimage.bbclass3
-rw-r--r--import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass152
-rw-r--r--import-layers/yocto-poky/meta/classes/kernel.bbclass79
-rw-r--r--import-layers/yocto-poky/meta/classes/libc-common.bbclass6
-rw-r--r--import-layers/yocto-poky/meta/classes/libc-package.bbclass48
-rw-r--r--import-layers/yocto-poky/meta/classes/license.bbclass84
-rw-r--r--import-layers/yocto-poky/meta/classes/linuxloader.bbclass8
-rw-r--r--import-layers/yocto-poky/meta/classes/live-vm-common.bbclass8
-rw-r--r--import-layers/yocto-poky/meta/classes/metadata_scm.bbclass5
-rw-r--r--import-layers/yocto-poky/meta/classes/mirrors.bbclass8
-rw-r--r--import-layers/yocto-poky/meta/classes/module.bbclass15
-rw-r--r--import-layers/yocto-poky/meta/classes/multilib_global.bbclass3
-rw-r--r--import-layers/yocto-poky/meta/classes/multilib_header.bbclass5
-rw-r--r--import-layers/yocto-poky/meta/classes/native.bbclass3
-rw-r--r--import-layers/yocto-poky/meta/classes/nativesdk.bbclass2
-rw-r--r--import-layers/yocto-poky/meta/classes/nopackages.bbclass6
-rw-r--r--import-layers/yocto-poky/meta/classes/npm.bbclass22
-rw-r--r--import-layers/yocto-poky/meta/classes/oelint.bbclass2
-rw-r--r--import-layers/yocto-poky/meta/classes/package.bbclass78
-rw-r--r--import-layers/yocto-poky/meta/classes/package_deb.bbclass49
-rw-r--r--import-layers/yocto-poky/meta/classes/package_ipk.bbclass19
-rw-r--r--import-layers/yocto-poky/meta/classes/package_rpm.bbclass12
-rw-r--r--import-layers/yocto-poky/meta/classes/package_tar.bbclass5
-rw-r--r--import-layers/yocto-poky/meta/classes/packagefeed-stability.bbclass252
-rw-r--r--import-layers/yocto-poky/meta/classes/packagegroup.bbclass2
-rw-r--r--import-layers/yocto-poky/meta/classes/patch.bbclass3
-rw-r--r--import-layers/yocto-poky/meta/classes/pixbufcache.bbclass6
-rw-r--r--import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass40
-rw-r--r--import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass267
-rw-r--r--import-layers/yocto-poky/meta/classes/python-dir.bbclass6
-rw-r--r--import-layers/yocto-poky/meta/classes/python3-dir.bbclass5
-rw-r--r--import-layers/yocto-poky/meta/classes/python3native.bbclass14
-rw-r--r--import-layers/yocto-poky/meta/classes/pythonnative.bbclass10
-rw-r--r--import-layers/yocto-poky/meta/classes/qemu.bbclass5
-rw-r--r--import-layers/yocto-poky/meta/classes/qemuboot.bbclass82
-rw-r--r--import-layers/yocto-poky/meta/classes/recipe_sanity.bbclass22
-rw-r--r--import-layers/yocto-poky/meta/classes/report-error.bbclass11
-rw-r--r--import-layers/yocto-poky/meta/classes/rm_work.bbclass17
-rw-r--r--import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass59
-rw-r--r--import-layers/yocto-poky/meta/classes/rootfs_rpm.bbclass9
-rw-r--r--import-layers/yocto-poky/meta/classes/sanity.bbclass70
-rw-r--r--import-layers/yocto-poky/meta/classes/scons.bbclass2
-rw-r--r--import-layers/yocto-poky/meta/classes/sdl.bbclass6
-rw-r--r--import-layers/yocto-poky/meta/classes/sip.bbclass61
-rw-r--r--import-layers/yocto-poky/meta/classes/siteinfo.bbclass29
-rw-r--r--import-layers/yocto-poky/meta/classes/spdx.bbclass11
-rw-r--r--import-layers/yocto-poky/meta/classes/sstate.bbclass77
-rw-r--r--import-layers/yocto-poky/meta/classes/staging.bbclass90
-rw-r--r--import-layers/yocto-poky/meta/classes/syslinux.bbclass21
-rw-r--r--import-layers/yocto-poky/meta/classes/systemd-boot.bbclass124
-rw-r--r--import-layers/yocto-poky/meta/classes/systemd.bbclass3
-rw-r--r--import-layers/yocto-poky/meta/classes/terminal.bbclass2
-rw-r--r--import-layers/yocto-poky/meta/classes/testexport.bbclass206
-rw-r--r--import-layers/yocto-poky/meta/classes/testimage.bbclass176
-rw-r--r--import-layers/yocto-poky/meta/classes/testsdk.bbclass16
-rw-r--r--import-layers/yocto-poky/meta/classes/tinderclient.bbclass26
-rw-r--r--import-layers/yocto-poky/meta/classes/toaster.bbclass113
-rw-r--r--import-layers/yocto-poky/meta/classes/toolchain-scripts-base.bbclass11
-rw-r--r--import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass28
-rw-r--r--import-layers/yocto-poky/meta/classes/uboot-config.bbclass19
-rw-r--r--import-layers/yocto-poky/meta/classes/uboot-extlinux-config.bbclass126
-rw-r--r--import-layers/yocto-poky/meta/classes/uboot-sign.bbclass95
-rw-r--r--import-layers/yocto-poky/meta/classes/update-alternatives.bbclass4
-rw-r--r--import-layers/yocto-poky/meta/classes/update-rc.d.bbclass18
-rw-r--r--import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass75
-rw-r--r--import-layers/yocto-poky/meta/classes/useradd.bbclass88
-rw-r--r--import-layers/yocto-poky/meta/classes/useradd_base.bbclass14
-rw-r--r--import-layers/yocto-poky/meta/classes/utility-tasks.bbclass4
-rw-r--r--import-layers/yocto-poky/meta/classes/utils.bbclass69
-rw-r--r--import-layers/yocto-poky/meta/conf/bitbake.conf64
-rw-r--r--import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc2
-rw-r--r--import-layers/yocto-poky/meta/conf/distro/include/default-versions.inc5
-rw-r--r--import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc14
-rw-r--r--import-layers/yocto-poky/meta/conf/distro/include/package_regex.inc22
-rw-r--r--import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc37
-rw-r--r--import-layers/yocto-poky/meta/conf/distro/include/tclibc-uclibc.inc28
-rw-r--r--import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc24
-rw-r--r--import-layers/yocto-poky/meta/conf/distro/include/world-broken.inc7
-rw-r--r--import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc6
-rw-r--r--import-layers/yocto-poky/meta/conf/documentation.conf7
-rw-r--r--import-layers/yocto-poky/meta/conf/layer.conf4
-rw-r--r--import-layers/yocto-poky/meta/conf/machine-sdk/i586.conf1
-rw-r--r--import-layers/yocto-poky/meta/conf/machine-sdk/i686.conf1
-rw-r--r--import-layers/yocto-poky/meta/conf/machine-sdk/x86_64.conf1
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/arm/arch-armv7ve.inc19
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-neon.inc2
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-vfp.inc2
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/mips/README19
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/mips/arch-mips.inc39
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/mips/feature-mips-mips16e.inc17
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/mips/tune-mips-24k.inc51
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc64.inc3
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/qemu.inc2
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/qemuboot-mips.inc8
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/qemuboot-x86.inc15
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/tune-mips32r2.inc12
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/tune-mips32r6.inc29
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/tune-mips64r2.inc84
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/tune-mips64r6.inc32
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/tune-ppce500mc.inc3
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/tune-ppce5500.inc3
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/tune-ppce6500.inc3
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc2
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/qemuarm.conf8
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/qemuarm64.conf14
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/qemumips.conf1
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/qemumips64.conf1
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/qemuppc.conf8
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/qemux86-64.conf6
-rw-r--r--import-layers/yocto-poky/meta/conf/machine/qemux86.conf6
-rw-r--r--import-layers/yocto-poky/meta/conf/multilib.conf3
-rw-r--r--import-layers/yocto-poky/meta/conf/sanity.conf2
-rw-r--r--import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/blacklist6
-rw-r--r--import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/filters7
-rw-r--r--import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/whitelist23
-rw-r--r--import-layers/yocto-poky/meta/conf/swabber/generic/blacklist2
-rw-r--r--import-layers/yocto-poky/meta/conf/swabber/generic/filters10
-rw-r--r--import-layers/yocto-poky/meta/conf/swabber/generic/whitelist15
-rw-r--r--import-layers/yocto-poky/meta/conf/toasterconf.json36
-rw-r--r--import-layers/yocto-poky/meta/files/ext-sdk-prepare.py117
-rw-r--r--import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh29
-rw-r--r--import-layers/yocto-poky/meta/files/toolchain-shar-relocate.sh20
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py42
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/classextend.py4
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/classutils.py17
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py51
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/data.py4
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/distro_check.py88
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/gpg_sign.py7
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/license.py28
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/maketype.py9
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/manifest.py7
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/package.py15
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/package_manager.py515
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/packagedata.py4
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/packagegroup.py4
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/patch.py193
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/path.py63
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/prservice.py6
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/qa.py56
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/recipeutils.py170
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/rootfs.py217
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/sdk.py26
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/sstatesig.py14
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/terminal.py38
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/tests/test_elf.py21
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/tests/test_path.py4
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/types.py4
-rw-r--r--import-layers/yocto-poky/meta/lib/oe/utils.py33
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/__init__.py0
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/buildperf/__init__.py19
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py551
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py127
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/controllers/masterimage.py44
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/oetest.py385
-rwxr-xr-ximport-layers/yocto-poky/meta/lib/oeqa/runexported.py48
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/__init__.py3
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/_ptest.py4
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/buildgalculator.py23
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/buildiptables.py2
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/buildsudoku.py28
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/connman.py2
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/files/test.py2
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/parselogs.py47
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/ping.py2
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/python.py2
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/rpm.py33
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/smart.py47
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/syslog.py13
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/runtime/systemd.py8
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/sdk/buildgalculator.py27
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/sdk/buildiptables.py2
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/sdk/buildsudoku.py26
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/sdkext/devtool.py90
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/sdkext/files/myapp_cmake/CMakeLists.txt11
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/sdkext/files/myapp_cmake/myapp.c9
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/sdkext/sdk_update.py3
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/_toaster.py4
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/base.py34
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/bbtests.py11
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py91
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/devtool.py210
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/eSDK.py103
-rwxr-xr-ximport-layers/yocto-poky/meta/lib/oeqa/selftest/esdk_prepare.py75
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/imagefeatures.py27
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/liboe.py93
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/lic-checksum.py10
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/pkgdata.py56
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/recipetool.py55
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/runtime-test.py105
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/signing.py34
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/sstatetests.py75
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/selftest/wic.py25
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py28
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py71
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/decorators.py40
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/dump.py2
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/git.py68
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/httpserver.py7
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/logparser.py2
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py29
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py90
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/qemutinyrunner.py16
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/sshcontrol.py116
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/targetbuild.py14
-rw-r--r--import-layers/yocto-poky/meta/lib/oeqa/utils/testexport.py8
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.26.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.27.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/aarch64-initplat.c-fix-const-qualifier.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb46
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb54
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch140
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc11
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.00.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/grub/grub_git.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/use_correct_strip_in_cross_environment.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/lrzsz_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.4.1.bb60
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.1.bb60
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/COPYING2
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/pointercal0
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarm/pointercal1
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarmv6/pointercal1
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarmv7/pointercal1
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemumips/pointercal1
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuppc/pointercalbin36 -> 0 bytes
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemux86-64/pointercal1
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemux86/pointercal1
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal_0.0.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/systemd-boot/systemd-boot.bb38
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot.inc132
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d/aarch64-host.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc12
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch3
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2775.patch90
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2776.patch123
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/dont-test-on-host.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc17
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/init2
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch26
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.37.bb55
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.41.bb55
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman-gnome/0001-Port-to-Gtk3.patch277
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman.inc7
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-Detect-backtrace-API-availability-before-using-it.patch55
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-iptables-Add-missing-function-item-of-xtables-to-mat.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch118
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/includes.patch423
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/no-version-scripts.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.31.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.33.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp.inc5
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2015-8605.patch99
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2016-2774.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch115
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch78
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/libxml2-configure-argument.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch55
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/tweak-to-support-external-bind.patch117
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.3.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/dhcp/files/dhcrelay.service3
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch108
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-fix-building-with-musl.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.4.0.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.7.0.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.3.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.7.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/libpcap/libpcap.inc5
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/neard/neard_0.15.bb60
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/neard/neard_0.16.bb49
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc9
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch1270
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.17.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.18.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_2.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_3.patch329
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_upstream_commit.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch99
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/init2
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch118
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch70
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.1p2.bb161
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.3p1.bb164
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl.inc53
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian/ca.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh210
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/parallel.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2g.bb58
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2j.bb58
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.78.bb67
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb67
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.1.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch55
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch86
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch66
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch86
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-Reject-SET-commands-with-newline-characters-in-the-s.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch73
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch72
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch74
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch90
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-libbb-race.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/files/busybox-syslog.default2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/busybox/files/inittab14
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/busybox/files/mdev4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/disable-ls-output-quoting.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_6.9.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.25.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.10.bb58
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb61
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.10.bb181
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb181
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear.inc6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch48
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/init4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat-2.1.0/autotools.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat-2.1.0/expat-CVE-2015-1283.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat_2.1.0.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.0.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/fts/fts.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch (renamed from import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch (renamed from import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/parallel.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in465
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgzbin39744 -> 0 bytes
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath684
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch (renamed from import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/COPYING4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/Makefile.in.in483
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/aclocal.tgzbin0 -> 40014 bytes
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/config.rpath684
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/remove-potcdate.sin (renamed from import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb32
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-native_0.19.8.1.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.16.1.bb38
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.6.bb115
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb120
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch66
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc15
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.46.1.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.48.2.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.23.bb58
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.24.bb52
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.24.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.23.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-ld.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.24.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.23.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.24.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.23.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.24.bb (renamed from import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.23.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch93
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch16
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch566
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Forward-port-cross-locale-generation-support.patch566
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-build_local_scope.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.23.bb133
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.24.bb140
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb120
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb117
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh40
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh39
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh4
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/finish33
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/init4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs62
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb17
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh2
-rwxr-xr-x[-rw-r--r--]import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh4
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh2
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/kbd/kbd/run-ptest4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.3.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.3.bb74
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb75
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb32
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/meta-extsdk-toolchain.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/meta-ide-support.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb58
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/musl.inc7
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160213.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/netbase/netbase_5.3.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/readline/readline.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc25
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch11
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch68
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch122
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd_229.bb579
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/systemd/systemd_230.bb598
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/funcs474
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/headers156
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/types21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-config.inc143
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git.inc17
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-Disable-lrount_tes-function.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/locale.cfg3
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/obstack.cfg1
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.distro195
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.machine14
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-initial_git.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-package.inc36
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc.inc168
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc_git.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.1.5.bb107
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.bb101
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc19
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch16
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.27.1.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.28.1.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.0.10.1.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch278
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch128
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.0.10.1.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/apt/files/no-curl.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf/autoreconf-include.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.10.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.6.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/redirect-output-dir.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/automake/automake/python-libdir.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.26.inc42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.27.inc44
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.27.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.26.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.27.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.26.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.26.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.27.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch1246
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch88
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch72
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Correct-nios2-_gp-address-computation.patch106
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-libtool-remove-rpath.patch100
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch97
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-binutils-mips-gas-pic-relax-linkonce.diff65
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.26.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.27.bb45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2/0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb27
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb34
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.7.1.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-improve-deb-and-ipk-checking.patch117
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-remove-space-at-head.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-run-rpm-once-to-make-it-faster.patch361
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.4.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.5.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ccache/files/Revert-Create-man-page-in-the-make-install-from-git-.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.4.3.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-Add-NIOS2-CPU-support.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.4.3.bb53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.6.1.bb48
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch135
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.22.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.1.bb74
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb71
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/distcc/files/separatebuilddir.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb74
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb74
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/largefile.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_3.0.28.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_4.0.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch71
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch22
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch219
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb111
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb111
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/gcc6.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch1163
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch129
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-Ignore-differences-between-mips-machine-identifiers.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch1163
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-fix-a-stack-usage-warning.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-remove-the-unneed-checking.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0003-Add-mips-n64-relocation-format-hack.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/aarch64_uio.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/arm_backend.diff (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/elfcmp-fix-self-comparision.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/fixheadercheck.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/fixheadercheck.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/hppa_backend.diff (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/kfreebsd_path.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/m68k_backend.diff (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/mips_backend.diff (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/mips_readelf_w.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/shadow.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/testsuite-ignore-elflint.diff (renamed from import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/testsuite-ignore-elflint.diff)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/uclibc-support.patch128
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.164.bb89
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.166.bb89
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/file/file/host-file.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/file/file_5.25.bb47
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/file/file_5.28.bb48
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch64
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9.inc139
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0002-uclibc-conf.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0003-gcc-uclibc-locale-ctype_touplow_t.patch87
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0004-uclibc-locale.patch2862
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0005-uclibc-locale-no__x.patch257
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0006-uclibc-locale-wchar_fix.patch68
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0007-uclibc-locale-update.patch542
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0008-missing-execinfo_h.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0009-c99-snprintf.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0010-c99-complex-ugly-hack.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0011-index_macro.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0013-libstdc-namespace.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0014-sh-pr24836.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0016-gcc-poison-system-directories.patch190
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0017-gcc-poison-dir-extend.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch73
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0019-64-bit-multilib-hack.patch82
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0020-optional-libstdc.patch98
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0022-COLLECT_GCC_OPTIONS.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch96
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0025-fortran-cross-compile-hack.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0026-libgcc-sjlj-check.patch74
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0027-cpp-honor-sysroot.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0028-MIPS64-Default-to-N64-ABI.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch228
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0030-gcc-Fix-argument-list-too-long-error.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0031-Disable-sdt.patch113
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0032-libtool.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch102
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0040-fix-g++-sysroot.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0041-libtool-avoid-libdir.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0043-cpp.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch97
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0046-libatomic-deptracking.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0047-repomembug.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch80
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0051-eabispe.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch138
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch66
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0055-dwarf-reg-processing-helper.patch148
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0056-define-default-cfa-register-mapping.patch75
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch113
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch55
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0061-target-gcc-includedir.patch81
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0062-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0063-nativesdk-gcc-support.patch198
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0064-handle-target-sysroot-multilib.patch88
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0065-gcc-483-universal-initializer-no-warning.patch107
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0066-cxxflags-for-build.patch123
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-fix-arm-thumb.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-gcc-musl-support.patch267
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0068-musl-dynamic-linker.patch205
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0069-musl-no-fixincludes.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0070-libstdc-musl.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0072-support-ffile-prefix-map.patch284
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0074-fdebug-prefix-map-support-to-remap-relative-path.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3.inc143
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch270
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc146
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0002-uclibc-conf.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0004-uclibc-locale.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0005-uclibc-locale-no__x.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0006-uclibc-locale-wchar_fix.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0007-uclibc-locale-update.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0008-missing-execinfo_h.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0009-c99-snprintf.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0010-gcc-poison-system-directories.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0011-gcc-poison-dir-extend.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0013-64-bit-multilib-hack.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0014-optional-libstdc.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0016-COLLECT_GCC_OPTIONS.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0018-fortran-cross-compile-hack.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0019-libgcc-sjlj-check.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0020-cpp-honor-sysroot.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0021-MIPS64-Default-to-N64-ABI.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0023-gcc-Fix-argument-list-too-long-error.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0024-Disable-sdt.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0025-libtool.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0029-export-CPP.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0032-Ensure-target-gcc-headers-can-be-included.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0037-aarch64-Add-support-for-musl-ldso.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0038-fix-g-sysroot.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0040-handle-sysroot-support-for-nativesdk-gcc.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0042-Fix-various-_FOR_BUILD-and-related-variables.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0043-libstdc-Support-musl.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch270
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0045-Support-for-arm-linux-musl.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0050-powerpc-pass-secure-plt-to-the-linker.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0052-nios2-use-ret-with-r31.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0054-support-ffile-prefix-map.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0057-unwind-fix-for-musl.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0058-fdebug-prefix-map-support-to-remap-relative-path.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2.inc133
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0002-uclibc-conf.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch87
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0004-uclibc-locale.patch2862
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0005-uclibc-locale-no__x.patch257
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0006-uclibc-locale-wchar_fix.patch68
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0007-uclibc-locale-update.patch542
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0008-missing-execinfo_h.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0009-c99-snprintf.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0010-gcc-poison-system-directories.patch192
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0011-gcc-poison-dir-extend.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch73
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0013-64-bit-multilib-hack.patch85
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0014-optional-libstdc.patch125
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0016-COLLECT_GCC_OPTIONS.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch96
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0018-fortran-cross-compile-hack.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0019-cpp-honor-sysroot.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0020-MIPS64-Default-to-N64-ABI.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch234
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0022-gcc-Fix-argument-list-too-long-error.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0023-Disable-sdt.patch113
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0024-libtool.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch102
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0028-export-CPP.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0031-Ensure-target-gcc-headers-can-be-included.patch98
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0035-aarch64-Add-support-for-musl-ldso.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0037-handle-sysroot-support-for-nativesdk-gcc.patch213
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch102
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0039-Fix-various-_FOR_BUILD-and-related-variables.patch137
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0041-ssp_nonshared.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch292
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch125
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch85
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch92
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/CVE-2016-4490.patch290
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc61
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_4.9.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.2.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_4.9.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.2.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-common.inc21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_4.9.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.2.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.3.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.11.inc (renamed from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.10.1.inc)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.11.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.10.1.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross.inc6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.10.1.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.11.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-Change-order-of-CFLAGS.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-Add-support-for-Renesas-SH-sh4-architecture.patch921
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch921
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch2601
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/force-readline-static.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.10.1.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.11.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/git/git.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/git/git_2.7.4.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/git/git_2.9.3.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.11.bb128
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.12.bb121
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.3.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool.inc30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/remove-perl-check.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/remove-xml-check.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/use-nativeperl.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/make/make-3.81/make_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/make/make-4.1/0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch63
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/make/make_4.1.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/make/make_4.2.1.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/makedevs/makedevs/makedevs.c10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch89
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.41.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_3.9.9.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.11.08.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-configure.ac-use-pkg-config-for-libsolv.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libsolv_solver_set_arch_policy-use-correct-logic-dur.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.1.bb75
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.3.bb73
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.24.bb27
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.25.bb27
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/packagegroups/packagegroup-core-device-devel.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/maxsize.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.8.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.5.bb35
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.6.bb35
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.1.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch2
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-configure.sh2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch74
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-1238.patch352
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-2381.patch114
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch128
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-conflict-between-skip_all-and-END.patch181
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-remove-nm-from-libswanted.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.22.1.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb95
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0003-Fix-renameat-parallel-to-previous-fix-to-rename.patch64
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/Fix-xattr-performance.patch117
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-group1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-passwd1
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/handle-remove-xattr.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/moreretries.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc14
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.6.7.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/aarch64/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/arm/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/arm/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/arm/numpyconfig.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/armeb/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/armeb/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/armeb/numpyconfig.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips/_numpyconfig.h32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64/_numpyconfig.h32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64n32/_numpyconfig.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64n32/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mipsel/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mipsel/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mipsel/numpyconfig.h18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc64/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86-64/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86/config.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86/config.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86/numpyconfig.h (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86/numpyconfig.h)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.1.bb104
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.0.bb105
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc48
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-dbus_1.2.0.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-docutils_0.12.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-git_1.0.2.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.0.7.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch55
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/fix-freetype-includes.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging_1.1.7.bb45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.3.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.4.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-native/debug.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch100
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-native/nohostlibs.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.11.bb63
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.12.bb61
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mipsel/numpyconfig.h17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h31
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy_1.10.4.bb102
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.0.1.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.0.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pycairo_1.10.0.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pygobject_3.18.2.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex_0.9.9.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.5.0.bb (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.4.1.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.4.1.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.0.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_19.4.bb38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_22.0.5.bb38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc16
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch91
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-locale.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-nodig.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch112
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm_git.bb44
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python.inc6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/CVE-2016-5636.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch116
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python/python-fix-CVE-2016-1000110.patch162
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.12.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.0.7.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.4.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.1.bb79
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb98
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_8.0.0.bb48
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_8.1.2.bb47
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch (renamed from import-layers/yocto-poky/meta/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.20.1.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_19.4.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/110-enable-zlib.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/CVE-2016-5636.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch116
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch148
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/unixccompiler.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3/use_packed_importlib.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.1.bb226
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb224
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.11.bb173
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.12.bb171
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c370
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc32
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-1568.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-2197.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-2198.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch13
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.5.0.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.7.0.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch63
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch25
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch26
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb730
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb64
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync.inc7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_2.6.9.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.2.bb46
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.5.bb42
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch176
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch117
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch198
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch306
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch114
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb51
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.13.bb49
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.3.bb53
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.4.bb54
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/swabber/swabber-native_git.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc7
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_230.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/no_packages.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.4.bb102
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb97
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc15
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.30.1.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.32.1.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/gcc5-port.patch64
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.18.bb70
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb71
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/augeas/augeas.inc30
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/sepbuildfix.patch22
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/augeas/augeas_1.4.0.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/string-format.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-builtins.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-intl.patch110
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest20
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bash/bash_3.2.48.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/byacc/byacc_20150711.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/byacc/byacc_20160606.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch105
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond_pam_config.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cronie/cronie_1.5.0.bb81
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cronie/cronie_1.5.1.bb81
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cups/cups.inc5
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.4.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.4/0001-Unset-need_charset_alias-when-building-for-musl.patch (renamed from import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.4/run-ptest (renamed from import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_2.8.1.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_3.3.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_3.4.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.6.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch67
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch81
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch105
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb107
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.19.bb106
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/grep/grep_2.23.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/grep/grep_2.25.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.18.1.4.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.22.3.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/gzip/gzip.inc5
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.6.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libaio/libaio_0.3.110.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch152
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/mkdir.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch25
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb71
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.2.1.bb67
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch181
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libidn/libidn_1.33.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch254
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.23.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb76
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.41.bb79
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch5
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.68.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh3
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list57
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session9
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.07.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb49
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.17.bb49
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.5.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/0001-lib-inet6.c-INET6_rresolve-various-fixes.patch87
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch52
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/newt/files/remove_slang_include.patch16
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.19.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb59
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.19.bb54
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/pam/libpam/crypt_configure.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch97
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch119
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb171
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb169
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.3.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb66
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb66
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch83
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch153
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/quota/quota/fcntl.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch58
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.3.1.bb53
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.4.0.bb52
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch100
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch218
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/slang/slang/fix-check-pcre.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/slang/slang/rpathfix.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb54
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.0.bb51
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch68
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.17p1.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc1
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.4.0.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/tar/tar/remove-gets.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016g.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb212
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016g.bb213
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/fix-security-format.patch97
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf42
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config/watchdog.default2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch99
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch79
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/wd_keepalive.init121
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb59
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc5
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.18.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/zip/zip-3.0/fix-security-format.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/zip/zip.inc26
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.18.4.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.20.3.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.18.0.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.3.bb102
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.34.0.bb102
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.18.2.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.20.2.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.18.0.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.20.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils.inc30
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/sysrooted-pkg-config.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/use-usr-bin-env-for-python-in-xml2po.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/xsltproc_nonet.patch95
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils_0.20.10.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-themes-standard_3.20.2.bb39
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch97
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-configure.ac-add-host-gi-gi-cross-wrapper-and-gi-ldd.patch204
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-use-ldd-wrapper-option.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch52
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch203
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch96
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb163
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb173
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.19.3.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.20.0.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc9
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc35
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch47
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0001-Redo-focus-handling-in-treeview-once-more.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch60
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch954
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch60
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch118
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.29.bb34
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.30.bb34
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.18.8.bb60
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.20.9.bb60
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-doc-stub/files/0001-Revert-Import-introspection-stub-machinery-too.patch305
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch40
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-xsltproc-is-not-found.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch139
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb52
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines-2.20.2/glib-2.32.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines-2.20.2/substitute-tests.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb55
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.0.4.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.2.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/glade-cruft.patch102
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/no-xml2.patch501
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/python_environment.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade_2.6.4.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_230.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.13.bb45
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.16.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.4.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.5.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.1.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/builder/files/builder_session.sh4
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch143
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch105
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.26.0.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.16.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.6.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb.inc79
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/bashism.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/compar_fn_t.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/configurefix.patch60
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/fusion.patch36
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/union-sigval.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch116
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb_1.7.7.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.67.bb45
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.70.bb47
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Revert-changes-made-to-FcConfigAppFontAddDir-recentl.patch132
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.11.94.bb50
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb49
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.3.bb46
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.5.bb49
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/glew/glew_1.13.0.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.2.3.bb39
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb39
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/images/core-image-directfb.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/images/core-image-weston.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb46
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_8d+1.4.2.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox/libpng.patch69
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.11.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/MIT-style-license22
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/link-x11.patch13
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/obsolete_automake_macros.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb39
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_git.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch116
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch119
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch267
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb60
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb59
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_11.1.1.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc29
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_11.1.1.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_12.0.1.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mx/mx-1.0_1.4.7.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/mx/mx.inc7
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch147
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.38.1.bb52
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.1.bb52
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-tests-Fix-missing-include-of-Xutil.h.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib/ts.conf25
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib/tslib.sh8
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib_1.1.bb53
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.1.4.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.4.1.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.7.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.11.0.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.9.0.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/init9
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston-start69
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston.service7
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch173
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch70
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/libsystemd.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/xwayland.weston-start7
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.11.0.bb117
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.9.0.bb103
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/Xserver.in12
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh6
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init.bb51
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver25
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername1
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm10
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf1
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in7
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service10
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in10
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/qemuall/pointercal.xinput2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xrandr_1.5.0.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch70
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/Fix-inconsistent-use-of-tabs-vs.-space.patch62
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.1.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb39
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxext_git.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.1.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxinerama_1.1.3.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch22
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.8.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.34.0.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.16.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/dri2proto_git.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_2.3.2.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_git.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/videoproto_2.3.2.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/videoproto_2.3.3.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto.inc26
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/0001-Make-whitespace-use-consistent.patch215
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/0002-print-is-a-function-and-needs-parentheses.patch75
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_git.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xineramaproto_1.2.1.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.28.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf2
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc8
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/modesetting_libdrm_requirements.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.0.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb27
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh13
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/change-cross.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/cleanup.patch621
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/dso_linking_change_build_fix.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal_0.6.3.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch54
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/cb186f682679383e8b5806240927903730ce85d9.patch279
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc4
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump52
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump.conf6
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc10
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb89
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc10
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch25
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch11
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc18
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dummy.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb38
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc15
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.1.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.8.bb44
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.4.0.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb7
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-error.h-common-error.h.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch30
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest7
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb108
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch17
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch51
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server/init37
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server/oprofileui-server.service6
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server_git.bb34
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui.inc16
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui_git.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch41
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/gui-argument.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/rmb-arm.patch21
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/rmb-mips.patch22
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_git.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc6
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch22
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb51
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb44
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb105
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb103
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch75
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch153
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb102
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb109
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb139
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb142
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch71
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc29
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch32
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch634
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch35
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch244
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch32
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch77
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch51
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch495
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glimagesink-Downrank-to-marginal.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc1
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch20
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch38
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch2
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch143
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch4
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc4
-rw-r--r--[-rwxr-xr-x]import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb17
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc17
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc18
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc21
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch70
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch12
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.24.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch137
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch195
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch73
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch107
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb9
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb63
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc9
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch268
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch218
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch18
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch65
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch373
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch83
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch72
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch79
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb49
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.1.bb54
-rw-r--r--import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch30
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py28
-rw-r--r--import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest2
-rw-r--r--import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc6
-rw-r--r--import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_2.0.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine.inc25
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine_git.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/l3afpad/l3afpad_git.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/leafpad/files/leafpad.desktop10
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/leafpad/files/owl-menu.patch63
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb35
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/libowl/libowl_git.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/files/no-handed.patch26
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_git.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop-sato/matchbox-desktop-sato_git.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch60
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/All.directory5
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Applications.directory6
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Games.directory9
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Root.order4
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Settings.directory8
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb27
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb59
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb54
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-applets-systray-Allow-icons-to-be-smaller.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-showdesktop-Make-sure-active-state-is-initialized.patch50
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/silence-warnings.patch64
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_git.bb39
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato/index.theme7
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato/session9
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.1.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_git.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_0.1.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_0.2.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_git.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch203
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb73
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb41
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/sato-icon-theme/sato-icon-theme/0001-Inherit-the-GNOME-icon-theme.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb40
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_git.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/settings-daemon/files/dso_linking_change_build_fix.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_git.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch223
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/files/musl-fixes.patch48
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/files/ppc-musl-fix.patch26
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch39
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/clang.patch25
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.10.7.bb88
-rw-r--r--import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.12.5.bb108
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.18.1.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.20.1.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb23
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.20.2.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/atk/atk_2.18.0.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/atk/atk_2.20.0.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/acl.inc3
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest67
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/attr.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.1.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.4.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch71
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.6.0.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.61.0.bb (renamed from import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.60.0.bb)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc19
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost-1.61.0.inc19
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost.inc56
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch45
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch49
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch145
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch60
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch112
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch6
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch43
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/curl/curl_7.47.1.bb68
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/curl/curl_7.50.1.bb71
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch11
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch10
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch8
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/db/db_6.0.30.bb124
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/db/db_6.0.35.bb122
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.7.bb48
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.bb48
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.12.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch (renamed from import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch52
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/amd64.patch (renamed from import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/amd64.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/use-includedir.patch (renamed from import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/use-includedir.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.0.bb33
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.1.bb38
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.11.bb45
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.14.bb46
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc10
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/CVE-2016-7444.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb8
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.3.bb13
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch73
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.7.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.9.bb24
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch24
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/icu/icu_56.1.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/icu/icu_57.1.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.65.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.70.bb15
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.2.bb30
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb31
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb32
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb32
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.2.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.3.bb43
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb38
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb37
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch32
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb76
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.25.bb77
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.6.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.2.bb14
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest2
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch177
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb5
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch140
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc4
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/0001-libgpg-error-Add-nios2-support.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.21.bb53
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.24.bb53
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb10
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb25
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.4.bb26
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch146
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch403
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch82
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb42
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.28.bb48
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb79
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.39.bb81
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.13.bb36
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.52.2.bb34
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb35
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch90
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch31
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch2529
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch28
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch42
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch72
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind.inc9
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch81
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch69
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch (renamed from import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch248
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch (renamed from import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-x86-Stub-out-x86_local_resume.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch (renamed from import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_git.bb29
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.1.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.2.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch130
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch34
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch118
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb50
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb50
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb21
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb20
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest25
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch37
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch (renamed from import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr-3.1.3/long-long-thumb.patch)0
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb19
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.4.bb18
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/npth/npth_1.2.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch27
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch33
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch11
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch23
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/nss/nss_3.21.bb240
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/nss/nss_3.25.bb242
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb22
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb3
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch2
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/popt/popt_1.16.bb2
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb6
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch30
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb28
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/sqlite/files/0001-revert-ad601c7962-that-brings-2-increase-of-build-ti.patch56
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch61
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb11
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.14.1.bb12
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb1
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch136
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch14
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/vte/vte.inc15
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch119
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch29
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb16
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/vte/vte_0.44.2.bb43
-rw-r--r--import-layers/yocto-poky/meta/site/arm-common1
-rw-r--r--import-layers/yocto-poky/meta/site/common-linux3
-rw-r--r--import-layers/yocto-poky/meta/site/ix86-common1
-rw-r--r--import-layers/yocto-poky/meta/site/mips64el-linux1
-rw-r--r--import-layers/yocto-poky/meta/site/mipsisa32r6-linux79
-rw-r--r--import-layers/yocto-poky/meta/site/mipsisa32r6el-linux79
-rw-r--r--import-layers/yocto-poky/meta/site/mipsisa64r6-linux83
-rw-r--r--import-layers/yocto-poky/meta/site/mipsisa64r6el-linux83
-rw-r--r--import-layers/yocto-poky/meta/site/nios2-linux1
-rw-r--r--import-layers/yocto-poky/meta/site/sh-common1
2145 files changed, 59231 insertions, 51839 deletions
diff --git a/import-layers/yocto-poky/meta/classes/allarch.bbclass b/import-layers/yocto-poky/meta/classes/allarch.bbclass
index 208cde6e5..ddc2a8505 100644
--- a/import-layers/yocto-poky/meta/classes/allarch.bbclass
+++ b/import-layers/yocto-poky/meta/classes/allarch.bbclass
@@ -17,6 +17,7 @@ python () {
# Set these to a common set of values, we shouldn't be using them other that for WORKDIR directory
# naming anyway
+ d.setVar("baselib", "lib")
d.setVar("TARGET_ARCH", "allarch")
d.setVar("TARGET_OS", "linux")
d.setVar("TARGET_CC_ARCH", "none")
@@ -41,6 +42,10 @@ python () {
d.setVar("EXCLUDE_FROM_SHLIBS", "1")
d.setVar("INHIBIT_PACKAGE_DEBUG_SPLIT", "1")
d.setVar("INHIBIT_PACKAGE_STRIP", "1")
+
+ # These multilib values shouldn't change allarch packages so exclude them
+ d.setVarFlag("emit_pkgdata", "vardepsexclude", "MULTILIB_VARIANTS")
+ d.setVarFlag("write_specfile", "vardepsexclude", "MULTILIBS")
elif bb.data.inherits_class('packagegroup', d) and not bb.data.inherits_class('nativesdk', d):
bb.error("Please ensure recipe %s sets PACKAGE_ARCH before inherit packagegroup" % d.getVar("FILE", True))
}
diff --git a/import-layers/yocto-poky/meta/classes/archiver.bbclass b/import-layers/yocto-poky/meta/classes/archiver.bbclass
index 2f3b278fb..9239983e8 100644
--- a/import-layers/yocto-poky/meta/classes/archiver.bbclass
+++ b/import-layers/yocto-poky/meta/classes/archiver.bbclass
@@ -132,7 +132,26 @@ python do_ar_original() {
ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
bb.note('Archiving the original source...')
- fetch = bb.fetch2.Fetch([], d)
+ urls = d.getVar("SRC_URI", True).split()
+ # destsuffix (git fetcher) and subdir (everything else) are allowed to be
+ # absolute paths (for example, destsuffix=${S}/foobar).
+ # That messes with unpacking inside our tmpdir below, because the fetchers
+ # will then unpack in that directory and completely ignore the tmpdir.
+ # That breaks parallel tasks relying on ${S}, like do_compile.
+ #
+ # To solve this, we remove these parameters from all URLs.
+ # We do this even for relative paths because it makes the content of the
+ # archives more useful (no extra paths that are only used during
+ # compilation).
+ for i, url in enumerate(urls):
+ decoded = bb.fetch2.decodeurl(url)
+ for param in ('destsuffix', 'subdir'):
+ if param in decoded[5]:
+ del decoded[5][param]
+ encoded = bb.fetch2.encodeurl(decoded)
+ urls[i] = encoded
+ fetch = bb.fetch2.Fetch(urls, d)
+ tarball_suffix = {}
for url in fetch.urls:
local = fetch.localpath(url).rstrip("/");
if os.path.isfile(local):
@@ -140,7 +159,21 @@ python do_ar_original() {
elif os.path.isdir(local):
tmpdir = tempfile.mkdtemp(dir=d.getVar('ARCHIVER_WORKDIR', True))
fetch.unpack(tmpdir, (url,))
- create_tarball(d, tmpdir + '/.', '', ar_outdir)
+ # To handle recipes with more than one source, we add the "name"
+ # URL parameter as suffix. We treat it as an error when
+ # there's more than one URL without a name, or a name gets reused.
+ # This is an additional safety net, in practice the name has
+ # to be set when using the git fetcher, otherwise SRCREV cannot
+ # be set separately for each URL.
+ params = bb.fetch2.decodeurl(url)[5]
+ name = params.get('name', '')
+ if name in tarball_suffix:
+ if not name:
+ bb.fatal("Cannot determine archive names for original source because 'name' URL parameter is unset in more than one URL. Add it to at least one of these: %s %s" % (tarball_suffix[name], url))
+ else:
+ bb.fatal("Cannot determine archive names for original source because 'name=' URL parameter '%s' is used twice. Make it unique in: %s %s" % (tarball_suffix[name], url))
+ tarball_suffix[name] = url
+ create_tarball(d, tmpdir + '/.', name, ar_outdir)
# Emit patch series files for 'original'
bb.note('Writing patch series files...')
@@ -270,9 +303,10 @@ python do_unpack_and_patch() {
return
ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
ar_workdir = d.getVar('ARCHIVER_WORKDIR', True)
+ pn = d.getVar('PN', True)
# The kernel class functions require it to be on work-shared, so we dont change WORKDIR
- if not bb.data.inherits_class('kernel-yocto', d):
+ if not (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source')):
# Change the WORKDIR to make do_unpack do_patch run in another dir.
d.setVar('WORKDIR', ar_workdir)
@@ -290,7 +324,7 @@ python do_unpack_and_patch() {
oe.path.copytree(src, src_orig)
# Make sure gcc and kernel sources are patched only once
- if not ((d.getVar('SRC_URI', True) == "" or bb.data.inherits_class('kernel-yocto', d))):
+ if not (d.getVar('SRC_URI', True) == "" or (bb.data.inherits_class('kernel-yocto', d) or pn.startswith('gcc-source'))):
bb.build.exec_func('do_patch', d)
# Create the patches
diff --git a/import-layers/yocto-poky/meta/classes/autotools.bbclass b/import-layers/yocto-poky/meta/classes/autotools.bbclass
index 6649f5df7..c43ea9a7e 100644
--- a/import-layers/yocto-poky/meta/classes/autotools.bbclass
+++ b/import-layers/yocto-poky/meta/classes/autotools.bbclass
@@ -19,15 +19,13 @@ def autotools_dep_prepend(d):
return deps + 'gnu-config-native '
-EXTRA_OEMAKE = ""
-
DEPENDS_prepend = "${@autotools_dep_prepend(d)} "
inherit siteinfo
# Space separated list of shell scripts with variables defined to supply test
# results for autoconf tests we cannot run at build time.
-export CONFIG_SITE = "${@siteinfo_get_files(d, False)}"
+export CONFIG_SITE = "${@siteinfo_get_files(d)}"
acpaths = "default"
EXTRA_AUTORECONF = "--exclude=autopoint"
@@ -77,6 +75,8 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
${@append_libtool_sysroot(d)}"
CONFIGUREOPT_DEPTRACK ?= "--disable-dependency-tracking"
+CACHED_CONFIGUREVARS ?= ""
+
AUTOTOOLS_SCRIPT_PATH ?= "${S}"
CONFIGURE_SCRIPT ?= "${AUTOTOOLS_SCRIPT_PATH}/configure"
@@ -85,7 +85,7 @@ AUTOTOOLS_AUXDIR ?= "${AUTOTOOLS_SCRIPT_PATH}"
oe_runconf () {
# Use relative path to avoid buildpaths in files
cfgscript_name="`basename ${CONFIGURE_SCRIPT}`"
- cfgscript=`python -c "import os; print os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.')"`/$cfgscript_name
+ cfgscript=`python3 -c "import os; print(os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.'))"`/$cfgscript_name
if [ -x "$cfgscript" ] ; then
bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
@@ -129,12 +129,16 @@ autotools_postconfigure(){
EXTRACONFFUNCS ??= ""
+EXTRA_OECONF_append = " ${PACKAGECONFIG_CONFARGS}"
+
do_configure[prefuncs] += "autotools_preconfigure autotools_copy_aclocals ${EXTRACONFFUNCS}"
do_configure[postfuncs] += "autotools_postconfigure"
-ACLOCALDIR = "${B}/aclocal-copy"
+ACLOCALDIR = "${WORKDIR}/aclocal-copy"
python autotools_copy_aclocals () {
+ import copy
+
s = d.getVar("AUTOTOOLS_SCRIPT_PATH", True)
if not os.path.exists(s + "/configure.in") and not os.path.exists(s + "/configure.ac"):
if not d.getVar("AUTOTOOLS_COPYACLOCAL", False):
@@ -163,36 +167,63 @@ python autotools_copy_aclocals () {
if start is None:
bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
- # We need to find configure tasks which are either from <target> -> <target>
- # or <native> -> <native> but not <target> -> <native> unless they're direct
- # dependencies. This mirrors what would get restored from sstate.
- done = [start]
- next = [start]
+ # We need to figure out which m4 files we need to expose to this do_configure task.
+ # This needs to match what would get restored from sstate, which is controlled
+ # ultimately by calls from bitbake to setscene_depvalid().
+ # That function expects a setscene dependency tree. We build a dependency tree
+ # condensed to do_populate_sysroot -> do_populate_sysroot dependencies, similar to
+ # that used by setscene tasks. We can then call into setscene_depvalid() and decide
+ # which dependencies we can "see" and should expose the m4 files for.
+ setscenedeps = copy.deepcopy(taskdepdata)
+
+ start = set([start])
+
+ # Create collapsed do_populate_sysroot -> do_populate_sysroot tree
+ for dep in taskdepdata:
+ data = setscenedeps[dep]
+ if data[1] != "do_populate_sysroot":
+ for dep2 in setscenedeps:
+ data2 = setscenedeps[dep2]
+ if dep in data2[3]:
+ data2[3].update(setscenedeps[dep][3])
+ data2[3].remove(dep)
+ if dep in start:
+ start.update(setscenedeps[dep][3])
+ start.remove(dep)
+ del setscenedeps[dep]
+
+ # Remove circular references
+ for dep in setscenedeps:
+ if dep in setscenedeps[dep][3]:
+ setscenedeps[dep][3].remove(dep)
+
+ # Direct dependencies should be present and can be depended upon
+ for dep in start:
+ configuredeps.append(setscenedeps[dep][0])
+
+ # Call into setscene_depvalid for each sub-dependency and only copy m4 files
+ # for ones that would be restored from sstate.
+ done = list(start)
+ next = list(start)
while next:
new = []
for dep in next:
- data = taskdepdata[dep]
+ data = setscenedeps[dep]
for datadep in data[3]:
if datadep in done:
continue
- if (not data[0].endswith("-native")) and taskdepdata[datadep][0].endswith("-native") and dep != start:
+ taskdeps = {}
+ taskdeps[dep] = setscenedeps[dep][:2]
+ taskdeps[datadep] = setscenedeps[datadep][:2]
+ retval = setscene_depvalid(datadep, taskdeps, [], d)
+ if retval:
+ bb.note("Skipping setscene dependency %s for m4 macro copying" % datadep)
continue
done.append(datadep)
new.append(datadep)
- if taskdepdata[datadep][1] == "do_configure":
- configuredeps.append(taskdepdata[datadep][0])
+ configuredeps.append(setscenedeps[datadep][0])
next = new
- #configuredeps2 = []
- #for dep in taskdepdata:
- # data = taskdepdata[dep]
- # if data[1] == "do_configure" and data[0] != pn:
- # configuredeps2.append(data[0])
- #configuredeps.sort()
- #configuredeps2.sort()
- #bb.warn(str(configuredeps))
- #bb.warn(str(configuredeps2))
-
cp = []
if nodeps:
bb.warn("autotools: Unable to find task dependencies, -b being used? Pulling in all m4 files")
@@ -222,11 +253,14 @@ python autotools_copy_aclocals () {
t = os.path.join(aclocaldir, os.path.basename(c))
if not os.path.exists(t):
os.symlink(c, t)
-
- d.setVar("CONFIG_SITE", siteinfo_get_files(d, False))
+
+ # Refresh variable with cache files
+ d.setVar("CONFIG_SITE", siteinfo_get_files(d, aclocalcache=True))
}
autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
+CONFIGURE_FILES = "${S}/configure.in ${S}/configure.ac ${S}/config.h.in ${S}/acinclude.m4 Makefile.am"
+
autotools_do_configure() {
# WARNING: gross hack follows:
# An autotools built package generally needs these scripts, however only
@@ -236,6 +270,9 @@ autotools_do_configure() {
# for a package whose autotools are old, on an x86_64 machine, which the old
# config.sub does not support. Work around this by installing them manually
# regardless.
+
+ PRUNE_M4=""
+
for ac in `find ${S} -ignore_readdir_race -name configure.in -o -name configure.ac`; do
rm -f `dirname $ac`/configure
done
@@ -246,7 +283,7 @@ autotools_do_configure() {
if [ x"${acpaths}" = xdefault ]; then
acpaths=
for i in `find ${AUTOTOOLS_SCRIPT_PATH} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
- grep -v 'acinclude.m4' | grep -v 'aclocal-copy' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
+ grep -v 'acinclude.m4' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
acpaths="$acpaths -I $i"
done
else
@@ -285,17 +322,22 @@ autotools_do_configure() {
cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/
fi
fi
- for i in gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4; do
- for j in `find ${S} -ignore_readdir_race -name $i | grep -v aclocal-copy`; do
- rm $j
- done
- done
+ PRUNE_M4="$PRUNE_M4 gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4"
fi
mkdir -p m4
if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
+ if ! echo "${DEPENDS}" | grep -q intltool-native; then
+ bbwarn "Missing DEPENDS on intltool-native"
+ fi
+ PRUNE_M4="$PRUNE_M4 intltool.m4"
bbnote Executing intltoolize --copy --force --automake
intltoolize --copy --force --automake
fi
+
+ for i in $PRUNE_M4; do
+ find ${S} -ignore_readdir_race -name $i -delete
+ done
+
bbnote Executing ACLOCAL=\"$ACLOCAL\" autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
cd $olddir
@@ -307,6 +349,10 @@ autotools_do_configure() {
fi
}
+autotools_do_compile() {
+ oe_runmake
+}
+
autotools_do_install() {
oe_runmake 'DESTDIR=${D}' install
# Info dir listing isn't interesting at this point so remove it if it exists.
@@ -317,6 +363,6 @@ autotools_do_install() {
inherit siteconfig
-EXPORT_FUNCTIONS do_configure do_install
+EXPORT_FUNCTIONS do_configure do_compile do_install
B = "${WORKDIR}/build"
diff --git a/import-layers/yocto-poky/meta/classes/base.bbclass b/import-layers/yocto-poky/meta/classes/base.bbclass
index a7ca3a667..024fe4331 100644
--- a/import-layers/yocto-poky/meta/classes/base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/base.bbclass
@@ -10,7 +10,7 @@ inherit utility-tasks
inherit metadata_scm
inherit logging
-OE_IMPORTS += "os sys time oe.path oe.utils oe.data oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath"
+OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath"
OE_IMPORTS[type] = "list"
def oe_import(d):
@@ -105,12 +105,15 @@ def get_lic_checksum_file_list(d):
# any others should be covered by SRC_URI.
try:
path = bb.fetch.decodeurl(url)[2]
+ if not path:
+ raise bb.fetch.MalformedUrl(url)
+
if path[0] == '/':
if path.startswith(tmpdir):
continue
filelist.append(path + ":" + str(os.path.exists(path)))
except bb.fetch.MalformedUrl:
- raise bb.build.FuncFailed(d.getVar('PN', True) + ": LIC_FILES_CHKSUM contains an invalid URL: " + url)
+ bb.fatal(d.getVar('PN', True) + ": LIC_FILES_CHKSUM contains an invalid URL: " + url)
return " ".join(filelist)
addtask fetch
@@ -128,30 +131,28 @@ python base_do_fetch() {
fetcher = bb.fetch2.Fetch(src_uri, d)
fetcher.download()
except bb.fetch2.BBFetchException as e:
- raise bb.build.FuncFailed(e)
+ bb.fatal(str(e))
}
addtask unpack after do_fetch
do_unpack[dirs] = "${WORKDIR}"
+
+python () {
+ if d.getVar('S', True) != d.getVar('WORKDIR', True):
+ d.setVarFlag('do_unpack', 'cleandirs', '${S}')
+ else:
+ d.setVarFlag('do_unpack', 'cleandirs', os.path.join('${S}', 'patches'))
+}
python base_do_unpack() {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
- rootdir = d.getVar('WORKDIR', True)
-
- # Ensure that we cleanup ${S}/patches
- # TODO: Investigate if we can remove
- # the entire ${S} in this case.
- s_dir = d.getVar('S', True)
- p_dir = os.path.join(s_dir, 'patches')
- bb.utils.remove(p_dir, True)
-
try:
fetcher = bb.fetch2.Fetch(src_uri, d)
- fetcher.unpack(rootdir)
+ fetcher.unpack(d.getVar('WORKDIR', True))
except bb.fetch2.BBFetchException as e:
- raise bb.build.FuncFailed(e)
+ bb.fatal(str(e))
}
def pkgarch_mapping(d):
@@ -308,7 +309,7 @@ base_do_compile() {
}
addtask install after do_compile
-do_install[dirs] = "${D} ${B}"
+do_install[dirs] = "${B}"
# Remove and re-create ${D} so that is it guaranteed to be empty
do_install[cleandirs] = "${D}"
@@ -430,12 +431,6 @@ python () {
appendVar('RDEPENDS_${PN}', extrardeps)
appendVar('PACKAGECONFIG_CONFARGS', extraconf)
- # TODO: once all recipes/classes abusing EXTRA_OECONF
- # to get PACKAGECONFIG options are fixed to use PACKAGECONFIG_CONFARGS
- # move this appendVar to autotools.bbclass.
- if not bb.data.inherits_class('cmake', d):
- appendVar('EXTRA_OECONF', extraconf)
-
pn = d.getVar('PN', True)
license = d.getVar('LICENSE', True)
if license == "INVALID":
@@ -477,7 +472,7 @@ python () {
else:
raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE', True))
- source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', 0)
+ source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False)
if not source_mirror_fetch:
need_host = d.getVar('COMPATIBLE_HOST', True)
if need_host:
@@ -490,7 +485,7 @@ python () {
check_license = False if pn.startswith("nativesdk-") else True
for t in ["-native", "-cross-${TARGET_ARCH}", "-cross-initial-${TARGET_ARCH}",
- "-crosssdk-${SDK_ARCH}", "-crosssdk-initial-${SDK_ARCH}",
+ "-crosssdk-${SDK_SYS}", "-crosssdk-initial-${SDK_SYS}",
"-cross-canadian-${TRANSLATED_TARGET_ARCH}"]:
if pn.endswith(d.expand(t)):
check_license = False
@@ -542,6 +537,19 @@ python () {
if pn in incompatwl:
bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted")
+ # Try to verify per-package (LICENSE_<pkg>) values. LICENSE should be a
+ # superset of all per-package licenses. We do not do advanced (pattern)
+ # matching of license expressions - just check that all license strings
+ # in LICENSE_<pkg> are found in LICENSE.
+ license_set = oe.license.list_licenses(license)
+ for pkg in d.getVar('PACKAGES', True).split():
+ pkg_license = d.getVar('LICENSE_' + pkg, True)
+ if pkg_license:
+ unlisted = oe.license.list_licenses(pkg_license) - license_set
+ if unlisted:
+ bb.warn("LICENSE_%s includes licenses (%s) that are not "
+ "listed in LICENSE" % (pkg, ' '.join(unlisted)))
+
needsrcrev = False
srcuri = d.getVar('SRC_URI', True)
for uri in srcuri.split():
@@ -566,6 +574,10 @@ python () {
needsrcrev = True
d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot')
+ # Perforce packages support SRCREV = "${AUTOREV}"
+ elif scheme == "p4":
+ needsrcrev = True
+
# OSC packages should DEPEND on osc-native
elif scheme == "osc":
d.appendVarFlag('do_fetch', 'depends', ' osc-native:do_populate_sysroot')
@@ -658,8 +670,8 @@ python do_cleanall() {
try:
fetcher = bb.fetch2.Fetch(src_uri, d)
fetcher.clean()
- except bb.fetch2.BBFetchException, e:
- raise bb.build.FuncFailed(e)
+ except bb.fetch2.BBFetchException as e:
+ bb.fatal(str(e))
}
do_cleanall[nostamp] = "1"
diff --git a/import-layers/yocto-poky/meta/classes/bash-completion.bbclass b/import-layers/yocto-poky/meta/classes/bash-completion.bbclass
index 74a878edf..80ee9b487 100644
--- a/import-layers/yocto-poky/meta/classes/bash-completion.bbclass
+++ b/import-layers/yocto-poky/meta/classes/bash-completion.bbclass
@@ -1,3 +1,5 @@
+DEPENDS_append_class-target = " bash-completion"
+
PACKAGES += "${PN}-bash-completion"
FILES_${PN}-bash-completion = "${datadir}/bash-completion ${sysconfdir}/bash_completion.d"
diff --git a/import-layers/yocto-poky/meta/classes/buildhistory.bbclass b/import-layers/yocto-poky/meta/classes/buildhistory.bbclass
index 581d53269..3a5bc2c3e 100644
--- a/import-layers/yocto-poky/meta/classes/buildhistory.bbclass
+++ b/import-layers/yocto-poky/meta/classes/buildhistory.bbclass
@@ -57,6 +57,9 @@ SSTATEPOSTINSTFUNCS[vardepvalueexclude] .= "| buildhistory_emit_pkghistory"
# class.
BUILDHISTORY_PRESERVE = "latest latest_srcrev"
+PATCH_GIT_USER_EMAIL ?= "buildhistory@oe"
+PATCH_GIT_USER_NAME ?= "OpenEmbedded"
+
#
# Write out metadata about this package for comparison when writing future packages
#
@@ -145,7 +148,7 @@ python buildhistory_emit_pkghistory() {
elif name == "RCONFLICTS":
pkginfo.rconflicts = value
elif name == "PKGSIZE":
- pkginfo.size = long(value)
+ pkginfo.size = int(value)
elif name == "FILES":
pkginfo.files = value
elif name == "FILELIST":
@@ -233,7 +236,7 @@ python buildhistory_emit_pkghistory() {
key = item[0]
if key.endswith('_' + pkg):
key = key[:-len(pkg)-1]
- pkgdata[key] = item[1].decode('utf-8').decode('string_escape')
+ pkgdata[key] = item[1]
pkge = pkgdata.get('PKGE', '0')
pkgv = pkgdata['PKGV']
@@ -274,7 +277,7 @@ python buildhistory_emit_pkghistory() {
# Gather information about packaged files
val = pkgdata.get('FILES_INFO', '')
dictval = json.loads(val)
- filelist = dictval.keys()
+ filelist = list(dictval.keys())
filelist.sort()
pkginfo.filelist = " ".join(filelist)
@@ -288,14 +291,12 @@ python buildhistory_emit_pkghistory() {
def write_recipehistory(rcpinfo, d):
- import codecs
-
bb.debug(2, "Writing recipe history")
pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE', True)
infofile = os.path.join(pkghistdir, "latest")
- with codecs.open(infofile, "w", encoding='utf8') as f:
+ with open(infofile, "w") as f:
if rcpinfo.pe != "0":
f.write(u"PE = %s\n" % rcpinfo.pe)
f.write(u"PV = %s\n" % rcpinfo.pv)
@@ -305,8 +306,6 @@ def write_recipehistory(rcpinfo, d):
def write_pkghistory(pkginfo, d):
- import codecs
-
bb.debug(2, "Writing package history for package %s" % pkginfo.name)
pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE', True)
@@ -316,22 +315,20 @@ def write_pkghistory(pkginfo, d):
bb.utils.mkdirhier(pkgpath)
infofile = os.path.join(pkgpath, "latest")
- with codecs.open(infofile, "w", encoding='utf8') as f:
+ with open(infofile, "w") as f:
if pkginfo.pe != "0":
f.write(u"PE = %s\n" % pkginfo.pe)
f.write(u"PV = %s\n" % pkginfo.pv)
f.write(u"PR = %s\n" % pkginfo.pr)
- pkgvars = {}
- pkgvars['PKG'] = pkginfo.pkg if pkginfo.pkg != pkginfo.name else ''
- pkgvars['PKGE'] = pkginfo.pkge if pkginfo.pkge != pkginfo.pe else ''
- pkgvars['PKGV'] = pkginfo.pkgv if pkginfo.pkgv != pkginfo.pv else ''
- pkgvars['PKGR'] = pkginfo.pkgr if pkginfo.pkgr != pkginfo.pr else ''
- for pkgvar in pkgvars:
- val = pkgvars[pkgvar]
- if val:
- f.write(u"%s = %s\n" % (pkgvar, val))
-
+ if pkginfo.pkg != pkginfo.name:
+ f.write(u"PKG = %s\n" % pkginfo.pkg)
+ if pkginfo.pkge != pkginfo.pe:
+ f.write(u"PKGE = %s\n" % pkginfo.pkge)
+ if pkginfo.pkgv != pkginfo.pv:
+ f.write(u"PKGV = %s\n" % pkginfo.pkgv)
+ if pkginfo.pkgr != pkginfo.pr:
+ f.write(u"PKGR = %s\n" % pkginfo.pkgr)
f.write(u"RPROVIDES = %s\n" % pkginfo.rprovides)
f.write(u"RDEPENDS = %s\n" % pkginfo.rdepends)
f.write(u"RRECOMMENDS = %s\n" % pkginfo.rrecommends)
@@ -349,7 +346,7 @@ def write_pkghistory(pkginfo, d):
filevarpath = os.path.join(pkgpath, "latest.%s" % filevar)
val = pkginfo.filevars[filevar]
if val:
- with codecs.open(filevarpath, "w", encoding='utf8') as f:
+ with open(filevarpath, "w") as f:
f.write(val)
else:
if os.path.exists(filevarpath):
@@ -565,11 +562,11 @@ python buildhistory_get_extra_sdkinfo() {
tasksizes[task] = origtotal + fsize
filesizes[fn] = fsize
with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-package-sizes.txt'), 'w') as f:
- filesizes_sorted = sorted(filesizes.items(), key=operator.itemgetter(1), reverse=True)
+ filesizes_sorted = sorted(filesizes.items(), key=operator.itemgetter(1, 0), reverse=True)
for fn, size in filesizes_sorted:
f.write('%10d KiB %s\n' % (size, fn))
with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-task-sizes.txt'), 'w') as f:
- tasksizes_sorted = sorted(tasksizes.items(), key=operator.itemgetter(1), reverse=True)
+ tasksizes_sorted = sorted(tasksizes.items(), key=operator.itemgetter(1, 0), reverse=True)
for task, size in tasksizes_sorted:
f.write('%10d KiB %s\n' % (size, task))
}
@@ -645,7 +642,7 @@ def buildhistory_get_sdkvars(d):
sdkvars = "DISTRO DISTRO_VERSION SDK_NAME SDK_VERSION SDKMACHINE SDKIMAGE_FEATURES BAD_RECOMMENDATIONS NO_RECOMMENDATIONS PACKAGE_EXCLUDE"
if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext':
# Extensible SDK uses some additional variables
- sdkvars += " SDK_LOCAL_CONF_WHITELIST SDK_LOCAL_CONF_BLACKLIST SDK_INHERIT_BLACKLIST SDK_UPDATE_URL SDK_EXT_TYPE SDK_RECRDEP_TASKS"
+ sdkvars += " SDK_LOCAL_CONF_WHITELIST SDK_LOCAL_CONF_BLACKLIST SDK_INHERIT_BLACKLIST SDK_UPDATE_URL SDK_EXT_TYPE SDK_RECRDEP_TASKS SDK_INCLUDE_PKGDATA SDK_INCLUDE_TOOLCHAIN"
listvars = "SDKIMAGE_FEATURES BAD_RECOMMENDATIONS PACKAGE_EXCLUDE SDK_LOCAL_CONF_WHITELIST SDK_LOCAL_CONF_BLACKLIST SDK_INHERIT_BLACKLIST"
return outputvars(sdkvars, listvars, d)
@@ -714,15 +711,9 @@ END
git tag -f build-minus-2 build-minus-1 > /dev/null 2>&1 || true
git tag -f build-minus-1 > /dev/null 2>&1 || true
fi
- # If the user hasn't set up their name/email, set some defaults
- # just for this repo (otherwise the commit will fail with older
- # versions of git)
- if ! git config user.email > /dev/null ; then
- git config --local user.email "buildhistory@${DISTRO}"
- fi
- if ! git config user.name > /dev/null ; then
- git config --local user.name "buildhistory"
- fi
+
+ check_git_config
+
# Check if there are new/changed files to commit (other than metadata-revs)
repostatus=`git status --porcelain | grep -v " metadata-revs$"`
HOSTNAME=`hostname 2>/dev/null || echo unknown`
@@ -842,7 +833,7 @@ python write_srcrev() {
f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev))
f.write('SRCREV_%s = "%s"\n' % (name, srcrev))
else:
- f.write('SRCREV = "%s"\n' % srcrevs.itervalues().next())
+ f.write('SRCREV = "%s"\n' % srcrevs.values())
if len(tag_srcrevs) > 0:
for name, srcrev in tag_srcrevs.items():
f.write('# tag_%s = "%s"\n' % (name, srcrev))
diff --git a/import-layers/yocto-poky/meta/classes/buildstats-summary.bbclass b/import-layers/yocto-poky/meta/classes/buildstats-summary.bbclass
index d73350b94..b86abcc3f 100644
--- a/import-layers/yocto-poky/meta/classes/buildstats-summary.bbclass
+++ b/import-layers/yocto-poky/meta/classes/buildstats-summary.bbclass
@@ -30,7 +30,11 @@ python buildstats_summary () {
header_printed = True
bb.note("Build completion summary:")
- bb.note(" {0}: {1}% sstate reuse ({2} setscene, {3} scratch)".format(t, 100*len(sstate)/(len(sstate)+len(no_sstate)), len(sstate), len(no_sstate)))
+ sstate_count = len(sstate)
+ no_sstate_count = len(no_sstate)
+ total_count = sstate_count + no_sstate_count
+ bb.note(" {0}: {1:.1f}% sstate reuse({2} setscene, {3} scratch)".format(
+ t, round(100 * sstate_count / total_count, 1), sstate_count, no_sstate_count))
}
addhandler buildstats_summary
buildstats_summary[eventmask] = "bb.event.BuildCompleted"
diff --git a/import-layers/yocto-poky/meta/classes/buildstats.bbclass b/import-layers/yocto-poky/meta/classes/buildstats.bbclass
index 34ecb0386..599a21998 100644
--- a/import-layers/yocto-poky/meta/classes/buildstats.bbclass
+++ b/import-layers/yocto-poky/meta/classes/buildstats.bbclass
@@ -163,8 +163,13 @@ python run_buildstats () {
bs = os.path.join(bsdir, "build_stats")
with open(bs, "a") as f:
rootfs = d.getVar('IMAGE_ROOTFS', True)
- rootfs_size = subprocess.Popen(["du", "-sh", rootfs], stdout=subprocess.PIPE).stdout.read()
- f.write("Uncompressed Rootfs size: %s" % rootfs_size)
+ if os.path.isdir(rootfs):
+ try:
+ rootfs_size = subprocess.check_output(["du", "-sh", rootfs],
+ stderr=subprocess.STDOUT).decode('utf-8')
+ f.write("Uncompressed Rootfs size: %s" % rootfs_size)
+ except subprocess.CalledProcessError as err:
+ bb.warn("Failed to get rootfs size: %s" % err.output.decode('utf-8'))
elif isinstance(e, bb.build.TaskFailed):
# Can have a failure before TaskStarted so need to mkdir here too
diff --git a/import-layers/yocto-poky/meta/classes/ccache.bbclass b/import-layers/yocto-poky/meta/classes/ccache.bbclass
index 2cdce4693..2e9837cf0 100644
--- a/import-layers/yocto-poky/meta/classes/ccache.bbclass
+++ b/import-layers/yocto-poky/meta/classes/ccache.bbclass
@@ -4,5 +4,3 @@ CCACHE_DISABLE[unexport] = "1"
do_configure[dirs] =+ "${CCACHE_DIR}"
do_kernel_configme[dirs] =+ "${CCACHE_DIR}"
-
-do_clean[cleandirs] += "${CCACHE_DIR}"
diff --git a/import-layers/yocto-poky/meta/classes/chrpath.bbclass b/import-layers/yocto-poky/meta/classes/chrpath.bbclass
index 9c68855ab..3b5cd37f7 100644
--- a/import-layers/yocto-poky/meta/classes/chrpath.bbclass
+++ b/import-layers/yocto-poky/meta/classes/chrpath.bbclass
@@ -5,15 +5,17 @@ def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d):
import subprocess as sub
p = sub.Popen([cmd, '-l', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
- err, out = p.communicate()
- # If returned successfully, process stderr for results
+ out, err = p.communicate()
+ # If returned successfully, process stdout for results
if p.returncode != 0:
return
+ out = out.decode('utf-8')
+
# Handle RUNPATH as well as RPATH
- err = err.replace("RUNPATH=","RPATH=")
+ out = out.replace("RUNPATH=","RPATH=")
# Throw away everything other than the rpath list
- curr_rpath = err.partition("RPATH=")[2]
+ curr_rpath = out.partition("RPATH=")[2]
#bb.note("Current rpath for %s is %s" % (fpath, curr_rpath.strip()))
rpaths = curr_rpath.split(":")
new_rpaths = []
@@ -37,18 +39,17 @@ def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d):
p = sub.Popen([cmd, '-r', args, fpath],stdout=sub.PIPE,stderr=sub.PIPE)
out, err = p.communicate()
if p.returncode != 0:
- bb.error("%s: chrpath command failed with exit code %d:\n%s%s" % (d.getVar('PN', True), p.returncode, out, err))
- raise bb.build.FuncFailed
+ bb.fatal("%s: chrpath command failed with exit code %d:\n%s%s" % (d.getVar('PN', True), p.returncode, out, err))
def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d):
import subprocess as sub
p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
- err, out = p.communicate()
- # If returned successfully, process stderr for results
+ out, err = p.communicate()
+ # If returned successfully, process stdout for results
if p.returncode != 0:
return
- for l in err.split("\n"):
+ for l in out.split("\n"):
if "(compatibility" not in l:
continue
rpath = l.partition("(compatibility")[0].strip()
@@ -57,7 +58,7 @@ def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d):
newpath = "@loader_path/" + os.path.relpath(rpath, os.path.dirname(fpath.replace(rootdir, "/")))
p = sub.Popen([d.expand("${HOST_PREFIX}install_name_tool"), '-change', rpath, newpath, fpath],stdout=sub.PIPE,stderr=sub.PIPE)
- err, out = p.communicate()
+ out, err = p.communicate()
def process_dir (rootdir, directory, d):
import stat
diff --git a/import-layers/yocto-poky/meta/classes/cmake.bbclass b/import-layers/yocto-poky/meta/classes/cmake.bbclass
index 02f313a86..3e762de6a 100644
--- a/import-layers/yocto-poky/meta/classes/cmake.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cmake.bbclass
@@ -84,6 +84,8 @@ EOF
addtask generate_toolchain_file after do_patch before do_configure
+CONFIGURE_FILES = "CMakeLists.txt"
+
cmake_do_configure() {
if [ "${OECMAKE_BUILDPATH}" ]; then
bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build."
@@ -108,25 +110,27 @@ cmake_do_configure() {
${OECMAKE_SITEFILE} \
${OECMAKE_SOURCEPATH} \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
- -DCMAKE_INSTALL_BINDIR:PATH=${bindir} \
- -DCMAKE_INSTALL_SBINDIR:PATH=${sbindir} \
- -DCMAKE_INSTALL_LIBEXECDIR:PATH=${libexecdir} \
+ -DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir', True), d.getVar('prefix', True))} \
+ -DCMAKE_INSTALL_SBINDIR:PATH=${@os.path.relpath(d.getVar('sbindir', True), d.getVar('prefix', True))} \
+ -DCMAKE_INSTALL_LIBEXECDIR:PATH=${@os.path.relpath(d.getVar('libexecdir', True), d.getVar('prefix', True))} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \
- -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${sharedstatedir} \
+ -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${@os.path.relpath(d.getVar('sharedstatedir', True), d. getVar('prefix', True))} \
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \
- -DCMAKE_INSTALL_LIBDIR:PATH=${libdir} \
- -DCMAKE_INSTALL_INCLUDEDIR:PATH=${includedir} \
- -DCMAKE_INSTALL_DATAROOTDIR:PATH=${datadir} \
+ -DCMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir', True), d.getVar('prefix', True))} \
+ -DCMAKE_INSTALL_INCLUDEDIR:PATH=${@os.path.relpath(d.getVar('includedir', True), d.getVar('prefix', True))} \
+ -DCMAKE_INSTALL_DATAROOTDIR:PATH=${@os.path.relpath(d.getVar('datadir', True), d.getVar('prefix', True))} \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
-DCMAKE_VERBOSE_MAKEFILE=1 \
+ -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \
${EXTRA_OECMAKE} \
-Wno-dev
}
+do_compile[progress] = "percent"
cmake_do_compile() {
cd ${B}
- base_do_compile
+ base_do_compile VERBOSE=1
}
cmake_do_install() {
diff --git a/import-layers/yocto-poky/meta/classes/cml1.bbclass b/import-layers/yocto-poky/meta/classes/cml1.bbclass
index b5dc028a2..583480626 100644
--- a/import-layers/yocto-poky/meta/classes/cml1.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cml1.bbclass
@@ -42,6 +42,7 @@ python do_menuconfig() {
}
do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
do_menuconfig[nostamp] = "1"
+do_menuconfig[dirs] = "${B}"
addtask menuconfig after do_configure
python do_diffconfig() {
@@ -73,4 +74,5 @@ python do_diffconfig() {
}
do_diffconfig[nostamp] = "1"
+do_diffconfig[dirs] = "${B}"
addtask diffconfig
diff --git a/import-layers/yocto-poky/meta/classes/core-image.bbclass b/import-layers/yocto-poky/meta/classes/core-image.bbclass
index 705cad8d9..8431440db 100644
--- a/import-layers/yocto-poky/meta/classes/core-image.bbclass
+++ b/import-layers/yocto-poky/meta/classes/core-image.bbclass
@@ -2,9 +2,6 @@
#
# Copyright (C) 2007-2011 Linux Foundation
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
# IMAGE_FEATURES control content of the core reference images
#
# By default we install packagegroup-core-boot and packagegroup-base-extended packages;
diff --git a/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass b/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass
index e07b1bdb6..21921b3dd 100644
--- a/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cross-canadian.bbclass
@@ -15,7 +15,8 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
#
PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}"
-CANADIANEXTRAOS = "linux-uclibc linux-musl"
+BASECANADIANEXTRAOS ?= "linux-uclibc linux-musl"
+CANADIANEXTRAOS = "${BASECANADIANEXTRAOS}"
CANADIANEXTRAVENDOR = ""
MODIFYTOS ??= "1"
python () {
@@ -34,8 +35,13 @@ python () {
tos = d.getVar("TARGET_OS", True)
whitelist = []
+ extralibcs = [""]
+ if "uclibc" in d.getVar("BASECANADIANEXTRAOS", True):
+ extralibcs.append("uclibc")
+ if "musl" in d.getVar("BASECANADIANEXTRAOS", True):
+ extralibcs.append("musl")
for variant in ["", "spe", "x32", "eabi", "n32"]:
- for libc in ["", "uclibc", "musl"]:
+ for libc in extralibcs:
entry = "linux"
if variant and libc:
entry = entry + "-" + libc + variant
@@ -59,15 +65,22 @@ python () {
if tarch == "x86_64":
d.setVar("LIBCEXTENSION", "")
d.setVar("ABIEXTENSION", "")
- d.appendVar("CANADIANEXTRAOS", " linux-gnux32 linux-uclibcx32 linux-muslx32")
+ d.appendVar("CANADIANEXTRAOS", " linux-gnux32")
+ for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
+ d.appendVar("CANADIANEXTRAOS", " " + extraos + "x32")
elif tarch == "powerpc":
# PowerPC can build "linux" and "linux-gnuspe"
d.setVar("LIBCEXTENSION", "")
d.setVar("ABIEXTENSION", "")
- d.appendVar("CANADIANEXTRAOS", " linux-gnuspe linux-uclibcspe linux-muslspe")
+ d.appendVar("CANADIANEXTRAOS", " linux-gnuspe")
+ for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
+ d.appendVar("CANADIANEXTRAOS", " " + extraos + "spe")
elif tarch == "mips64":
- d.appendVar("CANADIANEXTRAOS", " linux-gnun32 linux-uclibcn32 linux-musln32")
+ d.appendVar("CANADIANEXTRAOS", " linux-gnun32")
+ for extraos in d.getVar("BASECANADIANEXTRAOS", True).split():
+ d.appendVar("CANADIANEXTRAOS", " " + extraos + "n32")
if tarch == "arm" or tarch == "armeb":
+ d.appendVar("CANADIANEXTRAOS", " linux-gnueabi linux-musleabi linux-uclibceabi")
d.setVar("TARGET_OS", "linux-gnueabi")
else:
d.setVar("TARGET_OS", "linux")
diff --git a/import-layers/yocto-poky/meta/classes/cross.bbclass b/import-layers/yocto-poky/meta/classes/cross.bbclass
index 81d1c9d85..01b09337a 100644
--- a/import-layers/yocto-poky/meta/classes/cross.bbclass
+++ b/import-layers/yocto-poky/meta/classes/cross.bbclass
@@ -17,6 +17,8 @@ HOST_CC_ARCH = "${BUILD_CC_ARCH}"
HOST_LD_ARCH = "${BUILD_LD_ARCH}"
HOST_AS_ARCH = "${BUILD_AS_ARCH}"
+export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir} /lib /lib64 /usr/lib /usr/lib64"
+
STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
PACKAGE_ARCH = "${BUILD_ARCH}"
@@ -68,4 +70,16 @@ do_install () {
USE_NLS = "no"
+export CC = "${BUILD_CC}"
+export CXX = "${BUILD_CXX}"
+export FC = "${BUILD_FC}"
+export CPP = "${BUILD_CPP}"
+export LD = "${BUILD_LD}"
+export CCLD = "${BUILD_CCLD}"
+export AR = "${BUILD_AR}"
+export AS = "${BUILD_AS}"
+export RANLIB = "${BUILD_RANLIB}"
+export STRIP = "${BUILD_STRIP}"
+export NM = "${BUILD_NM}"
+
inherit nopackages
diff --git a/import-layers/yocto-poky/meta/classes/cve-check.bbclass b/import-layers/yocto-poky/meta/classes/cve-check.bbclass
new file mode 100644
index 000000000..1425a4055
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/cve-check.bbclass
@@ -0,0 +1,265 @@
+# This class is used to check recipes against public CVEs.
+#
+# In order to use this class just inherit the class in the
+# local.conf file and it will add the cve_check task for
+# every recipe. The task can be used per recipe, per image,
+# or using the special cases "world" and "universe". The
+# cve_check task will print a warning for every unpatched
+# CVE found and generate a file in the recipe WORKDIR/cve
+# directory. If an image is build it will generate a report
+# in DEPLOY_DIR_IMAGE for all the packages used.
+#
+# Example:
+# bitbake -c cve_check openssl
+# bitbake core-image-sato
+# bitbake -k -c cve_check universe
+#
+# DISCLAIMER
+#
+# This class/tool is meant to be used as support and not
+# the only method to check against CVEs. Running this tool
+# doesn't guarantee your packages are free of CVEs.
+
+CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
+CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvd.db"
+
+CVE_CHECK_LOCAL_DIR ?= "${WORKDIR}/cve"
+CVE_CHECK_LOCAL_FILE ?= "${CVE_CHECK_LOCAL_DIR}/cve.log"
+CVE_CHECK_TMP_FILE ?= "${TMPDIR}/cve_check"
+
+CVE_CHECK_DIR ??= "${DEPLOY_DIR}/cve"
+CVE_CHECK_MANIFEST ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cve"
+CVE_CHECK_COPY_FILES ??= "1"
+CVE_CHECK_CREATE_MANIFEST ??= "1"
+
+# Whitelist for packages (PN)
+CVE_CHECK_PN_WHITELIST = "\
+ glibc-locale \
+"
+
+# Whitelist for CVE and version of package
+CVE_CHECK_CVE_WHITELIST = "{\
+ 'CVE-2014-2524': ('6.3',), \
+}"
+
+python do_cve_check () {
+ """
+ Check recipe for patched and unpatched CVEs
+ """
+
+ if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE", True)):
+ patched_cves = get_patches_cves(d)
+ patched, unpatched = check_cves(d, patched_cves)
+ if patched or unpatched:
+ cve_data = get_cve_info(d, patched + unpatched)
+ cve_write_data(d, patched, unpatched, cve_data)
+ else:
+ bb.note("Failed to update CVE database, skipping CVE check")
+}
+
+addtask cve_check after do_unpack before do_build
+do_cve_check[depends] = "cve-check-tool-native:do_populate_cve_db"
+do_cve_check[nostamp] = "1"
+
+python cve_check_cleanup () {
+ """
+ Delete the file used to gather all the CVE information.
+ """
+
+ bb.utils.remove(e.data.getVar("CVE_CHECK_TMP_FILE", True))
+}
+
+addhandler cve_check_cleanup
+cve_check_cleanup[eventmask] = "bb.cooker.CookerExit"
+
+python cve_check_write_rootfs_manifest () {
+ """
+ Create CVE manifest when building an image
+ """
+
+ import shutil
+
+ if os.path.exists(d.getVar("CVE_CHECK_TMP_FILE", True)):
+ bb.note("Writing rootfs CVE manifest")
+ deploy_dir = d.getVar("DEPLOY_DIR_IMAGE", True)
+ link_name = d.getVar("IMAGE_LINK_NAME", True)
+ manifest_name = d.getVar("CVE_CHECK_MANIFEST", True)
+ cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE", True)
+
+ shutil.copyfile(cve_tmp_file, manifest_name)
+
+ if manifest_name and os.path.exists(manifest_name):
+ manifest_link = os.path.join(deploy_dir, "%s.cve" % link_name)
+ # If we already have another manifest, update symlinks
+ if os.path.exists(os.path.realpath(manifest_link)):
+ os.remove(manifest_link)
+ os.symlink(os.path.basename(manifest_name), manifest_link)
+ bb.plain("Image CVE report stored in: %s" % manifest_name)
+}
+
+ROOTFS_POSTPROCESS_COMMAND_prepend = "${@'cve_check_write_rootfs_manifest; ' if d.getVar('CVE_CHECK_CREATE_MANIFEST', True) == '1' else ''}"
+
+def get_patches_cves(d):
+ """
+ Get patches that solve CVEs using the "CVE: " tag.
+ """
+
+ import re
+
+ pn = d.getVar("PN", True)
+ cve_match = re.compile("CVE:( CVE\-\d{4}\-\d+)+")
+ patched_cves = set()
+ bb.debug(2, "Looking for patches that solves CVEs for %s" % pn)
+ for url in src_patches(d):
+ patch_file = bb.fetch.decodeurl(url)[2]
+ with open(patch_file, "r", encoding="utf-8") as f:
+ try:
+ patch_text = f.read()
+ except UnicodeDecodeError:
+ bb.debug(1, "Failed to read patch %s using UTF-8 encoding"
+ " trying with iso8859-1" % patch_file)
+ f.close()
+ with open(patch_file, "r", encoding="iso8859-1") as f:
+ patch_text = f.read()
+
+ # Search for the "CVE: " line
+ match = cve_match.search(patch_text)
+ if match:
+ # Get only the CVEs without the "CVE: " tag
+ cves = patch_text[match.start()+5:match.end()]
+ for cve in cves.split():
+ bb.debug(2, "Patch %s solves %s" % (patch_file, cve))
+ patched_cves.add(cve)
+ else:
+ bb.debug(2, "Patch %s doesn't solve CVEs" % patch_file)
+
+ return patched_cves
+
+def check_cves(d, patched_cves):
+ """
+ Run cve-check-tool looking for patched and unpatched CVEs.
+ """
+
+ import ast, csv, tempfile, subprocess, io
+
+ cves_patched = []
+ cves_unpatched = []
+ bpn = d.getVar("BPN", True)
+ pv = d.getVar("PV", True).split("git+")[0]
+ cves = " ".join(patched_cves)
+ cve_db_dir = d.getVar("CVE_CHECK_DB_DIR", True)
+ cve_whitelist = ast.literal_eval(d.getVar("CVE_CHECK_CVE_WHITELIST", True))
+ cve_cmd = "cve-check-tool"
+ cmd = [cve_cmd, "--no-html", "--csv", "--not-affected", "-t", "faux", "-d", cve_db_dir]
+
+ # If the recipe has been whitlisted we return empty lists
+ if d.getVar("PN", True) in d.getVar("CVE_CHECK_PN_WHITELIST", True).split():
+ bb.note("Recipe has been whitelisted, skipping check")
+ return ([], [])
+
+ # It is needed to export the proxies to download the database using HTTP
+ bb.utils.export_proxies(d)
+
+ try:
+ # Write the faux CSV file to be used with cve-check-tool
+ fd, faux = tempfile.mkstemp(prefix="cve-faux-")
+ with os.fdopen(fd, "w") as f:
+ f.write("%s,%s,%s," % (bpn, pv, cves))
+ cmd.append(faux)
+
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
+ bb.debug(2, "Output of command %s:\n%s" % ("\n".join(cmd), output))
+ except subprocess.CalledProcessError as e:
+ bb.warn("Couldn't check for CVEs: %s (output %s)" % (e, e.output))
+ finally:
+ os.remove(faux)
+
+ for row in csv.reader(io.StringIO(output)):
+ # Third row has the unpatched CVEs
+ if row[2]:
+ for cve in row[2].split():
+ # Skip if the CVE has been whitlisted for the current version
+ if pv in cve_whitelist.get(cve,[]):
+ bb.note("%s-%s has been whitelisted for %s" % (bpn, pv, cve))
+ else:
+ cves_unpatched.append(cve)
+ bb.debug(2, "%s-%s is not patched for %s" % (bpn, pv, cve))
+ # Fourth row has patched CVEs
+ if row[3]:
+ for cve in row[3].split():
+ cves_patched.append(cve)
+ bb.debug(2, "%s-%s is patched for %s" % (bpn, pv, cve))
+
+ return (cves_patched, cves_unpatched)
+
+def get_cve_info(d, cves):
+ """
+ Get CVE information from the database used by cve-check-tool.
+
+ Unfortunately the only way to get CVE info is set the output to
+ html (hard to parse) or query directly the database.
+ """
+
+ try:
+ import sqlite3
+ except ImportError:
+ from pysqlite2 import dbapi2 as sqlite3
+
+ cve_data = {}
+ db_file = d.getVar("CVE_CHECK_DB_FILE", True)
+ placeholder = ",".join("?" * len(cves))
+ query = "SELECT * FROM NVD WHERE id IN (%s)" % placeholder
+ conn = sqlite3.connect(db_file)
+ cur = conn.cursor()
+ for row in cur.execute(query, tuple(cves)):
+ cve_data[row[0]] = {}
+ cve_data[row[0]]["summary"] = row[1]
+ cve_data[row[0]]["score"] = row[2]
+ cve_data[row[0]]["modified"] = row[3]
+ cve_data[row[0]]["vector"] = row[4]
+ conn.close()
+
+ return cve_data
+
+def cve_write_data(d, patched, unpatched, cve_data):
+ """
+ Write CVE information in WORKDIR; and to CVE_CHECK_DIR, and
+ CVE manifest if enabled.
+ """
+
+ cve_file = d.getVar("CVE_CHECK_LOCAL_FILE", True)
+ nvd_link = "https://web.nvd.nist.gov/view/vuln/detail?vulnId="
+ write_string = ""
+ first_alert = True
+ bb.utils.mkdirhier(d.getVar("CVE_CHECK_LOCAL_DIR", True))
+
+ for cve in sorted(cve_data):
+ write_string += "PACKAGE NAME: %s\n" % d.getVar("PN", True)
+ write_string += "PACKAGE VERSION: %s\n" % d.getVar("PV", True)
+ write_string += "CVE: %s\n" % cve
+ if cve in patched:
+ write_string += "CVE STATUS: Patched\n"
+ else:
+ write_string += "CVE STATUS: Unpatched\n"
+ if first_alert:
+ bb.warn("Found unpatched CVE, for more information check %s" % cve_file)
+ first_alert = False
+ write_string += "CVE SUMMARY: %s\n" % cve_data[cve]["summary"]
+ write_string += "CVSS v2 BASE SCORE: %s\n" % cve_data[cve]["score"]
+ write_string += "VECTOR: %s\n" % cve_data[cve]["vector"]
+ write_string += "MORE INFORMATION: %s%s\n\n" % (nvd_link, cve)
+
+ with open(cve_file, "w") as f:
+ bb.note("Writing file %s with CVE information" % cve_file)
+ f.write(write_string)
+
+ if d.getVar("CVE_CHECK_COPY_FILES", True) == "1":
+ cve_dir = d.getVar("CVE_CHECK_DIR", True)
+ bb.utils.mkdirhier(cve_dir)
+ deploy_file = os.path.join(cve_dir, d.getVar("PN", True))
+ with open(deploy_file, "w") as f:
+ f.write(write_string)
+
+ if d.getVar("CVE_CHECK_CREATE_MANIFEST", True) == "1":
+ with open(d.getVar("CVE_CHECK_TMP_FILE", True), "a") as f:
+ f.write("%s" % write_string)
diff --git a/import-layers/yocto-poky/meta/classes/devshell.bbclass b/import-layers/yocto-poky/meta/classes/devshell.bbclass
index 341d9c000..be71aff35 100644
--- a/import-layers/yocto-poky/meta/classes/devshell.bbclass
+++ b/import-layers/yocto-poky/meta/classes/devshell.bbclass
@@ -65,9 +65,6 @@ def devpyshell(d):
os.dup2(m, sys.stdout.fileno())
os.dup2(m, sys.stderr.fileno())
- sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
- sys.stdin = os.fdopen(sys.stdin.fileno(), 'r', 0)
-
bb.utils.nonblockingfd(sys.stdout)
bb.utils.nonblockingfd(sys.stderr)
bb.utils.nonblockingfd(sys.stdin)
@@ -93,6 +90,7 @@ def devpyshell(d):
else:
prompt = ps1
sys.stdout.write(prompt)
+ sys.stdout.flush()
# Restore Ctrl+C since bitbake masks this
def signal_handler(signal, frame):
@@ -114,6 +112,7 @@ def devpyshell(d):
continue
except EOFError as e:
sys.stdout.write("\n")
+ sys.stdout.flush()
except (OSError, IOError) as e:
if e.errno == 11:
continue
diff --git a/import-layers/yocto-poky/meta/classes/distrodata.bbclass b/import-layers/yocto-poky/meta/classes/distrodata.bbclass
index 51bfc1e54..fbb7402e0 100644
--- a/import-layers/yocto-poky/meta/classes/distrodata.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distrodata.bbclass
@@ -1,4 +1,3 @@
-include conf/distro/include/package_regex.inc
include conf/distro/include/upstream_tracking.inc
include conf/distro/include/distro_alias.inc
include conf/distro/include/maintainers.inc
diff --git a/import-layers/yocto-poky/meta/classes/distutils-common-base.bbclass b/import-layers/yocto-poky/meta/classes/distutils-common-base.bbclass
index 08511f59c..824a1b68b 100644
--- a/import-layers/yocto-poky/meta/classes/distutils-common-base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distutils-common-base.bbclass
@@ -1,7 +1,3 @@
-inherit python-dir
-
-EXTRA_OEMAKE = ""
-
export STAGING_INCDIR
export STAGING_LIBDIR
diff --git a/import-layers/yocto-poky/meta/classes/distutils-native-base.bbclass b/import-layers/yocto-poky/meta/classes/distutils-native-base.bbclass
deleted file mode 100644
index 509cb9551..000000000
--- a/import-layers/yocto-poky/meta/classes/distutils-native-base.bbclass
+++ /dev/null
@@ -1,3 +0,0 @@
-inherit distutils-common-base
-
-DEPENDS += "${@["${PYTHON_PN}-native", ""][(d.getVar('PACKAGES', True) == '')]}"
diff --git a/import-layers/yocto-poky/meta/classes/distutils-tools.bbclass b/import-layers/yocto-poky/meta/classes/distutils-tools.bbclass
index 8d9b3f78f..3ef9cc5a7 100644
--- a/import-layers/yocto-poky/meta/classes/distutils-tools.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distutils-tools.bbclass
@@ -8,14 +8,12 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
distutils_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py build_ext execution failed."
}
distutils_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
}
@@ -25,7 +23,6 @@ distutils_stage_all() {
STAGING_LIBDIR=${STAGING_LIBDIR} \
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed."
}
@@ -37,7 +34,6 @@ distutils_do_install() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py install execution failed."
diff --git a/import-layers/yocto-poky/meta/classes/distutils.bbclass b/import-layers/yocto-poky/meta/classes/distutils.bbclass
index da48a2ed5..857572d75 100644
--- a/import-layers/yocto-poky/meta/classes/distutils.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distutils.bbclass
@@ -10,14 +10,12 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
distutils_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py build execution failed."
}
distutils_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
}
@@ -27,7 +25,6 @@ distutils_stage_all() {
STAGING_LIBDIR=${STAGING_LIBDIR} \
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed."
}
@@ -37,7 +34,6 @@ distutils_do_install() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py install execution failed."
diff --git a/import-layers/yocto-poky/meta/classes/distutils3-base.bbclass b/import-layers/yocto-poky/meta/classes/distutils3-base.bbclass
index 2a093d3a8..82ab6a3d1 100644
--- a/import-layers/yocto-poky/meta/classes/distutils3-base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distutils3-base.bbclass
@@ -1,8 +1,5 @@
DEPENDS += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}"
RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
-PYTHON_BASEVERSION = "3.5"
-PYTHON_ABI = "m"
-
inherit distutils-common-base python3native
diff --git a/import-layers/yocto-poky/meta/classes/distutils3-native-base.bbclass b/import-layers/yocto-poky/meta/classes/distutils3-native-base.bbclass
deleted file mode 100644
index db9a1a73c..000000000
--- a/import-layers/yocto-poky/meta/classes/distutils3-native-base.bbclass
+++ /dev/null
@@ -1,4 +0,0 @@
-PYTHON_BASEVERSION = "3.5"
-PYTHON_ABI = "m"
-
-inherit distutils-native-base
diff --git a/import-layers/yocto-poky/meta/classes/distutils3.bbclass b/import-layers/yocto-poky/meta/classes/distutils3.bbclass
index 4f6ca4482..a6720c5b6 100644
--- a/import-layers/yocto-poky/meta/classes/distutils3.bbclass
+++ b/import-layers/yocto-poky/meta/classes/distutils3.bbclass
@@ -9,14 +9,8 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
--install-data=${D}/${datadir}"
distutils3_do_compile() {
- if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
- SYS=${MACHINE}
- else
- SYS=${HOST_SYS}
- fi
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
build ${DISTUTILS_BUILD_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py build_ext execution failed."
@@ -25,28 +19,16 @@ distutils3_do_compile[vardepsexclude] = "MACHINE"
distutils3_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
- if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
- SYS=${MACHINE}
- else
- SYS=${HOST_SYS}
- fi
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
}
distutils3_stage_headers[vardepsexclude] = "MACHINE"
distutils3_stage_all() {
- if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
- SYS=${MACHINE}
- else
- SYS=${HOST_SYS}
- fi
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed."
}
@@ -54,15 +36,9 @@ distutils3_stage_all[vardepsexclude] = "MACHINE"
distutils3_do_install() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
- if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
- SYS=${MACHINE}
- else
- SYS=${HOST_SYS}
- fi
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal_log "${PYTHON_PN} setup.py install execution failed."
diff --git a/import-layers/yocto-poky/meta/classes/externalsrc.bbclass b/import-layers/yocto-poky/meta/classes/externalsrc.bbclass
index da7eb4781..31908c3ca 100644
--- a/import-layers/yocto-poky/meta/classes/externalsrc.bbclass
+++ b/import-layers/yocto-poky/meta/classes/externalsrc.bbclass
@@ -29,6 +29,23 @@ EXTERNALSRC_SYMLINKS ?= "oe-workdir:${WORKDIR} oe-logs:${T}"
python () {
externalsrc = d.getVar('EXTERNALSRC', True)
+
+ # If this is the base recipe and EXTERNALSRC is set for it or any of its
+ # derivatives, then enable BB_DONT_CACHE to force the recipe to always be
+ # re-parsed so that the file-checksums function for do_compile is run every
+ # time.
+ bpn = d.getVar('BPN', True)
+ if bpn == d.getVar('PN', True):
+ classextend = (d.getVar('BBCLASSEXTEND', True) or '').split()
+ if (externalsrc or
+ ('native' in classextend and
+ d.getVar('EXTERNALSRC_pn-%s-native' % bpn, True)) or
+ ('nativesdk' in classextend and
+ d.getVar('EXTERNALSRC_pn-nativesdk-%s' % bpn, True)) or
+ ('cross' in classextend and
+ d.getVar('EXTERNALSRC_pn-%s-cross' % bpn, True))):
+ d.setVar('BB_DONT_CACHE', '1')
+
if externalsrc:
d.setVar('S', externalsrc)
externalsrcbuild = d.getVar('EXTERNALSRC_BUILD', True)
@@ -85,10 +102,8 @@ python () {
d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ")
d.prependVarFlag('do_configure', 'prefuncs', "externalsrc_configure_prefunc ")
- # Force the recipe to be always re-parsed so that the file_checksums
- # function is run every time
- d.setVar('BB_DONT_CACHE', '1')
d.setVarFlag('do_compile', 'file-checksums', '${@srctree_hash_files(d)}')
+ d.setVarFlag('do_configure', 'file-checksums', '${@srctree_configure_hash_files(d)}')
# We don't want the workdir to go away
d.appendVar('RM_WORK_EXCLUDE', ' ' + d.getVar('PN', True))
@@ -145,10 +160,31 @@ def srctree_hash_files(d):
env = os.environ.copy()
env['GIT_INDEX_FILE'] = tmp_index.name
subprocess.check_output(['git', 'add', '.'], cwd=s_dir, env=env)
- sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env)
+ sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env).decode("utf-8")
with open(oe_hash_file, 'w') as fobj:
fobj.write(sha1)
ret = oe_hash_file + ':True'
else:
ret = d.getVar('EXTERNALSRC', True) + '/*:True'
return ret
+
+def srctree_configure_hash_files(d):
+ """
+ Get the list of files that should trigger do_configure to re-execute,
+ based on the value of CONFIGURE_FILES
+ """
+ in_files = (d.getVar('CONFIGURE_FILES', True) or '').split()
+ out_items = []
+ search_files = []
+ for entry in in_files:
+ if entry.startswith('/'):
+ out_items.append('%s:%s' % (entry, os.path.exists(entry)))
+ else:
+ search_files.append(entry)
+ if search_files:
+ s_dir = d.getVar('EXTERNALSRC', True)
+ for root, _, files in os.walk(s_dir):
+ for f in files:
+ if f in search_files:
+ out_items.append('%s:True' % os.path.join(root, f))
+ return ' '.join(out_items)
diff --git a/import-layers/yocto-poky/meta/classes/gobject-introspection-data.bbclass b/import-layers/yocto-poky/meta/classes/gobject-introspection-data.bbclass
index b1bdd268e..2ef684626 100644
--- a/import-layers/yocto-poky/meta/classes/gobject-introspection-data.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gobject-introspection-data.bbclass
@@ -3,7 +3,5 @@
#
# It should be used in recipes to determine whether introspection data should be built,
# so that qemu use can be avoided when necessary.
-GI_DATA_ENABLED = "${@bb.utils.contains('DISTRO_FEATURES', 'gobject-introspection-data', \
+GI_DATA_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'gobject-introspection-data', \
bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}"
-
-
diff --git a/import-layers/yocto-poky/meta/classes/gobject-introspection.bbclass b/import-layers/yocto-poky/meta/classes/gobject-introspection.bbclass
index 2d73e402c..37389cbc8 100644
--- a/import-layers/yocto-poky/meta/classes/gobject-introspection.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gobject-introspection.bbclass
@@ -1,22 +1,28 @@
# Inherit this class in recipes to enable building their introspection files
-# This sets up autoconf-based recipes to build introspection data (or not),
+# python3native is inherited to prevent introspection tools being run with
+# host's python 3 (they need to be run with native python 3)
+#
+# This also sets up autoconf-based recipes to build introspection data (or not),
# depending on distro and machine features (see gobject-introspection-data class).
-inherit gobject-introspection-data
-EXTRA_OECONF_prepend = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} "
+inherit python3native gobject-introspection-data
+EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} "
+
+# When building native recipes, disable introspection, as it is not necessary,
+# pulls in additional dependencies, and makes build times longer
+EXTRA_OECONF_prepend_class-native = "--disable-introspection "
+EXTRA_OECONF_prepend_class-nativesdk = "--disable-introspection "
UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection"
# Generating introspection data depends on a combination of native and target
# introspection tools, and qemu to run the target tools.
-DEPENDS_append = " gobject-introspection gobject-introspection-native qemu-native"
-
-# This is necessary for python scripts to succeed - distutils fails if these
-# are not set
-export BUILD_SYS
-export HOST_SYS
-export STAGING_INCDIR
-export STAGING_LIBDIR
+DEPENDS_append_class-target = " gobject-introspection gobject-introspection-native qemu-native"
+
+# Even though introspection is disabled on -native, gobject-introspection package is still
+# needed for m4 macros.
+DEPENDS_append_class-native = " gobject-introspection-native"
+DEPENDS_append_class-nativesdk = " gobject-introspection-native"
# This is used by introspection tools to find .gir includes
export XDG_DATA_DIRS = "${STAGING_DATADIR}"
diff --git a/import-layers/yocto-poky/meta/classes/grub-efi.bbclass b/import-layers/yocto-poky/meta/classes/grub-efi.bbclass
index 4ce3d2844..17417ba5d 100644
--- a/import-layers/yocto-poky/meta/classes/grub-efi.bbclass
+++ b/import-layers/yocto-poky/meta/classes/grub-efi.bbclass
@@ -45,6 +45,8 @@ efi_populate() {
GRUB_IMAGE="bootx64.efi"
fi
install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
+ EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
+ printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" >${DEST}/startup.nsh
install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
}
@@ -57,7 +59,7 @@ efi_iso_populate() {
cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
cp $iso_dir/vmlinuz ${EFIIMGDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
- echo "fs0:${EFIPATH}\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh
+ printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh
if [ -f "$iso_dir/initrd" ] ; then
cp $iso_dir/initrd ${EFIIMGDIR}
fi
@@ -88,12 +90,12 @@ python build_efi_cfg() {
cfile = d.getVar('GRUB_CFG', True)
if not cfile:
- raise bb.build.FuncFailed('Unable to read GRUB_CFG')
+ bb.fatal('Unable to read GRUB_CFG')
try:
- cfgfile = file(cfile, 'w')
+ cfgfile = open(cfile, 'w')
except OSError:
- raise bb.build.funcFailed('Unable to open %s' % (cfile))
+ bb.fatal('Unable to open %s' % cfile)
cfgfile.write('# Automatically created by OE\n')
@@ -112,7 +114,7 @@ python build_efi_cfg() {
root = d.getVar('GRUB_ROOT', True)
if not root:
- raise bb.build.FuncFailed('GRUB_ROOT not defined')
+ bb.fatal('GRUB_ROOT not defined')
if gfxserial == "1":
btypes = [ [ " graphics console", "" ],
@@ -125,7 +127,7 @@ python build_efi_cfg() {
overrides = localdata.getVar('OVERRIDES', True)
if not overrides:
- raise bb.build.FuncFailed('OVERRIDES not defined')
+ bb.fatal('OVERRIDES not defined')
for btype in btypes:
localdata.setVar('OVERRIDES', label + ':' + overrides)
@@ -144,7 +146,8 @@ python build_efi_cfg() {
if append:
append = replace_rootfs_uuid(d, append)
- cfgfile.write('%s' % (append))
+ cfgfile.write(' %s' % (append))
+
cfgfile.write(' %s' % btype[1])
cfgfile.write('\n')
diff --git a/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass b/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass
index e32f98dcf..297eac63b 100644
--- a/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gtk-doc.bbclass
@@ -1,25 +1,69 @@
-# Helper class to pull in the right gtk-doc dependencies and disable
-# gtk-doc.
+# Helper class to pull in the right gtk-doc dependencies and configure
+# gtk-doc to enable or disable documentation building (which requries the
+# use of usermode qemu).
+
+# This variable is set to True if api-documentation is in
+# DISTRO_FEATURES and qemu-usermode is in MACHINE_FEATURES, and False otherwise.
#
-# Long-term it would be great if this class could be toggled between
-# gtk-doc-stub-native and the real gtk-doc-native, which would enable
-# re-generation of documentation. For now, we'll make do with this which
-# packages up any existing documentation (so from tarball builds).
+# It should be used in recipes to determine whether gtk-doc based documentation should be built,
+# so that qemu use can be avoided when necessary.
+GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \
+ bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}"
+
+EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-gtk-doc --enable-gtk-doc-html --disable-gtk-doc-pdf', \
+ '--disable-gtk-doc', d)} "
+
+# When building native recipes, disable gtkdoc, as it is not necessary,
+# pulls in additional dependencies, and makes build times longer
+EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc "
+EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc "
+
+DEPENDS_append_class-target = " gtk-doc-native qemu-native"
+
+# Even though gtkdoc is disabled on -native, gtk-doc package is still
+# needed for m4 macros.
+DEPENDS_append_class-native = " gtk-doc-native"
+DEPENDS_append_class-nativesdk = " gtk-doc-native"
# The documentation directory, where the infrastructure will be copied.
# gtkdocize has a default of "." so to handle out-of-tree builds set this to $S.
GTKDOC_DOCDIR ?= "${S}"
-DEPENDS_append = " gtk-doc-stub-native"
+do_configure_prepend () {
+ ( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true )
+}
+
+inherit qemu
-EXTRA_OECONF_append = "\
- --disable-gtk-doc \
- --disable-gtk-doc-html \
- --disable-gtk-doc-pdf \
-"
+export STAGING_DIR_HOST
-do_configure_prepend () {
- ( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} )
+do_compile_prepend_class-target () {
+
+ # Write out a qemu wrapper that will be given to gtkdoc-scangobj so that it
+ # can run target helper binaries through that.
+ qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
+ cat > ${B}/gtkdoc-qemuwrapper << EOF
+#!/bin/sh
+# Use a modules directory which doesn't exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
+
+GIR_EXTRA_LIBS_PATH=\`find ${B} -name .libs| tr '\n' ':'\`\$GIR_EXTRA_LIBS_PATH
+
+if test -d ".libs"; then
+ $qemu_binary ".libs/\$@"
+else
+ $qemu_binary "\$@"
+fi
+
+if [ \$? -ne 0 ]; then
+ echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
+ echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
+ exit 1
+fi
+EOF
+ chmod +x ${B}/gtkdoc-qemuwrapper
}
+
inherit pkgconfig
diff --git a/import-layers/yocto-poky/meta/classes/gtk-immodules-cache.bbclass b/import-layers/yocto-poky/meta/classes/gtk-immodules-cache.bbclass
index c099cd38e..ebbc9dea8 100644
--- a/import-layers/yocto-poky/meta/classes/gtk-immodules-cache.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gtk-immodules-cache.bbclass
@@ -15,7 +15,8 @@ if [ "x$D" != "x" ]; then
${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \
$IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null &&
sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
- elif [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
+ fi
+ if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so)
${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \
$IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null &&
@@ -40,7 +41,8 @@ if [ "x$D" != "x" ]; then
${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \
$IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null &&
sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
- elif [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
+ fi
+ if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so)
${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \
$IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null &&
@@ -82,6 +84,6 @@ python __anonymous() {
gtkimmodules_check = d.getVar('GTKIMMODULES_PACKAGES', False)
if not gtkimmodules_check:
bb_filename = d.getVar('FILE', False)
- raise bb.build.FuncFailed("ERROR: %s inherits gtk-immodules-cache but doesn't set GTKIMMODULES_PACKAGES" % bb_filename)
+ bb.fatal("ERROR: %s inherits gtk-immodules-cache but doesn't set GTKIMMODULES_PACKAGES" % bb_filename)
}
diff --git a/import-layers/yocto-poky/meta/classes/gummiboot.bbclass b/import-layers/yocto-poky/meta/classes/gummiboot.bbclass
index 1ebb9462d..4f2dea6c3 100644
--- a/import-layers/yocto-poky/meta/classes/gummiboot.bbclass
+++ b/import-layers/yocto-poky/meta/classes/gummiboot.bbclass
@@ -34,6 +34,8 @@ efi_populate() {
install -d ${DEST}/loader
install -d ${DEST}/loader/entries
install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE}
+ EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
+ printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_EFI_IMAGE" >${DEST}/startup.nsh
install -m 0644 ${GUMMIBOOT_CFG} ${DEST}/loader/loader.conf
for i in ${GUMMIBOOT_ENTRIES}; do
install -m 0644 ${i} ${DEST}/loader/entries
@@ -72,7 +74,7 @@ python build_efi_cfg() {
try:
cfgfile = open(cfile, 'w')
except OSError:
- raise bb.build.funcFailed('Unable to open %s' % (cfile))
+ bb.fatal('Unable to open %s' % cfile)
cfgfile.write('# Automatically created by OE\n')
cfgfile.write('default %s\n' % (labels.split()[0]))
@@ -88,14 +90,14 @@ python build_efi_cfg() {
overrides = localdata.getVar('OVERRIDES', True)
if not overrides:
- raise bb.build.FuncFailed('OVERRIDES not defined')
+ bb.fatal('OVERRIDES not defined')
entryfile = "%s/%s.conf" % (s, label)
d.appendVar("GUMMIBOOT_ENTRIES", " " + entryfile)
try:
entrycfg = open(entryfile, "w")
except OSError:
- raise bb.build.funcFailed('Unable to open %s' % (entryfile))
+ bb.fatal('Unable to open %s' % entryfile)
localdata.setVar('OVERRIDES', label + ':' + overrides)
bb.data.update_data(localdata)
diff --git a/import-layers/yocto-poky/meta/classes/icecc.bbclass b/import-layers/yocto-poky/meta/classes/icecc.bbclass
index e1c06c49c..a83789415 100644
--- a/import-layers/yocto-poky/meta/classes/icecc.bbclass
+++ b/import-layers/yocto-poky/meta/classes/icecc.bbclass
@@ -47,7 +47,8 @@ def get_cross_kernel_cc(bb,d):
# evaluate the expression by the shell if necessary
if '`' in kernel_cc or '$(' in kernel_cc:
- kernel_cc = os.popen("echo %s" % kernel_cc).read()[:-1]
+ import subprocess
+ kernel_cc = subprocess.check_output("echo %s" % kernel_cc, shell=True).decode("utf-8")[:-1]
kernel_cc = d.expand(kernel_cc)
kernel_cc = kernel_cc.replace('ccache', '').strip()
@@ -220,9 +221,14 @@ def icecc_get_and_check_tool(bb, d, tool):
# PATH or icecc-create-env script will silently create an invalid
# compiler environment package.
t = icecc_get_tool(bb, d, tool)
- if t and os.popen("readlink -f %s" % t).read()[:-1] == get_icecc(d):
- bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, get_icecc(d)))
- return ""
+ if t:
+ import subprocess
+ link_path = subprocess.check_output("readlink -f %s" % t, shell=True).decode("utf-8")[:-1]
+ if link_path == get_icecc(d):
+ bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, get_icecc(d)))
+ return ""
+ else:
+ return t
else:
return t
diff --git a/import-layers/yocto-poky/meta/classes/image-buildinfo.bbclass b/import-layers/yocto-poky/meta/classes/image-buildinfo.bbclass
index 197b24235..3003f5d25 100644
--- a/import-layers/yocto-poky/meta/classes/image-buildinfo.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image-buildinfo.bbclass
@@ -32,7 +32,7 @@ def get_layer_git_status(path):
shell=True,
stderr=subprocess.STDOUT)
return ""
- except subprocess.CalledProcessError, ex:
+ except subprocess.CalledProcessError as ex:
# Silently treat errors as "modified", without checking for the
# (expected) return code 1 in a modified git repo. For example, we get
# output and a 129 return code when a layer isn't a git repo at all.
@@ -71,7 +71,9 @@ Build Configuration: |
Layer Revisions: |
-----------------------
''',
- get_layer_revs(d)
+ get_layer_revs(d),
+ '''
+'''
))
}
diff --git a/import-layers/yocto-poky/meta/classes/image-live.bbclass b/import-layers/yocto-poky/meta/classes/image-live.bbclass
index c8a861060..4a634dca9 100644
--- a/import-layers/yocto-poky/meta/classes/image-live.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image-live.bbclass
@@ -43,7 +43,7 @@ ROOT_LIVE ?= "root=/dev/ram0"
INITRD_IMAGE_LIVE ?= "core-image-minimal-initramfs"
INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.cpio.gz"
-ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
+ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ext4"
IMAGE_TYPEDEP_live = "ext4"
IMAGE_TYPEDEP_iso = "ext4"
@@ -56,7 +56,7 @@ python() {
if image_b == initrd_i:
bb.error('INITRD_IMAGE_LIVE %s cannot use image live, hddimg or iso.' % initrd_i)
bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.')
- else:
+ elif initrd_i:
d.appendVarFlag('do_bootimg', 'depends', ' %s:do_image_complete' % initrd_i)
}
@@ -144,14 +144,14 @@ build_iso() {
if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then
# PCBIOS only media
mkisofs -V ${BOOTIMG_VOLUME_ID} \
- -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
+ -o ${IMGDEPLOYDIR}/${IMAGE_NAME}.iso \
-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
$mkisofs_compress_opts \
${MKISOFS_OPTIONS} $mkisofs_iso_level ${ISODIR}
else
# EFI only OR EFI+PCBIOS
mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \
- -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
+ -o ${IMGDEPLOYDIR}/${IMAGE_NAME}.iso \
-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
$mkisofs_compress_opts ${MKISOFS_OPTIONS} $mkisofs_iso_level \
-eltorito-alt-boot -eltorito-platform efi \
@@ -160,7 +160,7 @@ build_iso() {
isohybrid_args="-u"
fi
- isohybrid $isohybrid_args ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso
+ isohybrid $isohybrid_args ${IMGDEPLOYDIR}/${IMAGE_NAME}.iso
}
build_fat_img() {
@@ -202,12 +202,6 @@ build_fat_img() {
# Determine the final size in blocks accounting for some padding
BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE})
- # Ensure total sectors is an integral number of sectors per
- # track or mcopy will complain. Sectors are 512 bytes, and we
- # generate images with 32 sectors per track. This calculation is
- # done in blocks, thus the mod by 16 instead of 32.
- BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
-
# mkdosfs will sometimes use FAT16 when it is not appropriate,
# resulting in a boot failure from SYSLINUX. Use FAT32 for
# images larger than 512MB, otherwise let mkdosfs decide.
@@ -258,13 +252,13 @@ build_hddimg() {
fi
fi
- build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
+ build_fat_img ${HDDDIR} ${IMGDEPLOYDIR}/${IMAGE_NAME}.hddimg
if [ "${PCBIOS}" = "1" ]; then
syslinux_hddimg_install
fi
- chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
+ chmod 644 ${IMGDEPLOYDIR}/${IMAGE_NAME}.hddimg
fi
}
diff --git a/import-layers/yocto-poky/meta/classes/image-swab.bbclass b/import-layers/yocto-poky/meta/classes/image-swab.bbclass
deleted file mode 100644
index 6b02cadaf..000000000
--- a/import-layers/yocto-poky/meta/classes/image-swab.bbclass
+++ /dev/null
@@ -1,94 +0,0 @@
-HOST_DATA ?= "${TMPDIR}/host-contamination-data/"
-SWABBER_REPORT ?= "${LOG_DIR}/swabber/"
-SWABBER_LOGS ?= "${LOG_DIR}/contamination-logs"
-TRACE_LOGDIR ?= "${SWABBER_LOGS}/${PACKAGE_ARCH}"
-TRACE_LOGFILE = "${TRACE_LOGDIR}/${PN}-${PV}"
-
-SWAB_ORIG_TASK := "${BB_DEFAULT_TASK}"
-BB_DEFAULT_TASK = "generate_swabber_report"
-
-# Several recipes don't build with parallel make when run under strace
-# Ideally these should be fixed but as a temporary measure disable parallel
-# builds for troublesome recipes
-PARALLEL_MAKE_pn-openssl = ""
-PARALLEL_MAKE_pn-glibc = ""
-PARALLEL_MAKE_pn-glib-2.0 = ""
-PARALLEL_MAKE_pn-libxml2 = ""
-PARALLEL_MAKE_pn-readline = ""
-PARALLEL_MAKE_pn-util-linux = ""
-PARALLEL_MAKE_pn-binutils = ""
-PARALLEL_MAKE_pn-bison = ""
-PARALLEL_MAKE_pn-cmake = ""
-PARALLEL_MAKE_pn-elfutils = ""
-PARALLEL_MAKE_pn-gcc = ""
-PARALLEL_MAKE_pn-gcc-runtime = ""
-PARALLEL_MAKE_pn-m4 = ""
-PARALLEL_MAKE_pn-opkg = ""
-PARALLEL_MAKE_pn-pkgconfig = ""
-PARALLEL_MAKE_pn-prelink = ""
-PARALLEL_MAKE_pn-rpm = ""
-PARALLEL_MAKE_pn-tcl = ""
-PARALLEL_MAKE_pn-beecrypt = ""
-PARALLEL_MAKE_pn-curl = ""
-PARALLEL_MAKE_pn-gmp = ""
-PARALLEL_MAKE_pn-libmpc = ""
-PARALLEL_MAKE_pn-libxslt = ""
-PARALLEL_MAKE_pn-lzo = ""
-PARALLEL_MAKE_pn-popt = ""
-PARALLEL_MAKE_pn-linux-wrs = ""
-PARALLEL_MAKE_pn-libgcrypt = ""
-PARALLEL_MAKE_pn-gpgme = ""
-PARALLEL_MAKE_pn-udev = ""
-PARALLEL_MAKE_pn-gnutls = ""
-
-python() {
- # NOTE: It might be useful to detect host infection on native and cross
- # packages but as it turns out to be pretty hard to do this for all native
- # and cross packages which aren't swabber-native or one of its dependencies
- # I have ignored them for now...
- if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('nativesdk', d) and not bb.data.inherits_class('cross', d):
- deps = (d.getVarFlag('do_setscene', 'depends', True) or "").split()
- deps.append('strace-native:do_populate_sysroot')
- d.setVarFlag('do_setscene', 'depends', " ".join(deps))
- logdir = d.expand("${TRACE_LOGDIR}")
- bb.utils.mkdirhier(logdir)
- else:
- d.setVar('STRACEFUNC', '')
-}
-
-STRACEPID = "${@os.getpid()}"
-STRACEFUNC = "imageswab_attachstrace"
-
-do_configure[prefuncs] += "${STRACEFUNC}"
-do_compile[prefuncs] += "${STRACEFUNC}"
-
-imageswab_attachstrace () {
- STRACE=`which strace`
-
- if [ -x "$STRACE" ]; then
- swabber-strace-attach "$STRACE -f -o ${TRACE_LOGFILE}-${BB_CURRENTTASK}.log -e trace=open,execve -p ${STRACEPID}" "${TRACE_LOGFILE}-traceattach-${BB_CURRENTTASK}.log"
- fi
-}
-
-do_generate_swabber_report () {
-
- update_distro ${HOST_DATA}
-
- # Swabber can't create the directory for us
- mkdir -p ${SWABBER_REPORT}
-
- REPORTSTAMP=${SWAB_ORIG_TASK}-`date +%2m%2d%2H%2M%Y`
-
- if [ `which ccache` ] ; then
- CCACHE_DIR=`( ccache -s | grep "cache directory" | grep -o '[^ ]*$' 2> /dev/null )`
- fi
-
- if [ "$(ls -A ${HOST_DATA})" ]; then
- echo "Generating swabber report"
- swabber -d ${HOST_DATA} -l ${SWABBER_LOGS} -o ${SWABBER_REPORT}/report-${REPORTSTAMP}.txt -r ${SWABBER_REPORT}/extra_report-${REPORTSTAMP}.txt -c all -p ${TOPDIR} -f ${OEROOT}/meta/conf/swabber ${TOPDIR} ${OEROOT} ${CCACHE_DIR}
- else
- echo "No host data, cannot generate swabber report."
- fi
-}
-addtask generate_swabber_report after do_${SWAB_ORIG_TASK}
-do_generate_swabber_report[depends] = "swabber-native:do_populate_sysroot"
diff --git a/import-layers/yocto-poky/meta/classes/image-vm.bbclass b/import-layers/yocto-poky/meta/classes/image-vm.bbclass
index 47f73261f..2f35d6b4d 100644
--- a/import-layers/yocto-poky/meta/classes/image-vm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image-vm.bbclass
@@ -23,23 +23,24 @@ do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
syslinux-native:do_populate_sysroot \
parted-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
- ${PN}:do_image_ext4 \
+ ${PN}:do_image_${VM_ROOTFS_TYPE} \
"
-IMAGE_TYPEDEP_vmdk = "ext4"
-IMAGE_TYPEDEP_vdi = "ext4"
-IMAGE_TYPEDEP_qcow2 = "ext4"
-IMAGE_TYPEDEP_hdddirect = "ext4"
+IMAGE_TYPEDEP_vmdk = "${VM_ROOTFS_TYPE}"
+IMAGE_TYPEDEP_vdi = "${VM_ROOTFS_TYPE}"
+IMAGE_TYPEDEP_qcow2 = "${VM_ROOTFS_TYPE}"
+IMAGE_TYPEDEP_hdddirect = "${VM_ROOTFS_TYPE}"
IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect"
-ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
+VM_ROOTFS_TYPE ?= "ext4"
+ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${VM_ROOTFS_TYPE}"
# Used by bootloader
LABELS_VM ?= "boot"
ROOT_VM ?= "root=/dev/sda2"
# Using an initramfs is optional. Enable it by setting INITRD_IMAGE_VM.
INITRD_IMAGE_VM ?= ""
-INITRD_VM ?= "${@'${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}"
+INITRD_VM ?= "${@'${IMGDEPLOYDIR}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}"
do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE_VM}:do_image_complete' if '${INITRD_IMAGE_VM}' else ''}"
BOOTDD_VOLUME_ID ?= "boot"
@@ -51,7 +52,7 @@ DISK_SIGNATURE[vardepsexclude] = "DISK_SIGNATURE_GENERATED"
build_boot_dd() {
HDDDIR="${S}/hdd/boot"
HDDIMG="${S}/hdd.image"
- IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
+ IMAGE=${IMGDEPLOYDIR}/${IMAGE_NAME}.hdddirect
populate_kernel $HDDDIR
@@ -65,12 +66,6 @@ build_boot_dd() {
BLOCKS=`du -bks $HDDDIR | cut -f 1`
BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
- # Ensure total sectors is an integral number of sectors per
- # track or mcopy will complain. Sectors are 512 bytes, and we
- # generate images with 32 sectors per track. This calculation is
- # done in blocks, thus the mod by 16 instead of 32.
- BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
-
# Remove it since mkdosfs would fail when it exists
rm -f $HDDIMG
mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS
@@ -109,9 +104,9 @@ build_boot_dd() {
dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
- cd ${DEPLOY_DIR_IMAGE}
- rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect
- ln -s ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect
+ cd ${IMGDEPLOYDIR}
+
+ ln -sf ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect
}
python do_bootdirectdisk() {
@@ -146,8 +141,9 @@ DISK_SIGNATURE_GENERATED := "${@generate_disk_signature()}"
run_qemu_img (){
type="$1"
- qemu-img convert -O $type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.$type
- ln -sf ${IMAGE_NAME}.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type
+ qemu-img convert -O $type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type
+
+ ln -sf ${IMAGE_NAME}.$type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type
}
create_vmdk_image () {
run_qemu_img vmdk
diff --git a/import-layers/yocto-poky/meta/classes/image.bbclass b/import-layers/yocto-poky/meta/classes/image.bbclass
index 8bfd24193..6111f6d26 100644
--- a/import-layers/yocto-poky/meta/classes/image.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image.bbclass
@@ -74,6 +74,8 @@ IMAGE_INSTALL[type] = "list"
export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}"
PACKAGE_INSTALL_ATTEMPTONLY ?= "${FEATURE_INSTALL_OPTIONAL}"
+IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-image-complete"
+
# Images are generally built explicitly, do not need to be part of world.
EXCLUDE_FROM_WORLD = "1"
@@ -114,11 +116,11 @@ python () {
def rootfs_variables(d):
from oe.rootfs import variable_depends
- variables = ['IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
- 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS',
+ variables = ['IMAGE_DEVICE_TABLE','IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
+ 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS',
'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS',
'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS',
- 'COMPRESSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED']
+ 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY']
variables.extend(rootfs_command_variables(d))
variables.extend(variable_depends(d))
return " ".join(variables)
@@ -166,7 +168,7 @@ python () {
if temp:
bb.fatal("%s contains conflicting IMAGE_FEATURES %s %s" % (d.getVar('PN', True), feature, ' '.join(list(temp))))
- d.setVar('IMAGE_FEATURES', ' '.join(list(remain_features)))
+ d.setVar('IMAGE_FEATURES', ' '.join(sorted(list(remain_features))))
check_image_features(d)
initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or ""
@@ -198,6 +200,17 @@ fakeroot python do_rootfs () {
from oe.rootfs import create_rootfs
from oe.manifest import create_manifest
+ # NOTE: if you add, remove or significantly refactor the stages of this
+ # process then you should recalculate the weightings here. This is quite
+ # easy to do - just change the MultiStageProgressReporter line temporarily
+ # to pass debug=True as the last parameter and you'll get a printout of
+ # the weightings as well as a map to the lines where next_stage() was
+ # called. Of course this isn't critical, but it helps to keep the progress
+ # reporting accurate.
+ stage_weights = [1, 203, 354, 186, 65, 4228, 1, 353, 49, 330, 382, 23, 1]
+ progress_reporter = bb.progress.MultiStageProgressReporter(d, stage_weights)
+ progress_reporter.next_stage()
+
# Handle package exclusions
excl_pkgs = d.getVar("PACKAGE_EXCLUDE", True).split()
inst_pkgs = d.getVar("PACKAGE_INSTALL", True).split()
@@ -230,11 +243,15 @@ fakeroot python do_rootfs () {
# Generate the initial manifest
create_manifest(d)
- # Generate rootfs
- create_rootfs(d)
+ progress_reporter.next_stage()
+
+ # generate rootfs
+ create_rootfs(d, progress_reporter=progress_reporter)
+
+ progress_reporter.finish()
}
do_rootfs[dirs] = "${TOPDIR}"
-do_rootfs[cleandirs] += "${S}"
+do_rootfs[cleandirs] += "${S} ${IMGDEPLOYDIR}"
do_rootfs[umask] = "022"
addtask rootfs before do_build
@@ -258,8 +275,43 @@ fakeroot python do_image_complete () {
}
do_image_complete[dirs] = "${TOPDIR}"
do_image_complete[umask] = "022"
+SSTATETASKS += "do_image_complete"
+SSTATE_SKIP_CREATION_task-image-complete = '1'
+do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}"
+do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
+do_image_complete[stamp-extra-info] = "${MACHINE}"
addtask do_image_complete after do_image before do_build
+# Add image-level QA/sanity checks to IMAGE_QA_COMMANDS
+#
+# IMAGE_QA_COMMANDS += " \
+# image_check_everything_ok \
+# "
+# This task runs all functions in IMAGE_QA_COMMANDS after the image
+# construction has completed in order to validate the resulting image.
+fakeroot python do_image_qa () {
+ from oe.utils import ImageQAFailed
+
+ qa_cmds = (d.getVar('IMAGE_QA_COMMANDS', True) or '').split()
+ qamsg = ""
+
+ for cmd in qa_cmds:
+ try:
+ bb.build.exec_func(cmd, d)
+ except oe.utils.ImageQAFailed as e:
+ qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (e.name, e.description)
+ except bb.build.FuncFailed as e:
+ qamsg = qamsg + '\tImage QA function %s failed' % e.name
+ if e.logfile:
+ qamsg = qamsg + ' (log file is located at %s)' % e.logfile
+ qamsg = qamsg + '\n'
+
+ if qamsg:
+ imgname = d.getVar('IMAGE_NAME', True)
+ bb.fatal("QA errors found whilst validating image: %s\n%s" % (imgname, qamsg))
+}
+addtask do_image_qa after do_image_complete before do_build
+
#
# Write environment variables used by wic
# to tmp/sysroots/<machine>/imgdata/<image>.env
@@ -287,6 +339,7 @@ def setup_debugfs_variables(d):
d.appendVar('IMAGE_ROOTFS', '-dbg')
d.appendVar('IMAGE_LINK_NAME', '-dbg')
d.appendVar('IMAGE_NAME','-dbg')
+ d.setVar('IMAGE_BUILDING_DEBUGFS', 'true')
debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True)
if debugfs_image_fstypes:
d.setVar('IMAGE_FSTYPES', debugfs_image_fstypes)
@@ -297,8 +350,16 @@ python setup_debugfs () {
python () {
vardeps = set()
- ctypes = d.getVar('COMPRESSIONTYPES', True).split()
- old_overrides = d.getVar('OVERRIDES', 0)
+ # We allow CONVERSIONTYPES to have duplicates. That avoids breaking
+ # derived distros when OE-core or some other layer independently adds
+ # the same type. There is still only one command for each type, but
+ # presumably the commands will do the same when the type is the same,
+ # even when added in different places.
+ #
+ # Without de-duplication, gen_conversion_cmds() below
+ # would create the same compression command multiple times.
+ ctypes = set(d.getVar('CONVERSIONTYPES', True).split())
+ old_overrides = d.getVar('OVERRIDES', False)
def _image_base_type(type):
basetype = type
@@ -354,6 +415,7 @@ python () {
d.appendVarFlag('do_image', 'vardeps', ' '.join(vardeps))
maskedtypes = (d.getVar('IMAGE_TYPES_MASKED', True) or "").split()
+ maskedtypes = [dbg + t for t in maskedtypes for dbg in ("", "debugfs_")]
for t in basetypes:
vardeps = set()
@@ -386,21 +448,30 @@ python () {
cmds.append("\t" + image_cmd)
else:
bb.fatal("No IMAGE_CMD defined for IMAGE_FSTYPES entry '%s' - possibly invalid type name or missing support class" % t)
- cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
+ cmds.append(localdata.expand("\tcd ${IMGDEPLOYDIR}"))
+
+ # Since a copy of IMAGE_CMD_xxx will be inlined within do_image_xxx,
+ # prevent a redundant copy of IMAGE_CMD_xxx being emitted as a function.
+ d.delVarFlag('IMAGE_CMD_' + realt, 'func')
rm_tmp_images = set()
def gen_conversion_cmds(bt):
for ctype in ctypes:
- if bt.endswith("." + ctype):
+ if bt[bt.find('.') + 1:] == ctype:
type = bt[0:-len(ctype) - 1]
if type.startswith("debugfs_"):
type = type[8:]
# Create input image first.
gen_conversion_cmds(type)
localdata.setVar('type', type)
- cmds.append("\t" + localdata.getVar("COMPRESS_CMD_" + ctype, True))
+ cmd = "\t" + (localdata.getVar("CONVERSION_CMD_" + ctype, True) or localdata.getVar("COMPRESS_CMD_" + ctype, True))
+ if cmd not in cmds:
+ cmds.append(cmd)
+ vardeps.add('CONVERSION_CMD_' + ctype)
vardeps.add('COMPRESS_CMD_' + ctype)
- subimages.append(type + "." + ctype)
+ subimage = type + "." + ctype
+ if subimage not in subimages:
+ subimages.append(subimage)
if type not in alltypes:
rm_tmp_images.add(localdata.expand("${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"))
@@ -467,6 +538,12 @@ def get_rootfs_size(d):
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment
+ # Do not check image size of the debugfs image. This is not supposed
+ # to be deployed, etc. so it doesn't make sense to limit the size
+ # of the debug.
+ if (d.getVar('IMAGE_BUILDING_DEBUGFS', True) or "") == "true":
+ return base_size
+
# Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
if rootfs_maxsize:
rootfs_maxsize_int = int(rootfs_maxsize)
@@ -495,28 +572,26 @@ python set_image_size () {
#
python create_symlinks() {
- deploy_dir = d.getVar('DEPLOY_DIR_IMAGE', True)
+ deploy_dir = d.getVar('IMGDEPLOYDIR', True)
img_name = d.getVar('IMAGE_NAME', True)
link_name = d.getVar('IMAGE_LINK_NAME', True)
manifest_name = d.getVar('IMAGE_MANIFEST', True)
taskname = d.getVar("BB_CURRENTTASK", True)
subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split()
imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or d.expand("${IMAGE_NAME_SUFFIX}.")
- os.chdir(deploy_dir)
if not link_name:
return
for type in subimages:
- if os.path.exists(img_name + imgsuffix + type):
- dst = deploy_dir + "/" + link_name + "." + type
- src = img_name + imgsuffix + type
+ dst = os.path.join(deploy_dir, link_name + "." + type)
+ src = img_name + imgsuffix + type
+ if os.path.exists(os.path.join(deploy_dir, src)):
bb.note("Creating symlink: %s -> %s" % (dst, src))
if os.path.islink(dst):
- if d.getVar('RM_OLD_IMAGE', True) == "1" and \
- os.path.exists(os.path.realpath(dst)):
- os.remove(os.path.realpath(dst))
os.remove(dst)
os.symlink(src, dst)
+ else:
+ bb.note("Skipping symlink, source does not exist: %s -> %s" % (dst, src))
}
MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|"
diff --git a/import-layers/yocto-poky/meta/classes/image_types.bbclass b/import-layers/yocto-poky/meta/classes/image_types.bbclass
index 53af7ca8d..1ce8334e3 100644
--- a/import-layers/yocto-poky/meta/classes/image_types.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image_types.bbclass
@@ -11,41 +11,40 @@ IMAGE_ROOTFS_ALIGNMENT ?= "1"
def imagetypes_getdepends(d):
def adddep(depstr, deps):
- for i in (depstr or "").split():
- if i not in deps:
- deps.append(i)
+ for d in (depstr or "").split():
+ # Add task dependency if not already present
+ if ":" not in d:
+ d += ":do_populate_sysroot"
+ deps.add(d)
- deps = []
- ctypes = d.getVar('COMPRESSIONTYPES', True).split()
fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split())
fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split())
- for type in fstypes:
- if type in ["vmdk", "vdi", "qcow2", "hdddirect", "live", "iso", "hddimg"]:
- type = "ext4"
- basetype = type
- for ctype in ctypes:
- if type.endswith("." + ctype):
- basetype = type[:-len("." + ctype)]
- adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
- break
+
+ deps = set()
+ for typestring in fstypes:
+ types = typestring.split(".")
+ basetype, resttypes = types[0], types[1:]
+
+ adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
- adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
-
- depstr = ""
- for dep in deps:
- depstr += " " + dep + ":do_populate_sysroot"
- return depstr
+ for ctype in resttypes:
+ adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype, True), deps)
+ adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
+ # Sort the set so that ordering is consistant
+ return " ".join(sorted(deps))
-XZ_COMPRESSION_LEVEL ?= "-e -6"
+XZ_COMPRESSION_LEVEL ?= "-3"
XZ_INTEGRITY_CHECK ?= "crc32"
XZ_THREADS ?= "-T 0"
+ZIP_COMPRESSION_LEVEL ?= "-9"
+
JFFS2_SUM_EXTRA_ARGS ?= ""
-IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}"
+IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}"
-IMAGE_CMD_cramfs = "mkfs.cramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cramfs ${EXTRA_IMAGECMD}"
+IMAGE_CMD_cramfs = "mkfs.cramfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cramfs ${EXTRA_IMAGECMD}"
oe_mkext234fs () {
fstype=$1
@@ -65,8 +64,8 @@ oe_mkext234fs () {
eval COUNT=\"$MIN_COUNT\"
fi
# Create a sparse image block
- dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024
- mkfs.$fstype -F $extra_imagecmd ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}
+ dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024
+ mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}
}
IMAGE_CMD_ext2 = "oe_mkext234fs ext2 ${EXTRA_IMAGECMD}"
@@ -76,16 +75,16 @@ IMAGE_CMD_ext4 = "oe_mkext234fs ext4 ${EXTRA_IMAGECMD}"
MIN_BTRFS_SIZE ?= "16384"
IMAGE_CMD_btrfs () {
if [ ${ROOTFS_SIZE} -gt ${MIN_BTRFS_SIZE} ]; then
- dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs count=${ROOTFS_SIZE} bs=1024
- mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs
+ dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs count=${ROOTFS_SIZE} bs=1024
+ mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs
else
bbfatal "Rootfs is too small for BTRFS (Rootfs Actual Size: ${ROOTFS_SIZE}, BTRFS Minimum Size: ${MIN_BTRFS_SIZE})"
fi
}
-IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs ${EXTRA_IMAGECMD} -noappend"
-IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
-IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
+IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs ${EXTRA_IMAGECMD} -noappend"
+IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
+IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
# By default, tar from the host is used, which can be quite old. If
# you need special parameters (like --xattrs) which are only supported
@@ -98,18 +97,25 @@ IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE
# In practice, it turned out to be not needed when creating archives and
# required when extracting, but it seems prudent to use it in both cases.
IMAGE_CMD_TAR ?= "tar"
-IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} ."
+IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} ."
do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
IMAGE_CMD_cpio () {
- (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
- if [ ! -L ${IMAGE_ROOTFS}/init -a ! -e ${IMAGE_ROOTFS}/init ]; then
- if [ -L ${IMAGE_ROOTFS}/sbin/init -o -e ${IMAGE_ROOTFS}/sbin/init ]; then
- ln -sf /sbin/init ${WORKDIR}/cpio_append/init
- else
- touch ${WORKDIR}/cpio_append/init
+ (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
+ # We only need the /init symlink if we're building the real
+ # image. The -dbg image doesn't need it! By being clever
+ # about this we also avoid 'touch' below failing, as it
+ # might be trying to touch /sbin/init on the host since both
+ # the normal and the -dbg image share the same WORKDIR
+ if [ "${IMAGE_BUILDING_DEBUGFS}" != "true" ]; then
+ if [ ! -L ${IMAGE_ROOTFS}/init ] && [ ! -e ${IMAGE_ROOTFS}/init ]; then
+ if [ -L ${IMAGE_ROOTFS}/sbin/init ] || [ -e ${IMAGE_ROOTFS}/sbin/init ]; then
+ ln -sf /sbin/init ${WORKDIR}/cpio_append/init
+ else
+ touch ${WORKDIR}/cpio_append/init
+ fi
+ (cd ${WORKDIR}/cpio_append && echo ./init | cpio -oA -H newc -F ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
fi
- (cd ${WORKDIR}/cpio_append && echo ./init | cpio -oA -H newc -F ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
fi
}
@@ -117,8 +123,8 @@ ELF_KERNEL ?= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"
ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console="
IMAGE_CMD_elf () {
- test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf
- mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
+ test -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf && rm -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf
+ mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.cpio.gz --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
}
IMAGE_TYPEDEP_elf = "cpio.gz"
@@ -136,20 +142,20 @@ multiubi_mkfs() {
echo \[ubifs\] > ubinize${vname}-${IMAGE_NAME}.cfg
echo mode=ubi >> ubinize${vname}-${IMAGE_NAME}.cfg
- echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs >> ubinize${vname}-${IMAGE_NAME}.cfg
+ echo image=${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_id=0 >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_type=dynamic >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_name=${UBI_VOLNAME} >> ubinize${vname}-${IMAGE_NAME}.cfg
echo vol_flags=autoresize >> ubinize${vname}-${IMAGE_NAME}.cfg
- mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
- ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubi ${ubinize_args} ubinize${vname}-${IMAGE_NAME}.cfg
+ mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
+ ubinize -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubi ${ubinize_args} ubinize${vname}-${IMAGE_NAME}.cfg
# Cleanup cfg file
- mv ubinize${vname}-${IMAGE_NAME}.cfg ${DEPLOY_DIR_IMAGE}/
+ mv ubinize${vname}-${IMAGE_NAME}.cfg ${IMGDEPLOYDIR}/
# Create own symlinks for 'named' volumes
if [ -n "$vname" ]; then
- cd ${DEPLOY_DIR_IMAGE}
+ cd ${IMGDEPLOYDIR}
if [ -e ${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ]; then
ln -sf ${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs \
${IMAGE_LINK_NAME}${vname}.ubifs
@@ -176,9 +182,9 @@ IMAGE_CMD_ubi () {
multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}"
}
-IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}"
+IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}"
-WKS_FILE ?= "${IMAGE_BASENAME}.${MACHINE}.wks"
+WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l for l in '${BBPATH}:${COREBASE}'.split(':'))}"
WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(), '${WKS_SEARCH_PATH}') or ''}"
@@ -193,22 +199,76 @@ def wks_search(files, search_path):
if searched:
return searched
+WIC_CREATE_EXTRA_ARGS ?= ""
+
IMAGE_CMD_wic () {
- out="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}"
+ out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
wks="${WKS_FULL_PATH}"
if [ -z "$wks" ]; then
bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
fi
- BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR_TARGET}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/"
+ BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR_TARGET}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/" ${WIC_CREATE_EXTRA_ARGS}
mv "$out/build/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic"
rm -rf "$out/"
}
IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
# Rebuild when the wks file or vars in WICVARS change
-USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${COMPRESSIONTYPES}'.split()), '1', '', d)}"
-do_image_wic[file-checksums] += "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
+USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
+WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
+do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
+
+python () {
+ if d.getVar('USING_WIC', True) and 'do_bootimg' in d:
+ bb.build.addtask('do_image_wic', '', 'do_bootimg', d)
+}
+
+python do_write_wks_template () {
+ """Write out expanded template contents to WKS_FULL_PATH."""
+ import re
+
+ template_body = d.getVar('_WKS_TEMPLATE', True)
+
+ # Remove any remnant variable references left behind by the expansion
+ # due to undefined variables
+ expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")
+ while True:
+ new_body = re.sub(expand_var_regexp, '', template_body)
+ if new_body == template_body:
+ break
+ else:
+ template_body = new_body
+
+ wks_file = d.getVar('WKS_FULL_PATH', True)
+ with open(wks_file, 'w') as f:
+ f.write(template_body)
+}
+
+python () {
+ if d.getVar('USING_WIC', True):
+ wks_file_u = d.getVar('WKS_FULL_PATH', False)
+ wks_file = d.expand(wks_file_u)
+ base, ext = os.path.splitext(wks_file)
+ if ext == '.in' and os.path.exists(wks_file):
+ wks_out_file = os.path.join(d.getVar('WORKDIR', True), os.path.basename(base))
+ d.setVar('WKS_FULL_PATH', wks_out_file)
+ d.setVar('WKS_TEMPLATE_PATH', wks_file_u)
+ d.setVar('WKS_FILE_CHECKSUM', '${WKS_TEMPLATE_PATH}:True')
+
+ try:
+ with open(wks_file, 'r') as f:
+ body = f.read()
+ except (IOError, OSError) as exc:
+ pass
+ else:
+ # Previously, I used expandWithRefs to get the dependency list
+ # and add it to WICVARS, but there's no point re-parsing the
+ # file in process_wks_template as well, so just put it in
+ # a variable and let the metadata deal with the deps.
+ d.setVar('_WKS_TEMPLATE', body)
+ bb.build.addtask('do_write_wks_template', 'do_image_wic', None, d)
+}
EXTRA_IMAGECMD = ""
@@ -262,25 +322,35 @@ IMAGE_TYPES = " \
wic wic.gz wic.bz2 wic.lzma \
"
-COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum"
-COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
-COMPRESS_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
-COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
-COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
-COMPRESS_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum"
-COMPRESS_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum"
-COMPRESS_CMD_sha224sum = "sha224sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha224sum"
-COMPRESS_CMD_sha256sum = "sha256sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha256sum"
-COMPRESS_CMD_sha384sum = "sha384sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha384sum"
-COMPRESS_CMD_sha512sum = "sha512sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha512sum"
-COMPRESS_DEPENDS_lzma = "xz-native"
-COMPRESS_DEPENDS_gz = ""
-COMPRESS_DEPENDS_bz2 = "pbzip2-native"
-COMPRESS_DEPENDS_xz = "xz-native"
-COMPRESS_DEPENDS_lz4 = "lz4-native"
-COMPRESS_DEPENDS_sum = "mtd-utils-native"
+# Compression is a special case of conversion. The old variable
+# names are still supported for backward-compatibility. When defining
+# new compression or conversion commands, use CONVERSIONTYPES and
+# CONVERSION_CMD/DEPENDS.
+COMPRESSIONTYPES ?= ""
+
+CONVERSIONTYPES = "gz bz2 lzma xz lz4 zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap ${COMPRESSIONTYPES}"
+CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
+CONVERSION_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
+CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
+CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
+CONVERSION_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
+CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
+CONVERSION_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
+CONVERSION_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum"
+CONVERSION_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum"
+CONVERSION_CMD_sha224sum = "sha224sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha224sum"
+CONVERSION_CMD_sha256sum = "sha256sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha256sum"
+CONVERSION_CMD_sha384sum = "sha384sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha384sum"
+CONVERSION_CMD_sha512sum = "sha512sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha512sum"
+CONVERSION_CMD_bmap = "bmaptool create ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.bmap"
+CONVERSION_DEPENDS_lzma = "xz-native"
+CONVERSION_DEPENDS_gz = ""
+CONVERSION_DEPENDS_bz2 = "pbzip2-native"
+CONVERSION_DEPENDS_xz = "xz-native"
+CONVERSION_DEPENDS_lz4 = "lz4-native"
+CONVERSION_DEPENDS_zip = "zip-native"
+CONVERSION_DEPENDS_sum = "mtd-utils-native"
+CONVERSION_DEPENDS_bmap = "bmap-tools-native"
RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4"
RUNNABLE_MACHINE_PATTERNS ?= "qemu"
@@ -296,4 +366,4 @@ IMAGE_TYPES_MASKED ?= ""
# The WICVARS variable is used to define list of bitbake variables used in wic code
# variables from this list is written to <image>.env file
-WICVARS ?= "BBLAYERS DEPLOY_DIR_IMAGE HDDDIR IMAGE_BASENAME IMAGE_BOOT_FILES IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD ISODIR MACHINE_ARCH ROOTFS_SIZE STAGING_DATADIR STAGING_DIR_NATIVE STAGING_LIBDIR TARGET_SYS"
+WICVARS ?= "BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE HDDDIR IMAGE_BASENAME IMAGE_BOOT_FILES IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD ISODIR MACHINE_ARCH ROOTFS_SIZE STAGING_DATADIR STAGING_DIR_NATIVE STAGING_LIBDIR TARGET_SYS"
diff --git a/import-layers/yocto-poky/meta/classes/image_types_uboot.bbclass b/import-layers/yocto-poky/meta/classes/image_types_uboot.bbclass
index 19e4aa2e4..6c8c1ff60 100644
--- a/import-layers/yocto-poky/meta/classes/image_types_uboot.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image_types_uboot.bbclass
@@ -2,25 +2,25 @@ inherit image_types kernel-arch
oe_mkimage () {
mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C $2 -n ${IMAGE_NAME} \
- -d ${DEPLOY_DIR_IMAGE}/$1 ${DEPLOY_DIR_IMAGE}/$1.u-boot
+ -d ${IMGDEPLOYDIR}/$1 ${IMGDEPLOYDIR}/$1.u-boot
if [ x$3 = x"clean" ]; then
rm $1
fi
}
-COMPRESSIONTYPES += "gz.u-boot bz2.u-boot lzma.u-boot u-boot"
+CONVERSIONTYPES += "gz.u-boot bz2.u-boot lzma.u-boot u-boot"
-COMPRESS_DEPENDS_u-boot = "u-boot-mkimage-native"
-COMPRESS_CMD_u-boot = "oe_mkimage ${IMAGE_NAME}.rootfs.${type} none"
+CONVERSION_DEPENDS_u-boot = "u-boot-mkimage-native"
+CONVERSION_CMD_u-boot = "oe_mkimage ${IMAGE_NAME}.rootfs.${type} none"
-COMPRESS_DEPENDS_gz.u-boot = "u-boot-mkimage-native"
-COMPRESS_CMD_gz.u-boot = "${COMPRESS_CMD_gz}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.gz gzip clean"
+CONVERSION_DEPENDS_gz.u-boot = "u-boot-mkimage-native"
+CONVERSION_CMD_gz.u-boot = "${CONVERSION_CMD_gz}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.gz gzip clean"
-COMPRESS_DEPENDS_bz2.u-boot = "u-boot-mkimage-native"
-COMPRESS_CMD_bz2.u-boot = "${COMPRESS_CMD_bz2}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.bz2 bzip2 clean"
+CONVERSION_DEPENDS_bz2.u-boot = "u-boot-mkimage-native"
+CONVERSION_CMD_bz2.u-boot = "${CONVERSION_CMD_bz2}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.bz2 bzip2 clean"
-COMPRESS_DEPENDS_lzma.u-boot = "u-boot-mkimage-native"
-COMPRESS_CMD_lzma.u-boot = "${COMPRESS_CMD_lzma}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.lzma lzma clean"
+CONVERSION_DEPENDS_lzma.u-boot = "u-boot-mkimage-native"
+CONVERSION_CMD_lzma.u-boot = "${CONVERSION_CMD_lzma}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.lzma lzma clean"
IMAGE_TYPES += "ext2.u-boot ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot ext3.gz.u-boot ext4.gz.u-boot cpio.gz.u-boot"
diff --git a/import-layers/yocto-poky/meta/classes/insane.bbclass b/import-layers/yocto-poky/meta/classes/insane.bbclass
index c57b21735..1d7377825 100644
--- a/import-layers/yocto-poky/meta/classes/insane.bbclass
+++ b/import-layers/yocto-poky/meta/classes/insane.bbclass
@@ -54,8 +54,8 @@ UNKNOWN_CONFIGURE_WHITELIST ?= "--enable-nls --disable-nls --disable-silent-rule
# feel free to add and correct.
#
# TARGET_OS TARGET_ARCH MACHINE, OSABI, ABIVERSION, Little Endian, 32bit?
-def package_qa_get_machine_dict():
- return {
+def package_qa_get_machine_dict(d):
+ machdata = {
"darwin9" : {
"arm" : (40, 0, 0, True, 32),
},
@@ -66,6 +66,8 @@ def package_qa_get_machine_dict():
"i586" : (3, 0, 0, True, 32),
"x86_64": (62, 0, 0, True, 64),
"epiphany": (4643, 0, 0, True, 32),
+ "mips": ( 8, 0, 0, False, 32),
+ "mipsel": ( 8, 0, 0, True, 32),
},
"linux" : {
"aarch64" : (183, 0, 0, True, 64),
@@ -87,6 +89,10 @@ def package_qa_get_machine_dict():
"mipsel": ( 8, 0, 0, True, 32),
"mips64": ( 8, 0, 0, False, 64),
"mips64el": ( 8, 0, 0, True, 64),
+ "mipsisa32r6": ( 8, 0, 0, False, 32),
+ "mipsisa32r6el": ( 8, 0, 0, True, 32),
+ "mipsisa64r6": ( 8, 0, 0, False, 64),
+ "mipsisa64r6el": ( 8, 0, 0, True, 64),
"nios2": (113, 0, 0, True, 32),
"s390": (22, 0, 0, False, 32),
"sh4": (42, 0, 0, True, 32),
@@ -168,18 +174,32 @@ def package_qa_get_machine_dict():
},
}
+ # Add in any extra user supplied data which may come from a BSP layer, removing the
+ # need to always change this class directly
+ extra_machdata = (d.getVar("PACKAGEQA_EXTRA_MACHDEFFUNCS", True) or "").split()
+ for m in extra_machdata:
+ call = m + "(machdata, d)"
+ locs = { "machdata" : machdata, "d" : d}
+ machdata = bb.utils.better_eval(call, locs)
+
+ return machdata
-def package_qa_clean_path(path,d):
- """ Remove the common prefix from the path. In this case it is the TMPDIR"""
- return path.replace(d.getVar("TMPDIR", True) + "/", "")
+
+def package_qa_clean_path(path, d, pkg=None):
+ """
+ Remove redundant paths from the path for display. If pkg isn't set then
+ TMPDIR is stripped, otherwise PKGDEST/pkg is stripped.
+ """
+ if pkg:
+ path = path.replace(os.path.join(d.getVar("PKGDEST", True), pkg), "/")
+ return path.replace(d.getVar("TMPDIR", True), "/").replace("//", "/")
def package_qa_write_error(type, error, d):
logfile = d.getVar('QA_LOGFILE', True)
if logfile:
p = d.getVar('P', True)
- f = file( logfile, "a+")
- print >> f, "%s: %s [%s]" % (p, error, type)
- f.close()
+ with open(logfile, "a+") as f:
+ f.write("%s: %s [%s]\n" % (p, error, type))
def package_qa_handle_error(error_class, error_msg, d):
package_qa_write_error(error_class, error_msg, d)
@@ -400,7 +420,7 @@ def package_qa_check_unsafe_references_in_binaries(path, name, d, elf, messages)
sysroot_path_usr = sysroot_path + exec_prefix
try:
- ldd_output = bb.process.Popen(["prelink-rtld", "--root", sysroot_path, path], stdout=sub.PIPE).stdout.read()
+ ldd_output = bb.process.Popen(["prelink-rtld", "--root", sysroot_path, path], stdout=sub.PIPE).stdout.read().decode("utf-8")
except bb.process.CmdError:
error_msg = pn + ": prelink-rtld aborted when processing %s" % path
package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
@@ -495,6 +515,8 @@ def package_qa_check_arch(path,name,d, elf, messages):
"""
Check if archs are compatible
"""
+ import re
+
if not elf:
return
@@ -520,15 +542,15 @@ def package_qa_check_arch(path,name,d, elf, messages):
#if this will throw an exception, then fix the dict above
(machine, osabi, abiversion, littleendian, bits) \
- = package_qa_get_machine_dict()[target_os][target_arch]
+ = package_qa_get_machine_dict(d)[target_os][target_arch]
# Check the architecture and endiannes of the binary
- if not ((machine == elf.machine()) or \
- ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
- package_qa_add_message(messages, "arch", "Architecture did not match (%d to %d) on %s" % \
- (machine, elf.machine(), package_qa_clean_path(path,d)))
- elif not ((bits == elf.abiSize()) or \
- ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
+ is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
+ (target_os == "linux-gnux32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE', True)))
+ if not ((machine == elf.machine()) or is_32):
+ package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
+ (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))
+ elif not ((bits == elf.abiSize()) or is_32):
package_qa_add_message(messages, "arch", "Bit size did not match (%d to %d) %s on %s" % \
(bits, elf.abiSize(), bpn, package_qa_clean_path(path,d)))
elif not littleendian == elf.isLittleEndian():
@@ -672,23 +694,24 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
trimmed = path.replace(os.path.join (d.getVar("PKGDEST", True), name), "")
package_qa_add_message(messages, "symlink-to-sysroot", "Symlink %s in %s points to TMPDIR" % (trimmed, name))
-def package_qa_check_license(workdir, d):
+# Check license variables
+do_populate_lic[postfuncs] += "populate_lic_qa_checksum"
+python populate_lic_qa_checksum() {
"""
- Check for changes in the license files
+ Check for changes in the license files.
"""
import tempfile
sane = True
- lic_files = d.getVar('LIC_FILES_CHKSUM', True)
+ lic_files = d.getVar('LIC_FILES_CHKSUM', True) or ''
lic = d.getVar('LICENSE', True)
pn = d.getVar('PN', True)
if lic == "CLOSED":
return
- if not lic_files:
- package_qa_handle_error("license-checksum", pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)", d)
- return
+ if not lic_files and d.getVar('SRC_URI', True):
+ sane = package_qa_handle_error("license-checksum", pn + ": Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM)", d)
srcdir = d.getVar('S', True)
@@ -696,7 +719,7 @@ def package_qa_check_license(workdir, d):
try:
(type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
except bb.fetch.MalformedUrl:
- package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url, d)
+ sane = package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url, d)
continue
srclicfile = os.path.join(srcdir, path)
if not os.path.isfile(srclicfile):
@@ -720,7 +743,7 @@ def package_qa_check_license(workdir, d):
linesout = 0
for line in fi:
lineno += 1
- if (lineno >= beginline):
+ if (lineno >= beginline):
if ((lineno <= endline) or not endline):
fo.write(line)
linesout += 1
@@ -752,7 +775,11 @@ def package_qa_check_license(workdir, d):
else:
msg = pn + ": LIC_FILES_CHKSUM is not specified for " + url
msg = msg + "\n" + pn + ": The md5 checksum is " + md5chksum
- package_qa_handle_error("license-checksum", msg, d)
+ sane = package_qa_handle_error("license-checksum", msg, d)
+
+ if not sane:
+ bb.fatal("Fatal QA errors found, failing task.")
+}
def package_qa_check_staged(path,d):
"""
@@ -984,12 +1011,12 @@ def package_qa_check_expanded_d(path,name,d,elf,messages):
return sane
def package_qa_check_encoding(keys, encode, d):
- def check_encoding(key,enc):
+ def check_encoding(key, enc):
sane = True
value = d.getVar(key, True)
if value:
try:
- s = unicode(value, enc)
+ s = value.encode(enc)
except UnicodeDecodeError as e:
error_msg = "%s has non %s characters" % (key,enc)
sane = False
@@ -1208,12 +1235,6 @@ Rerun configure task after fixing this.""")
Missing inherit gettext?""" % (gt, config))
###########################################################################
- # Check license variables
- ###########################################################################
-
- package_qa_check_license(workdir, d)
-
- ###########################################################################
# Check unrecognised configure options (with a white list)
###########################################################################
if bb.data.inherits_class("autotools", d):
@@ -1221,7 +1242,7 @@ Missing inherit gettext?""" % (gt, config))
try:
flag = "WARNING: unrecognized options:"
log = os.path.join(d.getVar('B', True), 'config.log')
- output = subprocess.check_output(['grep', '-F', flag, log]).replace(', ', ' ')
+ output = subprocess.check_output(['grep', '-F', flag, log]).decode("utf-8").replace(', ', ' ')
options = set()
for line in output.splitlines():
options |= set(line.partition(flag)[2].split())
@@ -1250,10 +1271,9 @@ Missing inherit gettext?""" % (gt, config))
}
python do_qa_unpack() {
- bb.note("Checking has ${S} been created")
-
+ src_uri = d.getVar('SRC_URI', True)
s_dir = d.getVar('S', True)
- if not os.path.exists(s_dir):
+ if src_uri and not os.path.exists(s_dir):
bb.warn('%s: the directory %s (%s) pointed to by the S variable doesn\'t exist - please set S within the recipe to point to where the source has been unpacked to' % (d.getVar('PN', True), d.getVar('S', False), s_dir))
}
@@ -1261,8 +1281,8 @@ python do_qa_unpack() {
#addtask qa_staging after do_populate_sysroot before do_build
do_populate_sysroot[postfuncs] += "do_qa_staging "
-# Check broken config.log files, for packages requiring Gettext which don't
-# have it in DEPENDS and for correct LIC_FILES_CHKSUM
+# Check broken config.log files, for packages requiring Gettext which
+# don't have it in DEPENDS.
#addtask qa_configure after do_configure before do_compile
do_configure[postfuncs] += "do_qa_configure "
diff --git a/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass b/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass
index 3ed5986a5..ea976c66b 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-arch.bbclass
@@ -14,7 +14,7 @@ valid_archs = "alpha cris ia64 \
parisc s390 v850 \
avr32 blackfin \
microblaze \
- nios2"
+ nios2 arc xtensa"
def map_kernel_arch(a, d):
import re
@@ -25,7 +25,7 @@ def map_kernel_arch(a, d):
elif re.match('armeb$', a): return 'arm'
elif re.match('aarch64$', a): return 'arm64'
elif re.match('aarch64_be$', a): return 'arm64'
- elif re.match('mips(el|64|64el)$', a): return 'mips'
+ elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'mips'
elif re.match('p(pc|owerpc)(|64)', a): return 'powerpc'
elif re.match('sh(3|4)$', a): return 'sh'
elif re.match('bfin', a): return 'blackfin'
diff --git a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
index 332384de3..05be1f070 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-fitimage.bbclass
@@ -1,4 +1,4 @@
-inherit kernel-uboot
+inherit kernel-uboot uboot-sign
python __anonymous () {
kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
@@ -7,17 +7,28 @@ python __anonymous () {
depends = "%s u-boot-mkimage-native dtc-native" % depends
d.setVar("DEPENDS", depends)
+ if d.getVar("UBOOT_ARCH", True) == "x86":
+ replacementtype = "bzImage"
+ else:
+ replacementtype = "zImage"
+
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
if 'fitImage' in typeformake.split():
- d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', 'zImage'))
+ d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('fitImage', replacementtype))
image = d.getVar('INITRAMFS_IMAGE', True)
if image:
d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+ # Verified boot will sign the fitImage and append the public key to
+ # U-boot dtb. We ensure the U-Boot dtb is deployed before assembling
+ # the fitImage:
+ if d.getVar('UBOOT_SIGN_ENABLE', True):
+ uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot', True) or 'u-boot'
+ d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_deploy' % uboot_pn)
}
# Options for the device tree compiler passed to mkimage '-D' feature:
@@ -132,6 +143,33 @@ EOF
}
#
+# Emit the fitImage ITS setup section
+#
+# $1 ... .its filename
+# $2 ... Image counter
+# $3 ... Path to setup image
+fitimage_emit_section_setup() {
+
+ setup_csum="sha1"
+
+ cat << EOF >> ${1}
+ setup@${2} {
+ description = "Linux setup.bin";
+ data = /incbin/("${3}");
+ type = "x86_setup";
+ arch = "${UBOOT_ARCH}";
+ os = "linux";
+ compression = "none";
+ load = <0x00090000>;
+ entry = <0x00090000>;
+ hash@1 {
+ algo = "${setup_csum}";
+ };
+ };
+EOF
+}
+
+#
# Emit the fitImage ITS ramdisk section
#
# $1 ... .its filename
@@ -193,29 +231,34 @@ EOF
# $2 ... Linux kernel ID
# $3 ... DTB image ID
# $4 ... ramdisk ID
+# $5 ... config ID
fitimage_emit_section_config() {
conf_csum="sha1"
+ if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then
+ conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
+ fi
# Test if we have any DTBs at all
- if [ -z "${3}" -a -z "${4}" ] ; then
- conf_desc="Boot Linux kernel"
- fdt_line=""
- ramdisk_line=""
- elif [ -z "${4}" ]; then
- conf_desc="Boot Linux kernel with FDT blob"
- fdt_line="fdt = \"fdt@${3}\";"
- ramdisk_line=""
- elif [ -z "${3}" ]; then
- conf_desc="Boot Linux kernel with ramdisk"
- fdt_line=""
- ramdisk_line="ramdisk = \"ramdisk@${4}\";"
- else
- conf_desc="Boot Linux kernel with FDT blob, ramdisk"
+ conf_desc="Linux kernel"
+ kernel_line="kernel = \"kernel@${2}\";"
+ fdt_line=""
+ ramdisk_line=""
+
+ if [ -n "${3}" ]; then
+ conf_desc="${conf_desc}, FDT blob"
fdt_line="fdt = \"fdt@${3}\";"
+ fi
+
+ if [ -n "${4}" ]; then
+ conf_desc="${conf_desc}, ramdisk"
ramdisk_line="ramdisk = \"ramdisk@${4}\";"
fi
- kernel_line="kernel = \"kernel@${2}\";"
+
+ if [ -n "${5}" ]; then
+ conf_desc="${conf_desc}, setup"
+ setup_line="setup = \"setup@${5}\";"
+ fi
cat << EOF >> ${1}
default = "conf@1";
@@ -224,9 +267,40 @@ fitimage_emit_section_config() {
${kernel_line}
${fdt_line}
${ramdisk_line}
+ ${setup_line}
hash@1 {
algo = "${conf_csum}";
};
+EOF
+
+ if [ ! -z "${conf_sign_keyname}" ] ; then
+
+ sign_line="sign-images = \"kernel\""
+
+ if [ -n "${3}" ]; then
+ sign_line="${sign_line}, \"fdt\""
+ fi
+
+ if [ -n "${4}" ]; then
+ sign_line="${sign_line}, \"ramdisk\""
+ fi
+
+ if [ -n "${5}" ]; then
+ sign_line="${sign_line}, \"setup\""
+ fi
+
+ sign_line="${sign_line};"
+
+ cat << EOF >> ${1}
+ signature@1 {
+ algo = "${conf_csum},rsa2048";
+ key-name-hint = "${conf_sign_keyname}";
+ ${sign_line}
+ };
+EOF
+ fi
+
+ cat << EOF >> ${1}
};
EOF
}
@@ -241,6 +315,7 @@ fitimage_assemble() {
kernelcount=1
dtbcount=""
ramdiskcount=${3}
+ setupcount=""
rm -f ${1} arch/${ARCH}/boot/${2}
fitimage_emit_fit_header ${1}
@@ -274,7 +349,15 @@ fitimage_assemble() {
fi
#
- # Step 3: Prepare a ramdisk section.
+ # Step 3: Prepare a setup section. (For x86)
+ #
+ if test -e arch/${ARCH}/boot/setup.bin ; then
+ setupcount=1
+ fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin
+ fi
+
+ #
+ # Step 4: Prepare a ramdisk section.
#
if [ "x${ramdiskcount}" = "x1" ] ; then
# Find and use the first initramfs image archive type we find
@@ -292,26 +375,39 @@ fitimage_assemble() {
# Force the first Kernel and DTB in the default config
kernelcount=1
- dtbcount=1
+ if test -n "${dtbcount}"; then
+ dtbcount=1
+ fi
#
- # Step 4: Prepare a configurations section
+ # Step 5: Prepare a configurations section
#
fitimage_emit_section_maint ${1} confstart
- fitimage_emit_section_config ${1} ${kernelcount} ${dtbcount} ${ramdiskcount}
+ fitimage_emit_section_config ${1} "${kernelcount}" "${dtbcount}" "${ramdiskcount}" "${setupcount}"
fitimage_emit_section_maint ${1} sectend
fitimage_emit_section_maint ${1} fitend
#
- # Step 5: Assemble the image
+ # Step 6: Assemble the image
#
uboot-mkimage \
${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
-f ${1} \
arch/${ARCH}/boot/${2}
+
+ #
+ # Step 7: Sign the image and add public key to U-Boot dtb
+ #
+ if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then
+ uboot-mkimage \
+ ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
+ -F -k "${UBOOT_SIGN_KEYDIR}" \
+ -K "${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY}" \
+ -r arch/${ARCH}/boot/${2}
+ fi
}
do_assemble_fitimage() {
diff --git a/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass b/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass
index e1a70e621..08d226276 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-module-split.bbclass
@@ -30,16 +30,12 @@ PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages "
KERNEL_MODULES_META_PACKAGE ?= "kernel-modules"
+KERNEL_MODULE_PACKAGE_PREFIX ?= ""
+
python split_kernel_module_packages () {
import re
modinfoexp = re.compile("([^=]+)=(.*)")
- kerverrexp = re.compile('^(.*-hh.*)[\.\+].*$')
- depmodpat0 = re.compile("^(.*\.k?o):..*$")
- depmodpat1 = re.compile("^(.*\.k?o):\s*(.*\.k?o)\s*$")
- depmodpat2 = re.compile("^(.*\.k?o):\s*(.*\.k?o)\s*\\\$")
- depmodpat3 = re.compile("^\t(.*\.k?o)\s*\\\$")
- depmodpat4 = re.compile("^\t(.*\.k?o)\s*$")
def extract_modinfo(file):
import tempfile, subprocess
@@ -61,68 +57,6 @@ python split_kernel_module_packages () {
vals[m.group(1)] = m.group(2)
return vals
- def parse_depmod():
-
- dvar = d.getVar('PKGD', True)
-
- kernelver = d.getVar('KERNEL_VERSION', True)
- kernelver_stripped = kernelver
- m = kerverrexp.match(kernelver)
- if m:
- kernelver_stripped = m.group(1)
- staging_kernel_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
- system_map_file = "%s/boot/System.map-%s" % (dvar, kernelver)
- if not os.path.exists(system_map_file):
- system_map_file = "%s/System.map-%s" % (staging_kernel_dir, kernelver)
- if not os.path.exists(system_map_file):
- bb.fatal("System.map-%s does not exist in '%s/boot' nor STAGING_KERNEL_BUILDDIR '%s'" % (kernelver, dvar, staging_kernel_dir))
-
- cmd = "depmod -n -a -b %s -F %s %s" % (dvar, system_map_file, kernelver_stripped)
- f = os.popen(cmd, 'r')
-
- deps = {}
- line = f.readline()
- while line:
- if not depmodpat0.match(line):
- line = f.readline()
- continue
- m1 = depmodpat1.match(line)
- if m1:
- deps[m1.group(1)] = m1.group(2).split()
- else:
- m2 = depmodpat2.match(line)
- if m2:
- deps[m2.group(1)] = m2.group(2).split()
- line = f.readline()
- m3 = depmodpat3.match(line)
- while m3:
- deps[m2.group(1)].extend(m3.group(1).split())
- line = f.readline()
- m3 = depmodpat3.match(line)
- m4 = depmodpat4.match(line)
- deps[m2.group(1)].extend(m4.group(1).split())
- line = f.readline()
- f.close()
- return deps
-
- def get_dependencies(file, pattern, format):
- # file no longer includes PKGD
- file = file.replace(d.getVar('PKGD', True) or '', '', 1)
- # instead is prefixed with /lib/modules/${KERNEL_VERSION}
- file = file.replace("/lib/modules/%s/" % d.getVar('KERNEL_VERSION', True) or '', '', 1)
-
- if file in module_deps:
- dependencies = []
- for i in module_deps[file]:
- m = re.match(pattern, os.path.basename(i))
- if not m:
- continue
- on = legitimize_package_name(m.group(1))
- dependency_pkg = format % on
- dependencies.append(dependency_pkg)
- return dependencies
- return []
-
def frob_metadata(file, pkg, pattern, format, basename):
vals = extract_modinfo(file)
@@ -171,7 +105,13 @@ python split_kernel_module_packages () {
d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or "")
- for dep in get_dependencies(file, pattern, format):
+ modinfo_deps = []
+ if "depends" in vals and vals["depends"] != "":
+ for dep in vals["depends"].split(","):
+ on = legitimize_package_name(dep)
+ dependency_pkg = format % on
+ modinfo_deps.append(dependency_pkg)
+ for dep in modinfo_deps:
if not dep in rdepends:
rdepends[dep] = []
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
@@ -179,9 +119,10 @@ python split_kernel_module_packages () {
# Avoid automatic -dev recommendations for modules ending with -dev.
d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1)
- module_deps = parse_depmod()
module_regex = '^(.*)\.k?o$'
- module_pattern = 'kernel-module-%s'
+
+ module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX', True)
+ module_pattern = module_pattern_prefix + 'kernel-module-%s'
postinst = d.getVar('pkg_postinst_modules', True)
postrm = d.getVar('pkg_postrm_modules', True)
diff --git a/import-layers/yocto-poky/meta/classes/kernel-uimage.bbclass b/import-layers/yocto-poky/meta/classes/kernel-uimage.bbclass
index 2a187f549..340503a2d 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-uimage.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-uimage.bbclass
@@ -14,8 +14,7 @@ python __anonymous () {
if d.getVar("KEEPUIMAGE", True) != 'yes':
typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
if "uImage" in typeformake.split():
- typeformake.replace('uImage', 'vmlinux')
- d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake)
+ d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('uImage', 'vmlinux'))
}
do_uboot_mkimage() {
diff --git a/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass b/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass
index f86b3ef01..6160a29ec 100644
--- a/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel-yocto.bbclass
@@ -1,5 +1,7 @@
# remove tasks that modify the source tree in case externalsrc is inherited
-SRCTREECOVEREDTASKS += "do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_shared_workdir do_fetch do_unpack do_patch"
+SRCTREECOVEREDTASKS += "do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_fetch do_unpack do_patch"
+PATCH_GIT_USER_EMAIL ?= "kernel-yocto@oe"
+PATCH_GIT_USER_NAME ?= "OpenEmbedded"
# returns local (absolute) path names for all valid patches in the
# src_uri
@@ -119,72 +121,54 @@ do_kernel_metadata() {
patches="${@" ".join(find_patches(d))}"
feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
- # add any explicitly referenced features onto the end of the feature
- # list that is passed to the kernel build scripts.
- if [ -n "${KERNEL_FEATURES}" ]; then
- for feat in ${KERNEL_FEATURES}; do
- addon_features="$addon_features --feature $feat"
- done
- fi
-
# check for feature directories/repos/branches that were part of the
# SRC_URI. If they were supplied, we convert them into include directives
# for the update part of the process
- if [ -n "${feat_dirs}" ]; then
- for f in ${feat_dirs}; do
+ for f in ${feat_dirs}; do
if [ -d "${WORKDIR}/$f/meta" ]; then
- includes="$includes -I${WORKDIR}/$f/meta"
- elif [ -d "${WORKDIR}/$f" ]; then
- includes="$includes -I${WORKDIR}/$f"
+ includes="$includes -I${WORKDIR}/$f/kernel-meta"
+ elif [ -d "${WORKDIR}/$f" ]; then
+ includes="$includes -I${WORKDIR}/$f"
fi
- done
+ done
+ for s in ${sccs} ${patches}; do
+ sdir=$(dirname $s)
+ includes="$includes -I${sdir}"
+ # if a SRC_URI passed patch or .scc has a subdir of "kernel-meta",
+ # then we add it to the search path
+ if [ -d "${sdir}/kernel-meta" ]; then
+ includes="$includes -I${sdir}/kernel-meta"
+ fi
+ done
+
+ # expand kernel features into their full path equivalents
+ bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE})
+ meta_dir=$(kgit --meta)
+
+ # run1: pull all the configuration fragments, no matter where they come from
+ elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`"
+ if [ -n "${elements}" ]; then
+ scc --force -o ${S}/${meta_dir}:cfg,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
fi
- # updates or generates the target description
- updateme ${updateme_flags} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
- ${includes} ${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches}
- if [ $? -ne 0 ]; then
- bbfatal_log "Could not update ${machine_branch}"
+ # run2: only generate patches for elements that have been passed on the SRC_URI
+ elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`"
+ if [ -n "${elements}" ]; then
+ scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} ${KERNEL_FEATURES}
fi
}
do_patch() {
cd ${S}
- # executes and modifies the source tree as required
- patchme ${KMACHINE}
- if [ $? -ne 0 ]; then
- bberror "Could not apply patches for ${KMACHINE}."
- bbfatal_log "Patch failures can be resolved in the linux source directory ${S})"
- fi
-
- # check to see if the specified SRCREV is reachable from the final branch.
- # if it wasn't something wrong has happened, and we should error.
- machine_srcrev="${SRCREV_machine}"
- if [ -z "${machine_srcrev}" ]; then
- # fallback to SRCREV if a non machine_meta tree is being built
- machine_srcrev="${SRCREV}"
- # if SRCREV cannot be reached something is wrong.
- if [ -z "${machine_srcrev}" ]; then
- bbfatal "Neither SRCREV_machine or SRCREV was specified!"
- fi
- fi
-
- current_branch=`git rev-parse --abbrev-ref HEAD`
- machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
- if [ "${current_branch}" != "${machine_branch}" ]; then
- bbwarn "After meta data application, the kernel tree branch is ${current_branch}. The"
- bbwarn "SRC_URI specified branch ${machine_branch}. The branch will be forced to ${machine_branch},"
- bbwarn "but this means the board meta data (.scc files) do not match the SRC_URI specification."
- bbwarn "The meta data and branch ${machine_branch} should be inspected to ensure the proper"
- bbwarn "kernel is being built."
- git checkout -f ${machine_branch}
- fi
-
- if [ "${machine_srcrev}" != "AUTOINC" ]; then
- if ! [ "$(git rev-parse --verify ${machine_srcrev}~0)" = "$(git merge-base ${machine_srcrev} HEAD)" ]; then
- bberror "SRCREV ${machine_srcrev} was specified, but is not reachable"
- bbfatal "Check the BSP description for incorrect branch selection, or other errors."
+ check_git_config
+ meta_dir=$(kgit --meta)
+ (cd ${meta_dir}; ln -sf patch.queue series)
+ if [ -f "${meta_dir}/series" ]; then
+ kgit-s2q --gen -v --patches .kernel-meta/
+ if [ $? -ne 0 ]; then
+ bberror "Could not apply patches for ${KMACHINE}."
+ bbfatal_log "Patch failures can be resolved in the linux source directory ${S})"
fi
fi
}
@@ -253,26 +237,37 @@ do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot"
do_kernel_configme[dirs] += "${S} ${B}"
do_kernel_configme() {
- bbnote "kernel configme"
- export KMETA=${KMETA}
+ set +e
- if [ -n "${KCONFIG_MODE}" ]; then
- configmeflags=${KCONFIG_MODE}
- else
- # If a defconfig was passed, use =n as the baseline, which is achieved
- # via --allnoconfig
+ # translate the kconfig_mode into something that merge_config.sh
+ # understands
+ case ${KCONFIG_MODE} in
+ *allnoconfig)
+ config_flags="-n"
+ ;;
+ *alldefconfig)
+ config_flags=""
+ ;;
+ *)
if [ -f ${WORKDIR}/defconfig ]; then
- configmeflags="--allnoconfig"
+ config_flags="-n"
fi
- fi
+ ;;
+ esac
cd ${S}
- PATH=${PATH}:${S}/scripts/util
- configme ${configmeflags} --reconfig --output ${B} ${LINUX_KERNEL_TYPE} ${KMACHINE}
+
+ meta_dir=$(kgit --meta)
+ configs="$(scc --configs -o ${meta_dir})"
+ if [ -z "${configs}" ]; then
+ bbfatal_log "Could not find configuration queue (${meta_dir}/config.queue)"
+ fi
+
+ CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}" ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} > ${meta_dir}/cfg/merge_config_build.log 2>&1
if [ $? -ne 0 ]; then
bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
fi
-
+
echo "# Global settings from linux recipe" >> ${B}/.config
echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
}
@@ -290,36 +285,23 @@ python do_kernel_configcheck() {
kmeta = "." + kmeta
pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH', True), "${S}/scripts/util/")
- cmd = d.expand("cd ${S}; kconf_check -config %s/meta-series ${S} ${B}" % kmeta)
+
+ cmd = d.expand("scc --configs -o ${S}/.kernel-meta")
+ ret, configs = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd))
+
+ cmd = d.expand("cd ${S}; kconf_check --report -o ${S}/%s/cfg/ ${B}/.config ${S} %s" % (kmeta,configs))
ret, result = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd))
config_check_visibility = int(d.getVar( "KCONF_AUDIT_LEVEL", True ) or 0)
bsp_check_visibility = int(d.getVar( "KCONF_BSP_AUDIT_LEVEL", True ) or 0)
# if config check visibility is non-zero, report dropped configuration values
- mismatch_file = "${S}/" + kmeta + "/" + "mismatch.cfg"
+ mismatch_file = d.expand("${S}/%s/cfg/mismatch.txt" % kmeta)
if os.path.exists(mismatch_file):
if config_check_visibility:
with open (mismatch_file, "r") as myfile:
results = myfile.read()
bb.warn( "[kernel config]: specified values did not make it into the kernel's final configuration:\n\n%s" % results)
-
- # if config check visibility is level 2 or higher, report non-hardware options
- nonhw_file = "${S}/" + kmeta + "/" + "nonhw_report.cfg"
- if os.path.exists(nonhw_file):
- if config_check_visibility > 1:
- with open (nonhw_file, "r") as myfile:
- results = myfile.read()
- bb.warn( "[kernel config]: BSP specified non-hw configuration:\n\n%s" % results)
-
- bsp_desc = "${S}/" + kmeta + "/" + "top_tgt"
- if os.path.exists(bsp_desc) and bsp_check_visibility > 1:
- with open (bsp_desc, "r") as myfile:
- bsp_tgt = myfile.read()
- m = re.match("^(.*)scratch.obj(.*)$", bsp_tgt)
- if not m is None:
- bb.warn( "[kernel]: An auto generated BSP description was used, this normally indicates a misconfiguration.\n" +
- "Check that your machine (%s) has an associated kernel description." % "${MACHINE}" )
}
# Ensure that the branches (BSP and meta) are on the locations specified by
diff --git a/import-layers/yocto-poky/meta/classes/kernel.bbclass b/import-layers/yocto-poky/meta/classes/kernel.bbclass
index e7e2cb396..25a153cd2 100644
--- a/import-layers/yocto-poky/meta/classes/kernel.bbclass
+++ b/import-layers/yocto-poky/meta/classes/kernel.bbclass
@@ -1,7 +1,7 @@
inherit linux-kernel-base kernel-module-split
PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross bc-native"
+DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross bc-native lzop-native"
S = "${STAGING_KERNEL_DIR}"
B = "${WORKDIR}/build"
@@ -127,9 +127,9 @@ PACKAGES_DYNAMIC += "^kernel-firmware-.*"
export OS = "${TARGET_OS}"
export CROSS_COMPILE = "${TARGET_PREFIX}"
-KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
- int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + \
- int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}"
+KERNEL_PRIORITY ?= "${@int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
+ int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[1]) * 100 + \
+ int(d.getVar('PV', True).split('-')[0].split('+')[0].split('.')[-1])}"
KERNEL_RELEASE ?= "${KERNEL_VERSION}"
@@ -140,7 +140,7 @@ KERNEL_IMAGEDEST = "boot"
#
# configuration
#
-export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}"
+export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE", True) or "ttyS0"}"
KERNEL_VERSION = "${@get_kernelversion_headers('${B}')}"
@@ -156,10 +156,7 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
# Some Linux kernel configurations need additional parameters on the command line
KERNEL_EXTRA_ARGS ?= ""
-# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE.
-# We don't want to override kernel Makefile variables from the environment
-EXTRA_OEMAKE = ""
-
+EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}""
KERNEL_ALT_IMAGETYPE ??= ""
copy_initramfs() {
@@ -203,7 +200,7 @@ copy_initramfs() {
echo "Finished copy of initramfs into ./usr"
}
-INITRAMFS_BASE_NAME = "initramfs-${PV}-${PR}-${MACHINE}-${DATETIME}"
+INITRAMFS_BASE_NAME ?= "initramfs-${PV}-${PR}-${MACHINE}-${DATETIME}"
INITRAMFS_BASE_NAME[vardepsexclude] = "DATETIME"
do_bundle_initramfs () {
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
@@ -232,8 +229,7 @@ do_bundle_initramfs () {
if [ -n "$realpath" ]; then
mv -f $realpath $realpath.initramfs
mv -f $realpath.bak $realpath
- cd ${B}/${KERNEL_OUTPUT_DIR}
- ln -sf $linkpath.initramfs
+ ln -sf $linkpath.initramfs ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs
else
mv -f ${KERNEL_OUTPUT_DIR}/$type ${KERNEL_OUTPUT_DIR}/$type.initramfs
mv -f ${KERNEL_OUTPUT_DIR}/$type.bak ${KERNEL_OUTPUT_DIR}/$type
@@ -247,6 +243,7 @@ do_bundle_initramfs () {
done
fi
}
+do_bundle_initramfs[dirs] = "${B}"
python do_devshell_prepend () {
os.environ["LDFLAGS"] = ''
@@ -291,7 +288,7 @@ do_compile_kernelmodules() {
# external kernel modules has a dependency on
# other kernel modules and will look at this
# file to do symbol lookups
- cp Module.symvers ${STAGING_KERNEL_BUILDDIR}/
+ cp ${B}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/
else
bbnote "no modules to compile"
fi
@@ -330,6 +327,36 @@ kernel_do_install() {
}
do_install[prefuncs] += "package_get_auto_pr"
+# Must be ran no earlier than after do_kernel_checkout or else Makefile won't be in ${S}/Makefile
+do_kernel_version_sanity_check() {
+ # The Makefile determines the kernel version shown at runtime
+ # Don't use KERNEL_VERSION because the headers it grabs the version from aren't generated until do_compile
+ VERSION=$(grep "^VERSION =" ${S}/Makefile | sed s/.*=\ *//)
+ PATCHLEVEL=$(grep "^PATCHLEVEL =" ${S}/Makefile | sed s/.*=\ *//)
+ SUBLEVEL=$(grep "^SUBLEVEL =" ${S}/Makefile | sed s/.*=\ *//)
+ EXTRAVERSION=$(grep "^EXTRAVERSION =" ${S}/Makefile | sed s/.*=\ *//)
+
+ # Build a string for regex and a plain version string
+ reg="^${VERSION}\.${PATCHLEVEL}"
+ vers="${VERSION}.${PATCHLEVEL}"
+ if [ -n "${SUBLEVEL}" ]; then
+ # Ignoring a SUBLEVEL of zero is fine
+ if [ "${SUBLEVEL}" = "0" ]; then
+ reg="${reg}(\.${SUBLEVEL})?"
+ else
+ reg="${reg}\.${SUBLEVEL}"
+ vers="${vers}.${SUBLEVEL}"
+ fi
+ fi
+ vers="${vers}${EXTRAVERSION}"
+ reg="${reg}${EXTRAVERSION}"
+
+ if [ -z `echo ${PV} | grep -E "${reg}"` ]; then
+ bbfatal "Package Version (${PV}) does not match of kernel being built (${vers}). Please update the PV variable to match the kernel source."
+ fi
+ exit 0
+}
+
addtask shared_workdir after do_compile before do_compile_kernelmodules
addtask shared_workdir_setscene
@@ -364,6 +391,14 @@ do_shared_workdir () {
cp .config $kerneldir/
mkdir -p $kerneldir/include/config
cp include/config/kernel.release $kerneldir/include/config/kernel.release
+ if [ -e certs/signing_key.pem ]; then
+ # The signing_key.* files are stored in the certs/ dir in
+ # newer Linux kernels
+ mkdir -p $kerneldir/certs
+ cp certs/signing_key.* $kerneldir/certs/
+ elif [ -e signing_key.priv ]; then
+ cp signing_key.* $kerneldir/
+ fi
# We can also copy over all the generated files and avoid special cases
# like version.h, but we've opted to keep this small until file creep starts
@@ -434,6 +469,7 @@ kernel_do_configure() {
}
do_savedefconfig() {
+ bbplain "Saving defconfig to:\n${B}/defconfig"
oe_runmake -C ${B} savedefconfig
}
do_savedefconfig[nostamp] = "1"
@@ -484,15 +520,18 @@ python split_kernel_packages () {
}
# Many scripts want to look in arch/$arch/boot for the bootable
-# image. This poses a problem for vmlinux based booting. This
-# task arranges to have vmlinux appear in the normalized directory
-# location.
-do_kernel_link_vmlinux() {
+# image. This poses a problem for vmlinux and vmlinuz based
+# booting. This task arranges to have vmlinux and vmlinuz appear
+# in the normalized directory location.
+do_kernel_link_images() {
if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
mkdir ${B}/arch/${ARCH}/boot
fi
cd ${B}/arch/${ARCH}/boot
ln -sf ../../../vmlinux
+ if [ -f ../../../vmlinuz ]; then
+ ln -sf ../../../vmlinuz
+ fi
}
do_strip() {
@@ -522,7 +561,7 @@ do_strip() {
}
do_strip[dirs] = "${B}"
-addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
+addtask do_strip before do_sizecheck after do_kernel_link_images
# Support checking the kernel size since some kernels need to reside in partitions
# with a fixed length or there is a limit in transferring the kernel to memory
@@ -583,8 +622,7 @@ kernel_do_deploy() {
initramfs_base_name=${type}-${INITRAMFS_BASE_NAME}
initramfs_symlink_name=${type}-initramfs-${MACHINE}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${type}.initramfs ${DEPLOYDIR}/${initramfs_base_name}.bin
- cd ${DEPLOYDIR}
- ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
+ ln -sf ${initramfs_base_name}.bin ${DEPLOYDIR}/${initramfs_symlink_name}.bin
fi
done
}
@@ -595,4 +633,3 @@ do_deploy[prefuncs] += "package_get_auto_pr"
addtask deploy after do_populate_sysroot
EXPORT_FUNCTIONS do_deploy
-
diff --git a/import-layers/yocto-poky/meta/classes/libc-common.bbclass b/import-layers/yocto-poky/meta/classes/libc-common.bbclass
index bbc80167d..11b0065a6 100644
--- a/import-layers/yocto-poky/meta/classes/libc-common.bbclass
+++ b/import-layers/yocto-poky/meta/classes/libc-common.bbclass
@@ -4,14 +4,12 @@ do_install() {
h=`echo $r|sed -e's,\.x$,.h,'`
install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
done
- install -d ${D}/${sysconfdir}/
- install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/
+ install -Dm 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ld.so.conf
install -d ${D}${localedir}
make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
# get rid of some broken files...
for i in ${GLIBC_BROKEN_LOCALES}; do
- grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
- mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
+ sed -i "/$i/d" ${WORKDIR}/SUPPORTED
done
rm -f ${D}${sysconfdir}/rpc
rm -rf ${D}${datadir}/zoneinfo
diff --git a/import-layers/yocto-poky/meta/classes/libc-package.bbclass b/import-layers/yocto-poky/meta/classes/libc-package.bbclass
index 467d56792..2dc90c44d 100644
--- a/import-layers/yocto-poky/meta/classes/libc-package.bbclass
+++ b/import-layers/yocto-poky/meta/classes/libc-package.bbclass
@@ -47,15 +47,6 @@ python __anonymous () {
OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
-do_configure_prepend() {
- if [ -e ${S}/elf/ldd.bash.in ]; then
- sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
- fi
-}
-
-
-
-# indentation removed on purpose
locale_base_postinst() {
#!/bin/sh
@@ -63,33 +54,14 @@ if [ "x$D" != "x" ]; then
exit 1
fi
-rm -rf ${TMP_LOCALE}
-mkdir -p ${TMP_LOCALE}
-if [ -f ${localedir}/locale-archive ]; then
- cp ${localedir}/locale-archive ${TMP_LOCALE}/
-fi
-localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s
-mkdir -p ${localedir}/
-mv ${TMP_LOCALE}/locale-archive ${localedir}/
-rm -rf ${TMP_LOCALE}
+localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s %s
}
-# indentation removed on purpose
locale_base_postrm() {
#!/bin/sh
-
-rm -rf ${TMP_LOCALE}
-mkdir -p ${TMP_LOCALE}
-if [ -f ${localedir}/locale-archive ]; then
- cp ${localedir}/locale-archive ${TMP_LOCALE}/
-fi
-localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s
-mv ${TMP_LOCALE}/locale-archive ${localedir}/
-rm -rf ${TMP_LOCALE}
+localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s %s
}
-
-TMP_LOCALE="/tmp/locale${localedir}"
LOCALETREESRC ?= "${PKGD}"
do_prep_locale_tree() {
@@ -150,6 +122,7 @@ python package_do_split_gconvs () {
c_re = re.compile('^copy "(.*)"')
i_re = re.compile('^include "(\w+)".*')
for l in f.readlines():
+ l = l.decode("latin-1")
m = c_re.match(l) or i_re.match(l)
if m:
dp = legitimize_package_name('%s%s-gconv-%s' % (mlprefix, bpn, m.group(1)))
@@ -171,6 +144,7 @@ python package_do_split_gconvs () {
c_re = re.compile('^copy "(.*)"')
i_re = re.compile('^include "(\w+)".*')
for l in f.readlines():
+ l = l.decode("latin-1")
m = c_re.match(l) or i_re.match(l)
if m:
dp = legitimize_package_name('%s%s-charmap-%s' % (mlprefix, bpn, m.group(1)))
@@ -191,6 +165,7 @@ python package_do_split_gconvs () {
c_re = re.compile('^copy "(.*)"')
i_re = re.compile('^include "(\w+)".*')
for l in f.readlines():
+ l = l.decode("latin-1")
m = c_re.match(l) or i_re.match(l)
if m:
dp = legitimize_package_name(mlprefix+bpn+'-localedata-%s' % m.group(1))
@@ -223,7 +198,7 @@ python package_do_split_gconvs () {
# GLIBC_GENERATE_LOCALES var specifies which locales to be generated. empty or "all" means all locales
to_generate = d.getVar('GLIBC_GENERATE_LOCALES', True)
if not to_generate or to_generate == 'all':
- to_generate = supported.keys()
+ to_generate = sorted(supported.keys())
else:
to_generate = to_generate.split()
for locale in to_generate:
@@ -274,9 +249,13 @@ python package_do_split_gconvs () {
"powerpc": " --uint32-align=4 --big-endian ", \
"powerpc64": " --uint32-align=4 --big-endian ", \
"mips": " --uint32-align=4 --big-endian ", \
+ "mipsisa32r6": " --uint32-align=4 --big-endian ", \
"mips64": " --uint32-align=4 --big-endian ", \
+ "mipsisa64r6": " --uint32-align=4 --big-endian ", \
"mipsel": " --uint32-align=4 --little-endian ", \
+ "mipsisa32r6el": " --uint32-align=4 --little-endian ", \
"mips64el":" --uint32-align=4 --little-endian ", \
+ "mipsisa64r6el":" --uint32-align=4 --little-endian ", \
"i586": " --uint32-align=4 --little-endian ", \
"i686": " --uint32-align=4 --little-endian ", \
"x86_64": " --uint32-align=4 --little-endian " }
@@ -285,9 +264,9 @@ python package_do_split_gconvs () {
localedef_opts = locale_arch_options[target_arch]
else:
bb.error("locale_arch_options not found for target_arch=" + target_arch)
- raise bb.build.FuncFailed("unknown arch:" + target_arch + " for locale_arch_options")
+ bb.fatal("unknown arch:" + target_arch + " for locale_arch_options")
- localedef_opts += " --force --old-style --no-archive --prefix=%s \
+ localedef_opts += " --force --no-archive --prefix=%s \
--inputfile=%s/%s/i18n/locales/%s --charmap=%s %s/%s" \
% (treedir, treedir, datadir, locale, encoding, outputpath, name)
@@ -295,7 +274,7 @@ python package_do_split_gconvs () {
(path, i18npath, gconvpath, localedef_opts)
else: # earlier slower qemu way
qemu = qemu_target_binary(d)
- localedef_opts = "--force --old-style --no-archive --prefix=%s \
+ localedef_opts = "--force --no-archive --prefix=%s \
--inputfile=%s/i18n/locales/%s --charmap=%s %s" \
% (treedir, datadir, locale, encoding, name)
@@ -388,4 +367,3 @@ python package_do_split_gconvs () {
python populate_packages_prepend () {
bb.build.exec_func('package_do_split_gconvs', d)
}
-
diff --git a/import-layers/yocto-poky/meta/classes/license.bbclass b/import-layers/yocto-poky/meta/classes/license.bbclass
index 43944e6ee..da4fc3e1d 100644
--- a/import-layers/yocto-poky/meta/classes/license.bbclass
+++ b/import-layers/yocto-poky/meta/classes/license.bbclass
@@ -181,8 +181,10 @@ def license_deployed_manifest(d):
key,val = line.split(": ", 1)
man_dic[dep][key] = val[:-1]
- image_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
- d.getVar('IMAGE_NAME', True), 'image_license.manifest')
+ lic_manifest_dir = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
+ d.getVar('IMAGE_NAME', True))
+ bb.utils.mkdirhier(lic_manifest_dir)
+ image_license_manifest = os.path.join(lic_manifest_dir, 'image_license.manifest')
write_license_files(d, image_license_manifest, man_dic)
def get_deployed_dependencies(d):
@@ -198,7 +200,7 @@ def get_deployed_dependencies(d):
# it might contain the bootloader.
taskdata = d.getVar("BB_TASKDEPDATA", False)
depends = list(set([dep[0] for dep
- in taskdata.itervalues()
+ in list(taskdata.values())
if not dep[0].endswith("-native")]))
extra_depends = d.getVar("EXTRA_IMAGEDEPENDS", True)
boot_depends = get_boot_dependencies(d)
@@ -259,7 +261,7 @@ def get_boot_dependencies(d):
depends.append(dep)
# We need to search for the provider of the dependency
else:
- for taskdep in taskdepdata.itervalues():
+ for taskdep in taskdepdata.values():
# The fifth field contains what the task provides
if dep in taskdep[4]:
info_file = os.path.join(
@@ -340,6 +342,7 @@ def add_package_and_files(d):
def copy_license_files(lic_files_paths, destdir):
import shutil
+ import errno
bb.utils.mkdirhier(destdir)
for (basename, path) in lic_files_paths:
@@ -348,12 +351,21 @@ def copy_license_files(lic_files_paths, destdir):
dst = os.path.join(destdir, basename)
if os.path.exists(dst):
os.remove(dst)
- if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev):
- os.link(src, dst)
+ canlink = os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev)
+ if canlink:
try:
- os.chown(dst,0,0)
+ os.link(src, dst)
+ except OSError as err:
+ if err.errno == errno.EXDEV:
+ # Copy license files if hard-link is not possible even if st_dev is the
+ # same on source and destination (docker container with device-mapper?)
+ canlink = False
+ else:
+ raise
+ try:
+ if canlink:
+ os.chown(dst,0,0)
except OSError as err:
- import errno
if err.errno in (errno.EPERM, errno.EINVAL):
# Suppress "Operation not permitted" error, as
# sometimes this function is not executed under pseudo.
@@ -362,7 +374,7 @@ def copy_license_files(lic_files_paths, destdir):
pass
else:
raise
- else:
+ if not canlink:
shutil.copyfile(src, dst)
except Exception as e:
bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e))
@@ -373,21 +385,8 @@ def find_license_files(d):
"""
import shutil
import oe.license
+ from collections import defaultdict, OrderedDict
- pn = d.getVar('PN', True)
- for package in d.getVar('PACKAGES', True):
- if d.getVar('LICENSE_' + package, True):
- license_types = license_types + ' & ' + \
- d.getVar('LICENSE_' + package, True)
-
- #If we get here with no license types, then that means we have a recipe
- #level license. If so, we grab only those.
- try:
- license_types
- except NameError:
- # All the license types at the recipe level
- license_types = d.getVar('LICENSE', True)
-
# All the license files for the package
lic_files = d.getVar('LIC_FILES_CHKSUM', True)
pn = d.getVar('PN', True)
@@ -397,6 +396,8 @@ def find_license_files(d):
generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
# List of basename, path tuples
lic_files_paths = []
+ # Entries from LIC_FILES_CHKSUM
+ lic_chksums = {}
license_source_dirs = []
license_source_dirs.append(generic_directory)
try:
@@ -426,7 +427,6 @@ def find_license_files(d):
license_source = None
# If the generic does not exist we need to check to see if there is an SPDX mapping to it,
# unless NO_GENERIC_LICENSE is set.
-
for lic_dir in license_source_dirs:
if not os.path.isfile(os.path.join(lic_dir, license_type)):
if d.getVarFlag('SPDXLICENSEMAP', license_type, True) != None:
@@ -440,6 +440,7 @@ def find_license_files(d):
license_source = lic_dir
break
+ non_generic_lic = d.getVarFlag('NO_GENERIC_LICENSE', license_type, True)
if spdx_generic and license_source:
# we really should copy to generic_ + spdx_generic, however, that ends up messing the manifest
# audit up. This should be fixed in emit_pkgdata (or, we actually got and fix all the recipes)
@@ -451,13 +452,11 @@ def find_license_files(d):
if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True):
bb.warn("%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type))
- elif d.getVarFlag('NO_GENERIC_LICENSE', license_type, True):
+ elif non_generic_lic and non_generic_lic in lic_chksums:
# if NO_GENERIC_LICENSE is set, we copy the license files from the fetched source
# of the package rather than the license_source_dirs.
- for (basename, path) in lic_files_paths:
- if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True) == basename:
- lic_files_paths.append(("generic_" + license_type, path))
- break
+ lic_files_paths.append(("generic_" + license_type,
+ os.path.join(srcdir, non_generic_lic)))
else:
# Add explicity avoid of CLOSED license because this isn't generic
if license_type != 'CLOSED':
@@ -466,7 +465,7 @@ def find_license_files(d):
pass
if not generic_directory:
- raise bb.build.FuncFailed("COMMON_LICENSE_DIR is unset. Please set this in your distro config")
+ bb.fatal("COMMON_LICENSE_DIR is unset. Please set this in your distro config")
if not lic_files:
# No recipe should have an invalid license file. This is checked else
@@ -478,19 +477,32 @@ def find_license_files(d):
try:
(type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
except bb.fetch.MalformedUrl:
- raise bb.build.FuncFailed("%s: LIC_FILES_CHKSUM contains an invalid URL: %s" % (d.getVar('PF', True), url))
+ bb.fatal("%s: LIC_FILES_CHKSUM contains an invalid URL: %s" % (d.getVar('PF', True), url))
# We want the license filename and path
- srclicfile = os.path.join(srcdir, path)
- lic_files_paths.append((os.path.basename(path), srclicfile))
+ chksum = parm['md5'] if 'md5' in parm else parm['sha256']
+ lic_chksums[path] = chksum
v = FindVisitor()
try:
- v.visit_string(license_types)
+ v.visit_string(d.getVar('LICENSE', True))
except oe.license.InvalidLicense as exc:
bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
except SyntaxError:
bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF', True)))
+ # Add files from LIC_FILES_CHKSUM to list of license files
+ lic_chksum_paths = defaultdict(OrderedDict)
+ for path, chksum in lic_chksums.items():
+ lic_chksum_paths[os.path.basename(path)][chksum] = os.path.join(srcdir, path)
+ for basename, files in lic_chksum_paths.items():
+ if len(files) == 1:
+ lic_files_paths.append((basename, list(files.values())[0]))
+ else:
+ # If there are multiple different license files with identical
+ # basenames we rename them to <file>.0, <file>.1, ...
+ for i, path in enumerate(files.values()):
+ lic_files_paths.append(("%s.%d" % (basename, i), path))
+
return lic_files_paths
def return_spdx(d, license):
@@ -633,7 +645,7 @@ def check_license_format(d):
licenses = d.getVar('LICENSE', True)
from oe.license import license_operator, license_operator_chars, license_pattern
- elements = filter(lambda x: x.strip(), license_operator.split(licenses))
+ elements = list(filter(lambda x: x.strip(), license_operator.split(licenses)))
for pos, element in enumerate(elements):
if license_pattern.match(element):
if pos > 0 and license_pattern.match(elements[pos - 1]):
@@ -656,8 +668,6 @@ do_rootfs[recrdeptask] += "do_populate_lic"
IMAGE_POSTPROCESS_COMMAND_prepend = "write_deploy_manifest; "
do_image[recrdeptask] += "do_populate_lic"
-do_populate_lic_setscene[dirs] = "${LICSSTATEDIR}/${PN}"
-do_populate_lic_setscene[cleandirs] = "${LICSSTATEDIR}"
python do_populate_lic_setscene () {
sstate_setscene(d)
}
diff --git a/import-layers/yocto-poky/meta/classes/linuxloader.bbclass b/import-layers/yocto-poky/meta/classes/linuxloader.bbclass
index 5c4dc5c51..117b03074 100644
--- a/import-layers/yocto-poky/meta/classes/linuxloader.bbclass
+++ b/import-layers/yocto-poky/meta/classes/linuxloader.bbclass
@@ -1,7 +1,13 @@
linuxloader () {
case ${TARGET_ARCH} in
- powerpc | mips | mipsel | microblaze )
+ powerpc | microblaze )
+ dynamic_loader="${base_libdir}/ld.so.1"
+ ;;
+ mipsisa32r6el | mipsisa32r6 | mipsisa64r6el | mipsisa64r6)
+ dynamic_loader="${base_libdir}/ld-linux-mipsn8.so.1"
+ ;;
+ mips* )
dynamic_loader="${base_libdir}/ld.so.1"
;;
powerpc64)
diff --git a/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass b/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass
index c751385e7..734697f9e 100644
--- a/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass
+++ b/import-layers/yocto-poky/meta/classes/live-vm-common.bbclass
@@ -31,14 +31,18 @@ inherit ${EFI_CLASS}
inherit ${PCBIOS_CLASS}
KERNEL_IMAGETYPE ??= "bzImage"
+VM_DEFAULT_KERNEL ??= "${KERNEL_IMAGETYPE}"
populate_kernel() {
dest=$1
install -d $dest
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
- if [ -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ]; then
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} $dest/vmlinuz
+ bbnote "Trying to install ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} as $dest/vmlinuz"
+ if [ -e ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} ]; then
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} $dest/vmlinuz
+ else
+ bbwarn "${DEPLOY_DIR_IMAGE}/${VM_DEFAULT_KERNEL} doesn't exist"
fi
# initrd is made of concatenation of multiple filesystem images
diff --git a/import-layers/yocto-poky/meta/classes/metadata_scm.bbclass b/import-layers/yocto-poky/meta/classes/metadata_scm.bbclass
index 0f7f4235a..2e6fac209 100644
--- a/import-layers/yocto-poky/meta/classes/metadata_scm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/metadata_scm.bbclass
@@ -4,8 +4,7 @@ METADATA_REVISION ?= "${@base_detect_revision(d)}"
def base_detect_revision(d):
path = base_get_scmbasepath(d)
- scms = [base_get_metadata_git_revision, \
- base_get_metadata_svn_revision]
+ scms = [base_get_metadata_git_revision]
for scm in scms:
rev = scm(path, d)
@@ -27,7 +26,7 @@ def base_detect_branch(d):
return "<unknown>"
def base_get_scmbasepath(d):
- return d.getVar( 'COREBASE', True)
+ return os.path.join(d.getVar('COREBASE', True), 'meta')
def base_get_metadata_monotone_branch(path, d):
monotone_branch = "<unknown>"
diff --git a/import-layers/yocto-poky/meta/classes/mirrors.bbclass b/import-layers/yocto-poky/meta/classes/mirrors.bbclass
index 9e6d4836d..11847085b 100644
--- a/import-layers/yocto-poky/meta/classes/mirrors.bbclass
+++ b/import-layers/yocto-poky/meta/classes/mirrors.bbclass
@@ -21,13 +21,13 @@ ${DEBIAN_MIRROR} ftp://ftp.se.debian.org/debian/pool \n \
${DEBIAN_MIRROR} ftp://ftp.tr.debian.org/debian/pool \n \
${GNU_MIRROR} ftp://mirrors.kernel.org/gnu \n \
${KERNELORG_MIRROR} http://www.kernel.org/pub \n \
-ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/ \n \
-ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.surfnet.nl/pub/security/gnupg/ \n \
-ftp://ftp.gnupg.org/gcrypt/ http://gulus.USherbrooke.ca/pub/appl/GnuPG/ \n \
+${GNUPG_MIRROR} ftp://ftp.gnupg.org/gcrypt \n \
+${GNUPG_MIRROR} ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt \n \
+${GNUPG_MIRROR} ftp://mirrors.dotsrc.org/gcrypt \n \
ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN \n \
ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/ \n \
ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n \
-ftp://ftp.gnutls.org/gcrypt/gnutls ftp://ftp.gnupg.org/gcrypt/gnutls/ \n \
+ftp://ftp.gnutls.org/gcrypt/gnutls ${GNUPG_MIRROR} \n \
http://ftp.info-zip.org/pub/infozip/src/ http://mirror.switch.ch/ftp/mirror/infozip/src/ \n \
http://ftp.info-zip.org/pub/infozip/src/ ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/ \n \
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ \n \
diff --git a/import-layers/yocto-poky/meta/classes/module.bbclass b/import-layers/yocto-poky/meta/classes/module.bbclass
index 01c9309eb..68e3d341a 100644
--- a/import-layers/yocto-poky/meta/classes/module.bbclass
+++ b/import-layers/yocto-poky/meta/classes/module.bbclass
@@ -8,6 +8,15 @@ EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
MODULES_INSTALL_TARGET ?= "modules_install"
+python __anonymous () {
+ depends = d.getVar('DEPENDS', True)
+ extra_symbols = []
+ for dep in depends.split():
+ if dep.startswith("kernel-module-"):
+ extra_symbols.append("${STAGING_INCDIR}/" + dep + "/Module.symvers")
+ d.setVar('KBUILD_EXTRA_SYMBOLS', " ".join(extra_symbols))
+}
+
module_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
@@ -15,6 +24,7 @@ module_do_compile() {
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
AR="${KERNEL_AR}" \
O=${STAGING_KERNEL_BUILDDIR} \
+ KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \
${MAKE_TARGETS}
}
@@ -24,6 +34,11 @@ module_do_install() {
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
O=${STAGING_KERNEL_BUILDDIR} \
${MODULES_INSTALL_TARGET}
+
+ install -d -m0755 ${D}${includedir}/${BPN}
+ cp -a --no-preserve=ownership ${B}/Module.symvers ${D}${includedir}/${BPN}
+ # it doesn't actually seem to matter which path is specified here
+ sed -e 's:${B}/::g' -i ${D}${includedir}/${BPN}/Module.symvers
}
EXPORT_FUNCTIONS do_compile do_install
diff --git a/import-layers/yocto-poky/meta/classes/multilib_global.bbclass b/import-layers/yocto-poky/meta/classes/multilib_global.bbclass
index 67dc72b76..11ae2681f 100644
--- a/import-layers/yocto-poky/meta/classes/multilib_global.bbclass
+++ b/import-layers/yocto-poky/meta/classes/multilib_global.bbclass
@@ -72,6 +72,7 @@ def preferred_ml_updates(d):
pkg = pkg.replace("virtual/", "")
virt = "virtual/"
for p in prefixes:
+ newval = None
if pkg != "kernel":
newval = p + "-" + val
@@ -86,7 +87,7 @@ def preferred_ml_updates(d):
# implement alternative multilib name
newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
- if not d.getVar(newname, False):
+ if not d.getVar(newname, False) and newval != None:
d.setVar(newname, localdata.expand(newval))
# Avoid future variable key expansion
provexp = d.expand(prov)
diff --git a/import-layers/yocto-poky/meta/classes/multilib_header.bbclass b/import-layers/yocto-poky/meta/classes/multilib_header.bbclass
index 5ee0a2d56..304c28e77 100644
--- a/import-layers/yocto-poky/meta/classes/multilib_header.bbclass
+++ b/import-layers/yocto-poky/meta/classes/multilib_header.bbclass
@@ -52,3 +52,8 @@ oe_multilib_header() {
oe_multilib_header_class-native () {
return
}
+
+# Nor do we need multilib headers for nativesdk builds.
+oe_multilib_header_class-nativesdk () {
+ return
+}
diff --git a/import-layers/yocto-poky/meta/classes/native.bbclass b/import-layers/yocto-poky/meta/classes/native.bbclass
index f67ef0014..143f8a914 100644
--- a/import-layers/yocto-poky/meta/classes/native.bbclass
+++ b/import-layers/yocto-poky/meta/classes/native.bbclass
@@ -87,8 +87,7 @@ datadir = "${STAGING_DATADIR_NATIVE}"
baselib = "lib"
-# Libtool's default paths are correct for the native machine
-lt_cv_sys_lib_dlsearch_path_spec[unexport] = "1"
+export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir} /lib /lib64 /usr/lib /usr/lib64"
NATIVE_PACKAGE_PATH_SUFFIX ?= ""
bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}"
diff --git a/import-layers/yocto-poky/meta/classes/nativesdk.bbclass b/import-layers/yocto-poky/meta/classes/nativesdk.bbclass
index f74da6267..a78257c19 100644
--- a/import-layers/yocto-poky/meta/classes/nativesdk.bbclass
+++ b/import-layers/yocto-poky/meta/classes/nativesdk.bbclass
@@ -10,6 +10,8 @@ LIBCOVERRIDE = ":${NATIVESDKLIBC}"
CLASSOVERRIDE = "class-nativesdk"
MACHINEOVERRIDES = ""
+MULTILIBS = ""
+
#
# Update PACKAGE_ARCH and PACKAGE_ARCHS
#
diff --git a/import-layers/yocto-poky/meta/classes/nopackages.bbclass b/import-layers/yocto-poky/meta/classes/nopackages.bbclass
index 0c2761bef..559f5078b 100644
--- a/import-layers/yocto-poky/meta/classes/nopackages.bbclass
+++ b/import-layers/yocto-poky/meta/classes/nopackages.bbclass
@@ -4,3 +4,9 @@ deltask do_package_write_ipk
deltask do_package_write_deb
deltask do_package_qa
deltask do_packagedata
+deltask do_package_setscene
+deltask do_package_write_rpm_setscene
+deltask do_package_write_ipk_setscene
+deltask do_package_write_deb_setscene
+deltask do_package_qa_setscene
+deltask do_packagedata_setscene
diff --git a/import-layers/yocto-poky/meta/classes/npm.bbclass b/import-layers/yocto-poky/meta/classes/npm.bbclass
index 9843e8735..fce4c1146 100644
--- a/import-layers/yocto-poky/meta/classes/npm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/npm.bbclass
@@ -1,9 +1,25 @@
DEPENDS_prepend = "nodejs-native "
+RDEPENDS_${PN}_prepend = "nodejs "
S = "${WORKDIR}/npmpkg"
NPM_INSTALLDIR = "${D}${libdir}/node_modules/${PN}"
+# function maps arch names to npm arch names
+def npm_oe_arch_map(target_arch, d):
+ import re
+ if re.match('p(pc|owerpc)(|64)', target_arch): return 'ppc'
+ elif re.match('i.86$', target_arch): return 'ia32'
+ elif re.match('x86_64$', target_arch): return 'x64'
+ elif re.match('arm64$', target_arch): return 'arm'
+ return target_arch
+
+NPM_ARCH ?= "${@npm_oe_arch_map(d.getVar('TARGET_ARCH', True), d)}"
+
npm_do_compile() {
+ # Copy in any additionally fetched modules
+ if [ -d ${WORKDIR}/node_modules ] ; then
+ cp -a ${WORKDIR}/node_modules ${S}/
+ fi
# changing the home directory to the working directory, the .npmrc will
# be created in this directory
export HOME=${WORKDIR}
@@ -12,7 +28,7 @@ npm_do_compile() {
# clear cache before every build
npm cache clear
# Install pkg into ${S} without going to the registry
- npm --arch=${TARGET_ARCH} --production --no-registry install
+ npm --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry install
}
npm_do_install() {
@@ -35,10 +51,10 @@ python populate_packages_prepend () {
if pdata:
version = pdata.get('version', None)
if version:
- d.setVar('PKGV_%s' % expanded_pkgname, version.encode("utf8"))
+ d.setVar('PKGV_%s' % expanded_pkgname, version)
description = pdata.get('description', None)
if description:
- d.setVar('SUMMARY_%s' % expanded_pkgname, description.replace(u"\u2018", "'").replace(u"\u2019", "'").encode("utf8"))
+ d.setVar('SUMMARY_%s' % expanded_pkgname, description.replace(u"\u2018", "'").replace(u"\u2019", "'"))
d.appendVar('RDEPENDS_%s' % d.getVar('PN', True), ' %s' % ' '.join(pkgnames).replace('_', '-'))
}
diff --git a/import-layers/yocto-poky/meta/classes/oelint.bbclass b/import-layers/yocto-poky/meta/classes/oelint.bbclass
index 1b051ca22..c4febc2cf 100644
--- a/import-layers/yocto-poky/meta/classes/oelint.bbclass
+++ b/import-layers/yocto-poky/meta/classes/oelint.bbclass
@@ -45,7 +45,7 @@ python do_lint() {
def findKey(path, key):
ret = True
- f = file('%s' % path, mode = 'r')
+ f = open('%s' % path, mode = 'r')
line = f.readline()
while line:
if line.find(key) != -1:
diff --git a/import-layers/yocto-poky/meta/classes/package.bbclass b/import-layers/yocto-poky/meta/classes/package.bbclass
index 76b9f8649..a6f0a7a63 100644
--- a/import-layers/yocto-poky/meta/classes/package.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package.bbclass
@@ -63,7 +63,7 @@ def legitimize_package_name(s):
def fixutf(m):
cp = m.group(1)
if cp:
- return ('\u%s' % cp).decode('unicode_escape').encode('utf-8')
+ return ('\\u%s' % cp).encode('latin-1').decode('unicode_escape')
# Handle unicode codepoints encoded as <U0123>, as in glibc locale files.
s = re.sub('<U([0-9A-Fa-f]{1,4})>', fixutf, s)
@@ -146,7 +146,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
packages = d.getVar('PACKAGES', True).split()
- split_packages = []
+ split_packages = set()
if postinst:
postinst = '#!/bin/sh\n' + postinst + '\n'
@@ -183,7 +183,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
continue
on = legitimize_package_name(m.group(1))
pkg = output_pattern % on
- split_packages.append(pkg)
+ split_packages.add(pkg)
if not pkg in packages:
if prepend:
packages = [pkg] + packages
@@ -226,7 +226,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
hook(f, pkg, file_regex, output_pattern, m.group(1))
d.setVar('PACKAGES', ' '.join(packages))
- return split_packages
+ return list(split_packages)
PACKAGE_DEPENDS += "file-native"
@@ -259,14 +259,30 @@ def files_from_filevars(filevars):
continue
files.append(f)
- for f in files:
+ symlink_paths = []
+ for ind, f in enumerate(files):
+ # Handle directory symlinks. Truncate path to the lowest level symlink
+ parent = ''
+ for dirname in f.split('/')[:-1]:
+ parent = os.path.join(parent, dirname)
+ if dirname == '.':
+ continue
+ if cpath.islink(parent):
+ bb.warn("FILES contains file '%s' which resides under a "
+ "directory symlink. Please fix the recipe and use the "
+ "real path for the file." % f[1:])
+ symlink_paths.append(f)
+ files[ind] = parent
+ f = parent
+ break
+
if not cpath.islink(f):
if cpath.isdir(f):
newfiles = [ os.path.join(f,x) for x in os.listdir(f) ]
if newfiles:
files += newfiles
- return files
+ return files, symlink_paths
# Called in package_<rpm,ipk,deb>.bbclass to get the correct list of configuration files
def get_conffiles(pkg, d):
@@ -281,7 +297,7 @@ def get_conffiles(pkg, d):
if conffiles == None:
conffiles = ""
conffiles = conffiles.split()
- conf_orig_list = files_from_filevars(conffiles)
+ conf_orig_list = files_from_filevars(conffiles)[0]
# Remove links and directories from conf_orig_list to get conf_list which only contains normal files
conf_list = []
@@ -841,6 +857,9 @@ python split_and_strip_files () {
dvar = d.getVar('PKGD', True)
pn = d.getVar('PN', True)
+ oldcwd = os.getcwd()
+ os.chdir(dvar)
+
# We default to '.debug' style
if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory':
# Single debug-file-directory style debug info
@@ -864,8 +883,6 @@ python split_and_strip_files () {
sourcefile = d.expand("${WORKDIR}/debugsources.list")
bb.utils.remove(sourcefile)
- os.chdir(dvar)
-
# Return type (bits):
# 0 - not elf
# 1 - ELF
@@ -903,7 +920,8 @@ python split_and_strip_files () {
inodes = {}
libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True))
baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True))
- if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
+ if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1' or \
+ d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1'):
for root, dirs, files in cpath.walk(dvar):
for f in files:
file = os.path.join(root, f)
@@ -1051,6 +1069,7 @@ python split_and_strip_files () {
#
# End of strip
#
+ os.chdir(oldcwd)
}
python populate_packages () {
@@ -1108,7 +1127,7 @@ python populate_packages () {
filesvar.replace("//", "/")
origfiles = filesvar.split()
- files = files_from_filevars(origfiles)
+ files, symlink_paths = files_from_filevars(origfiles)
if autodebug and pkg.endswith("-dbg"):
files.extend(debug)
@@ -1149,13 +1168,19 @@ python populate_packages () {
fpath = os.path.join(root,file)
if not cpath.islink(file):
os.link(file, fpath)
- fstat = cpath.stat(file)
- os.chmod(fpath, fstat.st_mode)
- os.chown(fpath, fstat.st_uid, fstat.st_gid)
continue
ret = bb.utils.copyfile(file, fpath)
if ret is False or ret == 0:
- raise bb.build.FuncFailed("File population failed")
+ bb.fatal("File population failed")
+
+ # Check if symlink paths exist
+ for file in symlink_paths:
+ if not os.path.exists(os.path.join(root,file)):
+ bb.fatal("File '%s' cannot be packaged into '%s' because its "
+ "parent directory structure does not exist. One of "
+ "its parent directories is a symlink whose target "
+ "directory is not included in the package." %
+ (file, pkg))
os.umask(oldumask)
os.chdir(workdir)
@@ -1258,8 +1283,8 @@ python emit_pkgdata() {
def write_if_exists(f, pkg, var):
def encode(str):
import codecs
- c = codecs.getencoder("string_escape")
- return c(str)[0]
+ c = codecs.getencoder("unicode_escape")
+ return c(str)[0].decode("latin1")
val = d.getVar('%s_%s' % (var, pkg), True)
if val:
@@ -1465,7 +1490,7 @@ python package_do_shlibs() {
import re, pipes
import subprocess as sub
- exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', 0)
+ exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', False)
if exclude_shlibs:
bb.note("not generating shlibs")
return
@@ -1503,7 +1528,7 @@ python package_do_shlibs() {
m = re.match("\s+RPATH\s+([^\s]*)", l)
if m:
rpaths = m.group(1).replace("$ORIGIN", ldir).split(":")
- rpath = map(os.path.normpath, rpaths)
+ rpath = list(map(os.path.normpath, rpaths))
for l in lines:
m = re.match("\s+NEEDED\s+([^\s]*)", l)
if m:
@@ -1554,19 +1579,19 @@ python package_do_shlibs() {
if file.endswith('.dylib') or file.endswith('.so'):
rpath = []
p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file],stdout=sub.PIPE,stderr=sub.PIPE)
- err, out = p.communicate()
- # If returned successfully, process stderr for results
+ out, err = p.communicate()
+ # If returned successfully, process stdout for results
if p.returncode == 0:
- for l in err.split("\n"):
+ for l in out.split("\n"):
l = l.strip()
if l.startswith('path '):
rpath.append(l.split()[1])
p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE)
- err, out = p.communicate()
- # If returned successfully, process stderr for results
+ out, err = p.communicate()
+ # If returned successfully, process stdout for results
if p.returncode == 0:
- for l in err.split("\n"):
+ for l in out.split("\n"):
l = l.strip()
if not l or l.endswith(":"):
continue
@@ -1673,7 +1698,7 @@ python package_do_shlibs() {
bb.debug(2, '%s: Dependency %s covered by PRIVATE_LIBS' % (pkg, n[0]))
continue
if n[0] in shlib_provider.keys():
- shlib_provider_path = list()
+ shlib_provider_path = []
for k in shlib_provider[n[0]].keys():
shlib_provider_path.append(k)
match = None
@@ -2128,4 +2153,3 @@ def mapping_rename_hook(d):
runtime_mapping_rename("RDEPENDS", pkg, d)
runtime_mapping_rename("RRECOMMENDS", pkg, d)
runtime_mapping_rename("RSUGGESTS", pkg, d)
-
diff --git a/import-layers/yocto-poky/meta/classes/package_deb.bbclass b/import-layers/yocto-poky/meta/classes/package_deb.bbclass
index e1d05a74c..fb6034cab 100644
--- a/import-layers/yocto-poky/meta/classes/package_deb.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_deb.bbclass
@@ -52,6 +52,9 @@ python do_package_deb () {
import re, copy
import textwrap
import subprocess
+ import collections
+
+ oldcwd = os.getcwd()
workdir = d.getVar('WORKDIR', True)
if not workdir:
@@ -117,13 +120,13 @@ python do_package_deb () {
controldir = os.path.join(root, 'DEBIAN')
bb.utils.mkdirhier(controldir)
- os.chmod(controldir, 0755)
+ os.chmod(controldir, 0o755)
try:
import codecs
ctrlfile = codecs.open(os.path.join(controldir, 'control'), 'w', 'utf-8')
except OSError:
bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open control file for writing.")
+ bb.fatal("unable to open control file for writing")
fields = []
pe = d.getVar('PKGE', True)
@@ -173,7 +176,7 @@ python do_package_deb () {
# Special behavior for description...
if 'DESCRIPTION' in fs:
summary = localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or "."
- ctrlfile.write('Description: %s\n' % unicode(summary,'utf-8'))
+ ctrlfile.write('Description: %s\n' % summary)
description = localdata.getVar('DESCRIPTION', True) or "."
description = textwrap.dedent(description).strip()
if '\\n' in description:
@@ -182,29 +185,25 @@ python do_package_deb () {
# We don't limit the width when manually indent, but we do
# need the textwrap.fill() to set the initial_indent and
# subsequent_indent, so set a large width
- ctrlfile.write('%s\n' % unicode(textwrap.fill(t, width=100000, initial_indent=' ', subsequent_indent=' '),'utf-8'))
+ ctrlfile.write('%s\n' % textwrap.fill(t, width=100000, initial_indent=' ', subsequent_indent=' '))
else:
# Auto indent
- ctrlfile.write('%s\n' % unicode(textwrap.fill(description.strip(), width=74, initial_indent=' ', subsequent_indent=' '),'utf-8'))
+ ctrlfile.write('%s\n' % textwrap.fill(description.strip(), width=74, initial_indent=' ', subsequent_indent=' '))
else:
- ctrlfile.write(unicode(c % tuple(pullData(fs, localdata)),'utf-8'))
+ ctrlfile.write(c % tuple(pullData(fs, localdata)))
except KeyError:
import sys
(type, value, traceback) = sys.exc_info()
bb.utils.unlockfile(lf)
ctrlfile.close()
- raise bb.build.FuncFailed("Missing field for deb generation: %s" % value)
- except UnicodeDecodeError:
- bb.utils.unlockfile(lf)
- ctrlfile.close()
- raise bb.build.FuncFailed("Non UTF-8 characters found in one of the fields")
+ bb.fatal("Missing field for deb generation: %s" % value)
# more fields
custom_fields_chunk = get_package_additional_metadata("deb", localdata)
if custom_fields_chunk is not None:
- ctrlfile.write(unicode(custom_fields_chunk))
+ ctrlfile.write(custom_fields_chunk)
ctrlfile.write("\n")
mapping_rename_hook(localdata)
@@ -234,7 +233,7 @@ python do_package_deb () {
rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS", True) or "")
debian_cmp_remap(rdepends)
- for dep in rdepends.keys():
+ for dep in list(rdepends.keys()):
if dep == pkg:
del rdepends[dep]
continue
@@ -242,30 +241,31 @@ python do_package_deb () {
del rdepends[dep]
rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS", True) or "")
debian_cmp_remap(rrecommends)
- for dep in rrecommends.keys():
+ for dep in list(rrecommends.keys()):
if '*' in dep:
del rrecommends[dep]
rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS", True) or "")
debian_cmp_remap(rsuggests)
# Deliberately drop version information here, not wanted/supported by deb
rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or ""), [])
+ rprovides = collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0]))
debian_cmp_remap(rprovides)
rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
debian_cmp_remap(rreplaces)
rconflicts = bb.utils.explode_dep_versions2(localdata.getVar("RCONFLICTS", True) or "")
debian_cmp_remap(rconflicts)
if rdepends:
- ctrlfile.write("Depends: %s\n" % unicode(bb.utils.join_deps(rdepends)))
+ ctrlfile.write("Depends: %s\n" % bb.utils.join_deps(rdepends))
if rsuggests:
- ctrlfile.write("Suggests: %s\n" % unicode(bb.utils.join_deps(rsuggests)))
+ ctrlfile.write("Suggests: %s\n" % bb.utils.join_deps(rsuggests))
if rrecommends:
- ctrlfile.write("Recommends: %s\n" % unicode(bb.utils.join_deps(rrecommends)))
+ ctrlfile.write("Recommends: %s\n" % bb.utils.join_deps(rrecommends))
if rprovides:
- ctrlfile.write("Provides: %s\n" % unicode(bb.utils.join_deps(rprovides)))
+ ctrlfile.write("Provides: %s\n" % bb.utils.join_deps(rprovides))
if rreplaces:
- ctrlfile.write("Replaces: %s\n" % unicode(bb.utils.join_deps(rreplaces)))
+ ctrlfile.write("Replaces: %s\n" % bb.utils.join_deps(rreplaces))
if rconflicts:
- ctrlfile.write("Conflicts: %s\n" % unicode(bb.utils.join_deps(rconflicts)))
+ ctrlfile.write("Conflicts: %s\n" % bb.utils.join_deps(rconflicts))
ctrlfile.close()
for script in ["preinst", "postinst", "prerm", "postrm"]:
@@ -277,7 +277,7 @@ python do_package_deb () {
scriptfile = open(os.path.join(controldir, script), 'w')
except OSError:
bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open %s script file for writing." % script)
+ bb.fatal("unable to open %s script file for writing" % script)
if scriptvar.startswith("#!"):
pos = scriptvar.find("\n") + 1
@@ -293,7 +293,7 @@ python do_package_deb () {
scriptfile.write(scriptvar[pos:])
scriptfile.write('\n')
scriptfile.close()
- os.chmod(os.path.join(controldir, script), 0755)
+ os.chmod(os.path.join(controldir, script), 0o755)
conffiles_str = ' '.join(get_conffiles(pkg, d))
if conffiles_str:
@@ -301,7 +301,7 @@ python do_package_deb () {
conffiles = open(os.path.join(controldir, 'conffiles'), 'w')
except OSError:
bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open conffiles for writing.")
+ bb.fatal("unable to open conffiles for writing")
for f in conffiles_str.split():
if os.path.exists(oe.path.join(root, f)):
conffiles.write('%s\n' % f)
@@ -311,10 +311,11 @@ python do_package_deb () {
ret = subprocess.call("PATH=\"%s\" dpkg-deb -b %s %s" % (localdata.getVar("PATH", True), root, pkgoutdir), shell=True)
if ret != 0:
bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("dpkg-deb execution failed")
+ bb.fatal("dpkg-deb execution failed")
cleanupcontrol(root)
bb.utils.unlockfile(lf)
+ os.chdir(oldcwd)
}
# Indirect references to these vars
do_package_write_deb[vardeps] += "PKGV PKGR PKGV DESCRIPTION SECTION PRIORITY MAINTAINER DPKG_ARCH PN HOMEPAGE"
diff --git a/import-layers/yocto-poky/meta/classes/package_ipk.bbclass b/import-layers/yocto-poky/meta/classes/package_ipk.bbclass
index f1ad1d5c1..eb0093233 100644
--- a/import-layers/yocto-poky/meta/classes/package_ipk.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_ipk.bbclass
@@ -20,6 +20,9 @@ python do_package_ipk () {
import re, copy
import textwrap
import subprocess
+ import collections
+
+ oldcwd = os.getcwd()
workdir = d.getVar('WORKDIR', True)
outdir = d.getVar('PKGWRITEDIRIPK', True)
@@ -105,7 +108,7 @@ python do_package_ipk () {
ctrlfile = open(os.path.join(controldir, 'control'), 'w')
except OSError:
bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open control file for writing.")
+ bb.fatal("unable to open control file for writing")
fields = []
pe = d.getVar('PKGE', True)
@@ -159,7 +162,7 @@ python do_package_ipk () {
(type, value, traceback) = sys.exc_info()
ctrlfile.close()
bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("Missing field for ipk generation: %s" % value)
+ bb.fatal("Missing field for ipk generation: %s" % value)
# more fields
custom_fields_chunk = get_package_additional_metadata("ipk", localdata)
@@ -190,6 +193,7 @@ python do_package_ipk () {
debian_cmp_remap(rsuggests)
# Deliberately drop version information here, not wanted/supported by ipk
rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or ""), [])
+ rprovides = collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0]))
debian_cmp_remap(rprovides)
rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
debian_cmp_remap(rreplaces)
@@ -222,10 +226,10 @@ python do_package_ipk () {
scriptfile = open(os.path.join(controldir, script), 'w')
except OSError:
bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open %s script file for writing." % script)
+ bb.fatal("unable to open %s script file for writing" % script)
scriptfile.write(scriptvar)
scriptfile.close()
- os.chmod(os.path.join(controldir, script), 0755)
+ os.chmod(os.path.join(controldir, script), 0o755)
conffiles_str = ' '.join(get_conffiles(pkg, d))
if conffiles_str:
@@ -233,7 +237,7 @@ python do_package_ipk () {
conffiles = open(os.path.join(controldir, 'conffiles'), 'w')
except OSError:
bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("unable to open conffiles for writing.")
+ bb.fatal("unable to open conffiles for writing")
for f in conffiles_str.split():
if os.path.exists(oe.path.join(root, f)):
conffiles.write('%s\n' % f)
@@ -241,10 +245,10 @@ python do_package_ipk () {
os.chdir(basedir)
ret = subprocess.call("PATH=\"%s\" %s %s %s" % (localdata.getVar("PATH", True),
- d.getVar("OPKGBUILDCMD",1), pkg, pkgoutdir), shell=True)
+ d.getVar("OPKGBUILDCMD", True), pkg, pkgoutdir), shell=True)
if ret != 0:
bb.utils.unlockfile(lf)
- raise bb.build.FuncFailed("opkg-build execution failed")
+ bb.fatal("opkg-build execution failed")
if d.getVar('IPK_SIGN_PACKAGES', True) == '1':
ipkver = "%s-%s" % (d.getVar('PKGV', True), d.getVar('PKGR', True))
@@ -254,6 +258,7 @@ python do_package_ipk () {
cleanupcontrol(root)
bb.utils.unlockfile(lf)
+ os.chdir(oldcwd)
}
# Otherwise allarch packages may change depending on override configuration
do_package_ipk[vardepsexclude] = "OVERRIDES"
diff --git a/import-layers/yocto-poky/meta/classes/package_rpm.bbclass b/import-layers/yocto-poky/meta/classes/package_rpm.bbclass
index 7d523a16f..c431545f7 100644
--- a/import-layers/yocto-poky/meta/classes/package_rpm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_rpm.bbclass
@@ -58,12 +58,12 @@ def write_rpm_perfiledata(srcname, d):
try:
dependsfile = open(outdepends, 'w')
except OSError:
- raise bb.build.FuncFailed("unable to open spec file for writing.")
+ bb.fatal("unable to open spec file for writing")
dump_filerdeps('RDEPENDS', dependsfile, d)
dependsfile.close()
- os.chmod(outdepends, 0755)
+ os.chmod(outdepends, 0o755)
# OE-core / RPM Provides
outprovides = workdir + "/" + srcname + ".provides"
@@ -71,12 +71,12 @@ def write_rpm_perfiledata(srcname, d):
try:
providesfile = open(outprovides, 'w')
except OSError:
- raise bb.build.FuncFailed("unable to open spec file for writing.")
+ bb.fatal("unable to open spec file for writing")
dump_filerdeps('RPROVIDES', providesfile, d)
providesfile.close()
- os.chmod(outprovides, 0755)
+ os.chmod(outprovides, 0o755)
return (outdepends, outprovides)
@@ -617,7 +617,7 @@ python write_specfile () {
try:
specfile = open(outspecfile, 'w')
except OSError:
- raise bb.build.FuncFailed("unable to open spec file for writing.")
+ bb.fatal("unable to open spec file for writing")
# RPMSPEC_PREAMBLE is a way to add arbitrary text to the top
# of the generated spec file
@@ -702,7 +702,7 @@ python do_package_rpm () {
pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
magicfile = d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
bb.utils.mkdirhier(pkgwritedir)
- os.chmod(pkgwritedir, 0755)
+ os.chmod(pkgwritedir, 0o755)
cmd = rpmbuild
cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
diff --git a/import-layers/yocto-poky/meta/classes/package_tar.bbclass b/import-layers/yocto-poky/meta/classes/package_tar.bbclass
index 854e64528..e217814af 100644
--- a/import-layers/yocto-poky/meta/classes/package_tar.bbclass
+++ b/import-layers/yocto-poky/meta/classes/package_tar.bbclass
@@ -4,6 +4,9 @@ IMAGE_PKGTYPE ?= "tar"
python do_package_tar () {
import subprocess
+
+ oldcwd = os.getcwd()
+
workdir = d.getVar('WORKDIR', True)
if not workdir:
bb.error("WORKDIR not defined, unable to package")
@@ -49,6 +52,8 @@ python do_package_tar () {
ret = subprocess.call(args + [tarfn] + dlist)
if ret != 0:
bb.error("Creation of tar %s failed." % tarfn)
+
+ os.chdir(oldcwd)
}
python () {
diff --git a/import-layers/yocto-poky/meta/classes/packagefeed-stability.bbclass b/import-layers/yocto-poky/meta/classes/packagefeed-stability.bbclass
new file mode 100644
index 000000000..aa01def74
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/packagefeed-stability.bbclass
@@ -0,0 +1,252 @@
+# Class to avoid copying packages into the feed if they haven't materially changed
+#
+# Copyright (C) 2015 Intel Corporation
+# Released under the MIT license (see COPYING.MIT for details)
+#
+# This class effectively intercepts packages as they are written out by
+# do_package_write_*, causing them to be written into a different
+# directory where we can compare them to whatever older packages might
+# be in the "real" package feed directory, and avoid copying the new
+# package to the feed if it has not materially changed. The idea is to
+# avoid unnecessary churn in the packages when dependencies trigger task
+# reexecution (and thus repackaging). Enabling the class is simple:
+#
+# INHERIT += "packagefeed-stability"
+#
+# Caveats:
+# 1) Latest PR values in the build system may not match those in packages
+# seen on the target (naturally)
+# 2) If you rebuild from sstate without the existing package feed present,
+# you will lose the "state" of the package feed i.e. the preserved old
+# package versions. Not the end of the world, but would negate the
+# entire purpose of this class.
+#
+# Note that running -c cleanall on a recipe will purposely delete the old
+# package files so they will definitely be copied the next time.
+
+python() {
+ if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d):
+ return
+ # Package backend agnostic intercept
+ # This assumes that the package_write task is called package_write_<pkgtype>
+ # and that the directory in which packages should be written is
+ # pointed to by the variable DEPLOY_DIR_<PKGTYPE>
+ for pkgclass in (d.getVar('PACKAGE_CLASSES', True) or '').split():
+ if pkgclass.startswith('package_'):
+ pkgtype = pkgclass.split('_', 1)[1]
+ pkgwritefunc = 'do_package_write_%s' % pkgtype
+ sstate_outputdirs = d.getVarFlag(pkgwritefunc, 'sstate-outputdirs', False)
+ deploydirvar = 'DEPLOY_DIR_%s' % pkgtype.upper()
+ deploydirvarref = '${' + deploydirvar + '}'
+ pkgcomparefunc = 'do_package_compare_%s' % pkgtype
+
+ if bb.data.inherits_class('image', d):
+ d.appendVarFlag('do_rootfs', 'recrdeptask', ' ' + pkgcomparefunc)
+
+ if bb.data.inherits_class('populate_sdk_base', d):
+ d.appendVarFlag('do_populate_sdk', 'recrdeptask', ' ' + pkgcomparefunc)
+
+ if bb.data.inherits_class('populate_sdk_ext', d):
+ d.appendVarFlag('do_populate_sdk_ext', 'recrdeptask', ' ' + pkgcomparefunc)
+
+ d.appendVarFlag('do_build', 'recrdeptask', ' ' + pkgcomparefunc)
+
+ if d.getVarFlag(pkgwritefunc, 'noexec', True) or not d.getVarFlag(pkgwritefunc, 'task', True):
+ # Packaging is disabled for this recipe, we shouldn't do anything
+ continue
+
+ if deploydirvarref in sstate_outputdirs:
+ deplor_dir_pkgtype = d.expand(deploydirvarref + '-prediff')
+ # Set intermediate output directory
+ d.setVarFlag(pkgwritefunc, 'sstate-outputdirs', sstate_outputdirs.replace(deploydirvarref, deplor_dir_pkgtype))
+ # Update SSTATE_DUPWHITELIST to avoid shared location conflicted error
+ d.appendVar('SSTATE_DUPWHITELIST', ' %s' % deplor_dir_pkgtype)
+
+ d.setVar(pkgcomparefunc, d.getVar('do_package_compare', False))
+ d.setVarFlags(pkgcomparefunc, d.getVarFlags('do_package_compare', False))
+ d.appendVarFlag(pkgcomparefunc, 'depends', ' build-compare-native:do_populate_sysroot')
+ bb.build.addtask(pkgcomparefunc, 'do_build', 'do_packagedata ' + pkgwritefunc, d)
+}
+
+# This isn't the real task function - it's a template that we use in the
+# anonymous python code above
+fakeroot python do_package_compare () {
+ currenttask = d.getVar('BB_CURRENTTASK', True)
+ pkgtype = currenttask.rsplit('_', 1)[1]
+ package_compare_impl(pkgtype, d)
+}
+
+def package_compare_impl(pkgtype, d):
+ import errno
+ import fnmatch
+ import glob
+ import subprocess
+ import oe.sstatesig
+
+ pn = d.getVar('PN', True)
+ deploydir = d.getVar('DEPLOY_DIR_%s' % pkgtype.upper(), True)
+ prepath = deploydir + '-prediff/'
+
+ # Find out PKGR values are
+ pkgdatadir = d.getVar('PKGDATA_DIR', True)
+ packages = []
+ try:
+ with open(os.path.join(pkgdatadir, pn), 'r') as f:
+ for line in f:
+ if line.startswith('PACKAGES:'):
+ packages = line.split(':', 1)[1].split()
+ break
+ except IOError as e:
+ if e.errno == errno.ENOENT:
+ pass
+
+ if not packages:
+ bb.debug(2, '%s: no packages, nothing to do' % pn)
+ return
+
+ pkgrvalues = {}
+ rpkgnames = {}
+ rdepends = {}
+ pkgvvalues = {}
+ for pkg in packages:
+ with open(os.path.join(pkgdatadir, 'runtime', pkg), 'r') as f:
+ for line in f:
+ if line.startswith('PKGR:'):
+ pkgrvalues[pkg] = line.split(':', 1)[1].strip()
+ if line.startswith('PKGV:'):
+ pkgvvalues[pkg] = line.split(':', 1)[1].strip()
+ elif line.startswith('PKG_%s:' % pkg):
+ rpkgnames[pkg] = line.split(':', 1)[1].strip()
+ elif line.startswith('RDEPENDS_%s:' % pkg):
+ rdepends[pkg] = line.split(':', 1)[1].strip()
+
+ # Prepare a list of the runtime package names for packages that were
+ # actually produced
+ rpkglist = []
+ for pkg, rpkg in rpkgnames.items():
+ if os.path.exists(os.path.join(pkgdatadir, 'runtime', pkg + '.packaged')):
+ rpkglist.append((rpkg, pkg))
+ rpkglist.sort(key=lambda x: len(x[0]), reverse=True)
+
+ pvu = d.getVar('PV', False)
+ if '$' + '{SRCPV}' in pvu:
+ pvprefix = pvu.split('$' + '{SRCPV}', 1)[0]
+ else:
+ pvprefix = None
+
+ pkgwritetask = 'package_write_%s' % pkgtype
+ files = []
+ docopy = False
+ manifest, _ = oe.sstatesig.sstate_get_manifest_filename(pkgwritetask, d)
+ mlprefix = d.getVar('MLPREFIX', True)
+ # Copy recipe's all packages if one of the packages are different to make
+ # they have the same PR.
+ with open(manifest, 'r') as f:
+ for line in f:
+ if line.startswith(prepath):
+ srcpath = line.rstrip()
+ if os.path.isfile(srcpath):
+ destpath = os.path.join(deploydir, os.path.relpath(srcpath, prepath))
+
+ # This is crude but should work assuming the output
+ # package file name starts with the package name
+ # and rpkglist is sorted by length (descending)
+ pkgbasename = os.path.basename(destpath)
+ pkgname = None
+ for rpkg, pkg in rpkglist:
+ if mlprefix and pkgtype == 'rpm' and rpkg.startswith(mlprefix):
+ rpkg = rpkg[len(mlprefix):]
+ if pkgbasename.startswith(rpkg):
+ pkgr = pkgrvalues[pkg]
+ destpathspec = destpath.replace(pkgr, '*')
+ if pvprefix:
+ pkgv = pkgvvalues[pkg]
+ if pkgv.startswith(pvprefix):
+ pkgvsuffix = pkgv[len(pvprefix):]
+ if '+' in pkgvsuffix:
+ newpkgv = pvprefix + '*+' + pkgvsuffix.split('+', 1)[1]
+ destpathspec = destpathspec.replace(pkgv, newpkgv)
+ pkgname = pkg
+ break
+ else:
+ bb.warn('Unable to map %s back to package' % pkgbasename)
+ destpathspec = destpath
+
+ oldfile = None
+ if not docopy:
+ oldfiles = glob.glob(destpathspec)
+ if oldfiles:
+ oldfile = oldfiles[-1]
+ result = subprocess.call(['pkg-diff.sh', oldfile, srcpath])
+ if result != 0:
+ docopy = True
+ bb.note("%s and %s are different, will copy packages" % (oldfile, srcpath))
+ else:
+ docopy = True
+ bb.note("No old packages found for %s, will copy packages" % pkgname)
+
+ files.append((pkgname, pkgbasename, srcpath, destpath))
+
+ # Remove all the old files and copy again if docopy
+ if docopy:
+ bb.plain('Copying packages for recipe %s' % pn)
+ pcmanifest = os.path.join(prepath, d.expand('pkg-compare-manifest-${MULTIMACH_TARGET_SYS}-${PN}'))
+ try:
+ with open(pcmanifest, 'r') as f:
+ for line in f:
+ fn = line.rstrip()
+ if fn:
+ try:
+ os.remove(fn)
+ bb.note('Removed old package %s' % fn)
+ except OSError as e:
+ if e.errno == errno.ENOENT:
+ pass
+ except IOError as e:
+ if e.errno == errno.ENOENT:
+ pass
+
+ # Create new manifest
+ with open(pcmanifest, 'w') as f:
+ for pkgname, pkgbasename, srcpath, destpath in files:
+ destdir = os.path.dirname(destpath)
+ bb.utils.mkdirhier(destdir)
+ # Remove allarch rpm pkg if it is already existed (for
+ # multilib), they're identical in theory, but sstate.bbclass
+ # copies it again, so keep align with that.
+ if os.path.exists(destpath) and pkgtype == 'rpm' \
+ and d.getVar('PACKAGE_ARCH', True) == 'all':
+ os.unlink(destpath)
+ if (os.stat(srcpath).st_dev == os.stat(destdir).st_dev):
+ # Use a hard link to save space
+ os.link(srcpath, destpath)
+ else:
+ shutil.copyfile(srcpath, destpath)
+ f.write('%s\n' % destpath)
+ else:
+ bb.plain('Not copying packages for recipe %s' % pn)
+
+do_cleansstate[postfuncs] += "pfs_cleanpkgs"
+python pfs_cleanpkgs () {
+ import errno
+ for pkgclass in (d.getVar('PACKAGE_CLASSES', True) or '').split():
+ if pkgclass.startswith('package_'):
+ pkgtype = pkgclass.split('_', 1)[1]
+ deploydir = d.getVar('DEPLOY_DIR_%s' % pkgtype.upper(), True)
+ prepath = deploydir + '-prediff'
+ pcmanifest = os.path.join(prepath, d.expand('pkg-compare-manifest-${MULTIMACH_TARGET_SYS}-${PN}'))
+ try:
+ with open(pcmanifest, 'r') as f:
+ for line in f:
+ fn = line.rstrip()
+ if fn:
+ try:
+ os.remove(fn)
+ except OSError as e:
+ if e.errno == errno.ENOENT:
+ pass
+ os.remove(pcmanifest)
+ except IOError as e:
+ if e.errno == errno.ENOENT:
+ pass
+}
diff --git a/import-layers/yocto-poky/meta/classes/packagegroup.bbclass b/import-layers/yocto-poky/meta/classes/packagegroup.bbclass
index 38bdbd382..3928c8a4a 100644
--- a/import-layers/yocto-poky/meta/classes/packagegroup.bbclass
+++ b/import-layers/yocto-poky/meta/classes/packagegroup.bbclass
@@ -14,6 +14,8 @@ PACKAGE_ARCH ?= "all"
# Fully expanded - so it applies the overrides as well
PACKAGE_ARCH_EXPANDED := "${PACKAGE_ARCH}"
+LICENSE ?= "MIT"
+
inherit ${@oe.utils.ifelse(d.getVar('PACKAGE_ARCH_EXPANDED', True) == 'all', 'allarch', '')}
# This automatically adds -dbg and -dev flavours of all PACKAGES
diff --git a/import-layers/yocto-poky/meta/classes/patch.bbclass b/import-layers/yocto-poky/meta/classes/patch.bbclass
index 3d22ad838..1f6927be0 100644
--- a/import-layers/yocto-poky/meta/classes/patch.bbclass
+++ b/import-layers/yocto-poky/meta/classes/patch.bbclass
@@ -5,6 +5,9 @@ QUILTRCFILE ?= "${STAGING_ETCDIR_NATIVE}/quiltrc"
PATCHDEPENDENCY = "${PATCHTOOL}-native:do_populate_sysroot"
+PATCH_GIT_USER_NAME ?= "OpenEmbedded"
+PATCH_GIT_USER_EMAIL ?= "oe.patch@oe"
+
inherit terminal
def src_patches(d, all = False ):
diff --git a/import-layers/yocto-poky/meta/classes/pixbufcache.bbclass b/import-layers/yocto-poky/meta/classes/pixbufcache.bbclass
index dbe11e12d..3f48a0f34 100644
--- a/import-layers/yocto-poky/meta/classes/pixbufcache.bbclass
+++ b/import-layers/yocto-poky/meta/classes/pixbufcache.bbclass
@@ -54,6 +54,7 @@ gdkpixbuf_complete() {
# An error exit during populate_sysroot_setscene allows bitbake to
# try to recover by re-building the package.
#
+DEPENDS_append_class-native = " gdk-pixbuf-native"
SSTATEPOSTINSTFUNCS_append_class-native = " pixbufcache_sstate_postinst"
# See base.bbclass for the other half of this
@@ -61,7 +62,8 @@ pixbufcache_sstate_postinst() {
if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then
${gdkpixbuf_complete}
elif [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]; then
- echo "${gdkpixbuf_complete}" >> ${STAGING_DIR}/sstatecompletions
+ if [ -x ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders ]; then
+ echo "${gdkpixbuf_complete}" >> ${STAGING_DIR}/sstatecompletions
+ fi
fi
}
-
diff --git a/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass b/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass
index 008bb577c..4462b52cb 100644
--- a/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/populate_sdk_base.bbclass
@@ -26,6 +26,8 @@ SDK_DIR = "${WORKDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"
SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
+SDKDEPLOYDIR = "${WORKDIR}/${SDKMACHINE}-deploy-${PN}-populate-sdk"
+
B_task-populate-sdk = "${SDK_DIR}"
SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
@@ -58,8 +60,8 @@ SDK_RELOCATE_AFTER_INSTALL ?= "1"
SDKEXTPATH ?= "~/${@d.getVar('DISTRO', True)}_sdk"
SDK_TITLE ?= "${@d.getVar('DISTRO_NAME', True) or d.getVar('DISTRO', True)} SDK"
-SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
-SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
+SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
+SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
python write_target_sdk_manifest () {
from oe.sdk import sdk_list_installed_packages
from oe.utils import format_pkg_list
@@ -90,9 +92,9 @@ SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; ${SDK
# Some archs override this, we need the nativesdk version
# turns out this is hard to get from the datastore due to TRANSLATED_TARGET_ARCH
# manipulation.
-SDK_OLDEST_KERNEL = "2.6.32"
+SDK_OLDEST_KERNEL = "3.2.0"
-fakeroot python do_populate_sdk() {
+def populate_sdk_common(d):
from oe.sdk import populate_sdk
from oe.manifest import create_manifest, Manifest
@@ -114,7 +116,16 @@ fakeroot python do_populate_sdk() {
manifest_type=Manifest.MANIFEST_TYPE_SDK_TARGET)
populate_sdk(d)
+
+fakeroot python do_populate_sdk() {
+ populate_sdk_common(d)
}
+SSTATETASKS += "do_populate_sdk"
+SSTATE_SKIP_CREATION_task-populate-sdk = '1'
+do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
+do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}"
+do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}"
+do_populate_sdk[stamp-extra-info] = "${MACHINE}${SDKMACHINE}"
fakeroot create_sdk_files() {
cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
@@ -136,7 +147,8 @@ python check_sdk_sysroots() {
return os.path.abspath(path)
# Get scan root
- SCAN_ROOT = norm_path("${SDK_OUTPUT}/${SDKPATH}/sysroots/")
+ SCAN_ROOT = norm_path("%s/%s/sysroots/" % (d.getVar('SDK_OUTPUT', True),
+ d.getVar('SDKPATH', True)))
bb.note('Checking SDK sysroots at ' + SCAN_ROOT)
@@ -180,14 +192,14 @@ SDKTAROPTS = "--owner=root --group=root"
fakeroot tar_sdk() {
# Package it up
- mkdir -p ${SDK_DEPLOY}
+ mkdir -p ${SDKDEPLOYDIR}
cd ${SDK_OUTPUT}/${SDKPATH}
- tar ${SDKTAROPTS} -cf - . | pixz > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
+ tar ${SDKTAROPTS} -cf - . | pixz > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
}
fakeroot create_shar() {
# copy in the template shar extractor script
- cp ${COREBASE}/meta/files/toolchain-shar-extract.sh ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+ cp ${COREBASE}/meta/files/toolchain-shar-extract.sh ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
rm -f ${T}/pre_install_command ${T}/post_install_command
@@ -203,7 +215,7 @@ ${SDK_POST_INSTALL_COMMAND}
EOF
sed -i -e '/@SDK_PRE_INSTALL_COMMAND@/r ${T}/pre_install_command' \
-e '/@SDK_POST_INSTALL_COMMAND@/r ${T}/post_install_command' \
- ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+ ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
# substitute variables
sed -i -e 's#@SDK_ARCH@#${SDK_ARCH}#g' \
@@ -215,16 +227,16 @@ EOF
-e 's#@SDK_VERSION@#${SDK_VERSION}#g' \
-e '/@SDK_PRE_INSTALL_COMMAND@/d' \
-e '/@SDK_POST_INSTALL_COMMAND@/d' \
- ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+ ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
# add execution permission
- chmod +x ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+ chmod +x ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
# append the SDK tarball
- cat ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz >> ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+ cat ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz >> ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh
# delete the old tarball, we don't need it anymore
- rm ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
+ rm ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
}
populate_sdk_log_check() {
@@ -251,7 +263,7 @@ def sdk_command_variables(d):
def sdk_variables(d):
variables = ['BUILD_IMAGES_FROM_FEEDS','SDK_OS','SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT',
'SDKTARGETSYSROOT','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS','PACKAGE_ARCHS',
- 'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI']
+ 'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI', 'PACKAGE_EXCLUDE_COMPLEMENTARY']
variables.extend(sdk_command_variables(d))
return " ".join(variables)
diff --git a/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass b/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass
index 87518d176..0f0525d76 100644
--- a/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass
+++ b/import-layers/yocto-poky/meta/classes/populate_sdk_ext.bbclass
@@ -20,34 +20,43 @@ SDK_EXT_task-populate-sdk-ext = "-ext"
# Options are full or minimal
SDK_EXT_TYPE ?= "full"
+SDK_INCLUDE_PKGDATA ?= "0"
+SDK_INCLUDE_TOOLCHAIN ?= "${@'1' if d.getVar('SDK_EXT_TYPE', True) == 'full' else '0'}"
SDK_RECRDEP_TASKS ?= ""
SDK_LOCAL_CONF_WHITELIST ?= ""
SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
BB_NUMBER_THREADS \
+ BB_NUMBER_PARSE_THREADS \
PARALLEL_MAKE \
PRSERV_HOST \
SSTATE_MIRRORS \
+ DL_DIR \
+ SSTATE_DIR \
+ TMPDIR \
"
SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
SDK_UPDATE_URL ?= ""
SDK_TARGETS ?= "${PN}"
-def get_sdk_install_targets(d):
+def get_sdk_install_targets(d, images_only=False):
sdk_install_targets = ''
- if d.getVar('SDK_EXT_TYPE', True) != 'minimal':
+ if images_only or d.getVar('SDK_EXT_TYPE', True) != 'minimal':
sdk_install_targets = d.getVar('SDK_TARGETS', True)
depd = d.getVar('BB_TASKDEPDATA', False)
- for v in depd.itervalues():
+ for v in depd.values():
if v[1] == 'do_image_complete':
if v[0] not in sdk_install_targets:
sdk_install_targets += ' {}'.format(v[0])
- if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1':
- sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata'
+ if not images_only:
+ if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1':
+ sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata'
+ if d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1':
+ sdk_install_targets += ' meta-extsdk-toolchain:do_populate_sysroot'
return sdk_install_targets
@@ -76,6 +85,67 @@ SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME', True) or d.getVar('DISTRO', True)} Extensible SDK"
+def clean_esdk_builddir(d, sdkbasepath):
+ """Clean up traces of the fake build for create_filtered_tasklist()"""
+ import shutil
+ cleanpaths = 'cache conf/sanity_info conf/templateconf.cfg tmp'.split()
+ for pth in cleanpaths:
+ fullpth = os.path.join(sdkbasepath, pth)
+ if os.path.isdir(fullpth):
+ shutil.rmtree(fullpth)
+ elif os.path.isfile(fullpth):
+ os.remove(fullpth)
+
+def create_filtered_tasklist(d, sdkbasepath, tasklistfile, conf_initpath):
+ """
+ Create a filtered list of tasks. Also double-checks that the build system
+ within the SDK basically works and required sstate artifacts are available.
+ """
+ import tempfile
+ import shutil
+ import oe.copy_buildsystem
+
+ # Create a temporary build directory that we can pass to the env setup script
+ shutil.copyfile(sdkbasepath + '/conf/local.conf', sdkbasepath + '/conf/local.conf.bak')
+ try:
+ with open(sdkbasepath + '/conf/local.conf', 'a') as f:
+ # Force the use of sstate from the build system
+ f.write('\nSSTATE_DIR_forcevariable = "%s"\n' % d.getVar('SSTATE_DIR', True))
+ f.write('SSTATE_MIRRORS_forcevariable = ""\n')
+ # Ensure TMPDIR is the default so that clean_esdk_builddir() can delete it
+ f.write('TMPDIR_forcevariable = "${TOPDIR}/tmp"\n')
+ # Drop uninative if the build isn't using it (or else NATIVELSBSTRING will
+ # be different and we won't be able to find our native sstate)
+ if not bb.data.inherits_class('uninative', d):
+ f.write('INHERIT_remove = "uninative"\n')
+
+ # Unfortunately the default SDKPATH (or even a custom value) may contain characters that bitbake
+ # will not allow in its COREBASE path, so we need to rename the directory temporarily
+ temp_sdkbasepath = d.getVar('SDK_OUTPUT', True) + '/tmp-renamed-sdk'
+ # Delete any existing temp dir
+ try:
+ shutil.rmtree(temp_sdkbasepath)
+ except FileNotFoundError:
+ pass
+ os.rename(sdkbasepath, temp_sdkbasepath)
+ try:
+ cmdprefix = '. %s .; ' % conf_initpath
+ logfile = d.getVar('WORKDIR', True) + '/tasklist_bb_log.txt'
+ try:
+ oe.copy_buildsystem.check_sstate_task_list(d, get_sdk_install_targets(d), tasklistfile, cmdprefix=cmdprefix, cwd=temp_sdkbasepath, logfile=logfile)
+ except bb.process.ExecutionError as e:
+ msg = 'Failed to generate filtered task list for extensible SDK:\n%s' % e.stdout.rstrip()
+ if 'attempted to execute unexpectedly and should have been setscened' in e.stdout:
+ msg += '\n----------\n\nNOTE: "attempted to execute unexpectedly and should have been setscened" errors indicate this may be caused by missing sstate artifacts that were likely produced in earlier builds, but have been subsequently deleted for some reason.\n'
+ bb.fatal(msg)
+ finally:
+ os.rename(temp_sdkbasepath, sdkbasepath)
+ # Clean out residue of running bitbake, which check_sstate_task_list()
+ # will effectively do
+ clean_esdk_builddir(d, sdkbasepath)
+ finally:
+ os.replace(sdkbasepath + '/conf/local.conf.bak', sdkbasepath + '/conf/local.conf')
+
python copy_buildsystem () {
import re
import shutil
@@ -125,8 +195,8 @@ python copy_buildsystem () {
d.setVar('scriptrelpath', scriptrelpath)
# Write out config file for devtool
- import ConfigParser
- config = ConfigParser.SafeConfigParser()
+ import configparser
+ config = configparser.SafeConfigParser()
config.add_section('General')
config.set('General', 'bitbake_subdir', conf_bbpath)
config.set('General', 'init_path', conf_initpath)
@@ -170,6 +240,14 @@ python copy_buildsystem () {
f.write(' $' + '{SDKBASEMETAPATH}/workspace \\\n')
f.write(' "\n')
+ # Copy uninative tarball
+ # For now this is where uninative.bbclass expects the tarball
+ uninative_file = d.expand('${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2')
+ uninative_checksum = bb.utils.sha256_file(uninative_file)
+ uninative_outdir = '%s/downloads/uninative/%s' % (baseoutpath, uninative_checksum)
+ bb.utils.mkdirhier(uninative_outdir)
+ shutil.copy(uninative_file, uninative_outdir)
+
env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE', True) or '').split()
env_whitelist_values = {}
@@ -204,7 +282,10 @@ python copy_buildsystem () {
# Write a newline just in case there's none at the end of the original
f.write('\n')
- f.write('INHERIT += "%s"\n\n' % 'uninative')
+ f.write('DL_DIR = "${TOPDIR}/downloads"\n')
+
+ f.write('INHERIT += "%s"\n' % 'uninative')
+ f.write('UNINATIVE_CHECKSUM[%s] = "%s"\n\n' % (d.getVar('BUILD_ARCH', True), uninative_checksum))
f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False))
# Some classes are not suitable for SDK, remove them from INHERIT
@@ -219,9 +300,12 @@ python copy_buildsystem () {
# warning.
f.write('SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK = "none"\n\n')
- # Error if the sigs in the locked-signature file don't match
+ # Warn if the sigs in the locked-signature file don't match
# the sig computed from the metadata.
- f.write('SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "error"\n\n')
+ f.write('SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n\n')
+
+ # Set up whitelist for run on install
+ f.write('BB_SETSCENE_ENFORCE_WHITELIST = "%:* *:do_shared_workdir *:do_rm_work"\n\n')
# Hide the config information from bitbake output (since it's fixed within the SDK)
f.write('BUILDCFG_HEADER = ""\n')
@@ -263,7 +347,7 @@ python copy_buildsystem () {
# Ensure any variables set from the external environment (by way of
# BB_ENV_EXTRAWHITE) are set in the SDK's configuration
extralines = []
- for name, value in env_whitelist_values.iteritems():
+ for name, value in env_whitelist_values.items():
actualvalue = d.getVar(name, True) or ''
if value != actualvalue:
extralines.append('%s = "%s"\n' % (name, actualvalue))
@@ -276,7 +360,7 @@ python copy_buildsystem () {
f.write('\n')
# Filter the locked signatures file to just the sstate tasks we are interested in
- excluded_targets = d.getVar('SDK_TARGETS', True)
+ excluded_targets = get_sdk_install_targets(d, images_only=True)
sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc'
lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc'
oe.copy_buildsystem.prune_lockedsigs([],
@@ -289,6 +373,15 @@ python copy_buildsystem () {
# uninative.bbclass sets NATIVELSBSTRING to 'universal'
fixedlsbstring = 'universal'
+ sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1')
+ sdk_ext_type = d.getVar('SDK_EXT_TYPE', True)
+ if sdk_ext_type != 'minimal' or sdk_include_toolchain or derivative:
+ # Create the filtered task list used to generate the sstate cache shipped with the SDK
+ tasklistfn = d.getVar('WORKDIR', True) + '/tasklist.txt'
+ create_filtered_tasklist(d, baseoutpath, tasklistfn, conf_initpath)
+ else:
+ tasklistfn = None
+
# Add packagedata if enabled
if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1':
lockedsigs_base = d.getVar('WORKDIR', True) + '/locked-sigs-base.inc'
@@ -300,7 +393,21 @@ python copy_buildsystem () {
lockedsigs_pruned,
lockedsigs_copy)
- if d.getVar('SDK_EXT_TYPE', True) == 'minimal':
+ if sdk_include_toolchain:
+ lockedsigs_base = d.getVar('WORKDIR', True) + '/locked-sigs-base2.inc'
+ lockedsigs_toolchain = d.getVar('STAGING_DIR_HOST', True) + '/locked-sigs/locked-sigs-extsdk-toolchain.inc'
+ shutil.move(lockedsigs_pruned, lockedsigs_base)
+ oe.copy_buildsystem.merge_lockedsigs([],
+ lockedsigs_base,
+ lockedsigs_toolchain,
+ lockedsigs_pruned)
+ oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_toolchain,
+ d.getVar('SSTATE_DIR', True),
+ sstate_out, d,
+ fixedlsbstring,
+ filterfile=tasklistfn)
+
+ if sdk_ext_type == 'minimal':
if derivative:
# Assume the user is not going to set up an additional sstate
# mirror, thus we need to copy the additional artifacts (from
@@ -316,12 +423,14 @@ python copy_buildsystem () {
oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_extra,
d.getVar('SSTATE_DIR', True),
sstate_out, d,
- fixedlsbstring)
+ fixedlsbstring,
+ filterfile=tasklistfn)
else:
oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_pruned,
d.getVar('SSTATE_DIR', True),
sstate_out, d,
- fixedlsbstring)
+ fixedlsbstring,
+ filterfile=tasklistfn)
# We don't need sstate do_package files
for root, dirs, files in os.walk(sstate_out):
@@ -346,38 +455,98 @@ python copy_buildsystem () {
f.write('%s\t%s\n' % (chksum, os.path.relpath(fn, baseoutpath)))
}
-def extsdk_get_buildtools_filename(d):
- return '*-buildtools-nativesdk-standalone-*.sh'
+def get_current_buildtools(d):
+ """Get the file name of the current buildtools installer"""
+ import glob
+ btfiles = glob.glob(os.path.join(d.getVar('SDK_DEPLOY', True), '*-buildtools-nativesdk-standalone-*.sh'))
+ btfiles.sort(key=os.path.getctime)
+ return os.path.basename(btfiles[-1])
+
+def get_sdk_required_utilities(buildtools_fn, d):
+ """Find required utilities that aren't provided by the buildtools"""
+ sanity_required_utilities = (d.getVar('SANITY_REQUIRED_UTILITIES', True) or '').split()
+ sanity_required_utilities.append(d.expand('${BUILD_PREFIX}gcc'))
+ sanity_required_utilities.append(d.expand('${BUILD_PREFIX}g++'))
+ buildtools_installer = os.path.join(d.getVar('SDK_DEPLOY', True), buildtools_fn)
+ filelist, _ = bb.process.run('%s -l' % buildtools_installer)
+ localdata = bb.data.createCopy(d)
+ localdata.setVar('SDKPATH', '.')
+ sdkpathnative = localdata.getVar('SDKPATHNATIVE', True)
+ sdkbindirs = [localdata.getVar('bindir_nativesdk', True),
+ localdata.getVar('sbindir_nativesdk', True),
+ localdata.getVar('base_bindir_nativesdk', True),
+ localdata.getVar('base_sbindir_nativesdk', True)]
+ for line in filelist.splitlines():
+ splitline = line.split()
+ if len(splitline) > 5:
+ fn = splitline[5]
+ if not fn.startswith('./'):
+ fn = './%s' % fn
+ if fn.startswith(sdkpathnative):
+ relpth = '/' + os.path.relpath(fn, sdkpathnative)
+ for bindir in sdkbindirs:
+ if relpth.startswith(bindir):
+ relpth = os.path.relpath(relpth, bindir)
+ if relpth in sanity_required_utilities:
+ sanity_required_utilities.remove(relpth)
+ break
+ return ' '.join(sanity_required_utilities)
install_tools() {
install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}
- lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/devtool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/devtool
- lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool
+ scripts="devtool recipetool oe-find-native-sysroot runqemu*"
+ for script in $scripts; do
+ for scriptfn in `find ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath} -maxdepth 1 -executable -name "$script"`; do
+ lnr ${scriptfn} ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/`basename $scriptfn`
+ done
+ done
+ # We can't use the same method as above because files in the sysroot won't exist at this point
+ # (they get populated from sstate on installation)
+ if [ "${SDK_INCLUDE_TOOLCHAIN}" == "1" ] ; then
+ binrelpath=${@os.path.relpath(d.getVar('STAGING_BINDIR_NATIVE',True), d.getVar('TOPDIR', True))}
+ lnr ${SDK_OUTPUT}/${SDKPATH}/$binrelpath/unfsd ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/unfsd
+ fi
touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase
- localconf=${SDK_OUTPUT}/${SDKPATH}/conf/local.conf
-
# find latest buildtools-tarball and install it
- buildtools_path=`ls -t1 ${SDK_DEPLOY}/${@extsdk_get_buildtools_filename(d)} | head -n1`
- install $buildtools_path ${SDK_OUTPUT}/${SDKPATH}
-
- # For now this is where uninative.bbclass expects the tarball
- chksum=`sha256sum ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 | cut -f 1 -d ' '`
- install -d ${SDK_OUTPUT}/${SDKPATH}/downloads/uninative/$chksum/
- install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH}/downloads/uninative/$chksum/
- echo "UNINATIVE_CHECKSUM[${BUILD_ARCH}] = '$chksum'" >> ${SDK_OUTPUT}/${SDKPATH}/conf/local.conf
+ install ${SDK_DEPLOY}/${SDK_BUILDTOOLS_INSTALLER} ${SDK_OUTPUT}/${SDKPATH}
install -m 0644 ${COREBASE}/meta/files/ext-sdk-prepare.py ${SDK_OUTPUT}/${SDKPATH}
}
do_populate_sdk_ext[file-checksums] += "${COREBASE}/meta/files/ext-sdk-prepare.py:True"
-# Since bitbake won't run as root it doesn't make sense to try and install
-# the extensible sdk as root.
sdk_ext_preinst() {
+ # Since bitbake won't run as root it doesn't make sense to try and install
+ # the extensible sdk as root.
if [ "`id -u`" = "0" ]; then
echo "ERROR: The extensible sdk cannot be installed as root."
exit 1
fi
+ if ! command -v locale > /dev/null; then
+ echo "ERROR: The installer requires the locale command, please install it first"
+ exit 1
+ fi
+ # Check setting of LC_ALL set above
+ canonicalised_locale=`echo $LC_ALL | sed 's/UTF-8/utf8/'`
+ if ! locale -a | grep -q $canonicalised_locale ; then
+ echo "ERROR: the installer requires the $LC_ALL locale to be installed (but not selected), please install it first"
+ exit 1
+ fi
+ # The relocation script used by buildtools installer requires python
+ if ! command -v python > /dev/null; then
+ echo "ERROR: The installer requires python, please install it first"
+ exit 1
+ fi
+ missing_utils=""
+ for util in ${SDK_REQUIRED_UTILITIES}; do
+ if ! command -v $util > /dev/null; then
+ missing_utils="$missing_utils $util"
+ fi
+ done
+ if [ -n "$missing_utils" ] ; then
+ echo "ERROR: the SDK requires the following missing utilities, please install them: $missing_utils"
+ exit 1
+ fi
SDK_EXTENSIBLE="1"
if [ "$publish" = "1" ] ; then
EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=ext-sdk-prepare.py"
@@ -392,14 +561,16 @@ SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}"
sdk_ext_postinst() {
printf "\nExtracting buildtools...\n"
cd $target_sdk_dir
- printf "buildtools\ny" | ./*buildtools-nativesdk-standalone* > /dev/null || ( printf 'ERROR: buildtools installation failed\n' ; exit 1 )
+ env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
+ printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
# Delete the buildtools tar file since it won't be used again
- rm ./*buildtools-nativesdk-standalone*.sh -f
+ rm -f ./${SDK_BUILDTOOLS_INSTALLER}
+ # We don't need the log either since it succeeded
+ rm -f buildtools.log
# Make sure when the user sets up the environment, they also get
# the buildtools-tarball tools in their path.
- env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script
# Allow bitbake environment setup to be ran as part of this sdk.
@@ -420,7 +591,7 @@ sdk_ext_postinst() {
# current working directory when first ran, nor will it set $1 when
# sourcing a script. That is why this has to look so ugly.
LOGFILE="$target_sdk_dir/preparing_build_system.log"
- sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py '${SDK_INSTALL_TARGETS}' >> $LOGFILE 2>&1" || { echo "ERROR: SDK preparation failed: see $LOGFILE"; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
+ sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
rm $target_sdk_dir/ext-sdk-prepare.py
fi
echo done
@@ -438,12 +609,22 @@ fakeroot python do_populate_sdk_ext() {
bb.fatal('The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to %s (likely via setting SDKMACHINE) which is different from the architecture of the build machine (%s). Unable to continue.' % (d.getVar('SDK_ARCH', True), d.getVar('BUILD_ARCH', True)))
d.setVar('SDK_INSTALL_TARGETS', get_sdk_install_targets(d))
+ buildtools_fn = get_current_buildtools(d)
+ d.setVar('SDK_REQUIRED_UTILITIES', get_sdk_required_utilities(buildtools_fn, d))
+ d.setVar('SDK_BUILDTOOLS_INSTALLER', buildtools_fn)
+ d.setVar('SDKDEPLOYDIR', '${SDKEXTDEPLOYDIR}')
- bb.build.exec_func("do_populate_sdk", d)
+ populate_sdk_common(d)
}
def get_ext_sdk_depends(d):
- return d.getVarFlag('do_rootfs', 'depends', True) + ' ' + d.getVarFlag('do_build', 'depends', True)
+ # Note: the deps varflag is a list not a string, so we need to specify expand=False
+ deps = d.getVarFlag('do_image_complete', 'deps', False)
+ pn = d.getVar('PN', True)
+ deplist = ['%s:%s' % (pn, dep) for dep in deps]
+ for task in ['do_image_complete', 'do_rootfs', 'do_build']:
+ deplist.extend((d.getVarFlag(task, 'depends', True) or '').split())
+ return ' '.join(deplist)
python do_sdk_depends() {
# We have to do this separately in its own task so we avoid recursing into
@@ -471,7 +652,8 @@ do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}"
do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \
buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk \
- ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''}"
+ ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''} \
+ ${@'meta-extsdk-toolchain:do_locked_sigs' if d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1' else ''}"
do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}"
@@ -484,4 +666,13 @@ do_populate_sdk_ext[vardeps] += "copy_buildsystem \
# always runs.
do_populate_sdk_ext[nostamp] = "1"
+SDKEXTDEPLOYDIR = "${WORKDIR}/deploy-${PN}-populate-sdk-ext"
+
+SSTATETASKS += "do_populate_sdk_ext"
+SSTATE_SKIP_CREATION_task-populate-sdk-ext = '1'
+do_populate_sdk_ext[cleandirs] = "${SDKDEPLOYDIR}"
+do_populate_sdk_ext[sstate-inputdirs] = "${SDKEXTDEPLOYDIR}"
+do_populate_sdk_ext[sstate-outputdirs] = "${SDK_DEPLOY}"
+do_populate_sdk_ext[stamp-extra-info] = "${MACHINE}"
+
addtask populate_sdk_ext after do_sdk_depends
diff --git a/import-layers/yocto-poky/meta/classes/python-dir.bbclass b/import-layers/yocto-poky/meta/classes/python-dir.bbclass
index ebfa4b30f..a11dc350b 100644
--- a/import-layers/yocto-poky/meta/classes/python-dir.bbclass
+++ b/import-layers/yocto-poky/meta/classes/python-dir.bbclass
@@ -1,5 +1,5 @@
-PYTHON_BASEVERSION ?= "2.7"
-PYTHON_ABI ?= ""
+PYTHON_BASEVERSION = "2.7"
+PYTHON_ABI = ""
PYTHON_DIR = "python${PYTHON_BASEVERSION}"
-PYTHON_PN = "python${@'' if '${PYTHON_BASEVERSION}'.startswith('2') else '3'}"
+PYTHON_PN = "python"
PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"
diff --git a/import-layers/yocto-poky/meta/classes/python3-dir.bbclass b/import-layers/yocto-poky/meta/classes/python3-dir.bbclass
new file mode 100644
index 000000000..06bb046d9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/python3-dir.bbclass
@@ -0,0 +1,5 @@
+PYTHON_BASEVERSION = "3.5"
+PYTHON_ABI = "m"
+PYTHON_DIR = "python${PYTHON_BASEVERSION}"
+PYTHON_PN = "python3"
+PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"
diff --git a/import-layers/yocto-poky/meta/classes/python3native.bbclass b/import-layers/yocto-poky/meta/classes/python3native.bbclass
index 8ec6b769d..ef468b3fd 100644
--- a/import-layers/yocto-poky/meta/classes/python3native.bbclass
+++ b/import-layers/yocto-poky/meta/classes/python3native.bbclass
@@ -1,7 +1,13 @@
-PYTHON_BASEVERSION = "3.5"
-
-inherit python-dir
+inherit python3-dir
PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
EXTRANATIVEPATH += "${PYTHON_PN}-native"
-DEPENDS += " ${PYTHON_PN}-native "
+DEPENDS_append = " ${PYTHON_PN}-native "
+
+# python-config and other scripts are using distutils modules
+# which we patch to access these variables
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+# autoconf macros will use their internal default preference otherwise
+export PYTHON
diff --git a/import-layers/yocto-poky/meta/classes/pythonnative.bbclass b/import-layers/yocto-poky/meta/classes/pythonnative.bbclass
index 97029dc52..4e0381b56 100644
--- a/import-layers/yocto-poky/meta/classes/pythonnative.bbclass
+++ b/import-layers/yocto-poky/meta/classes/pythonnative.bbclass
@@ -5,4 +5,12 @@ PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
# PYTHON_EXECUTABLE is used by cmake
PYTHON_EXECUTABLE="${PYTHON}"
EXTRANATIVEPATH += "${PYTHON_PN}-native"
-DEPENDS += " ${PYTHON_PN}-native "
+DEPENDS_append = " ${PYTHON_PN}-native "
+
+# python-config and other scripts are using distutils modules
+# which we patch to access these variables
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+# autoconf macros will use their internal default preference otherwise
+export PYTHON
diff --git a/import-layers/yocto-poky/meta/classes/qemu.bbclass b/import-layers/yocto-poky/meta/classes/qemu.bbclass
index 75739dbbf..f2d4d1c9e 100644
--- a/import-layers/yocto-poky/meta/classes/qemu.bbclass
+++ b/import-layers/yocto-poky/meta/classes/qemu.bbclass
@@ -4,6 +4,11 @@
#
def qemu_target_binary(data):
+ package_arch = data.getVar("PACKAGE_ARCH", True)
+ qemu_target_binary = (data.getVar("QEMU_TARGET_BINARY_%s" % package_arch, True) or "")
+ if qemu_target_binary:
+ return qemu_target_binary
+
target_arch = data.getVar("TARGET_ARCH", True)
if target_arch in ("i486", "i586", "i686"):
target_arch = "i386"
diff --git a/import-layers/yocto-poky/meta/classes/qemuboot.bbclass b/import-layers/yocto-poky/meta/classes/qemuboot.bbclass
new file mode 100644
index 000000000..b5cc93dc9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/qemuboot.bbclass
@@ -0,0 +1,82 @@
+# Help runqemu boot target board, "QB" means Qemu Boot, the following
+# vars can be set in conf files, such as <bsp.conf> to make it can be
+# boot by runqemu:
+#
+# QB_SYSTEM_NAME: qemu name, e.g., "qemu-system-i386"
+# QB_OPT_APPEND: options to append to qemu, e.g., "-show-cursor"
+# QB_DEFAULT_KERNEL: default kernel to boot, e.g., "bzImage"
+# QB_DEFAULT_FSTYPE: default FSTYPE to boot, e.g., "ext4"
+# QB_MEM: memory, e.g., "-m 512"
+# QB_MACHINE: qemu machine, e.g., "-machine virt"
+# QB_CPU: qemu cpu, e.g., "-cpu qemu32"
+# QB_CPU_KVM: the similar to QB_CPU, but used when kvm, e.g., '-cpu kvm64',
+# set it when support kvm.
+# QB_KERNEL_CMDLINE_APPEND: options to append to kernel's -append
+# option, e.g., "console=ttyS0 console=tty"
+# QB_DTB: qemu dtb name
+# QB_AUDIO_DRV: qemu audio driver, e.g., "alsa", set it when support audio
+# QB_AUDIO_OPT: qemu audio option, e.g., "-soundhw ac97,es1370", used
+# when QB_AUDIO_DRV is set.
+# QB_KERNEL_ROOT: kernel's root, e.g., /dev/vda
+# QB_TAP_OPT: netowrk option for 'tap' mode, e.g.,
+# "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-device,netdev=net0"
+# Note, runqemu will replace "@TAP@" with the one which is used, such as tap0, tap1 ...
+# QB_SLIRP_OPT: network option for SLIRP mode, e.g.,
+# "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
+# QB_ROOTFS_OPT: used as rootfs, e.g.,
+# "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
+# Note, runqemu will replace "@ROOTFS@" with the one which is used, such as core-image-minimal-qemuarm64.ext4.
+# QB_SERIAL_OPT: serial port, e.g., "-serial mon:stdio"
+# QB_TCPSERIAL_OPT: tcp serial port option, e.g.,
+# " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
+# Note, runqemu will replace "@PORT@" with the port number which is used.
+#
+# Usage:
+# IMAGE_CLASSES += "qemuboot"
+# See "runqemu help" for more info
+
+QB_MEM ?= "-m 256"
+QB_SERIAL_OPT ?= "-serial mon:stdio -serial null"
+QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}"
+QB_DEFAULT_FSTYPE ?= "ext4"
+QB_OPT_APPEND ?= "-show-cursor"
+
+# Create qemuboot.conf
+ROOTFS_POSTPROCESS_COMMAND += "write_qemuboot_conf; "
+
+python write_qemuboot_conf() {
+ import configparser
+
+ build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE', \
+ 'KERNEL_IMAGETYPE', 'IMAGE_NAME', 'IMAGE_LINK_NAME', \
+ 'STAGING_DIR_NATIVE', 'STAGING_BINDIR_NATIVE', \
+ 'STAGING_DIR_HOST']
+
+ # Vars from bsp
+ qb_vars = []
+ for k in d.keys():
+ if k.startswith('QB_'):
+ qb_vars.append(k)
+
+ qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_NAME', True))
+ qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('IMAGE_LINK_NAME', True))
+ cf = configparser.ConfigParser()
+ cf.add_section('config_bsp')
+ for k in build_vars + qb_vars:
+ cf.set('config_bsp', k, '%s' % d.getVar(k, True))
+
+ # QB_DEFAULT_KERNEL's value of KERNEL_IMAGETYPE is the name of a symlink
+ # to the kernel file, which hinders relocatability of the qb conf.
+ # Read the link and replace it with the full filename of the target.
+ kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('QB_DEFAULT_KERNEL', True))
+ kernel = os.path.realpath(kernel_link)
+ cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel)
+
+ bb.utils.mkdirhier(os.path.dirname(qemuboot))
+ with open(qemuboot, 'w') as f:
+ cf.write(f)
+
+ if os.path.lexists(qemuboot_link):
+ os.remove(qemuboot_link)
+ os.symlink(os.path.basename(qemuboot), qemuboot_link)
+}
diff --git a/import-layers/yocto-poky/meta/classes/recipe_sanity.bbclass b/import-layers/yocto-poky/meta/classes/recipe_sanity.bbclass
index 295611f0f..add34df9d 100644
--- a/import-layers/yocto-poky/meta/classes/recipe_sanity.bbclass
+++ b/import-layers/yocto-poky/meta/classes/recipe_sanity.bbclass
@@ -8,7 +8,7 @@ def bad_runtime_vars(cfgdata, d):
return
for var in d.getVar("__recipe_sanity_badruntimevars", True).split():
- val = d.getVar(var, 0)
+ val = d.getVar(var, False)
if val and val != cfgdata.get(var):
__note("%s should be %s_${PN}" % (var, var), d)
@@ -16,11 +16,11 @@ __recipe_sanity_reqvars = "DESCRIPTION"
__recipe_sanity_reqdiffvars = ""
def req_vars(cfgdata, d):
for var in d.getVar("__recipe_sanity_reqvars", True).split():
- if not d.getVar(var, 0):
+ if not d.getVar(var, False):
__note("%s should be set" % var, d)
for var in d.getVar("__recipe_sanity_reqdiffvars", True).split():
- val = d.getVar(var, 0)
+ val = d.getVar(var, False)
cfgval = cfgdata.get(var)
if not val:
@@ -29,7 +29,7 @@ def req_vars(cfgdata, d):
__note("%s should be defined to something other than default (%s)" % (var, cfgval), d)
def var_renames_overwrite(cfgdata, d):
- renames = d.getVar("__recipe_sanity_renames", 0)
+ renames = d.getVar("__recipe_sanity_renames", False)
if renames:
for (key, newkey, oldvalue, newvalue) in renames:
if oldvalue != newvalue and oldvalue != cfgdata.get(newkey):
@@ -50,7 +50,7 @@ def can_use_autotools_base(cfgdata, d):
if cfg.find(i) != -1:
return False
- for clsfile in d.getVar("__inherit_cache", 0):
+ for clsfile in d.getVar("__inherit_cache", False):
(base, _) = os.path.splitext(os.path.basename(clsfile))
if cfg.find("%s_do_configure" % base) != -1:
__note("autotools_base usage needs verification, spotted %s_do_configure" % base, d)
@@ -60,7 +60,7 @@ def can_use_autotools_base(cfgdata, d):
def can_delete_FILESPATH(cfgdata, d):
expected = cfgdata.get("FILESPATH")
expectedpaths = d.expand(expected)
- unexpanded = d.getVar("FILESPATH", 0)
+ unexpanded = d.getVar("FILESPATH", False)
filespath = d.getVar("FILESPATH", True).split(":")
filespath = [os.path.normpath(f) for f in filespath if os.path.exists(f)]
for fp in filespath:
@@ -73,7 +73,7 @@ def can_delete_FILESPATH(cfgdata, d):
def can_delete_FILESDIR(cfgdata, d):
expected = cfgdata.get("FILESDIR")
#expected = "${@bb.utils.which(d.getVar('FILESPATH', True), '.')}"
- unexpanded = d.getVar("FILESDIR", 0)
+ unexpanded = d.getVar("FILESDIR", False)
if unexpanded is None:
return False
@@ -90,7 +90,7 @@ def can_delete_others(p, cfgdata, d):
for k in ["S", "PV", "PN", "DESCRIPTION", "DEPENDS",
"SECTION", "PACKAGES", "EXTRA_OECONF", "EXTRA_OEMAKE"]:
#for k in cfgdata:
- unexpanded = d.getVar(k, 0)
+ unexpanded = d.getVar(k, False)
cfgunexpanded = cfgdata.get(k)
if not cfgunexpanded:
continue
@@ -117,7 +117,7 @@ python do_recipe_sanity () {
#(can_use_autotools_base, "candidate for use of autotools_base"),
(incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"),
]
- cfgdata = d.getVar("__recipe_sanity_cfgdata", 0)
+ cfgdata = d.getVar("__recipe_sanity_cfgdata", False)
for (func, msg) in sanitychecks:
if func(cfgdata, d):
@@ -143,8 +143,8 @@ python recipe_sanity_eh () {
cfgdata = {}
for k in d.keys():
- if not isinstance(d.getVar(k, 0), bb.data_smart.DataSmart):
- cfgdata[k] = d.getVar(k, 0)
+ if not isinstance(d.getVar(k, False), bb.data_smart.DataSmart):
+ cfgdata[k] = d.getVar(k, False)
d.setVar("__recipe_sanity_cfgdata", cfgdata)
#d.setVar("__recipe_sanity_cfgdata", d)
diff --git a/import-layers/yocto-poky/meta/classes/report-error.bbclass b/import-layers/yocto-poky/meta/classes/report-error.bbclass
index 82b5bcd69..5bb231efc 100644
--- a/import-layers/yocto-poky/meta/classes/report-error.bbclass
+++ b/import-layers/yocto-poky/meta/classes/report-error.bbclass
@@ -42,8 +42,8 @@ python errorreport_handler () {
data['distro'] = e.data.getVar("DISTRO", True)
data['target_sys'] = e.data.getVar("TARGET_SYS", True)
data['failures'] = []
- data['component'] = e.getPkgs()[0]
- data['branch_commit'] = base_detect_branch(e.data) + ": " + base_detect_revision(e.data)
+ data['component'] = " ".join(e.getPkgs())
+ data['branch_commit'] = str(base_detect_branch(e.data)) + ": " + str(base_detect_revision(e.data))
lock = bb.utils.lockfile(datafile + '.lock')
errorreport_savedata(e, data, "error-report.txt")
bb.utils.unlockfile(lock)
@@ -58,6 +58,13 @@ python errorreport_handler () {
try:
logFile = codecs.open(log, 'r', 'utf-8')
logdata = logFile.read()
+
+ # Replace host-specific paths so the logs are cleaner
+ for d in ("TOPDIR", "TMPDIR"):
+ s = e.data.getVar(d, True)
+ if s:
+ logdata = logdata.replace(s, d)
+
logFile.close()
except:
logdata = "Unable to read log file"
diff --git a/import-layers/yocto-poky/meta/classes/rm_work.bbclass b/import-layers/yocto-poky/meta/classes/rm_work.bbclass
index c647d88d2..b71a9d1cf 100644
--- a/import-layers/yocto-poky/meta/classes/rm_work.bbclass
+++ b/import-layers/yocto-poky/meta/classes/rm_work.bbclass
@@ -15,6 +15,9 @@
# to try and reduce disk usage
BB_SCHEDULER ?= "completion"
+# Run the rm_work task in the idle scheduling class
+BB_TASK_IONICE_LEVEL_task-rm_work = "3.0"
+
RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}"
BB_DEFAULT_TASK = "rm_work_all"
@@ -63,14 +66,10 @@ do_rm_work () {
i=dummy
break
;;
- *do_rootfs*)
- i=dummy
- break
- ;;
- *do_image*)
- i=dummy
- break
- ;;
+ *do_rootfs*|*do_image*|*do_bootimg*|*do_bootdirectdisk*|*do_vmimg*)
+ i=dummy
+ break
+ ;;
*do_build*)
i=dummy
break
@@ -119,6 +118,8 @@ rm_work_rootfs () {
rm_work_rootfs[cleandirs] = "${WORKDIR}/rootfs"
python () {
+ if bb.data.inherits_class('kernel', d):
+ d.appendVar("RM_WORK_EXCLUDE", ' ' + d.getVar("PN", True))
# If the recipe name is in the RM_WORK_EXCLUDE, skip the recipe.
excludes = (d.getVar("RM_WORK_EXCLUDE", True) or "").split()
pn = d.getVar("PN", True)
diff --git a/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass b/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass
index 95d28afa3..0c7ceea54 100644
--- a/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass
+++ b/import-layers/yocto-poky/meta/classes/rootfs-postcommands.bbclass
@@ -15,13 +15,13 @@ ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
# Write manifest
-IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
+IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest"
ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
# Set default postinst log file
POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
# Set default target for systemd images
SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}'
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; ", "", d)}'
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; systemd_create_users;", "", d)}'
ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;'
@@ -30,7 +30,34 @@ ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;'
SSH_DISABLE_DNS_LOOKUP ?= " ssh_disable_dns_lookup ; "
ROOTFS_POSTPROCESS_COMMAND_append_qemuall = "${SSH_DISABLE_DNS_LOOKUP}"
-
+systemd_create_users () {
+ for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
+ [ -e $conffile ] || continue
+ grep -v "^#" $conffile | sed -e '/^$/d' | while read type name id comment; do
+ if [ "$type" = "u" ]; then
+ useradd_params="--shell /sbin/nologin"
+ [ "$id" != "-" ] && useradd_params="$useradd_params --uid $id"
+ [ "$comment" != "-" ] && useradd_params="$useradd_params --comment $comment"
+ useradd_params="$useradd_params --system $name"
+ eval useradd --root ${IMAGE_ROOTFS} $useradd_params || true
+ elif [ "$type" = "g" ]; then
+ groupadd_params=""
+ [ "$id" != "-" ] && groupadd_params="$groupadd_params --gid $id"
+ groupadd_params="$groupadd_params --system $name"
+ eval groupadd --root ${IMAGE_ROOTFS} $groupadd_params || true
+ elif [ "$type" = "m" ]; then
+ group=$id
+ if [ ! `grep -q "^${group}:" ${IMAGE_ROOTFS}${sysconfdir}/group` ]; then
+ eval groupadd --root ${IMAGE_ROOTFS} --system $group
+ fi
+ if [ ! `grep -q "^${name}:" ${IMAGE_ROOTFS}${sysconfdir}/passwd` ]; then
+ eval useradd --root ${IMAGE_ROOTFS} --shell /sbin/nologin --system $name
+ fi
+ eval usermod --root ${IMAGE_ROOTFS} -a -G $group $name
+ fi
+ done
+ done
+}
#
# A hook function to support read-only-rootfs IMAGE_FEATURES
@@ -73,27 +100,6 @@ read_only_rootfs_hook () {
${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh
fi
fi
-
- if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then
- # Update user database files so that services don't fail for a read-only systemd system
- for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
- [ -e $conffile ] || continue
- grep -v "^#" $conffile | sed -e '/^$/d' | while read type name id comment; do
- if [ "$type" = "u" ]; then
- useradd_params=""
- [ "$id" != "-" ] && useradd_params="$useradd_params --uid $id"
- [ "$comment" != "-" ] && useradd_params="$useradd_params --comment $comment"
- useradd_params="$useradd_params --system $name"
- eval useradd --root ${IMAGE_ROOTFS} $useradd_params || true
- elif [ "$type" = "g" ]; then
- groupadd_params=""
- [ "$id" != "-" ] && groupadd_params="$groupadd_params --gid $id"
- groupadd_params="$groupadd_params --system $name"
- eval groupadd --root ${IMAGE_ROOTFS} $groupadd_params || true
- fi
- done
- done
- fi
}
#
@@ -211,7 +217,7 @@ python write_image_manifest () {
from oe.rootfs import image_list_installed_packages
from oe.utils import format_pkg_list
- deploy_dir = d.getVar('DEPLOY_DIR_IMAGE', True)
+ deploy_dir = d.getVar('IMGDEPLOYDIR', True)
link_name = d.getVar('IMAGE_LINK_NAME', True)
manifest_name = d.getVar('IMAGE_MANIFEST', True)
@@ -226,9 +232,6 @@ python write_image_manifest () {
if os.path.exists(manifest_name):
manifest_link = deploy_dir + "/" + link_name + ".manifest"
if os.path.lexists(manifest_link):
- if d.getVar('RM_OLD_IMAGE', True) == "1" and \
- os.path.exists(os.path.realpath(manifest_link)):
- os.remove(os.path.realpath(manifest_link))
os.remove(manifest_link)
os.symlink(os.path.basename(manifest_name), manifest_link)
}
diff --git a/import-layers/yocto-poky/meta/classes/rootfs_rpm.bbclass b/import-layers/yocto-poky/meta/classes/rootfs_rpm.bbclass
index 0d2e897c2..37730a710 100644
--- a/import-layers/yocto-poky/meta/classes/rootfs_rpm.bbclass
+++ b/import-layers/yocto-poky/meta/classes/rootfs_rpm.bbclass
@@ -5,8 +5,8 @@
ROOTFS_PKGMANAGE = "rpm smartpm"
ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
-# Add 50Meg of extra space for Smart
-IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smartpm", " + 51200", "" ,d)}"
+# Add 100Meg of extra space for Smart
+IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smartpm", " + 102400", "" ,d)}"
# Smart is python based, so be sure python-native is available to us.
EXTRANATIVEPATH += "python-native"
@@ -24,11 +24,6 @@ do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
do_rootfs[recrdeptask] += "do_package_write_rpm"
do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
-# RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files
-# in ${DEPLOY_DIR_RPM}. This can be removed if package_update_index_rpm can be called concurrently
-do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
-do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
-
python () {
if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
flags = d.getVarFlag('do_rootfs', 'recrdeptask', True)
diff --git a/import-layers/yocto-poky/meta/classes/sanity.bbclass b/import-layers/yocto-poky/meta/classes/sanity.bbclass
index 77813e41b..7682ffbb8 100644
--- a/import-layers/yocto-poky/meta/classes/sanity.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sanity.bbclass
@@ -135,8 +135,7 @@ is a good way to visualise the changes."""
bb.note("Your conf/bblayers.conf has been automatically updated.")
return
- if not status.reparse:
- status.addresult()
+ status.addresult()
elif current_lconf == 6 and lconf_version > 6:
# Handle rename of meta-yocto -> meta-poky
@@ -459,19 +458,19 @@ def check_gcc_march(sanity_data):
# Check if GCC could work without march
if not result:
- status,res = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc gcc_test.c -o gcc_test")
+ status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} gcc_test.c -o gcc_test"))
if status == 0:
result = True;
if not result:
- status,res = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=native gcc_test.c -o gcc_test")
+ status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} -march=native gcc_test.c -o gcc_test"))
if status == 0:
message = "BUILD_CFLAGS_append = \" -march=native\""
result = True;
if not result:
build_arch = sanity_data.getVar('BUILD_ARCH', True)
- status,res = oe.utils.getstatusoutput("${BUILD_PREFIX}gcc -march=%s gcc_test.c -o gcc_test" % build_arch)
+ status,res = oe.utils.getstatusoutput(sanity_data.expand("${BUILD_CC} -march=%s gcc_test.c -o gcc_test" % build_arch))
if status == 0:
message = "BUILD_CFLAGS_append = \" -march=%s\"" % build_arch
result = True;
@@ -557,20 +556,17 @@ def check_perl_modules(sanity_data):
return "Required perl module(s) not found: %s\n\n%s\n" % (ret, errresult)
return None
-def sanity_check_conffiles(status, d):
+def sanity_check_conffiles(d):
funcs = d.getVar('BBLAYERS_CONF_UPDATE_FUNCS', True).split()
for func in funcs:
conffile, current_version, required_version, func = func.split(":")
if check_conf_exists(conffile, d) and d.getVar(current_version, True) is not None and \
d.getVar(current_version, True) != d.getVar(required_version, True):
- success = True
try:
bb.build.exec_func(func, d, pythonexception=True)
except NotImplementedError as e:
- success = False
- status.addresult(str(e))
- if success:
- status.reparse = True
+ bb.fatal(e)
+ d.setVar("BB_INVALIDCONF", True)
def sanity_handle_abichanges(status, d):
#
@@ -673,11 +669,11 @@ def check_sanity_version_change(status, d):
if not check_app_exists("${MAKE}", d):
missing = missing + "GNU make,"
- if not check_app_exists('${BUILD_PREFIX}gcc', d):
- missing = missing + "C Compiler (%sgcc)," % d.getVar("BUILD_PREFIX", True)
+ if not check_app_exists('${BUILD_CC}', d):
+ missing = missing + "C Compiler (%s)," % d.getVar("BUILD_CC", True)
- if not check_app_exists('${BUILD_PREFIX}g++', d):
- missing = missing + "C++ Compiler (%sg++)," % d.getVar("BUILD_PREFIX", True)
+ if not check_app_exists('${BUILD_CXX}', d):
+ missing = missing + "C++ Compiler (%s)," % d.getVar("BUILD_CXX", True)
required_utilities = d.getVar('SANITY_REQUIRED_UTILITIES', True)
@@ -746,7 +742,7 @@ def check_sanity_version_change(status, d):
status.addresult("You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc headers.\n")
bbpaths = d.getVar('BBPATH', True).split(":")
- if ("." in bbpaths or "./" in bbpaths or "" in bbpaths) and not status.reparse:
+ if ("." in bbpaths or "./" in bbpaths or "" in bbpaths):
status.addresult("BBPATH references the current directory, either through " \
"an empty entry, a './' or a '.'.\n\t This is unsafe and means your "\
"layer configuration is adding empty elements to BBPATH.\n\t "\
@@ -765,6 +761,16 @@ def check_sanity_version_change(status, d):
# Check that TMPDIR isn't located on nfs
status.addresult(check_not_nfs(tmpdir, "TMPDIR"))
+def sanity_check_locale(d):
+ """
+ Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.
+ """
+ import locale
+ try:
+ locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
+ except locale.Error:
+ raise_sanity_error("You system needs to support the en_US.UTF-8 locale.", d)
+
def check_sanity_everybuild(status, d):
import os, stat
# Sanity tests which test the users environment so need to run at each build (or are so cheap
@@ -784,7 +790,7 @@ def check_sanity_everybuild(status, d):
if (LooseVersion(bb.__version__) < LooseVersion(minversion)):
status.addresult('Bitbake version %s is required and version %s was found\n' % (minversion, bb.__version__))
- sanity_check_conffiles(status, d)
+ sanity_check_locale(d)
paths = d.getVar('PATH', True).split(":")
if "." in paths or "./" in paths or "" in paths:
@@ -829,8 +835,8 @@ def check_sanity_everybuild(status, d):
check_supported_distro(d)
- omask = os.umask(022)
- if omask & 0755:
+ omask = os.umask(0o022)
+ if omask & 0o755:
status.addresult("Please use a umask which allows a+rx and u+rwx\n")
os.umask(omask)
@@ -891,13 +897,13 @@ def check_sanity_everybuild(status, d):
continue
if mirror.startswith('file://'):
- import urlparse
- check_symlink(urlparse.urlparse(mirror).path, d)
+ import urllib
+ check_symlink(urllib.parse.urlparse(mirror).path, d)
# SSTATE_MIRROR ends with a /PATH string
if mirror.endswith('/PATH'):
# remove /PATH$ from SSTATE_MIRROR to get a working
# base directory path
- mirror_base = urlparse.urlparse(mirror[:-1*len('/PATH')]).path
+ mirror_base = urllib.parse.urlparse(mirror[:-1*len('/PATH')]).path
check_symlink(mirror_base, d)
# Check that TMPDIR hasn't changed location since the last time we were run
@@ -920,17 +926,17 @@ def check_sanity_everybuild(status, d):
with open(checkfile, "w") as f:
f.write(tmpdir)
- # Check /bin/sh links to dash or bash
- real_sh = os.path.realpath('/bin/sh')
- if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'):
- status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh)
+ # If /bin/sh is a symlink, check that it points to dash or bash
+ if os.path.islink('/bin/sh'):
+ real_sh = os.path.realpath('/bin/sh')
+ if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'):
+ status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh)
def check_sanity(sanity_data):
class SanityStatus(object):
def __init__(self):
self.messages = ""
self.network_error = False
- self.reparse = False
def addresult(self, message):
if message:
@@ -986,7 +992,6 @@ def check_sanity(sanity_data):
if status.messages != "":
raise_sanity_error(sanity_data.expand(status.messages), sanity_data, status.network_error)
- return status.reparse
# Create a copy of the datastore and finalise it to ensure appends and
# overrides are set - the datastore has yet to be finalised at ConfigParsed
@@ -995,15 +1000,20 @@ def copy_data(e):
sanity_data.finalize()
return sanity_data
+addhandler config_reparse_eventhandler
+config_reparse_eventhandler[eventmask] = "bb.event.ConfigParsed"
+python config_reparse_eventhandler() {
+ sanity_check_conffiles(e.data)
+}
+
addhandler check_sanity_eventhandler
check_sanity_eventhandler[eventmask] = "bb.event.SanityCheck bb.event.NetworkTest"
python check_sanity_eventhandler() {
if bb.event.getName(e) == "SanityCheck":
sanity_data = copy_data(e)
+ check_sanity(sanity_data)
if e.generateevents:
sanity_data.setVar("SANITY_USE_EVENTS", "1")
- reparse = check_sanity(sanity_data)
- e.data.setVar("BB_INVALIDCONF", reparse)
bb.event.fire(bb.event.SanityCheckPassed(), e.data)
elif bb.event.getName(e) == "NetworkTest":
sanity_data = copy_data(e)
diff --git a/import-layers/yocto-poky/meta/classes/scons.bbclass b/import-layers/yocto-poky/meta/classes/scons.bbclass
index 1579b05c6..b9ae19d58 100644
--- a/import-layers/yocto-poky/meta/classes/scons.bbclass
+++ b/import-layers/yocto-poky/meta/classes/scons.bbclass
@@ -10,7 +10,7 @@ scons_do_compile() {
}
scons_do_install() {
- ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} prefix=${D}${prefix} install ${EXTRA_OESCONS}|| \
+ ${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
die "scons install execution failed."
}
diff --git a/import-layers/yocto-poky/meta/classes/sdl.bbclass b/import-layers/yocto-poky/meta/classes/sdl.bbclass
deleted file mode 100644
index cc31288f6..000000000
--- a/import-layers/yocto-poky/meta/classes/sdl.bbclass
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# (C) Michael 'Mickey' Lauer <mickey@Vanille.de>
-#
-
-DEPENDS += "virtual/libsdl libsdl-mixer libsdl-image"
-SECTION = "x11/games"
diff --git a/import-layers/yocto-poky/meta/classes/sip.bbclass b/import-layers/yocto-poky/meta/classes/sip.bbclass
deleted file mode 100644
index 6ed2a13bd..000000000
--- a/import-layers/yocto-poky/meta/classes/sip.bbclass
+++ /dev/null
@@ -1,61 +0,0 @@
-# Build Class for Sip based Python Bindings
-# (C) Michael 'Mickey' Lauer <mickey@Vanille.de>
-#
-STAGING_SIPDIR ?= "${STAGING_DATADIR_NATIVE}/sip"
-
-DEPENDS =+ "sip-native"
-RDEPENDS_${PN} += "python-sip"
-
-# default stuff, do not uncomment
-# EXTRA_SIPTAGS = "-tWS_X11 -tQt_4_3_0"
-
-# do_generate is before do_configure so ensure that sip_native is populated in sysroot before executing it
-do_generate[depends] += "sip-native:do_populate_sysroot"
-
-sip_do_generate() {
- if [ -z "${SIP_MODULES}" ]; then
- MODULES="`ls sip/*mod.sip`"
- else
- MODULES="${SIP_MODULES}"
- fi
-
- if [ -z "$MODULES" ]; then
- die "SIP_MODULES not set and no modules found in $PWD"
- else
- bbnote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'"
- fi
-
- if [ -z "${EXTRA_SIPTAGS}" ]; then
- die "EXTRA_SIPTAGS needs to be set!"
- else
- SIPTAGS="${EXTRA_SIPTAGS}"
- fi
-
- if [ ! -z "${SIP_FEATURES}" ]; then
- FEATURES="-z ${SIP_FEATURES}"
- bbnote "sip feature file: ${SIP_FEATURES}"
- fi
-
- for module in $MODULES
- do
- install -d ${module}/
- echo "calling 'sip4 -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'"
- sip4 -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf \
- sip/${module}/${module}mod.sip || die "Error calling sip on ${module}"
- sed -e 's,target,TARGET,' -e 's,sources,SOURCES,' -e 's,headers,HEADERS,' \
- ${module}/${module}.sbf | sed s,"moc_HEADERS =","HEADERS +=", \
- >${module}/${module}.pro
- echo "TEMPLATE=lib" >>${module}/${module}.pro
- [ "${module}" = "qt" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qtcanvas" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qttable" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qwt" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qtpe" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qtpe" ] && echo "LIBS+=-lqpe" >>${module}/${module}.pro
- true
- done
-}
-
-EXPORT_FUNCTIONS do_generate
-
-addtask generate after do_unpack do_patch before do_configure
diff --git a/import-layers/yocto-poky/meta/classes/siteinfo.bbclass b/import-layers/yocto-poky/meta/classes/siteinfo.bbclass
index 50141a353..6eca004c5 100644
--- a/import-layers/yocto-poky/meta/classes/siteinfo.bbclass
+++ b/import-layers/yocto-poky/meta/classes/siteinfo.bbclass
@@ -36,7 +36,11 @@ def siteinfo_data(d):
"mips": "endian-big bit-32 mips-common",
"mips64": "endian-big bit-64 mips-common",
"mips64el": "endian-little bit-64 mips-common",
+ "mipsisa64r6": "endian-big bit-64 mips-common",
+ "mipsisa64r6el": "endian-little bit-64 mips-common",
"mipsel": "endian-little bit-32 mips-common",
+ "mipsisa32r6": "endian-big bit-32 mips-common",
+ "mipsisa32r6el": "endian-little bit-32 mips-common",
"powerpc": "endian-big bit-32 powerpc-common",
"nios2": "endian-little bit-32 nios2-common",
"powerpc64": "endian-big bit-64 powerpc-common",
@@ -107,6 +111,14 @@ def siteinfo_data(d):
"x86_64-mingw32": "bit-64",
}
+ # Add in any extra user supplied data which may come from a BSP layer, removing the
+ # need to always change this class directly
+ extra_siteinfo = (d.getVar("SITEINFO_EXTRA_DATAFUNCS", True) or "").split()
+ for m in extra_siteinfo:
+ call = m + "(archinfo, osinfo, targetinfo, d)"
+ locs = { "archinfo" : archinfo, "osinfo" : osinfo, "targetinfo" : targetinfo, "d" : d}
+ archinfo, osinfo, targetinfo = bb.utils.better_eval(call, locs)
+
hostarch = d.getVar("HOST_ARCH", True)
hostos = d.getVar("HOST_OS", True)
target = "%s-%s" % (hostarch, hostos)
@@ -145,7 +157,7 @@ python () {
bb.fatal("Please add your architecture to siteinfo.bbclass")
}
-def siteinfo_get_files(d, no_cache = False):
+def siteinfo_get_files(d, aclocalcache = False):
sitedata = siteinfo_data(d)
sitefiles = ""
for path in d.getVar("BBPATH", True).split(":"):
@@ -154,11 +166,17 @@ def siteinfo_get_files(d, no_cache = False):
if os.path.exists(filename):
sitefiles += filename + " "
- if no_cache: return sitefiles
+ if not aclocalcache:
+ return sitefiles
- # Now check for siteconfig cache files
- # Use the files copied to the aclocal cache generated by autotools.bbclass
- # to avoid races
+ # Now check for siteconfig cache files in the directory setup by autotools.bbclass to
+ # avoid races.
+ #
+ # ACLOCALDIR may or may not exist so cache should only be set to True from autotools.bbclass
+ # after files have been copied into this location. To do otherwise risks parsing/signature
+ # issues and the directory being created/removed whilst this code executes. This can happen
+ # when a multilib recipe is parsed along with its base variant which may be running at the time
+ # causing rare but nasty failures
path_siteconfig = d.getVar('ACLOCALDIR', True)
if path_siteconfig and os.path.isdir(path_siteconfig):
for i in os.listdir(path_siteconfig):
@@ -166,7 +184,6 @@ def siteinfo_get_files(d, no_cache = False):
continue
filename = os.path.join(path_siteconfig, i)
sitefiles += filename + " "
-
return sitefiles
#
diff --git a/import-layers/yocto-poky/meta/classes/spdx.bbclass b/import-layers/yocto-poky/meta/classes/spdx.bbclass
index 0c9276584..89394d3a9 100644
--- a/import-layers/yocto-poky/meta/classes/spdx.bbclass
+++ b/import-layers/yocto-poky/meta/classes/spdx.bbclass
@@ -219,14 +219,13 @@ def hash_string(data):
def run_fossology(foss_command, full_spdx):
import string, re
import subprocess
-
- p = subprocess.Popen(foss_command.split(),
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- foss_output, foss_error = p.communicate()
- if p.returncode != 0:
+
+ try:
+ foss_output = subprocess.check_output(foss_command.split(),
+ stderr=subprocess.STDOUT).decode('utf-8')
+ except subprocess.CalledProcessError as e:
return None
- foss_output = unicode(foss_output, "utf-8")
foss_output = string.replace(foss_output, '\r', '')
# Package info
diff --git a/import-layers/yocto-poky/meta/classes/sstate.bbclass b/import-layers/yocto-poky/meta/classes/sstate.bbclass
index 8c623271a..172384b37 100644
--- a/import-layers/yocto-poky/meta/classes/sstate.bbclass
+++ b/import-layers/yocto-poky/meta/classes/sstate.bbclass
@@ -17,6 +17,9 @@ SSTATE_EXTRAPATH = ""
SSTATE_EXTRAPATHWILDCARD = ""
SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/${SSTATE_PKGSPEC}"
+# explicitly make PV to depend on evaluated value of PV variable
+PV[vardepvalue] = "${PV}"
+
# We don't want the sstate to depend on things like the distro string
# of the system, we let the sstate paths take care of this.
SSTATE_EXTRAPATH[vardepvalue] = ""
@@ -27,6 +30,8 @@ SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR
SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
# Archive the sources for many architectures in one deploy folder
SSTATE_DUPWHITELIST += "${DEPLOY_DIR_SRC}"
+# Ignore overlapping README
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR}/sdk/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt"
SSTATE_SCAN_FILES ?= "*.la *-config *_config"
SSTATE_SCAN_CMD ?= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES", True).split())}" \) -type f'
@@ -95,7 +100,7 @@ python () {
scan_cmd = "grep -Irl ${STAGING_DIR} ${SSTATE_BUILDDIR}"
d.setVar('SSTATE_SCAN_CMD', scan_cmd)
- unique_tasks = set((d.getVar('SSTATETASKS', True) or "").split())
+ unique_tasks = sorted(set((d.getVar('SSTATETASKS', True) or "").split()))
d.setVar('SSTATETASKS', " ".join(unique_tasks))
for task in unique_tasks:
d.prependVarFlag(task, 'prefuncs', "sstate_task_prefunc ")
@@ -170,6 +175,8 @@ def sstate_install(ss, d):
if os.access(manifest, os.R_OK):
bb.fatal("Package already staged (%s)?!" % manifest)
+ d.setVar("SSTATE_INST_POSTRM", manifest + ".postrm")
+
locks = []
for lock in ss['lockfiles-shared']:
locks.append(bb.utils.lockfile(lock, True))
@@ -200,6 +207,7 @@ def sstate_install(ss, d):
f = os.path.normpath(f)
realmatch = True
for w in whitelist:
+ w = os.path.normpath(w)
if f.startswith(w):
realmatch = False
break
@@ -402,6 +410,13 @@ def sstate_clean_manifest(manifest, d):
except OSError:
pass
+ postrm = manifest + ".postrm"
+ if os.path.exists(manifest + ".postrm"):
+ import subprocess
+ os.chmod(postrm, 0o755)
+ subprocess.call(postrm, shell=True)
+ oe.path.remove(postrm)
+
oe.path.remove(manifest)
def sstate_clean(ss, d):
@@ -563,6 +578,8 @@ def sstate_package(ss, d):
for state in ss['dirs']:
if not os.path.exists(state[1]):
continue
+ if d.getVar('SSTATE_SKIP_CREATION', True) == '1':
+ continue
srcbase = state[0].rstrip("/").rsplit('/', 1)[0]
for walkroot, dirs, files in os.walk(state[1]):
for file in files:
@@ -623,10 +640,10 @@ def pstaging_fetch(sstatefetch, sstatepkg, d):
# Try a fetch from the sstate mirror, if it fails just return and
# we will build the package
- uris = ['file://{0}'.format(sstatefetch),
- 'file://{0}.siginfo'.format(sstatefetch)]
+ uris = ['file://{0};downloadfilename={0}'.format(sstatefetch),
+ 'file://{0}.siginfo;downloadfilename={0}.siginfo'.format(sstatefetch)]
if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG", True), False):
- uris += ['file://{0}.sig'.format(sstatefetch)]
+ uris += ['file://{0}.sig;downloadfilename={0}.sig'.format(sstatefetch)]
for srcuri in uris:
localdata.setVar('SRC_URI', srcuri)
@@ -634,12 +651,6 @@ def pstaging_fetch(sstatefetch, sstatepkg, d):
fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)
fetcher.download()
- # Need to optimise this, if using file:// urls, the fetcher just changes the local path
- # For now work around by symlinking
- localpath = bb.data.expand(fetcher.localpath(srcuri), localdata)
- if localpath != sstatepkg and os.path.exists(localpath) and not os.path.exists(sstatepkg):
- os.symlink(localpath, sstatepkg)
-
except bb.fetch2.BBFetchException:
break
@@ -647,7 +658,7 @@ def sstate_setscene(d):
shared_state = sstate_state_fromvars(d)
accelerate = sstate_installpkg(shared_state, d)
if not accelerate:
- raise bb.build.FuncFailed("No suitable staging package found")
+ bb.fatal("No suitable staging package found")
python sstate_task_prefunc () {
shared_state = sstate_state_fromvars(d)
@@ -661,9 +672,9 @@ python sstate_task_postfunc () {
sstate_install(shared_state, d)
for intercept in shared_state['interceptfuncs']:
bb.build.exec_func(intercept, d, (d.getVar("WORKDIR", True),))
- omask = os.umask(002)
- if omask != 002:
- bb.note("Using umask 002 (not %0o) for sstate packaging" % omask)
+ omask = os.umask(0o002)
+ if omask != 0o002:
+ bb.note("Using umask 0o002 (not %0o) for sstate packaging" % omask)
sstate_package(shared_state, d)
os.umask(omask)
}
@@ -725,6 +736,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
ret = []
missed = []
+ missing = []
extension = ".tgz"
if siginfo:
extension = extension + ".siginfo"
@@ -746,6 +758,18 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
return spec, extrapath, tname
+ def sstate_pkg_to_pn(pkg, d):
+ """
+ Translate an sstate filename to a PN value by way of SSTATE_PKGSPEC. This is slightly hacky but
+ we don't have access to everything in this context.
+ """
+ pkgspec = d.getVar('SSTATE_PKGSPEC', False)
+ try:
+ idx = pkgspec.split(':').index('${PN}')
+ except ValueError:
+ bb.fatal('Unable to find ${PN} in SSTATE_PKGSPEC')
+ return pkg.split(':')[idx]
+
for task in range(len(sq_fn)):
@@ -780,6 +804,8 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
if localdata.getVar('BB_NO_NETWORK', True) == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK', True) == "1":
localdata.delVar('BB_NO_NETWORK')
+ whitelist = bb.runqueue.get_setscene_enforce_whitelist(d)
+
from bb.fetch2 import FetchConnectionCache
def checkstatus_init(thread_worker):
thread_worker.connection_cache = FetchConnectionCache()
@@ -806,7 +832,14 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
except:
missed.append(task)
bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
- pass
+ if whitelist:
+ pn = sstate_pkg_to_pn(sstatefile, d)
+ taskname = sq_task[task]
+ if not bb.runqueue.check_setscene_enforce_whitelist(pn, taskname, whitelist):
+ missing.append(task)
+ bb.error('Sstate artifact unavailable for %s.%s' % (pn, taskname))
+ pass
+ bb.event.fire(bb.event.ProcessProgress("Checking sstate mirror object availability", len(tasklist) - thread_worker.tasks.qsize()), d)
tasklist = []
for task in range(len(sq_fn)):
@@ -817,16 +850,23 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
tasklist.append((task, sstatefile))
if tasklist:
- bb.note("Checking sstate mirror object availability (for %s objects)" % len(tasklist))
+ bb.event.fire(bb.event.ProcessStarted("Checking sstate mirror object availability", len(tasklist)), d)
+
import multiprocessing
nproc = min(multiprocessing.cpu_count(), len(tasklist))
+ bb.event.enable_threadlock()
pool = oe.utils.ThreadedPool(nproc, len(tasklist),
worker_init=checkstatus_init, worker_end=checkstatus_end)
for t in tasklist:
pool.add_task(checkstatus, t)
pool.start()
pool.wait_completion()
+ bb.event.disable_threadlock()
+
+ bb.event.fire(bb.event.ProcessFinished("Checking sstate mirror object availability"), d)
+ if whitelist and missing:
+ bb.fatal('Required artifacts were unavailable - exiting')
inheritlist = d.getVar("INHERIT", True)
if "toaster" in inheritlist:
@@ -905,6 +945,9 @@ def setscene_depvalid(task, taskdependees, notneeded, d):
# Nothing need depend on libc-initial/gcc-cross-initial
if "-initial" in taskdependees[task][0]:
continue
+ # For meta-extsdk-toolchain we want all sysroot dependencies
+ if taskdependees[dep][0] == 'meta-extsdk-toolchain':
+ return False
# Native/Cross populate_sysroot need their dependencies
if isNativeCross(taskdependees[task][0]) and isNativeCross(taskdependees[dep][0]):
return False
@@ -982,6 +1025,8 @@ python sstate_eventhandler2() {
for r in toremove:
(stamp, manifest, workdir) = r.split()
for m in glob.glob(manifest + ".*"):
+ if m.endswith(".postrm"):
+ continue
sstate_clean_manifest(m, d)
bb.utils.remove(stamp + "*")
if removeworkdir:
diff --git a/import-layers/yocto-poky/meta/classes/staging.bbclass b/import-layers/yocto-poky/meta/classes/staging.bbclass
index bc5dfa81a..a0b09a00b 100644
--- a/import-layers/yocto-poky/meta/classes/staging.bbclass
+++ b/import-layers/yocto-poky/meta/classes/staging.bbclass
@@ -1,3 +1,37 @@
+# These directories will be staged in the sysroot
+SYSROOT_DIRS = " \
+ ${includedir} \
+ ${libdir} \
+ ${base_libdir} \
+ ${nonarch_base_libdir} \
+ ${datadir} \
+"
+
+# These directories are also staged in the sysroot when they contain files that
+# are usable on the build system
+SYSROOT_DIRS_NATIVE = " \
+ ${bindir} \
+ ${sbindir} \
+ ${base_bindir} \
+ ${base_sbindir} \
+ ${libexecdir} \
+ ${sysconfdir} \
+ ${localstatedir} \
+"
+SYSROOT_DIRS_append_class-native = " ${SYSROOT_DIRS_NATIVE}"
+SYSROOT_DIRS_append_class-cross = " ${SYSROOT_DIRS_NATIVE}"
+SYSROOT_DIRS_append_class-crosssdk = " ${SYSROOT_DIRS_NATIVE}"
+
+# These directories will not be staged in the sysroot
+SYSROOT_DIRS_BLACKLIST = " \
+ ${mandir} \
+ ${docdir} \
+ ${infodir} \
+ ${datadir}/locale \
+ ${datadir}/applications \
+ ${datadir}/fonts \
+ ${datadir}/pixmaps \
+"
sysroot_stage_dir() {
src="$1"
@@ -14,43 +48,18 @@ sysroot_stage_dir() {
)
}
-sysroot_stage_libdir() {
- src="$1"
- dest="$2"
-
- sysroot_stage_dir $src $dest
-}
-
sysroot_stage_dirs() {
from="$1"
to="$2"
- sysroot_stage_dir $from${includedir} $to${includedir}
- if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
- sysroot_stage_dir $from${bindir} $to${bindir}
- sysroot_stage_dir $from${sbindir} $to${sbindir}
- sysroot_stage_dir $from${base_bindir} $to${base_bindir}
- sysroot_stage_dir $from${base_sbindir} $to${base_sbindir}
- sysroot_stage_dir $from${libexecdir} $to${libexecdir}
- sysroot_stage_dir $from${sysconfdir} $to${sysconfdir}
- sysroot_stage_dir $from${localstatedir} $to${localstatedir}
- fi
- if [ -d $from${libdir} ]
- then
- sysroot_stage_libdir $from${libdir} $to${libdir}
- fi
- if [ -d $from${base_libdir} ]
- then
- sysroot_stage_libdir $from${base_libdir} $to${base_libdir}
- fi
- if [ -d $from${nonarch_base_libdir} ]
- then
- sysroot_stage_libdir $from${nonarch_base_libdir} $to${nonarch_base_libdir}
- fi
- sysroot_stage_dir $from${datadir} $to${datadir}
- # We don't care about docs/info/manpages/locales
- rm -rf $to${mandir}/ $to${docdir}/ $to${infodir}/ ${to}${datadir}/locale/
- rm -rf $to${datadir}/applications/ $to${datadir}/fonts/ $to${datadir}/pixmaps/
+ for dir in ${SYSROOT_DIRS}; do
+ sysroot_stage_dir "$from$dir" "$to$dir"
+ done
+
+ # Remove directories we do not care about
+ for dir in ${SYSROOT_DIRS_BLACKLIST}; do
+ rm -rf "$to$dir"
+ done
}
sysroot_stage_all() {
@@ -172,13 +181,26 @@ python sysroot_cleansstate () {
do_configure[prefuncs] += "sysroot_cleansstate"
+BB_SETSCENE_VERIFY_FUNCTION2 = "sysroot_checkhashes2"
+
+def sysroot_checkhashes2(covered, tasknames, fns, d, invalidtasks):
+ problems = set()
+ configurefns = set()
+ for tid in invalidtasks:
+ if tasknames[tid] == "do_configure" and tid not in covered:
+ configurefns.add(fns[tid])
+ for tid in covered:
+ if tasknames[tid] == "do_populate_sysroot" and fns[tid] in configurefns:
+ problems.add(tid)
+ return problems
+
BB_SETSCENE_VERIFY_FUNCTION = "sysroot_checkhashes"
def sysroot_checkhashes(covered, tasknames, fnids, fns, d, invalidtasks = None):
problems = set()
configurefnids = set()
if not invalidtasks:
- invalidtasks = xrange(len(tasknames))
+ invalidtasks = range(len(tasknames))
for task in invalidtasks:
if tasknames[task] == "do_configure" and task not in covered:
configurefnids.add(fnids[task])
diff --git a/import-layers/yocto-poky/meta/classes/syslinux.bbclass b/import-layers/yocto-poky/meta/classes/syslinux.bbclass
index 4fcb0c5e7..7778fd708 100644
--- a/import-layers/yocto-poky/meta/classes/syslinux.bbclass
+++ b/import-layers/yocto-poky/meta/classes/syslinux.bbclass
@@ -30,6 +30,7 @@ SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
SYSLINUX_PROMPT ?= "0"
SYSLINUX_TIMEOUT ?= "50"
AUTO_SYSLINUXMENU ?= "1"
+SYSLINUX_ALLOWOPTIONS ?= "1"
SYSLINUX_ROOT ?= "${ROOT}"
SYSLINUX_CFG_VM ?= "${S}/syslinux_vm.cfg"
SYSLINUX_CFG_LIVE ?= "${S}/syslinux_live.cfg"
@@ -71,7 +72,7 @@ syslinux_hddimg_populate() {
}
syslinux_hddimg_install() {
- syslinux ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
+ syslinux ${IMGDEPLOYDIR}/${IMAGE_NAME}.hddimg
}
syslinux_hdddirect_install() {
@@ -99,12 +100,12 @@ python build_syslinux_cfg () {
cfile = d.getVar('SYSLINUX_CFG', True)
if not cfile:
- raise bb.build.FuncFailed('Unable to read SYSLINUX_CFG')
+ bb.fatal('Unable to read SYSLINUX_CFG')
try:
- cfgfile = file(cfile, 'w')
+ cfgfile = open(cfile, 'w')
except OSError:
- raise bb.build.funcFailed('Unable to open %s' % (cfile))
+ bb.fatal('Unable to open %s' % cfile)
cfgfile.write('# Automatically created by OE\n')
@@ -114,7 +115,12 @@ python build_syslinux_cfg () {
for opt in opts.split(';'):
cfgfile.write('%s\n' % opt)
- cfgfile.write('ALLOWOPTIONS 1\n');
+ allowoptions = d.getVar('SYSLINUX_ALLOWOPTIONS', True)
+ if allowoptions:
+ cfgfile.write('ALLOWOPTIONS %s\n' % allowoptions)
+ else:
+ cfgfile.write('ALLOWOPTIONS 1\n')
+
syslinux_default_console = d.getVar('SYSLINUX_DEFAULT_CONSOLE', True)
syslinux_serial_tty = d.getVar('SYSLINUX_SERIAL_TTY', True)
syslinux_serial = d.getVar('SYSLINUX_SERIAL', True)
@@ -154,7 +160,7 @@ python build_syslinux_cfg () {
overrides = localdata.getVar('OVERRIDES', True)
if not overrides:
- raise bb.build.FuncFailed('OVERRIDES not defined')
+ bb.fatal('OVERRIDES not defined')
localdata.setVar('OVERRIDES', label + ':' + overrides)
bb.data.update_data(localdata)
@@ -166,7 +172,7 @@ python build_syslinux_cfg () {
root= d.getVar('SYSLINUX_ROOT', True)
if not root:
- raise bb.build.FuncFailed('SYSLINUX_ROOT not defined')
+ bb.fatal('SYSLINUX_ROOT not defined')
for btype in btypes:
cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
@@ -190,3 +196,4 @@ python build_syslinux_cfg () {
cfgfile.close()
}
+build_syslinux_cfg[dirs] = "${S}"
diff --git a/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass b/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass
new file mode 100644
index 000000000..05244c7e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/systemd-boot.bbclass
@@ -0,0 +1,124 @@
+# Copyright (C) 2016 Intel Corporation
+#
+# Released under the MIT license (see COPYING.MIT)
+
+# systemd-boot.bbclass - The "systemd-boot" is essentially the gummiboot merged into systemd.
+# The original standalone gummiboot project is dead without any more
+# maintenance. As a start point, we replace all gummitboot occurrences
+# with systemd-boot in gummiboot.bbclass to have a base version of this
+# systemd-boot.bbclass.
+#
+# Set EFI_PROVIDER = "systemd-boot" to use systemd-boot on your live images instead of grub-efi
+# (images built by image-live.bbclass or image-vm.bbclass)
+
+do_bootimg[depends] += "${MLPREFIX}systemd-boot:do_deploy"
+do_bootdirectdisk[depends] += "${MLPREFIX}systemd-boot:do_deploy"
+
+EFIDIR = "/EFI/BOOT"
+
+SYSTEMD_BOOT_CFG ?= "${S}/loader.conf"
+SYSTEMD_BOOT_ENTRIES ?= ""
+SYSTEMD_BOOT_TIMEOUT ?= "10"
+
+# Need UUID utility code.
+inherit fs-uuid
+
+efi_populate() {
+ DEST=$1
+
+ EFI_IMAGE="systemd-bootia32.efi"
+ DEST_EFI_IMAGE="bootia32.efi"
+ if [ "${TARGET_ARCH}" = "x86_64" ]; then
+ EFI_IMAGE="systemd-bootx64.efi"
+ DEST_EFI_IMAGE="bootx64.efi"
+ fi
+
+ install -d ${DEST}${EFIDIR}
+ # systemd-boot requires these paths for configuration files
+ # they are not customizable so no point in new vars
+ install -d ${DEST}/loader
+ install -d ${DEST}/loader/entries
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/${EFI_IMAGE} ${DEST}${EFIDIR}/${DEST_EFI_IMAGE}
+ install -m 0644 ${SYSTEMD_BOOT_CFG} ${DEST}/loader/loader.conf
+ for i in ${SYSTEMD_BOOT_ENTRIES}; do
+ install -m 0644 ${i} ${DEST}/loader/entries
+ done
+}
+
+efi_iso_populate() {
+ iso_dir=$1
+ efi_populate $iso_dir
+ mkdir -p ${EFIIMGDIR}/${EFIDIR}
+ cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
+ cp $iso_dir/vmlinuz ${EFIIMGDIR}
+ EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
+ echo "fs0:${EFIPATH}\\${DEST_EFI_IMAGE}" > ${EFIIMGDIR}/startup.nsh
+ if [ -f "$iso_dir/initrd" ] ; then
+ cp $iso_dir/initrd ${EFIIMGDIR}
+ fi
+}
+
+efi_hddimg_populate() {
+ efi_populate $1
+}
+
+python build_efi_cfg() {
+ s = d.getVar("S", True)
+ labels = d.getVar('LABELS', True)
+ if not labels:
+ bb.debug(1, "LABELS not defined, nothing to do")
+ return
+
+ if labels == []:
+ bb.debug(1, "No labels, nothing to do")
+ return
+
+ cfile = d.getVar('SYSTEMD_BOOT_CFG', True)
+ try:
+ cfgfile = open(cfile, 'w')
+ except OSError:
+ bb.fatal('Unable to open %s' % cfile)
+
+ cfgfile.write('# Automatically created by OE\n')
+ cfgfile.write('default %s\n' % (labels.split()[0]))
+ timeout = d.getVar('SYSTEMD_BOOT_TIMEOUT', True)
+ if timeout:
+ cfgfile.write('timeout %s\n' % timeout)
+ else:
+ cfgfile.write('timeout 10\n')
+ cfgfile.close()
+
+ for label in labels.split():
+ localdata = d.createCopy()
+
+ overrides = localdata.getVar('OVERRIDES', True)
+ if not overrides:
+ bb.fatal('OVERRIDES not defined')
+
+ entryfile = "%s/%s.conf" % (s, label)
+ d.appendVar("SYSTEMD_BOOT_ENTRIES", " " + entryfile)
+ try:
+ entrycfg = open(entryfile, "w")
+ except OSError:
+ bb.fatal('Unable to open %s' % entryfile)
+ localdata.setVar('OVERRIDES', label + ':' + overrides)
+ bb.data.update_data(localdata)
+
+ entrycfg.write('title %s\n' % label)
+ entrycfg.write('linux /vmlinuz\n')
+
+ append = localdata.getVar('APPEND', True)
+ initrd = localdata.getVar('INITRD', True)
+
+ if initrd:
+ entrycfg.write('initrd /initrd\n')
+ lb = label
+ if label == "install":
+ lb = "install-efi"
+ entrycfg.write('options LABEL=%s ' % lb)
+ if append:
+ append = replace_rootfs_uuid(d, append)
+ entrycfg.write('%s' % append)
+ entrycfg.write('\n')
+ entrycfg.close()
+}
diff --git a/import-layers/yocto-poky/meta/classes/systemd.bbclass b/import-layers/yocto-poky/meta/classes/systemd.bbclass
index db7873fbe..d56c760a1 100644
--- a/import-layers/yocto-poky/meta/classes/systemd.bbclass
+++ b/import-layers/yocto-poky/meta/classes/systemd.bbclass
@@ -165,8 +165,7 @@ python systemd_populate_packages() {
if path_found != '':
systemd_add_files_and_parse(pkg_systemd, path_found, service, keys)
else:
- raise bb.build.FuncFailed("SYSTEMD_SERVICE_%s value %s does not exist" % \
- (pkg_systemd, service))
+ bb.fatal("SYSTEMD_SERVICE_%s value %s does not exist" % (pkg_systemd, service))
# Run all modifications once when creating package
if os.path.exists(d.getVar("D", True)):
diff --git a/import-layers/yocto-poky/meta/classes/terminal.bbclass b/import-layers/yocto-poky/meta/classes/terminal.bbclass
index 9f4c24e90..a94f755a4 100644
--- a/import-layers/yocto-poky/meta/classes/terminal.bbclass
+++ b/import-layers/yocto-poky/meta/classes/terminal.bbclass
@@ -29,7 +29,7 @@ def emit_terminal_func(command, envdata, d):
bb.data.emit_func(cmd_func, script, envdata)
script.write(cmd_func)
script.write("\n")
- os.chmod(runfile, 0755)
+ os.chmod(runfile, 0o755)
return runfile
diff --git a/import-layers/yocto-poky/meta/classes/testexport.bbclass b/import-layers/yocto-poky/meta/classes/testexport.bbclass
new file mode 100644
index 000000000..514702082
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/testexport.bbclass
@@ -0,0 +1,206 @@
+# Copyright (C) 2016 Intel Corporation
+#
+# Released under the MIT license (see COPYING.MIT)
+#
+#
+# testexport.bbclass allows to execute runtime test outside OE environment.
+# Most of the tests are commands run on target image over ssh.
+# To use it add testexport to global inherit and call your target image with -c testexport
+# You can try it out like this:
+# - First build an image. i.e. core-image-sato
+# - Add INHERIT += "testexport" in local.conf
+# - Then bitbake core-image-sato -c testexport. That will generate the directory structure
+# to execute the runtime tests using runexported.py.
+#
+# For more information on TEST_SUITES check testimage class.
+
+TEST_LOG_DIR ?= "${WORKDIR}/testexport"
+TEST_EXPORT_DIR ?= "${TMPDIR}/testexport/${PN}"
+TEST_EXPORT_PACKAGED_DIR ?= "packages/packaged"
+TEST_EXPORT_EXTRACTED_DIR ?= "packages/extracted"
+
+TEST_TARGET ?= "simpleremote"
+TEST_TARGET_IP ?= ""
+TEST_SERVER_IP ?= ""
+
+TEST_EXPORT_SDK_PACKAGES ?= ""
+TEST_EXPORT_SDK_ENABLED ?= "0"
+TEST_EXPORT_SDK_NAME ?= "testexport-tools-nativesdk"
+TEST_EXPORT_SDK_DIR ?= "sdk"
+
+TEST_EXPORT_DEPENDS = ""
+TEST_EXPORT_DEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
+TEST_EXPORT_DEPENDS += "${@bb.utils.contains('TEST_EXPORT_SDK_ENABLED', '1', 'testexport-tarball:do_populate_sdk', '', d)}"
+TEST_EXPORT_LOCK = "${TMPDIR}/testimage.lock"
+
+python do_testexport() {
+ testexport_main(d)
+}
+
+addtask testexport
+do_testexport[nostamp] = "1"
+do_testexport[depends] += "${TEST_EXPORT_DEPENDS} ${TESTIMAGEDEPENDS}"
+do_testexport[lockfiles] += "${TEST_EXPORT_LOCK}"
+
+def exportTests(d,tc):
+ import json
+ import shutil
+ import pkgutil
+ import re
+ import oe.path
+
+ exportpath = d.getVar("TEST_EXPORT_DIR", True)
+
+ savedata = {}
+ savedata["d"] = {}
+ savedata["target"] = {}
+ savedata["target"]["ip"] = tc.target.ip or d.getVar("TEST_TARGET_IP", True)
+ savedata["target"]["server_ip"] = tc.target.server_ip or d.getVar("TEST_SERVER_IP", True)
+
+ keys = [ key for key in d.keys() if not key.startswith("_") and not key.startswith("BB") \
+ and not key.startswith("B_pn") and not key.startswith("do_") and not d.getVarFlag(key, "func", True)]
+ for key in keys:
+ try:
+ savedata["d"][key] = d.getVar(key, True)
+ except bb.data_smart.ExpansionError:
+ # we don't care about those anyway
+ pass
+
+ json_file = os.path.join(exportpath, "testdata.json")
+ with open(json_file, "w") as f:
+ json.dump(savedata, f, skipkeys=True, indent=4, sort_keys=True)
+
+ # Replace absolute path with relative in the file
+ exclude_path = os.path.join(d.getVar("COREBASE", True),'meta','lib','oeqa')
+ f1 = open(json_file,'r').read()
+ f2 = open(json_file,'w')
+ m = f1.replace(exclude_path,'oeqa')
+ f2.write(m)
+ f2.close()
+
+ # now start copying files
+ # we'll basically copy everything under meta/lib/oeqa, with these exceptions
+ # - oeqa/targetcontrol.py - not needed
+ # - oeqa/selftest - something else
+ # That means:
+ # - all tests from oeqa/runtime defined in TEST_SUITES (including from other layers)
+ # - the contents of oeqa/utils and oeqa/runtime/files
+ # - oeqa/oetest.py and oeqa/runexport.py (this will get copied to exportpath not exportpath/oeqa)
+ # - __init__.py files
+ bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/runtime/files"))
+ bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/utils"))
+ # copy test modules, this should cover tests in other layers too
+ bbpath = d.getVar("BBPATH", True).split(':')
+ for t in tc.testslist:
+ isfolder = False
+ if re.search("\w+\.\w+\.test_\S+", t):
+ t = '.'.join(t.split('.')[:3])
+ mod = pkgutil.get_loader(t)
+ # More depth than usual?
+ if (t.count('.') > 2):
+ for p in bbpath:
+ foldername = os.path.join(p, 'lib', os.sep.join(t.split('.')).rsplit(os.sep, 1)[0])
+ if os.path.isdir(foldername):
+ isfolder = True
+ target_folder = os.path.join(exportpath, "oeqa", "runtime", os.path.basename(foldername))
+ if not os.path.exists(target_folder):
+ oe.path.copytree(foldername, target_folder)
+ if not isfolder:
+ shutil.copy2(mod.path, os.path.join(exportpath, "oeqa/runtime"))
+ json_file = "%s.json" % mod.path.rsplit(".", 1)[0]
+ if os.path.isfile(json_file):
+ shutil.copy2(json_file, os.path.join(exportpath, "oeqa/runtime"))
+ # Get meta layer
+ for layer in d.getVar("BBLAYERS", True).split():
+ if os.path.basename(layer) == "meta":
+ meta_layer = layer
+ break
+ # copy oeqa/oetest.py and oeqa/runexported.py
+ oeqadir = os.path.join(meta_layer, "lib/oeqa")
+ shutil.copy2(os.path.join(oeqadir, "oetest.py"), os.path.join(exportpath, "oeqa"))
+ shutil.copy2(os.path.join(oeqadir, "runexported.py"), exportpath)
+ # copy oeqa/utils/*.py
+ for root, dirs, files in os.walk(os.path.join(oeqadir, "utils")):
+ for f in files:
+ if f.endswith(".py"):
+ shutil.copy2(os.path.join(root, f), os.path.join(exportpath, "oeqa/utils"))
+ # copy oeqa/runtime/files/*
+ for root, dirs, files in os.walk(os.path.join(oeqadir, "runtime/files")):
+ for f in files:
+ shutil.copy2(os.path.join(root, f), os.path.join(exportpath, "oeqa/runtime/files"))
+
+ # Create tar file for common parts of testexport
+ create_tarball(d, "testexport.tar.gz", d.getVar("TEST_EXPORT_DIR", True))
+
+ # Copy packages needed for runtime testing
+ test_pkg_dir = d.getVar("TEST_NEEDED_PACKAGES_DIR", True)
+ if os.listdir(test_pkg_dir):
+ export_pkg_dir = os.path.join(d.getVar("TEST_EXPORT_DIR", True), "packages")
+ oe.path.copytree(test_pkg_dir, export_pkg_dir)
+ # Create tar file for packages needed by the DUT
+ create_tarball(d, "testexport_packages_%s.tar.gz" % d.getVar("MACHINE", True), export_pkg_dir)
+
+ # Copy SDK
+ if d.getVar("TEST_EXPORT_SDK_ENABLED", True) == "1":
+ sdk_deploy = d.getVar("SDK_DEPLOY", True)
+ tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME", True)
+ tarball_path = os.path.join(sdk_deploy, tarball_name)
+ export_sdk_dir = os.path.join(d.getVar("TEST_EXPORT_DIR", True),
+ d.getVar("TEST_EXPORT_SDK_DIR", True))
+ bb.utils.mkdirhier(export_sdk_dir)
+ shutil.copy2(tarball_path, export_sdk_dir)
+
+ # Create tar file for the sdk
+ create_tarball(d, "testexport_sdk_%s.tar.gz" % d.getVar("SDK_ARCH", True), export_sdk_dir)
+
+ bb.plain("Exported tests to: %s" % exportpath)
+
+def testexport_main(d):
+ from oeqa.oetest import ExportTestContext
+ from oeqa.targetcontrol import get_target_controller
+ from oeqa.utils.dump import get_host_dumper
+
+ test_create_extract_dirs(d)
+ export_dir = d.getVar("TEST_EXPORT_DIR", True)
+ bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
+ bb.utils.remove(export_dir, recurse=True)
+ bb.utils.mkdirhier(export_dir)
+
+ # the robot dance
+ target = get_target_controller(d)
+
+ # test context
+ tc = ExportTestContext(d, target)
+
+ # this is a dummy load of tests
+ # we are doing that to find compile errors in the tests themselves
+ # before booting the image
+ try:
+ tc.loadTests()
+ except Exception as e:
+ import traceback
+ bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
+
+ tc.extract_packages()
+ exportTests(d,tc)
+
+def create_tarball(d, tar_name, src_dir):
+
+ import tarfile
+
+ tar_path = os.path.join(d.getVar("TEST_EXPORT_DIR", True), tar_name)
+ current_dir = os.getcwd()
+ src_dir = src_dir.rstrip('/')
+ dir_name = os.path.dirname(src_dir)
+ base_name = os.path.basename(src_dir)
+
+ os.chdir(dir_name)
+ tar = tarfile.open(tar_path, "w:gz")
+ tar.add(base_name)
+ tar.close()
+ os.chdir(current_dir)
+
+
+testexport_main[vardepsexclude] =+ "BB_ORIGENV"
+
+inherit testimage
diff --git a/import-layers/yocto-poky/meta/classes/testimage.bbclass b/import-layers/yocto-poky/meta/classes/testimage.bbclass
index e77bb1192..6b6781d86 100644
--- a/import-layers/yocto-poky/meta/classes/testimage.bbclass
+++ b/import-layers/yocto-poky/meta/classes/testimage.bbclass
@@ -8,7 +8,7 @@
# To use it add testimage to global inherit and call your target image with -c testimage
# You can try it out like this:
# - first build a qemu core-image-sato
-# - add INHERIT += "testimage" in local.conf
+# - add IMAGE_CLASSES += "testimage" in local.conf
# - then bitbake core-image-sato -c testimage. That will run a standard suite of tests.
# You can set (or append to) TEST_SUITES in local.conf to select the tests
@@ -30,7 +30,10 @@
TEST_LOG_DIR ?= "${WORKDIR}/testimage"
TEST_EXPORT_DIR ?= "${TMPDIR}/testimage/${PN}"
-TEST_EXPORT_ONLY ?= "0"
+TEST_INSTALL_TMP_DIR ?= "${WORKDIR}/testimage/install_tmp"
+TEST_NEEDED_PACKAGES_DIR ?= "${WORKDIR}/testimage/packages"
+TEST_EXTRACTED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/extracted"
+TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged"
RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', d)}"
MINTESTSUITE = "ping"
@@ -48,25 +51,33 @@ DEFAULT_TEST_SUITES_pn-core-image-sato = "${NETTESTSUITE} connman xorg parselogs
DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} connman xorg perl python \
${DEVTESTSUITE} parselogs ${RPMTESTSUITE}"
DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcvs buildiptables buildsudoku \
+DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcvs buildiptables buildgalculator \
connman ${DEVTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
# aarch64 has no graphics
DEFAULT_TEST_SUITES_remove_aarch64 = "xorg"
-#qemumips is too slow for buildsudoku
-DEFAULT_TEST_SUITES_remove_qemumips = "buildsudoku"
+# qemumips is quite slow and has reached the timeout limit several times on the YP build cluster,
+# mitigate this by removing build tests for qemumips machines.
+MIPSREMOVE ??= "buildcvs buildiptables buildgalculator"
+DEFAULT_TEST_SUITES_remove_qemumips = "${MIPSREMOVE}"
+DEFAULT_TEST_SUITES_remove_qemumips64 = "${MIPSREMOVE}"
TEST_SUITES ?= "${DEFAULT_TEST_SUITES}"
TEST_QEMUBOOT_TIMEOUT ?= "1000"
TEST_TARGET ?= "qemu"
-TEST_TARGET_IP ?= ""
-TEST_SERVER_IP ?= ""
TESTIMAGEDEPENDS = ""
TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'cpio-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python-smartpm-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg-utils-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 'apt-native:do_populate_sysroot', '', d)}"
+
TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
TESTIMAGELOCK_qemuall = ""
@@ -103,102 +114,12 @@ testimage_dump_host () {
python do_testimage() {
testimage_main(d)
}
+
addtask testimage
do_testimage[nostamp] = "1"
do_testimage[depends] += "${TESTIMAGEDEPENDS}"
do_testimage[lockfiles] += "${TESTIMAGELOCK}"
-def exportTests(d,tc):
- import json
- import shutil
- import pkgutil
- import re
-
- exportpath = d.getVar("TEST_EXPORT_DIR", True)
-
- savedata = {}
- savedata["d"] = {}
- savedata["target"] = {}
- savedata["host_dumper"] = {}
- for key in tc.__dict__:
- # special cases
- if key not in ['d', 'target', 'host_dumper', 'suite']:
- savedata[key] = getattr(tc, key)
- savedata["target"]["ip"] = tc.target.ip or d.getVar("TEST_TARGET_IP", True)
- savedata["target"]["server_ip"] = tc.target.server_ip or d.getVar("TEST_SERVER_IP", True)
-
- keys = [ key for key in d.keys() if not key.startswith("_") and not key.startswith("BB") \
- and not key.startswith("B_pn") and not key.startswith("do_") and not d.getVarFlag(key, "func", True)]
- for key in keys:
- try:
- savedata["d"][key] = d.getVar(key, True)
- except bb.data_smart.ExpansionError:
- # we don't care about those anyway
- pass
-
- savedata["host_dumper"]["parent_dir"] = tc.host_dumper.parent_dir
- savedata["host_dumper"]["cmds"] = tc.host_dumper.cmds
-
- json_file = os.path.join(exportpath, "testdata.json")
- with open(json_file, "w") as f:
- json.dump(savedata, f, skipkeys=True, indent=4, sort_keys=True)
-
- # Replace absolute path with relative in the file
- exclude_path = os.path.join(d.getVar("COREBASE", True),'meta','lib','oeqa')
- f1 = open(json_file,'r').read()
- f2 = open(json_file,'w')
- m = f1.replace(exclude_path,'oeqa')
- f2.write(m)
- f2.close()
-
- # now start copying files
- # we'll basically copy everything under meta/lib/oeqa, with these exceptions
- # - oeqa/targetcontrol.py - not needed
- # - oeqa/selftest - something else
- # That means:
- # - all tests from oeqa/runtime defined in TEST_SUITES (including from other layers)
- # - the contents of oeqa/utils and oeqa/runtime/files
- # - oeqa/oetest.py and oeqa/runexport.py (this will get copied to exportpath not exportpath/oeqa)
- # - __init__.py files
- bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/runtime/files"))
- bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/utils"))
- # copy test modules, this should cover tests in other layers too
- bbpath = d.getVar("BBPATH", True).split(':')
- for t in tc.testslist:
- isfolder = False
- if re.search("\w+\.\w+\.test_\S+", t):
- t = '.'.join(t.split('.')[:3])
- mod = pkgutil.get_loader(t)
- # More depth than usual?
- if (t.count('.') > 2):
- for p in bbpath:
- foldername = os.path.join(p, 'lib', os.sep.join(t.split('.')).rsplit(os.sep, 1)[0])
- if os.path.isdir(foldername):
- isfolder = True
- target_folder = os.path.join(exportpath, "oeqa", "runtime", os.path.basename(foldername))
- if not os.path.exists(target_folder):
- shutil.copytree(foldername, target_folder)
- if not isfolder:
- shutil.copy2(mod.filename, os.path.join(exportpath, "oeqa/runtime"))
- # copy __init__.py files
- oeqadir = pkgutil.get_loader("oeqa").filename
- shutil.copy2(os.path.join(oeqadir, "__init__.py"), os.path.join(exportpath, "oeqa"))
- shutil.copy2(os.path.join(oeqadir, "runtime/__init__.py"), os.path.join(exportpath, "oeqa/runtime"))
- # copy oeqa/oetest.py and oeqa/runexported.py
- shutil.copy2(os.path.join(oeqadir, "oetest.py"), os.path.join(exportpath, "oeqa"))
- shutil.copy2(os.path.join(oeqadir, "runexported.py"), exportpath)
- # copy oeqa/utils/*.py
- for root, dirs, files in os.walk(os.path.join(oeqadir, "utils")):
- for f in files:
- if f.endswith(".py"):
- shutil.copy2(os.path.join(root, f), os.path.join(exportpath, "oeqa/utils"))
- # copy oeqa/runtime/files/*
- for root, dirs, files in os.walk(os.path.join(oeqadir, "runtime/files")):
- for f in files:
- shutil.copy2(os.path.join(root, f), os.path.join(exportpath, "oeqa/runtime/files"))
-
- bb.plain("Exported tests to: %s" % exportpath)
-
def testimage_main(d):
import unittest
import os
@@ -210,11 +131,8 @@ def testimage_main(d):
from oeqa.utils.dump import get_host_dumper
pn = d.getVar("PN", True)
- export = oe.utils.conditional("TEST_EXPORT_ONLY", "1", True, False, d)
bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
- if export:
- bb.utils.remove(d.getVar("TEST_EXPORT_DIR", True), recurse=True)
- bb.utils.mkdirhier(d.getVar("TEST_EXPORT_DIR", True))
+ test_create_extract_dirs(d)
# we need the host dumper in test context
host_dumper = get_host_dumper(d)
@@ -234,29 +152,39 @@ def testimage_main(d):
import traceback
bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
- if export:
+ tc.extract_packages()
+ target.deploy()
+ try:
+ bootparams = None
+ if d.getVar('VIRTUAL-RUNTIME_init_manager', '') == 'systemd':
+ bootparams = 'systemd.log_level=debug systemd.log_target=console'
+ target.start(extra_bootparams=bootparams)
+ starttime = time.time()
+ result = tc.runTests()
+ stoptime = time.time()
+ if result.wasSuccessful():
+ bb.plain("%s - Ran %d test%s in %.3fs" % (pn, result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime))
+ msg = "%s - OK - All required tests passed" % pn
+ skipped = len(result.skipped)
+ if skipped:
+ msg += " (skipped=%d)" % skipped
+ bb.plain(msg)
+ else:
+ bb.fatal("%s - FAILED - check the task log and the ssh log" % pn)
+ finally:
signal.signal(signal.SIGTERM, tc.origsigtermhandler)
- tc.origsigtermhandler = None
- exportTests(d,tc)
- else:
- target.deploy()
- try:
- target.start()
- starttime = time.time()
- result = tc.runTests()
- stoptime = time.time()
- if result.wasSuccessful():
- bb.plain("%s - Ran %d test%s in %.3fs" % (pn, result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime))
- msg = "%s - OK - All required tests passed" % pn
- skipped = len(result.skipped)
- if skipped:
- msg += " (skipped=%d)" % skipped
- bb.plain(msg)
- else:
- raise bb.build.FuncFailed("%s - FAILED - check the task log and the ssh log" % pn )
- finally:
- signal.signal(signal.SIGTERM, tc.origsigtermhandler)
- target.stop()
+ target.stop()
+
+def test_create_extract_dirs(d):
+ install_path = d.getVar("TEST_INSTALL_TMP_DIR", True)
+ package_path = d.getVar("TEST_PACKAGED_DIR", True)
+ extracted_path = d.getVar("TEST_EXTRACTED_DIR", True)
+ bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
+ bb.utils.remove(package_path, recurse=True)
+ bb.utils.mkdirhier(install_path)
+ bb.utils.mkdirhier(package_path)
+ bb.utils.mkdirhier(extracted_path)
+
testimage_main[vardepsexclude] =+ "BB_ORIGENV"
diff --git a/import-layers/yocto-poky/meta/classes/testsdk.bbclass b/import-layers/yocto-poky/meta/classes/testsdk.bbclass
index f4dc2c36d..77c9203cf 100644
--- a/import-layers/yocto-poky/meta/classes/testsdk.bbclass
+++ b/import-layers/yocto-poky/meta/classes/testsdk.bbclass
@@ -44,7 +44,7 @@ def run_test_context(CTestContext, d, testdir, tcname, pn, *args):
msg += " (skipped=%d)" % skipped
bb.plain(msg)
else:
- raise bb.build.FuncFailed("%s - FAILED - check the task log and the commands log" % pn )
+ bb.fatal("%s - FAILED - check the task log and the commands log" % pn)
def testsdk_main(d):
import os
@@ -65,7 +65,7 @@ def testsdk_main(d):
try:
subprocess.check_output("cd %s; %s <<EOF\n./tc\nY\nEOF" % (sdktestdir, tcname), shell=True)
except subprocess.CalledProcessError as e:
- bb.fatal("Couldn't install the SDK:\n%s" % e.output)
+ bb.fatal("Couldn't install the SDK:\n%s" % e.output.decode("utf-8"))
try:
run_test_context(SDKTestContext, d, sdktestdir, tcname, pn)
@@ -113,10 +113,18 @@ def testsdkext_main(d):
testdir = d.expand("${WORKDIR}/testsdkext/")
bb.utils.remove(testdir, True)
bb.utils.mkdirhier(testdir)
+ sdkdir = os.path.join(testdir, 'tc')
try:
- subprocess.check_output("%s -y -d %s/tc" % (tcname, testdir), shell=True)
+ subprocess.check_output("%s -y -d %s" % (tcname, sdkdir), shell=True)
except subprocess.CalledProcessError as e:
- bb.fatal("Couldn't install the SDK EXT:\n%s" % e.output)
+ msg = "Couldn't install the extensible SDK:\n%s" % e.output.decode("utf-8")
+ logfn = os.path.join(sdkdir, 'preparing_build_system.log')
+ if os.path.exists(logfn):
+ msg += '\n\nContents of preparing_build_system.log:\n'
+ with open(logfn, 'r') as f:
+ for line in f:
+ msg += line
+ bb.fatal(msg)
try:
bb.plain("Running SDK Compatibility tests ...")
diff --git a/import-layers/yocto-poky/meta/classes/tinderclient.bbclass b/import-layers/yocto-poky/meta/classes/tinderclient.bbclass
index 2bc75fc65..917b74d88 100644
--- a/import-layers/yocto-poky/meta/classes/tinderclient.bbclass
+++ b/import-layers/yocto-poky/meta/classes/tinderclient.bbclass
@@ -10,10 +10,10 @@ def tinder_http_post(server, selector, content_type, body):
h.endheaders()
h.send(body)
errcode, errmsg, headers = h.getreply()
- #print errcode, errmsg, headers
+ #print(errcode, errmsg, headers)
return (errcode,errmsg, headers, h.file)
except:
- print "Error sending the report!"
+ print("Error sending the report!")
# try again
pass
@@ -82,7 +82,7 @@ def tinder_format_http_post(d,status,log):
# we only need on build_status.pl but sending it
# always does not hurt
try:
- f = file(d.getVar('TMPDIR',True)+'/tinder-machine.id', 'r')
+ f = open(d.getVar('TMPDIR',True)+'/tinder-machine.id', 'r')
id = f.read()
variables['machine_id'] = id
except:
@@ -111,11 +111,11 @@ def tinder_build_start(d):
selector = url + "/xml/build_start.pl"
- #print "selector %s and url %s" % (selector, url)
+ #print("selector %s and url %s" % (selector, url))
# now post it
errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body)
- #print errcode, errmsg, headers
+ #print(errcode, errmsg, headers)
report = h_file.read()
# now let us find the machine id that was assigned to us
@@ -127,7 +127,7 @@ def tinder_build_start(d):
# now we will need to save the machine number
# we will override any previous numbers
- f = file(d.getVar('TMPDIR', True)+"/tinder-machine.id", 'w')
+ f = open(d.getVar('TMPDIR', True)+"/tinder-machine.id", 'w')
f.write(report)
@@ -147,8 +147,8 @@ def tinder_send_http(d, status, _log):
while len(new_log) > 0:
content_type, body = tinder_format_http_post(d,status,new_log[0:18000])
errcode, errmsg, headers, h_file = tinder_http_post(server,selector,content_type, body)
- #print errcode, errmsg, headers
- #print h.file.read()
+ #print(errcode, errmsg, headers)
+ #print(h.file.read())
new_log = new_log[18000:]
@@ -278,7 +278,7 @@ def tinder_do_tinder_report(event):
try:
# truncate the tinder log file
- f = file(event.data.getVar('TINDER_LOG', True), 'w')
+ f = open(event.data.getVar('TINDER_LOG', True), 'w')
f.write("")
f.close()
except:
@@ -287,7 +287,7 @@ def tinder_do_tinder_report(event):
try:
# write a status to the file. This is needed for the -k option
# of BitBake
- g = file(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
+ g = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
g.write("")
g.close()
except IOError:
@@ -319,14 +319,14 @@ def tinder_do_tinder_report(event):
log += "<--- TINDERBOX Package %s failed (FAILURE)\n" % event.data.getVar('PF', True)
status = 200
# remember the failure for the -k case
- h = file(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
+ h = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
h.write("200")
elif name == "BuildCompleted":
log += "Build Completed\n"
status = 100
# Check if we have a old status...
try:
- h = file(event.data.getVar('TMPDIR',True)+'/tinder-status', 'r')
+ h = open(event.data.getVar('TMPDIR',True)+'/tinder-status', 'r')
status = int(h.read())
except:
pass
@@ -342,7 +342,7 @@ def tinder_do_tinder_report(event):
log += "Error:Was Runtime: %d\n" % event.isRuntime()
status = 200
# remember the failure for the -k case
- h = file(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
+ h = open(event.data.getVar('TMPDIR', True)+"/tinder-status", 'w')
h.write("200")
# now post the log
diff --git a/import-layers/yocto-poky/meta/classes/toaster.bbclass b/import-layers/yocto-poky/meta/classes/toaster.bbclass
index 1a70f14a9..4bddf34e9 100644
--- a/import-layers/yocto-poky/meta/classes/toaster.bbclass
+++ b/import-layers/yocto-poky/meta/classes/toaster.bbclass
@@ -33,6 +33,7 @@ python toaster_layerinfo_dumpdata() {
def _get_git_branch(layer_path):
branch = subprocess.Popen("git symbolic-ref HEAD 2>/dev/null ", cwd=layer_path, shell=True, stdout=subprocess.PIPE).communicate()[0]
+ branch = branch.decode('utf-8')
branch = branch.replace('refs/heads/', '').rstrip()
return branch
@@ -135,60 +136,16 @@ python toaster_package_dumpdata() {
# 2. Dump output image files information
-python toaster_image_dumpdata() {
- """
- Image filename for output images is not standardized.
- image_types.bbclass will spell out IMAGE_CMD_xxx variables that actually
- have hardcoded ways to create image file names in them.
- So we look for files starting with the set name.
-
- We also look for other files in the images/ directory which don't
- match IMAGE_NAME, such as the kernel bzImage, modules tarball etc.
- """
-
- dir_to_walk = d.getVar('DEPLOY_DIR_IMAGE', True);
- image_name = d.getVar('IMAGE_NAME', True);
- image_info_data = {}
- artifact_info_data = {}
-
- # collect all images and artifacts in the images directory
- for dirpath, dirnames, filenames in os.walk(dir_to_walk):
- for filename in filenames:
- full_path = os.path.join(dirpath, filename)
- try:
- if filename.startswith(image_name):
- # image
- image_info_data[full_path] = os.stat(full_path).st_size
- else:
- # other non-image artifact
- if not os.path.islink(full_path):
- artifact_info_data[full_path] = os.stat(full_path).st_size
- except OSError as e:
- bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d)
-
- bb.event.fire(bb.event.MetadataEvent("ImageFileSize", image_info_data), d)
- bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize", artifact_info_data), d)
-}
-
python toaster_artifact_dumpdata() {
"""
- Dump data about artifacts in the SDK_DEPLOY directory
+ Dump data about SDK variables
"""
- dir_to_walk = d.getVar("SDK_DEPLOY", True)
- artifact_info_data = {}
-
- # collect all artifacts in the sdk directory
- for dirpath, dirnames, filenames in os.walk(dir_to_walk):
- for filename in filenames:
- full_path = os.path.join(dirpath, filename)
- try:
- if not os.path.islink(full_path):
- artifact_info_data[full_path] = os.stat(full_path).st_size
- except OSError as e:
- bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d)
+ event_data = {
+ "TOOLCHAIN_OUTPUTNAME": d.getVar("TOOLCHAIN_OUTPUTNAME", True)
+ }
- bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize", artifact_info_data), d)
+ bb.event.fire(bb.event.MetadataEvent("SDKArtifactInfo", event_data), d)
}
# collect list of buildstats files based on fired events; when the build completes, collect all stats and fire an event with collected data
@@ -331,15 +288,22 @@ python toaster_buildhistory_dump() {
images[target][dependsname] = {'size': 0, 'depends' : []}
images[target][pname]['depends'].append((dependsname, deptype))
- with open("%s/files-in-image.txt" % installed_img_path, "r") as fin:
- for line in fin:
- lc = [ x for x in line.strip().split(" ") if len(x) > 0 ]
- if lc[0].startswith("l"):
- files[target]['syms'].append(lc)
- elif lc[0].startswith("d"):
- files[target]['dirs'].append(lc)
- else:
- files[target]['files'].append(lc)
+ # files-in-image.txt is only generated if an image file is created,
+ # so the file entries ('syms', 'dirs', 'files') for a target will be
+ # empty for rootfs builds and other "image" tasks which don't
+ # produce image files
+ # (e.g. "bitbake core-image-minimal -c populate_sdk")
+ files_in_image_path = "%s/files-in-image.txt" % installed_img_path
+ if os.path.exists(files_in_image_path):
+ with open(files_in_image_path, "r") as fin:
+ for line in fin:
+ lc = [ x for x in line.strip().split(" ") if len(x) > 0 ]
+ if lc[0].startswith("l"):
+ files[target]['syms'].append(lc)
+ elif lc[0].startswith("d"):
+ files[target]['dirs'].append(lc)
+ else:
+ files[target]['files'].append(lc)
for pname in images[target]:
if not pname in allpkgs:
@@ -360,15 +324,18 @@ python toaster_buildhistory_dump() {
}
-# dump information related to license manifest path
-
-python toaster_licensemanifest_dump() {
- deploy_dir = d.getVar('DEPLOY_DIR', True);
- image_name = d.getVar('IMAGE_NAME', True);
-
- data = { 'deploy_dir' : deploy_dir, 'image_name' : image_name }
-
- bb.event.fire(bb.event.MetadataEvent("LicenseManifestPath", data), d)
+# get list of artifacts from sstate manifest
+python toaster_artifacts() {
+ if e.taskname in ["do_deploy", "do_image_complete", "do_populate_sdk", "do_populate_sdk_ext"]:
+ d2 = d.createCopy()
+ d2.setVar('FILE', e.taskfile)
+ d2.setVar('SSTATE_MANMACH', d2.expand("${MACHINE}"))
+ manifest = oe.sstatesig.sstate_get_manifest_filename(e.taskname[3:], d2)[0]
+ if os.access(manifest, os.R_OK):
+ with open(manifest) as fmanifest:
+ artifacts = [fname.strip() for fname in fmanifest]
+ data = {"task": e.taskid, "artifacts": artifacts}
+ bb.event.fire(bb.event.MetadataEvent("TaskArtifacts", data), d2)
}
# set event handlers
@@ -381,17 +348,17 @@ toaster_collect_task_stats[eventmask] = "bb.event.BuildCompleted bb.build.TaskSu
addhandler toaster_buildhistory_dump
toaster_buildhistory_dump[eventmask] = "bb.event.BuildCompleted"
+addhandler toaster_artifacts
+toaster_artifacts[eventmask] = "bb.runqueue.runQueueTaskSkipped bb.runqueue.runQueueTaskCompleted"
+
do_packagedata_setscene[postfuncs] += "toaster_package_dumpdata "
do_packagedata_setscene[vardepsexclude] += "toaster_package_dumpdata "
do_package[postfuncs] += "toaster_package_dumpdata "
do_package[vardepsexclude] += "toaster_package_dumpdata "
-do_image_complete[postfuncs] += "toaster_image_dumpdata "
-do_image_complete[vardepsexclude] += "toaster_image_dumpdata "
-
-do_rootfs[postfuncs] += "toaster_licensemanifest_dump "
-do_rootfs[vardepsexclude] += "toaster_licensemanifest_dump "
-
do_populate_sdk[postfuncs] += "toaster_artifact_dumpdata "
do_populate_sdk[vardepsexclude] += "toaster_artifact_dumpdata "
+
+do_populate_sdk_ext[postfuncs] += "toaster_artifact_dumpdata "
+do_populate_sdk_ext[vardepsexclude] += "toaster_artifact_dumpdata " \ No newline at end of file
diff --git a/import-layers/yocto-poky/meta/classes/toolchain-scripts-base.bbclass b/import-layers/yocto-poky/meta/classes/toolchain-scripts-base.bbclass
new file mode 100644
index 000000000..2489b9dbe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/toolchain-scripts-base.bbclass
@@ -0,0 +1,11 @@
+#This function create a version information file
+toolchain_create_sdk_version () {
+ local versionfile=$1
+ rm -f $versionfile
+ touch $versionfile
+ echo 'Distro: ${DISTRO}' >> $versionfile
+ echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
+ echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
+ echo 'Timestamp: ${DATETIME}' >> $versionfile
+}
+toolchain_create_sdk_version[vardepsexclude] = "DATETIME"
diff --git a/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass b/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass
index 2e2c93af4..0e11f2d7a 100644
--- a/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass
+++ b/import-layers/yocto-poky/meta/classes/toolchain-scripts.bbclass
@@ -1,4 +1,4 @@
-inherit siteinfo kernel-arch
+inherit toolchain-scripts-base siteinfo kernel-arch
# We want to be able to change the value of MULTIMACH_TARGET_SYS, because it
# doesn't always match our expectations... but we default to the stock value
@@ -6,9 +6,13 @@ REAL_MULTIMACH_TARGET_SYS ?= "${MULTIMACH_TARGET_SYS}"
TARGET_CC_ARCH_append_libc-uclibc = " -muclibc"
TARGET_CC_ARCH_append_libc-musl = " -mmusl"
+# default debug prefix map isn't valid in the SDK
+DEBUG_PREFIX_MAP = ""
+
# This function creates an environment-setup-script for use in a deployable SDK
toolchain_create_sdk_env_script () {
- # Create environment setup script
+ # Create environment setup script. Remember that $SDKTARGETSYSROOT should
+ # only be expanded on the target at runtime.
base_sbindir=${10:-${base_sbindir_nativesdk}}
base_bindir=${9:-${base_bindir_nativesdk}}
sbindir=${8:-${sbindir_nativesdk}}
@@ -29,7 +33,7 @@ toolchain_create_sdk_env_script () {
echo "export PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH' >> $script
echo "export CCACHE_PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$CCACHE_PATH' >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
- echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig' >> $script
+ echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig' >> $script
echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
echo "export OECORE_NATIVE_SYSROOT=\"$sdkpathnative\"" >> $script
echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script
@@ -89,19 +93,19 @@ toolchain_shared_env_script () {
# Append environment subscripts
if [ -d "\$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then
for envfile in \$OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do
- source \$envfile
+ . \$envfile
done
fi
if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
- source \$envfile
+ . \$envfile
done
fi
EOF
}
#we get the cached site config in the runtime
-TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d, True)}"
+TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d)}"
TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "virtual/${MLPREFIX}libc ncurses"
@@ -132,18 +136,6 @@ toolchain_create_sdk_siteconfig () {
# The immediate expansion above can result in unwanted path dependencies here
toolchain_create_sdk_siteconfig[vardepsexclude] = "TOOLCHAIN_CONFIGSITE_SYSROOTCACHE"
-#This function create a version information file
-toolchain_create_sdk_version () {
- local versionfile=$1
- rm -f $versionfile
- touch $versionfile
- echo 'Distro: ${DISTRO}' >> $versionfile
- echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
- echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
- echo 'Timestamp: ${DATETIME}' >> $versionfile
-}
-toolchain_create_sdk_version[vardepsexclude] = "DATETIME"
-
python __anonymous () {
import oe.classextend
deps = ""
diff --git a/import-layers/yocto-poky/meta/classes/uboot-config.bbclass b/import-layers/yocto-poky/meta/classes/uboot-config.bbclass
index cb061af34..3f760f2fb 100644
--- a/import-layers/yocto-poky/meta/classes/uboot-config.bbclass
+++ b/import-layers/yocto-poky/meta/classes/uboot-config.bbclass
@@ -3,7 +3,7 @@
# The format to specify it, in the machine, is:
#
# UBOOT_CONFIG ??= <default>
-# UBOOT_CONFIG[foo] = "config,images"
+# UBOOT_CONFIG[foo] = "config,images,binary"
#
# or
#
@@ -11,9 +11,13 @@
#
# Copyright 2013, 2014 (C) O.S. Systems Software LTDA.
+UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
+
python () {
ubootmachine = d.getVar("UBOOT_MACHINE", True)
ubootconfigflags = d.getVarFlags('UBOOT_CONFIG')
+ ubootbinary = d.getVar('UBOOT_BINARY', True)
+ ubootbinaries = d.getVar('UBOOT_BINARIES', True)
# The "doc" varflag is special, we don't want to see it here
ubootconfigflags.pop('doc', None)
@@ -27,6 +31,9 @@ python () {
if ubootmachine and ubootconfigflags:
raise bb.parse.SkipPackage("You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.")
+ if ubootconfigflags and ubootbinaries:
+ raise bb.parse.SkipPackage("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.")
+
if not ubootconfigflags:
return
@@ -36,13 +43,19 @@ python () {
for f, v in ubootconfigflags.items():
if config == f:
items = v.split(',')
- if items[0] and len(items) > 2:
- raise bb.parse.SkipPackage('Only config,images can be specified!')
+ if items[0] and len(items) > 3:
+ raise bb.parse.SkipPackage('Only config,images,binary can be specified!')
d.appendVar('UBOOT_MACHINE', ' ' + items[0])
# IMAGE_FSTYPES appending
if len(items) > 1 and items[1]:
bb.debug(1, "Appending '%s' to IMAGE_FSTYPES." % items[1])
d.appendVar('IMAGE_FSTYPES', ' ' + items[1])
+ if len(items) > 2 and items[2]:
+ bb.debug(1, "Appending '%s' to UBOOT_BINARIES." % items[2])
+ d.appendVar('UBOOT_BINARIES', ' ' + items[2])
+ else:
+ bb.debug(1, "Appending '%s' to UBOOT_BINARIES." % ubootbinary)
+ d.appendVar('UBOOT_BINARIES', ' ' + ubootbinary)
break
elif len(ubootconfig) == 0:
raise bb.parse.SkipPackage('You must set a default in UBOOT_CONFIG.')
diff --git a/import-layers/yocto-poky/meta/classes/uboot-extlinux-config.bbclass b/import-layers/yocto-poky/meta/classes/uboot-extlinux-config.bbclass
new file mode 100644
index 000000000..df91386c0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/uboot-extlinux-config.bbclass
@@ -0,0 +1,126 @@
+# uboot-extlinux-config.bbclass
+#
+# This class allow the extlinux.conf generation for U-Boot use. The
+# U-Boot support for it is given to allow the Generic Distribution
+# Configuration specification use by OpenEmbedded-based products.
+#
+# External variables:
+#
+# UBOOT_EXTLINUX_CONSOLE - Set to "console=ttyX" to change kernel boot
+# default console.
+# UBOOT_EXTLINUX_LABELS - A list of targets for the automatic config.
+# UBOOT_EXTLINUX_KERNEL_ARGS - Add additional kernel arguments.
+# UBOOT_EXTLINUX_KERNEL_IMAGE - Kernel image name.
+# UBOOT_EXTLINUX_FDTDIR - Device tree directory.
+# UBOOT_EXTLINUX_INITRD - Indicates a list of filesystem images to
+# concatenate and use as an initrd (optional).
+# UBOOT_EXTLINUX_MENU_DESCRIPTION - Name to use as description.
+# UBOOT_EXTLINUX_ROOT - Root kernel cmdline.
+#
+# If there's only one label system will boot automatically and menu won't be
+# created. If you want to use more than one labels, e.g linux and alternate,
+# use overrides to set menu description, console and others variables.
+#
+# Ex:
+#
+# UBOOT_EXTLINUX_LABELS ??= "default fallback"
+#
+# UBOOT_EXTLINUX_KERNEL_IMAGE_default ??= "../zImage"
+# UBOOT_EXTLINUX_MENU_DESCRIPTION_default ??= "Linux Default"
+#
+# UBOOT_EXTLINUX_KERNEL_IMAGE_fallback ??= "../zImage-fallback"
+# UBOOT_EXTLINUX_MENU_DESCRIPTION_fallback ??= "Linux Fallback"
+#
+# Results:
+#
+# menu title Select the boot mode
+# LABEL Linux Default
+# KERNEL ../zImage
+# FDTDIR ../
+# APPEND root=/dev/mmcblk2p2 rootwait rw console=${console}
+# LABEL Linux Fallback
+# KERNEL ../zImage-fallback
+# FDTDIR ../
+# APPEND root=/dev/mmcblk2p2 rootwait rw console=${console}
+#
+# Copyright (C) 2016, O.S. Systems Software LTDA. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+#
+# The kernel has an internal default console, which you can override with
+# a console=...some_tty...
+UBOOT_EXTLINUX_CONSOLE ??= "console=${console}"
+UBOOT_EXTLINUX_LABELS ??= "linux"
+UBOOT_EXTLINUX_FDTDIR ??= "../"
+UBOOT_EXTLINUX_KERNEL_IMAGE ??= "../${KERNEL_IMAGETYPE}"
+UBOOT_EXTLINUX_KERNEL_ARGS ??= "rootwait rw"
+UBOOT_EXTLINUX_MENU_DESCRIPTION_linux ??= "${DISTRO_NAME}"
+
+UBOOT_EXTLINUX_CONFIG = "${B}/extlinux.conf"
+
+python create_extlinux_config() {
+ if d.getVar("UBOOT_EXTLINUX", True) != "1":
+ return
+
+ if not d.getVar('WORKDIR', True):
+ bb.error("WORKDIR not defined, unable to package")
+
+ labels = d.getVar('UBOOT_EXTLINUX_LABELS', True)
+ if not labels:
+ bb.fatal("UBOOT_EXTLINUX_LABELS not defined, nothing to do")
+
+ if not labels.strip():
+ bb.fatal("No labels, nothing to do")
+
+ cfile = d.getVar('UBOOT_EXTLINUX_CONFIG', True)
+ if not cfile:
+ bb.fatal('Unable to read UBOOT_EXTLINUX_CONFIG')
+
+ try:
+ with open(cfile, 'w') as cfgfile:
+ cfgfile.write('# Generic Distro Configuration file generated by OpenEmbedded\n')
+
+ if len(labels.split()) > 1:
+ cfgfile.write('menu title Select the boot mode\n')
+
+ for label in labels.split():
+ localdata = bb.data.createCopy(d)
+
+ overrides = localdata.getVar('OVERRIDES', True)
+ if not overrides:
+ bb.fatal('OVERRIDES not defined')
+
+ localdata.setVar('OVERRIDES', label + ':' + overrides)
+ bb.data.update_data(localdata)
+
+ extlinux_console = localdata.getVar('UBOOT_EXTLINUX_CONSOLE', True)
+
+ menu_description = localdata.getVar('UBOOT_EXTLINUX_MENU_DESCRIPTION', True)
+ if not menu_description:
+ menu_description = label
+
+ root = localdata.getVar('UBOOT_EXTLINUX_ROOT', True)
+ if not root:
+ bb.fatal('UBOOT_EXTLINUX_ROOT not defined')
+
+ kernel_image = localdata.getVar('UBOOT_EXTLINUX_KERNEL_IMAGE', True)
+ fdtdir = localdata.getVar('UBOOT_EXTLINUX_FDTDIR', True)
+ if fdtdir:
+ cfgfile.write('LABEL %s\n\tKERNEL %s\n\tFDTDIR %s\n' %
+ (menu_description, kernel_image, fdtdir))
+ else:
+ cfgfile.write('LABEL %s\n\tKERNEL %s\n' % (menu_description, kernel_image))
+
+ kernel_args = localdata.getVar('UBOOT_EXTLINUX_KERNEL_ARGS', True)
+
+ initrd = localdata.getVar('UBOOT_EXTLINUX_INITRD', True)
+ if initrd:
+ cfgfile.write('\tINITRD %s\n'% initrd)
+
+ kernel_args = root + " " + kernel_args
+ cfgfile.write('\tAPPEND %s %s\n' % (kernel_args, extlinux_console))
+
+ except OSError:
+ bb.fatal('Unable to open %s' % (cfile))
+}
+
+do_install[prefuncs] += "create_extlinux_config"
diff --git a/import-layers/yocto-poky/meta/classes/uboot-sign.bbclass b/import-layers/yocto-poky/meta/classes/uboot-sign.bbclass
new file mode 100644
index 000000000..3c56db887
--- /dev/null
+++ b/import-layers/yocto-poky/meta/classes/uboot-sign.bbclass
@@ -0,0 +1,95 @@
+# This file is part of U-Boot verified boot support and is intended to be
+# inherited from u-boot recipe and from kernel-fitimage.bbclass.
+#
+# The signature procedure requires the user to generate an RSA key and
+# certificate in a directory and to define the following variable:
+#
+# UBOOT_SIGN_KEYDIR = "/keys/directory"
+# UBOOT_SIGN_KEYNAME = "dev" # keys name in keydir (eg. "dev.crt", "dev.key")
+# UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"
+# UBOOT_SIGN_ENABLE = "1"
+#
+# As verified boot depends on fitImage generation, following is also required:
+#
+# KERNEL_CLASSES ?= " kernel-fitimage "
+# KERNEL_IMAGETYPE ?= "fitImage"
+#
+# The signature support is limited to the use of CONFIG_OF_SEPARATE in U-Boot.
+#
+# The tasks sequence is set as below, using DEPLOY_IMAGE_DIR as common place to
+# treat the device tree blob:
+#
+# u-boot:do_deploy_dtb
+# u-boot:do_deploy
+# virtual/kernel:do_assemble_fitimage
+# u-boot:do_concat_dtb
+# u-boot:do_install
+#
+# For more details on signature process, please refer to U-boot documentation.
+
+# Signature activation.
+UBOOT_SIGN_ENABLE ?= "0"
+
+# Default value for deployment filenames.
+UBOOT_DTB_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.dtb"
+UBOOT_DTB_BINARY ?= "u-boot.dtb"
+UBOOT_DTB_SYMLINK ?= "u-boot-${MACHINE}.dtb"
+UBOOT_NODTB_IMAGE ?= "u-boot-nodtb-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
+UBOOT_NODTB_BINARY ?= "u-boot-nodtb.${UBOOT_SUFFIX}"
+UBOOT_NODTB_SYMLINK ?= "u-boot-nodtb-${MACHINE}.${UBOOT_SUFFIX}"
+
+#
+# Following is relevant only for u-boot recipes:
+#
+
+do_deploy_dtb () {
+ mkdir -p ${DEPLOYDIR}
+ cd ${DEPLOYDIR}
+
+ if [ -f ${B}/${UBOOT_DTB_BINARY} ]; then
+ install ${B}/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/${UBOOT_DTB_IMAGE}
+ rm -f ${UBOOT_DTB_BINARY} ${UBOOT_DTB_SYMLINK}
+ ln -sf ${UBOOT_DTB_IMAGE} ${UBOOT_DTB_SYMLINK}
+ ln -sf ${UBOOT_DTB_IMAGE} ${UBOOT_DTB_BINARY}
+ fi
+ if [ -f ${B}/${UBOOT_NODTB_BINARY} ]; then
+ install ${B}/${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}
+ rm -f ${UBOOT_NODTB_BINARY} ${UBOOT_NODTB_SYMLINK}
+ ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_SYMLINK}
+ ln -sf ${UBOOT_NODTB_IMAGE} ${UBOOT_NODTB_BINARY}
+ fi
+}
+
+do_concat_dtb () {
+ # Concatenate U-Boot w/o DTB & DTB with public key
+ # (cf. kernel-fitimage.bbclass for more details)
+ if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ]; then
+ if [ "x${UBOOT_SUFFIX}" = "ximg" -o "x${UBOOT_SUFFIX}" = "xrom" ] && \
+ [ -e "${DEPLOYDIR}/${UBOOT_DTB_IMAGE}" ]; then
+ cd ${B}
+ oe_runmake EXT_DTB=${DEPLOYDIR}/${UBOOT_DTB_IMAGE}
+ install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+ install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
+ elif [ -e "${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}" -a -e "${DEPLOYDIR}/${UBOOT_DTB_IMAGE}" ]; then
+ cd ${DEPLOYDIR}
+ cat ${UBOOT_NODTB_IMAGE} ${UBOOT_DTB_IMAGE} | tee ${B}/${UBOOT_BINARY} > ${UBOOT_IMAGE}
+ else
+ bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."
+ fi
+ fi
+}
+
+python () {
+ uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot', True) or 'u-boot'
+ if d.getVar('UBOOT_SIGN_ENABLE', True) == '1' and d.getVar('PN', True) == uboot_pn:
+ kernel_pn = d.getVar('PREFERRED_PROVIDER_virtual/kernel', True)
+
+ # u-boot.dtb and u-boot-nodtb.bin are deployed _before_ do_deploy
+ # Thus, do_deploy_setscene will also populate them in DEPLOY_IMAGE_DIR
+ bb.build.addtask('do_deploy_dtb', 'do_deploy', 'do_compile', d)
+
+ # do_concat_dtb is scheduled _before_ do_install as it overwrite the
+ # u-boot.bin in both DEPLOYDIR and DEPLOY_IMAGE_DIR.
+ bb.build.addtask('do_concat_dtb', 'do_install', None, d)
+ d.appendVarFlag('do_concat_dtb', 'depends', ' %s:do_assemble_fitimage' % kernel_pn)
+}
diff --git a/import-layers/yocto-poky/meta/classes/update-alternatives.bbclass b/import-layers/yocto-poky/meta/classes/update-alternatives.bbclass
index 70a818572..1fdd68131 100644
--- a/import-layers/yocto-poky/meta/classes/update-alternatives.bbclass
+++ b/import-layers/yocto-poky/meta/classes/update-alternatives.bbclass
@@ -71,14 +71,14 @@ def gen_updatealternativesvardeps(d):
# First compute them for non_pkg versions
for v in vars:
- for flag in (d.getVarFlags(v) or {}):
+ for flag in sorted((d.getVarFlags(v) or {}).keys()):
if flag == "doc" or flag == "vardeps" or flag == "vardepsexp":
continue
d.appendVar('%s_VARDEPS' % (v), ' %s:%s' % (flag, d.getVarFlag(v, flag, False)))
for p in pkgs:
for v in vars:
- for flag in (d.getVarFlags("%s_%s" % (v,p)) or {}):
+ for flag in sorted((d.getVarFlags("%s_%s" % (v,p)) or {}).keys()):
if flag == "doc" or flag == "vardeps" or flag == "vardepsexp":
continue
d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False)))
diff --git a/import-layers/yocto-poky/meta/classes/update-rc.d.bbclass b/import-layers/yocto-poky/meta/classes/update-rc.d.bbclass
index 2a0a74a5f..321924bb3 100644
--- a/import-layers/yocto-poky/meta/classes/update-rc.d.bbclass
+++ b/import-layers/yocto-poky/meta/classes/update-rc.d.bbclass
@@ -1,6 +1,7 @@
UPDATERCPN ?= "${PN}"
-DEPENDS_append_class-target = " update-rc.d-native update-rc.d initscripts"
+DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ' update-rc.d-native update-rc.d initscripts', '', d)}"
+
UPDATERCD = "update-rc.d"
UPDATERCD_class-cross = ""
UPDATERCD_class-native = ""
@@ -12,7 +13,7 @@ INIT_D_DIR = "${sysconfdir}/init.d"
updatercd_preinst() {
if [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
- ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
+ ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
fi
if type update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
@@ -36,8 +37,8 @@ fi
}
updatercd_prerm() {
-if [ -z "$D" ]; then
- ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
+if [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
+ ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
fi
}
@@ -56,15 +57,15 @@ fi
def update_rc_after_parse(d):
if d.getVar('INITSCRIPT_PACKAGES', False) == None:
if d.getVar('INITSCRIPT_NAME', False) == None:
- raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % d.getVar('FILE', False))
+ bb.fatal("%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % d.getVar('FILE', False))
if d.getVar('INITSCRIPT_PARAMS', False) == None:
- raise bb.build.FuncFailed("%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % d.getVar('FILE', False))
+ bb.fatal("%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % d.getVar('FILE', False))
python __anonymous() {
update_rc_after_parse(d)
}
-PACKAGESPLITFUNCS_prepend = "populate_packages_updatercd "
+PACKAGESPLITFUNCS_prepend = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'populate_packages_updatercd ', '', d)}"
PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd "
populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst"
@@ -120,8 +121,7 @@ python populate_packages_updatercd () {
# Check that this class isn't being inhibited (generally, by
# systemd.bbclass) before doing any work.
- if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \
- not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
+ if not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):
pkgs = d.getVar('INITSCRIPT_PACKAGES', True)
if pkgs == None:
pkgs = d.getVar('UPDATERCPN', True)
diff --git a/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass b/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass
index a9b506d05..afb580aed 100644
--- a/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass
+++ b/import-layers/yocto-poky/meta/classes/useradd-staticids.bbclass
@@ -4,6 +4,7 @@ def update_useradd_static_config(d):
import argparse
import itertools
import re
+ import errno
class myArgumentParser( argparse.ArgumentParser ):
def _print_message(self, message, file=None):
@@ -15,7 +16,7 @@ def update_useradd_static_config(d):
error(message)
def error(self, message):
- raise bb.build.FuncFailed(message)
+ bb.fatal(message)
def list_extend(iterable, length, obj = None):
"""Ensure that iterable is the specified length by extending with obj
@@ -30,22 +31,33 @@ def update_useradd_static_config(d):
are set)."""
id_table = dict()
for conf in file_list.split():
- if os.path.exists(conf):
- f = open(conf, "r")
- for line in f:
- if line.startswith('#'):
- continue
- # Make sure there always are at least exp_fields elements in
- # the field list. This allows for leaving out trailing
- # colons in the files.
- fields = list_extend(line.rstrip().split(":"), exp_fields)
- if fields[0] not in id_table:
- id_table[fields[0]] = fields
- else:
- id_table[fields[0]] = list(itertools.imap(lambda x, y: x or y, fields, id_table[fields[0]]))
+ try:
+ with open(conf, "r") as f:
+ for line in f:
+ if line.startswith('#'):
+ continue
+ # Make sure there always are at least exp_fields
+ # elements in the field list. This allows for leaving
+ # out trailing colons in the files.
+ fields = list_extend(line.rstrip().split(":"), exp_fields)
+ if fields[0] not in id_table:
+ id_table[fields[0]] = fields
+ else:
+ id_table[fields[0]] = list(map(lambda x, y: x or y, fields, id_table[fields[0]]))
+ except IOError as e:
+ if e.errno == errno.ENOENT:
+ pass
return id_table
+ def handle_missing_id(id, type, pkg):
+ # For backwards compatibility we accept "1" in addition to "error"
+ if d.getVar('USERADD_ERROR_DYNAMIC', True) == 'error' or d.getVar('USERADD_ERROR_DYNAMIC', True) == '1':
+ #bb.error("Skipping recipe %s, package %s which adds %sname %s does not have a static ID defined." % (d.getVar('PN', True), pkg, type, id))
+ bb.fatal("%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN', True), pkg, type, id))
+ elif d.getVar('USERADD_ERROR_DYNAMIC', True) == 'warn':
+ bb.warn("%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN', True), pkg, type, id))
+
# We parse and rewrite the useradd components
def rewrite_useradd(params):
# The following comes from --help on useradd from shadow
@@ -93,9 +105,9 @@ def update_useradd_static_config(d):
if not param:
continue
try:
- uaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
+ uaargs = parser.parse_args(re.split('''[ \t]+(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
except:
- raise bb.build.FuncFailed("%s: Unable to parse arguments for USERADD_PARAM_%s: '%s'" % (d.getVar('PN', True), pkg, param))
+ bb.fatal("%s: Unable to parse arguments for USERADD_PARAM_%s: '%s'" % (d.getVar('PN', True), pkg, param))
# Read all passwd files specified in USERADD_UID_TABLES or files/passwd
# Use the standard passwd layout:
@@ -112,6 +124,8 @@ def update_useradd_static_config(d):
users = merge_files(get_passwd_list(d), 7)
if uaargs.LOGIN not in users:
+ if not uaargs.uid or not uaargs.uid.isdigit() or not uaargs.gid:
+ handle_missing_id(uaargs.LOGIN, 'user', pkg)
continue
field = users[uaargs.LOGIN]
@@ -161,9 +175,8 @@ def update_useradd_static_config(d):
uaargs.shell = field[6] or uaargs.shell
# Should be an error if a specific option is set...
- if d.getVar('USERADD_ERROR_DYNAMIC', True) == '1' and not ((uaargs.uid and uaargs.uid.isdigit()) and uaargs.gid):
- #bb.error("Skipping recipe %s, package %s which adds username %s does not have a static uid defined." % (d.getVar('PN', True), pkg, uaargs.LOGIN))
- raise bb.build.FuncFailed("%s - %s: Username %s does not have a static uid defined." % (d.getVar('PN', True), pkg, uaargs.LOGIN))
+ if not uaargs.uid or not uaargs.uid.isdigit() or not uaargs.gid:
+ handle_missing_id(uaargs.LOGIN, 'user', pkg)
# Reconstruct the args...
newparam = ['', ' --defaults'][uaargs.defaults]
@@ -227,9 +240,9 @@ def update_useradd_static_config(d):
continue
try:
# If we're processing multiple lines, we could have left over values here...
- gaargs = parser.parse_args(re.split('''[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
+ gaargs = parser.parse_args(re.split('''[ \t]+(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', param))
except:
- raise bb.build.FuncFailed("%s: Unable to parse arguments for GROUPADD_PARAM_%s: '%s'" % (d.getVar('PN', True), pkg, param))
+ bb.fatal("%s: Unable to parse arguments for GROUPADD_PARAM_%s: '%s'" % (d.getVar('PN', True), pkg, param))
# Read all group files specified in USERADD_GID_TABLES or files/group
# Use the standard group layout:
@@ -244,6 +257,8 @@ def update_useradd_static_config(d):
groups = merge_files(get_group_list(d), 4)
if gaargs.GROUP not in groups:
+ if not gaargs.gid or not gaargs.gid.isdigit():
+ handle_missing_id(gaargs.GROUP, 'group', pkg)
continue
field = groups[gaargs.GROUP]
@@ -253,9 +268,8 @@ def update_useradd_static_config(d):
bb.warn("%s: Changing groupname %s's gid from (%s) to (%s), verify configuration files!" % (d.getVar('PN', True), gaargs.GROUP, gaargs.gid, field[2]))
gaargs.gid = field[2]
- if d.getVar('USERADD_ERROR_DYNAMIC', True) == '1' and not (gaargs.gid and gaargs.gid.isdigit()):
- #bb.error("Skipping recipe %s, package %s which adds groupname %s does not have a static gid defined." % (d.getVar('PN', True), pkg, gaargs.GROUP))
- raise bb.build.FuncFailed("%s - %s: Groupname %s does not have a static gid defined." % (d.getVar('PN', True), pkg, gaargs.GROUP))
+ if not gaargs.gid or not gaargs.gid.isdigit():
+ handle_missing_id(gaargs.GROUP, 'group', pkg)
# Reconstruct the args...
newparam = ['', ' --force'][gaargs.force]
@@ -271,6 +285,19 @@ def update_useradd_static_config(d):
return ";".join(newparams).strip()
+ # The parsing of the current recipe depends on the content of
+ # the files listed in USERADD_UID/GID_TABLES. We need to tell bitbake
+ # about that explicitly to trigger re-parsing and thus re-execution of
+ # this code when the files change.
+ bbpath = d.getVar('BBPATH', True)
+ for varname, default in (('USERADD_UID_TABLES', 'files/passwd'),
+ ('USERADD_GID_TABLES', 'files/group')):
+ tables = d.getVar(varname, True)
+ if not tables:
+ tables = default
+ for conf_file in tables.split():
+ bb.parse.mark_dependency(d, bb.utils.which(bbpath, conf_file))
+
# Load and process the users and groups, rewriting the adduser/addgroup params
useradd_packages = d.getVar('USERADD_PACKAGES', True)
diff --git a/import-layers/yocto-poky/meta/classes/useradd.bbclass b/import-layers/yocto-poky/meta/classes/useradd.bbclass
index ee402acef..3cff08e00 100644
--- a/import-layers/yocto-poky/meta/classes/useradd.bbclass
+++ b/import-layers/yocto-poky/meta/classes/useradd.bbclass
@@ -3,11 +3,7 @@ inherit useradd_base
# base-passwd-cross provides the default passwd and group files in the
# target sysroot, and shadow -native and -sysroot provide the utilities
# and support files needed to add and modify user and group accounts
-DEPENDS_append = "${USERADDDEPENDS}"
-USERADDDEPENDS = " base-files shadow-native shadow-sysroot shadow"
-USERADDDEPENDS_class-cross = ""
-USERADDDEPENDS_class-native = ""
-USERADDDEPENDS_class-nativesdk = ""
+DEPENDS_append_class-target = " base-files shadow-native shadow-sysroot shadow"
# This preinstall function can be run in four different contexts:
#
@@ -54,15 +50,15 @@ if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
echo "Running groupadd commands..."
# Invoke multiple instances of groupadd for parameter lists
# separated by ';'
- opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1`
- remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2-`
+ opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
+ remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
while test "x$opts" != "x"; do
perform_groupadd "$SYSROOT" "$OPT $opts"
if test "x$opts" = "x$remaining"; then
break
fi
- opts=`echo "$remaining" | cut -d ';' -f 1`
- remaining=`echo "$remaining" | cut -d ';' -f 2-`
+ opts=`echo "$remaining" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
+ remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
done
fi
@@ -70,15 +66,15 @@ if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then
echo "Running useradd commands..."
# Invoke multiple instances of useradd for parameter lists
# separated by ';'
- opts=`echo "$USERADD_PARAM" | cut -d ';' -f 1`
- remaining=`echo "$USERADD_PARAM" | cut -d ';' -f 2-`
+ opts=`echo "$USERADD_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
+ remaining=`echo "$USERADD_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
while test "x$opts" != "x"; do
perform_useradd "$SYSROOT" "$OPT $opts"
if test "x$opts" = "x$remaining"; then
break
fi
- opts=`echo "$remaining" | cut -d ';' -f 1`
- remaining=`echo "$remaining" | cut -d ';' -f 2-`
+ opts=`echo "$remaining" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
+ remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
done
fi
@@ -86,15 +82,15 @@ if test "x`echo $GROUPMEMS_PARAM | tr -d '[:space:]'`" != "x"; then
echo "Running groupmems commands..."
# Invoke multiple instances of groupmems for parameter lists
# separated by ';'
- opts=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 1`
- remaining=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 2-`
+ opts=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
+ remaining=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
while test "x$opts" != "x"; do
perform_groupmems "$SYSROOT" "$OPT $opts"
if test "x$opts" = "x$remaining"; then
break
fi
- opts=`echo "$remaining" | cut -d ';' -f 1`
- remaining=`echo "$remaining" | cut -d ';' -f 2-`
+ opts=`echo "$remaining" | cut -d ';' -f 1 | sed -e 's#[ \t]*$##'`
+ remaining=`echo "$remaining" | cut -d ';' -f 2- | sed -e 's#[ \t]*$##'`
done
fi
}
@@ -103,7 +99,7 @@ useradd_sysroot () {
# Pseudo may (do_install) or may not (do_populate_sysroot_setscene) be running
# at this point so we're explicit about the environment so pseudo can load if
# not already present.
- export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir}/pseudo"
+ export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir_native}/pseudo"
# Explicitly set $D since it isn't set to anything
# before do_install
@@ -129,57 +125,53 @@ useradd_sysroot_sstate () {
userdel_sysroot_sstate () {
if test "x${STAGING_DIR_TARGET}" != "x"; then
- if [ "${BB_CURRENTTASK}" = "configure" -o "${BB_CURRENTTASK}" = "clean" ]; then
- export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir}/pseudo"
+ if [ "${BB_CURRENTTASK}" = "clean" ]; then
+ export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir_native}/pseudo"
OPT="--root ${STAGING_DIR_TARGET}"
# Remove groups and users defined for package
GROUPADD_PARAM="${@get_all_cmd_params(d, 'groupadd')}"
USERADD_PARAM="${@get_all_cmd_params(d, 'useradd')}"
- if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then
- user=`echo "$USERADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
+ user=`echo "$USERADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
+ remaining=`echo "$USERADD_PARAM" | cut -d ';' -f 2- -s | sed -e 's#[ \t]*$##'`
+ while test "x$user" != "x"; do
perform_userdel "${STAGING_DIR_TARGET}" "$OPT $user"
- fi
-
- if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
- group=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
- perform_groupdel "${STAGING_DIR_TARGET}" "$OPT $group"
- fi
+ user=`echo "$remaining" | cut -d ';' -f 1 | awk '{ print $NF }'`
+ remaining=`echo "$remaining" | cut -d ';' -f 2- -s | sed -e 's#[ \t]*$##'`
+ done
+
+ user=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
+ remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2- -s | sed -e 's#[ \t]*$##'`
+ while test "x$user" != "x"; do
+ perform_groupdel "${STAGING_DIR_TARGET}" "$OPT $user"
+ user=`echo "$remaining" | cut -d ';' -f 1 | awk '{ print $NF }'`
+ remaining=`echo "$remaining" | cut -d ';' -f 2- -s | sed -e 's#[ \t]*$##'`
+ done
fi
fi
}
-SSTATECLEANFUNCS = "userdel_sysroot_sstate"
-SSTATECLEANFUNCS_class-cross = ""
-SSTATECLEANFUNCS_class-native = ""
-SSTATECLEANFUNCS_class-nativesdk = ""
+SSTATECLEANFUNCS_append_class-target = " userdel_sysroot_sstate"
do_install[prefuncs] += "${SYSROOTFUNC}"
-SYSROOTFUNC = "useradd_sysroot"
-SYSROOTFUNC_class-cross = ""
-SYSROOTFUNC_class-native = ""
-SYSROOTFUNC_class-nativesdk = ""
-SSTATEPREINSTFUNCS += "${SYSROOTPOSTFUNC}"
-SYSROOTPOSTFUNC = "useradd_sysroot_sstate"
-SYSROOTPOSTFUNC_class-cross = ""
-SYSROOTPOSTFUNC_class-native = ""
-SYSROOTPOSTFUNC_class-nativesdk = ""
-
-USERADDSETSCENEDEPS = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene pseudo-native:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"
-USERADDSETSCENEDEPS_class-cross = ""
-USERADDSETSCENEDEPS_class-native = ""
-USERADDSETSCENEDEPS_class-nativesdk = ""
+SYSROOTFUNC_class-target = "useradd_sysroot"
+SYSROOTFUNC = ""
+
+SSTATEPREINSTFUNCS_append_class-target = " useradd_sysroot_sstate"
+
do_package_setscene[depends] += "${USERADDSETSCENEDEPS}"
do_populate_sysroot_setscene[depends] += "${USERADDSETSCENEDEPS}"
+USERADDSETSCENEDEPS_class-target = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene pseudo-native:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene"
+USERADDSETSCENEDEPS = ""
# Recipe parse-time sanity checks
def update_useradd_after_parse(d):
useradd_packages = d.getVar('USERADD_PACKAGES', True)
if not useradd_packages:
- raise bb.build.FuncFailed("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False))
+ bb.fatal("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False))
for pkg in useradd_packages.split():
if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPMEMS_PARAM_%s' % pkg, True):
@@ -203,7 +195,7 @@ def get_all_cmd_params(d, cmd_type):
for pkg in useradd_packages.split():
param = d.getVar(param_type % pkg, True)
if param:
- params.append(param)
+ params.append(param.rstrip(" ;"))
return "; ".join(params)
diff --git a/import-layers/yocto-poky/meta/classes/useradd_base.bbclass b/import-layers/yocto-poky/meta/classes/useradd_base.bbclass
index 0d81accd1..ba87edc57 100644
--- a/import-layers/yocto-poky/meta/classes/useradd_base.bbclass
+++ b/import-layers/yocto-poky/meta/classes/useradd_base.bbclass
@@ -17,7 +17,6 @@ perform_groupadd () {
local groupname=`echo "$opts" | awk '{ print $NF }'`
local group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
if test "x$group_exists" = "x"; then
- opts=`echo $opts | sed s/\'/\"/g`
eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupadd \$opts\" || true
group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
if test "x$group_exists" = "x"; then
@@ -35,7 +34,6 @@ perform_useradd () {
local username=`echo "$opts" | awk '{ print $NF }'`
local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
if test "x$user_exists" = "x"; then
- opts=`echo $opts | sed s/\'/\"/g`
eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO useradd \$opts\" || true
user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
if test "x$user_exists" = "x"; then
@@ -53,14 +51,6 @@ perform_groupmems () {
local groupname=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-g" || $i == "--group") print $(i+1) }'`
local username=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-a" || $i == "--add") print $(i+1) }'`
bbnote "${PN}: Running groupmems command with group $groupname and user $username"
- # groupmems fails if /etc/gshadow does not exist
- local gshadow=""
- if [ -f $rootdir${sysconfdir}/gshadow ]; then
- gshadow="yes"
- else
- gshadow="no"
- touch $rootdir${sysconfdir}/gshadow
- fi
local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`"
if test "x$mem_exists" = "x"; then
eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmems \$opts\" || true
@@ -71,10 +61,6 @@ perform_groupmems () {
else
bbnote "${PN}: group $groupname already contains $username, not re-adding it"
fi
- if test "x$gshadow" = "xno"; then
- rm -f $rootdir${sysconfdir}/gshadow
- rm -f $rootdir${sysconfdir}/gshadow-
- fi
}
perform_groupdel () {
diff --git a/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass b/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass
index 5bcfd0b72..7ba56e28a 100644
--- a/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass
+++ b/import-layers/yocto-poky/meta/classes/utility-tasks.bbclass
@@ -46,8 +46,8 @@ python do_checkuri() {
try:
fetcher = bb.fetch2.Fetch(src_uri, d)
fetcher.checkstatus()
- except bb.fetch2.BBFetchException, e:
- raise bb.build.FuncFailed(e)
+ except bb.fetch2.BBFetchException as e:
+ bb.fatal(str(e))
}
addtask checkuriall after do_checkuri
diff --git a/import-layers/yocto-poky/meta/classes/utils.bbclass b/import-layers/yocto-poky/meta/classes/utils.bbclass
index 81b92cb5e..dbb5e4cbb 100644
--- a/import-layers/yocto-poky/meta/classes/utils.bbclass
+++ b/import-layers/yocto-poky/meta/classes/utils.bbclass
@@ -24,6 +24,7 @@ def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
def base_contains(variable, checkvalues, truevalue, falsevalue, d):
+ bb.note('base_contains is deprecated, please use bb.utils.contains instead.')
return bb.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
def base_both_contain(variable1, variable2, checkvalue, d):
@@ -61,15 +62,18 @@ def is_machine_specific(d):
oe_soinstall() {
# Purpose: Install shared library file and
# create the necessary links
- # Example:
- #
- # oe_
- #
- #bbnote installing shared library $1 to $2
- #
+ # Example: oe_soinstall libfoo.so.1.2.3 ${D}${libdir}
libname=`basename $1`
+ case "$libname" in
+ *.so)
+ bbfatal "oe_soinstall: Shared library must haved versioned filename (e.g. libfoo.so.1.2.3)"
+ ;;
+ esac
install -m 755 $1 $2/$libname
sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
+ if [ -z $sonamelink ]; then
+ bbfatal "oe_soinstall: $libname is missing ELF tag 'SONAME'."
+ fi
solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
ln -sf $libname $2/$sonamelink
ln -sf $libname $2/$solink
@@ -248,7 +252,7 @@ oe_machinstall() {
create_cmdline_wrapper () {
# Create a wrapper script where commandline options are needed
#
- # These are useful to work around relocation issues, by passing extra options
+ # These are useful to work around relocation issues, by passing extra options
# to a program
#
# Usage: create_cmdline_wrapper FILENAME <extra-options>
@@ -302,7 +306,7 @@ hardlinkdir () {
def check_app_exists(app, d):
- app = d.expand(app)
+ app = d.expand(app).strip()
path = d.getVar('PATH', d, True)
return bool(bb.utils.which(path, app))
@@ -322,7 +326,7 @@ def base_set_filespath(path, d):
overrides.reverse()
for o in overrides:
for p in path:
- if p != "":
+ if p != "":
filespath.append(os.path.join(p, o))
return ":".join(filespath)
@@ -378,3 +382,50 @@ def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = '
else:
ret = values
return " ".join(ret)
+
+def all_multilib_tune_list(vars, d):
+ """
+ Return a list of ${VAR} for each variable VAR in vars from each
+ multilib tune configuration.
+ Is safe to be called from a multilib recipe/context as it can
+ figure out the original tune and remove the multilib overrides.
+ """
+ values = {}
+ for v in vars:
+ values[v] = []
+
+ localdata = bb.data.createCopy(d)
+ overrides = localdata.getVar("OVERRIDES", False).split(":")
+ newoverrides = []
+ for o in overrides:
+ if not o.startswith("virtclass-multilib-"):
+ newoverrides.append(o)
+ localdata.setVar("OVERRIDES", ":".join(newoverrides))
+ localdata.setVar("MLPREFIX", "")
+ origdefault = localdata.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL", True)
+ if origdefault:
+ localdata.setVar("DEFAULTTUNE", origdefault)
+ bb.data.update_data(localdata)
+ values['ml'] = ['']
+ for v in vars:
+ values[v].append(localdata.getVar(v, True))
+ variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+ for item in variants.split():
+ localdata = bb.data.createCopy(d)
+ overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
+ localdata.setVar("OVERRIDES", overrides)
+ localdata.setVar("MLPREFIX", item + "-")
+ bb.data.update_data(localdata)
+ values[v].append(localdata.getVar(v, True))
+ values['ml'].append(item)
+ return values
+
+# If the user hasn't set up their name/email, set some defaults
+check_git_config() {
+ if ! git config user.email > /dev/null ; then
+ git config --local user.email "${PATCH_GIT_USER_EMAIL}"
+ fi
+ if ! git config user.name > /dev/null ; then
+ git config --local user.name "${PATCH_GIT_USER_NAME}"
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/conf/bitbake.conf b/import-layers/yocto-poky/meta/conf/bitbake.conf
index 40796aab1..54a587f1b 100644
--- a/import-layers/yocto-poky/meta/conf/bitbake.conf
+++ b/import-layers/yocto-poky/meta/conf/bitbake.conf
@@ -15,7 +15,7 @@ BASELIB_powerpc64 = "lib64"
# Path prefixes
export base_prefix = ""
export prefix = "/usr"
-export exec_prefix = "/usr"
+export exec_prefix = "${prefix}"
# Base paths
export base_bindir = "${base_prefix}/bin"
@@ -129,7 +129,7 @@ TARGET_CC_ARCH = "${TUNE_CCARGS}"
TARGET_LD_ARCH = "${TUNE_LDARGS}"
TARGET_AS_ARCH = "${TUNE_ASARGS}"
-SDK_ARCH = "${BUILD_ARCH}"
+SDKMACHINE ??= "x86_64"
SDK_OS = "${BUILD_OS}"
SDK_VENDOR = "-oesdk"
SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}"
@@ -247,7 +247,7 @@ SUMMARY_${PN}-doc ?= "${SUMMARY} - Documentation files"
DESCRIPTION_${PN}-doc ?= "${DESCRIPTION} \
This package contains documentation."
-LICENSE = "INVALID"
+LICENSE ??= "INVALID"
MAINTAINER = "OE-Core Developers <openembedded-core@lists.openembedded.org>"
HOMEPAGE = ""
@@ -284,7 +284,8 @@ FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS}
${sysconfdir} ${sharedstatedir} ${localstatedir} \
${base_bindir}/* ${base_sbindir}/* \
${base_libdir}/*${SOLIBS} \
- ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d \
+ ${base_prefix}/lib/udev ${prefix}/lib/udev \
+ ${base_libdir}/udev ${libdir}/udev \
${datadir}/${BPN} ${libdir}/${BPN}/* \
${datadir}/pixmaps ${datadir}/applications \
${datadir}/idl ${datadir}/omf ${datadir}/sounds \
@@ -403,8 +404,14 @@ SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
# Kernel info.
##################################################################
-OLDEST_KERNEL = "2.6.32"
+OLDEST_KERNEL = "3.2.0"
OLDEST_KERNEL_aarch64 = "3.14"
+OLDEST_KERNEL_nios2 = "3.19"
+
+# Define where the kernel headers are installed on the target as well as where
+# they are staged.
+KERNEL_SRC_PATH = "/usr/src/kernel"
+
STAGING_KERNEL_DIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-source"
STAGING_KERNEL_BUILDDIR = "${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts"
@@ -444,10 +451,10 @@ CCACHE ??= ""
# Disable ccache explicitly if CCACHE is null since gcc may be a symlink
# of ccache some distributions (e.g., Fedora 17).
export CCACHE_DISABLE ??= "${@[0,1][d.getVar('CCACHE', True) == '']}"
-# Assign CCACHE_DIR a default value to fix a bug of ccache 3.1.7,
-# since it would always create CCACHE_DIR/.ccache even if
-# CCACHE_DISABLE = 1.
-export CCACHE_DIR ??= "${@os.getenv('HOME')}"
+# ccache < 3.1.10 will create CCACHE_DIR on startup even if disabled, and
+# autogen sets HOME=/dev/null so in certain situations builds can fail.
+# Explicitly export CCACHE_DIR until we can assume ccache >3.1.10 on the host.
+export CCACHE_DIR ??= "${@os.getenv('HOME')}/.ccache"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
@@ -465,6 +472,7 @@ export OBJCOPY = "${HOST_PREFIX}objcopy"
export OBJDUMP = "${HOST_PREFIX}objdump"
export STRINGS = "${HOST_PREFIX}strings"
export NM = "${HOST_PREFIX}nm"
+export READELF = "${HOST_PREFIX}readelf"
PYTHON = "${@sys.executable}"
export BUILD_CC = "${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}"
@@ -482,7 +490,7 @@ export BUILD_NM = "${BUILD_PREFIX}nm"
export MAKE = "make"
EXTRA_OEMAKE = ""
EXTRA_OECONF = ""
-export LC_ALL = "C"
+export LC_ALL = "en_US.UTF-8"
##################################################################
# Patch handling.
@@ -495,10 +503,9 @@ PATCHRESOLVE = "noop"
##################################################################
export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
-BUILDSDK_CPPFLAGS = "-isystem${STAGING_INCDIR}"
+BUILDSDK_CPPFLAGS = ""
export CPPFLAGS = "${TARGET_CPPFLAGS}"
export TARGET_CPPFLAGS = ""
-#export TARGET_CPPFLAGS = "-isystem${STAGING_DIR_TARGET}${includedir}"
export BUILD_CFLAGS = "${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}"
BUILDSDK_CFLAGS = "${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION}"
@@ -517,12 +524,7 @@ export BUILD_LDFLAGS = "-L${STAGING_LIBDIR_NATIVE} \
-Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE} \
-Wl,-O1"
-BUILDSDK_LDFLAGS = "-L${STAGING_LIBDIR} \
- -Wl,-rpath-link,${STAGING_LIBDIR} \
- -Wl,-rpath,${libdir} -Wl,-O1 \
- -L${STAGING_DIR_HOST}${base_libdir} \
- -Wl,-rpath-link,${STAGING_DIR_HOST}${base_libdir} \
- -Wl,-rpath,${base_libdir} -Wl,-O1"
+BUILDSDK_LDFLAGS = "-Wl,-O1"
LINKER_HASH_STYLE ??= "gnu"
# mips does not support GNU hash style therefore we override
@@ -532,6 +534,11 @@ LINKER_HASH_STYLE_mips64 = "sysv"
LINKER_HASH_STYLE_mips64el = "sysv"
LINKER_HASH_STYLE_mips64n32 = "sysv"
LINKER_HASH_STYLE_mips64eln32 = "sysv"
+LINKER_HASH_STYLE_mipsisa32r6 = "sysv"
+LINKER_HASH_STYLE_mipsisa32r6el = "sysv"
+LINKER_HASH_STYLE_mipsisa64r6 = "sysv"
+LINKER_HASH_STYLE_mipsisa64r6el = "sysv"
+
TARGET_LINK_HASH_STYLE ?= "${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE', True) != 'gnu']}"
export LDFLAGS = "${TARGET_LDFLAGS}"
@@ -549,11 +556,11 @@ EXTRA_OEMAKE_prepend_task-install = "${PARALLEL_MAKEINST} "
##################################################################
# Optimization flags.
##################################################################
-DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types \
- -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
- -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
- -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+DEBUG_PREFIX_MAP ?= "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+ -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+ -fdebug-prefix-map=${STAGING_DIR_HOST}= \
"
+DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
# Disabled until the option works properly -feliminate-dwarf2-dups
FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
@@ -572,12 +579,13 @@ BBLAYERS_FETCH_DIR ??= "${COREBASE}"
# Download locations and utilities.
##################################################################
-APACHE_MIRROR = "http://www.eu.apache.org/dist/"
+APACHE_MIRROR = "http://archive.apache.org/dist"
DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool"
GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
GNOME_GIT = "git://git.gnome.org"
GNOME_MIRROR = "http://ftp.gnome.org/pub/GNOME/sources"
GNU_MIRROR = "http://ftp.gnu.org/gnu"
+GNUPG_MIRROR = "https://www.gnupg.org/ftp/gcrypt"
GPE_MIRROR = "http://gpe.linuxtogo.org/download/source"
KERNELORG_MIRROR = "http://kernel.org/pub"
SOURCEFORGE_MIRROR = "http://downloads.sourceforge.net"
@@ -595,6 +603,7 @@ SRC_URI[vardepsexclude] += "\
GNOME_GIT \
GNOME_MIRROR \
GNU_MIRROR \
+ GNUPG_MIRROR \
GPE_MIRROR \
KERNELORG_MIRROR \
SAVANNAH_GNU_MIRROR \
@@ -713,6 +722,7 @@ require conf/sanity.conf
DL_DIR ?= "${TOPDIR}/downloads"
SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
IMAGE_FSTYPES ?= "tar.gz"
+IMAGE_FSTYPES_DEBUGFS ?= "${IMAGE_FSTYPES}"
INITRAMFS_FSTYPES ?= "cpio.gz"
# The maximum size in Kbytes for the generated initramfs image size.
@@ -798,7 +808,7 @@ BB_CONSOLELOG ?= "${LOG_DIR}/cooker/${MACHINE}/${DATETIME}.log"
# Setup our default hash policy
BB_SIGNATURE_HANDLER ?= "OEBasicHash"
-BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
+BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DIR \
SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
@@ -809,12 +819,14 @@ BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \
PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \
- HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD"
+ HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD \
+ BB_SETSCENE_ENFORCE"
BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
lockfiles type vardepsexclude vardeps vardepvalue vardepvalueexclude \
file-checksums python func task export unexport noexec nostamp dirs cleandirs \
sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask \
- recrdeptask nodeprrecs stamp-extra-info sstate-outputdirs filename lineno"
+ recrdeptask nodeprrecs stamp-extra-info sstate-outputdirs filename lineno \
+ progress"
MLPREFIX ??= ""
MULTILIB_VARIANTS ??= ""
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc b/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc
index fac4deb78..f7ed943c9 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/default-distrovars.inc
@@ -23,7 +23,7 @@ DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}"
IMAGE_FEATURES ?= ""
WHITELIST_GPL-3.0 ?= ""
-LGPLv2_WHITELIST_GPL-3.0 ?= "libidn"
+LGPLv2_WHITELIST_GPL-3.0 ?= ""
COMMERCIAL_AUDIO_PLUGINS ?= ""
# COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/default-versions.inc b/import-layers/yocto-poky/meta/conf/distro/include/default-versions.inc
index a04ea718b..cc8c533d4 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/default-versions.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/default-versions.inc
@@ -2,11 +2,6 @@
# Default preferred versions
#
-# Force the python versions in one place
-PYTHON_BASEVERSION ?= "2.7"
-PREFERRED_VERSION_python ?= "2.7.11"
-PREFERRED_VERSION_python-native ?= "2.7.11"
-
# Force the older version of liberation-fonts until we fix the fontforge issue
PREFERRED_VERSION_liberation-fonts ?= "1.04"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc b/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc
index c8f93955d..10efb096f 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/distro_alias.inc
@@ -13,7 +13,6 @@ DISTRO_PN_ALIAS_pn-alsa-state = "OE-Core"
DISTRO_PN_ALIAS_pn-alsa-utils-alsaconf = "OE-Core"
DISTRO_PN_ALIAS_pn-alsa-utils-scripts = "OE-Core"
DISTRO_PN_ALIAS_pn-atk = "Fedora=atk OpenSuSE=atk"
-DISTRO_PN_ALIAS_pn-augeas = "Ubuntu=libaugeas0 Debian=libaugeas0"
DISTRO_PN_ALIAS_pn-avahi-ui = "Ubuntu=avahi-discover Debian=avahi-discover"
DISTRO_PN_ALIAS_pn-babeltrace = "OSPDT"
DISTRO_PN_ALIAS_pn-bdwgc = "OSPDT"
@@ -46,7 +45,6 @@ DISTRO_PN_ALIAS_pn-connman-gnome = "Intel"
DISTRO_PN_ALIAS_pn-console-tools = "Debian=console-tools Ubuntu=console-tools"
DISTRO_PN_ALIAS_pn-core-image-base = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-clutter = "OE-Core"
-DISTRO_PN_ALIAS_pn-core-image-directfb = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-full-cmdline = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-kernel-dev = "OE-Core"
DISTRO_PN_ALIAS_pn-core-image-lsb = "OE-Core"
@@ -75,7 +73,6 @@ DISTRO_PN_ALIAS_pn-db = "Debian=db5.1 Ubuntu=db5.1"
DISTRO_PN_ALIAS_pn-dbus-test = "Fedora=dbus Ubuntu=dbus"
DISTRO_PN_ALIAS_pn-dbus-wait = "OpenedHand"
DISTRO_PN_ALIAS_pn-depmodwrapper-cross = "OE-Core"
-DISTRO_PN_ALIAS_pn-directfb-examples = "Debian=directfb Fedora=directfb"
DISTRO_PN_ALIAS_pn-distcc = "Debian=distcc Fedora=distcc"
DISTRO_PN_ALIAS_pn-distcc-config = "OpenedHand"
DISTRO_PN_ALIAS_pn-dmxproto = "Meego=xorg-x11-proto-dmxproto Ubuntu=x11proto-dmx Debian=x11proto-dmx"
@@ -134,7 +131,7 @@ DISTRO_PN_ALIAS_pn-gstreamer1.0-plugins-good = "Debian=gstreamer1.0-plugins-good
DISTRO_PN_ALIAS_pn-gstreamer1.0-rtsp-server = "Ubuntu=gstreamer0.10-rtsp Fedora=gstreamer-rtsp"
DISTRO_PN_ALIAS_pn-gtk+ = "Meego=gtk2 Fedora=gtk2 OpenSuSE=gtk2 Ubuntu=gtk+2.0 Mandriva=gtk+2.0 Debian=gtk+2.0"
DISTRO_PN_ALIAS_pn-gtk+3 = "Ubuntu=gtk+3.0 Debian=gtk+3.0 Fedora=gtk3"
-DISTRO_PN_ALIAS_pn-gtk-doc-stub = "Fedora=gtk-doc Ubuntu=gtk-doc"
+DISTRO_PN_ALIAS_pn-gtk-doc = "Fedora=gtk-doc Ubuntu=gtk-doc"
DISTRO_PN_ALIAS_pn-gtk-engines = "Fedora=gtk2-engines OpenSuSE=gtk2-engines Ubuntu=gtk2-engines Mandriva=gtk-engines2 Debian=gtk2-engines"
DISTRO_PN_ALIAS_pn-gtk-sato-engine = "OpenedHand"
DISTRO_PN_ALIAS_pn-gtk-icon-utils-native = "OSPDT"
@@ -216,7 +213,6 @@ DISTRO_PN_ALIAS_pn-libxft = "Mandriva=libxft Debian=libxft2 Ubuntu=libxft2"
DISTRO_PN_ALIAS_pn-libxi = "Ubuntu=libxi Fedora=libXi"
DISTRO_PN_ALIAS_pn-libxkbcommon = "Fedora=libxkbcommon Debian=libxkbcommon"
DISTRO_PN_ALIAS_pn-libxscrnsaver = "Fedora=libXScrnSaver Ubuntu=libxss1 Mandriva=libxscrnsaver"
-DISTRO_PN_ALIAS_pn-libxsettings-client = "Debian=libxsettings-client0 Ubuntu=libxsettings-client0 Mandriva=libXsettings-client0"
DISTRO_PN_ALIAS_pn-libxxf86misc = "Mandriva=libxxf86misc Fedora=libXxf86misc"
DISTRO_PN_ALIAS_pn-linux-dummy = "Intel"
DISTRO_PN_ALIAS_pn-linux-firmware = "Fedora=linux-firmware Ubuntu=linux-firmware"
@@ -281,8 +277,6 @@ DISTRO_PN_ALIAS_pn-opkg-keyrings = "OSPDT upstream=git://git.yoctoproject.org/op
DISTRO_PN_ALIAS_pn-opkg-nogpg = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
DISTRO_PN_ALIAS_pn-opkg-utils = "OSPDT upstream=git://git.yoctoproject.org/opkg-utils"
DISTRO_PN_ALIAS_pn-oprofile = "Debian=oprofile Fedora=oprofile"
-DISTRO_PN_ALIAS_pn-oprofileui = "Fedora=oprofileui Ubuntu=oprofile-gui Debian=oprofile-gui"
-DISTRO_PN_ALIAS_pn-oprofileui-server = "Fedora=oprofileui Ubuntu=oprofile-gui Debian=oprofile-gui"
DISTRO_PN_ALIAS_pn-os-release = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-base = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core = "OE-Core"
@@ -290,7 +284,6 @@ DISTRO_PN_ALIAS_pn-packagegroup-core-boot = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-buildessential = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-clutter = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-device-devel = "OE-Core"
-DISTRO_PN_ALIAS_pn-packagegroup-core-directfb = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-eclipse-debug = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-full-cmdline = "OE-Core"
DISTRO_PN_ALIAS_pn-packagegroup-core-lsb = "OE-Core"
@@ -318,7 +311,6 @@ DISTRO_PN_ALIAS_pn-patchelf = "Opensuse=patchelf Fedora=patchelf"
DISTRO_PN_ALIAS_pn-perf = "OSPDT"
DISTRO_PN_ALIAS_pn-piglit = "OE-Core"
DISTRO_PN_ALIAS_pn-pkgconfig = "Ubuntu=pkg-config Fedora=pkgconfig"
-DISTRO_PN_ALIAS_pn-pointercal = "OE-Core"
DISTRO_PN_ALIAS_pn-pointercal-xinput = "OE-Core"
DISTRO_PN_ALIAS_pn-pong-clock = "OpenedHand"
DISTRO_PN_ALIAS_pn-portmap = "Debian=rpcbind Fedora=rpcbind"
@@ -338,12 +330,10 @@ DISTRO_PN_ALIAS_pn-python3-setuptools = "OpenSuSE=python3-setuptools Debian=pyth
DISTRO_PN_ALIAS_pn-python-dbus = "Ubuntu=python-dbus Debian=python-dbus Mandriva=python-dbus"
DISTRO_PN_ALIAS_pn-python-distribute = "Opensuse=python-setuptools Fedora=python-setuptools"
DISTRO_PN_ALIAS_pn-python-git = "Debian=python-git Fedora=GitPython"
-DISTRO_PN_ALIAS_pn-python-imaging = "Mandriva=python-imaging Debian=python-imaging"
DISTRO_PN_ALIAS_pn-python-mako = "Fedora=python-mako Opensuse=python-Mako"
DISTRO_PN_ALIAS_pn-python-pycairo = "Meego=pycairo Fedora=pycairo Ubuntu=pycairo Debian=pycairo"
DISTRO_PN_ALIAS_pn-python-pycurl = "Debian=python-pycurl Ubuntu=python-pycurl"
DISTRO_PN_ALIAS_pn-python-pygobject = "Meego=pygobject2 Fedora=pygobject2 Ubuntu=pygobject Debian=pygobject"
-DISTRO_PN_ALIAS_pn-python-pyrex = "Mandriva=python-pyrex Ubuntu=python-pyrex"
DISTRO_PN_ALIAS_pn-python-scons = "Fedora=scons OpenSuSE=scons Ubuntu=scons Mandriva=scons Debian=scons"
DISTRO_PN_ALIAS_pn-python-setuptools = "Mandriva=python-setup OpenSuSE=python-setup-git"
DISTRO_PN_ALIAS_pn-python-smartpm = "Debian=smart OpenSuSE=smart"
@@ -388,7 +378,6 @@ DISTRO_PN_ALIAS_pn-texinfo-dummy-native = "OE-Core"
DISTRO_PN_ALIAS_pn-tiny-init = "OSPDT"
DISTRO_PN_ALIAS_pn-trace-cmd = "Mandriva=trace-cmd Ubuntu=trace-cmd"
DISTRO_PN_ALIAS_pn-tremor = "OSPDT upstream=http://www.xiph.org/vorbis/"
-DISTRO_PN_ALIAS_pn-tslib = "Debian=tslib Ubuntu=tslib"
DISTRO_PN_ALIAS_pn-ttf-bitstream-vera = "Debian=ttf-bitstream-vera Ubuntu=ttf-bitstream-vera"
DISTRO_PN_ALIAS_pn-tzcode = "OSPDT"
DISTRO_PN_ALIAS_pn-u-boot-fw-utils = "Ubuntu=u-boot-tools Debian=u-boot-tools"
@@ -457,7 +446,6 @@ DISTRO_PN_ALIAS_pn-xserver-xf86-dri-lite = "Fedora=xorg-x11-server Ubuntu=xserve
DISTRO_PN_ALIAS_pn-xserver-xf86-lite = "Fedora=xorg-x11-server Ubuntu=xserver-xorg"
DISTRO_PN_ALIAS_pn-xserver-xorg = "Fedora=xorg-x11-server Ubuntu=xserver-xorg"
DISTRO_PN_ALIAS_pn-xset = "Fedora=xorg-x11-server-utils Ubuntu=x11-xserver-utils Debian=x11-xserver-utils Opensuse=xorg-x11"
-DISTRO_PN_ALIAS_pn-xtscal = "OSPDT upstream=http://gpe.linuxtogo.org/download/source/"
DISTRO_PN_ALIAS_pn-xuser-account = "OE-Core"
DISTRO_PN_ALIAS_pn-xvideo-tests = "OpenedHand"
DISTRO_PN_ALIAS_pn-xvinfo = "Fedora=xorg-x11-utils Ubuntu=x11-utils"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/package_regex.inc b/import-layers/yocto-poky/meta/conf/distro/include/package_regex.inc
deleted file mode 100644
index 9fc115723..000000000
--- a/import-layers/yocto-poky/meta/conf/distro/include/package_regex.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-# NOTE: THIS FILE IS DEPRECATED. Please add new entries to the recipes themselves.
-#
-# package_regex.inc - This file contains data that tracks
-# upstream project associated with a given recipe. This list is needed
-# for recipes that version information can not be automagically discovered.
-# As we automate this checking, this file will slowly be reduced.
-#"
-# This data is used by the package reporting system (packages.yoctoproject.org)
-#"
-# The format is as a bitbake variable override for each recipe
-#"
-# UPSTREAM_CHECK_URI_pn-<recipe name> = "recipe_url"
-# - This is the url used by the package checking system to
-# get the latest version of the package
-# UPSTREAM_CHECK_REGEX_pn-<recipe name> = "package_regex"
-# - This is the regex the package checking system uses to
-# parse the page found at UPSTREAM_CHECK_URI_pn-<recipe name>
-# UPSTREAM_CHECK_GITTAGREGEX_pn-<recipe name> = "git_tag_regex"
-# - When source code is fetched from git, git tags are used to
-# determine the upstream release version. This regex can be used
-# to filter only relevant tags.
-#
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc b/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc
index ff5f34e3a..eca835e3a 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/security_flags.inc
@@ -9,8 +9,11 @@
# -O0 which then results in a compiler warning.
lcl_maybe_fortify = "${@base_conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
-SECURITY_CFLAGS ?= "-fstack-protector-strong -pie -fpie ${lcl_maybe_fortify}"
-SECURITY_NO_PIE_CFLAGS ?= "-fstack-protector-strong ${lcl_maybe_fortify}"
+# Error on use of format strings that represent possible security problems
+SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security -Werror=format-security"
+
+SECURITY_CFLAGS ?= "-fstack-protector-strong -pie -fpie ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
+SECURITY_NO_PIE_CFLAGS ?= "-fstack-protector-strong ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
SECURITY_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro,-z,now"
SECURITY_X_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro"
@@ -26,7 +29,6 @@ SECURITY_CFLAGS_pn-libmatchbox_powerpc = ""
SECURITY_CFLAGS_pn-lttng-tools_arm = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-aspell = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-beecrypt = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-blktrace = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-coreutils = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-cups = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-db = "${SECURITY_NO_PIE_CFLAGS}"
@@ -37,10 +39,9 @@ SECURITY_CFLAGS_pn-elfutils = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-enchant = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-expect = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-flac = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-flex = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gcc = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gcc-runtime = ""
-SECURITY_CFLAGS_pn-gcc-sanitizers = ""
+SECURITY_CFLAGS_pn-gcc-sanitizers = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gdb = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gmp = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gnutls = "${SECURITY_NO_PIE_CFLAGS}"
@@ -50,8 +51,6 @@ SECURITY_CFLAGS_pn-grub-efi-native = ""
SECURITY_CFLAGS_pn-grub-efi-x86-native = ""
SECURITY_CFLAGS_pn-grub-efi-i586-native = ""
SECURITY_CFLAGS_pn-grub-efi-x86-64-native = ""
-SECURITY_CFLAGS_pn-gst-plugins-bad = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-gst-plugins-gl = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gstreamer1.0-plugins-bad = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-gstreamer1.0-plugins-good = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-harfbuzz = "${SECURITY_NO_PIE_CFLAGS}"
@@ -59,28 +58,30 @@ SECURITY_CFLAGS_pn-kexec-tools = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-iptables = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libaio = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libcap = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libgcc = ""
+SECURITY_CFLAGS_pn-libgcc = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libid3tag = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libnewt = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-libnewt-python = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libglu = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libpcap = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libpcre = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-libproxy = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-lttng-ust = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-mesa = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-mesa-gl = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-openssl = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-opensp = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-ppp = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-python = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python-imaging = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-python-pycurl = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-python-smartpm = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-python-numpy = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-python3-numpy = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-python3-pycairo = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-python3 = "${SECURITY_NO_PIE_CFLAGS}"
# Revert RPM to using internally supported values
SECURITY_CFLAGS_pn-rpm = "${lcl_maybe_fortify} -fstack-protector"
SECURITY_CFLAGS_pn-syslinux = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-slang = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-source-highlight = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-tcl = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-tiff = "${SECURITY_NO_PIE_CFLAGS}"
SECURITY_CFLAGS_pn-uclibc = ""
@@ -88,18 +89,22 @@ SECURITY_CFLAGS_pn-uclibc-initial = ""
SECURITY_CFLAGS_pn-valgrind = ""
SECURITY_CFLAGS_pn-zlib = "${SECURITY_NO_PIE_CFLAGS}"
-# These 2 have text relco errors with the pie options enabled
-SECURITY_CFLAGS_pn-ltp = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-pulseaudio = "${SECURITY_NO_PIE_CFLAGS}"
+# Recipes which fail to compile when elevating -Wformat-security to an error
+SECURITY_STRINGFORMAT_pn-busybox = ""
+SECURITY_STRINGFORMAT_pn-console-tools = ""
+SECURITY_STRINGFORMAT_pn-cmake = ""
+SECURITY_STRINGFORMAT_pn-expect = ""
+SECURITY_STRINGFORMAT_pn-gcc = ""
+SECURITY_STRINGFORMAT_pn-gettext = ""
+SECURITY_STRINGFORMAT_pn-kexec-tools = ""
+SECURITY_STRINGFORMAT_pn-oh-puzzles = ""
TARGET_CFLAGS_append_class-target = " ${SECURITY_CFLAGS}"
TARGET_LDFLAGS_append_class-target = " ${SECURITY_LDFLAGS}"
SECURITY_LDFLAGS_remove_pn-gcc-runtime = "-fstack-protector-strong"
-SECURITY_LDFLAGS_remove_pn-gcc-sanitizers = "-fstack-protector-strong"
SECURITY_LDFLAGS_remove_pn-glibc = "-fstack-protector-strong"
SECURITY_LDFLAGS_remove_pn-glibc-initial = "-fstack-protector-strong"
-SECURITY_LDFLAGS_remove_pn-libgcc = "-fstack-protector-strong"
SECURITY_LDFLAGS_remove_pn-uclibc = "-fstack-protector-strong"
SECURITY_LDFLAGS_remove_pn-uclibc-initial = "-fstack-protector-strong"
SECURITY_LDFLAGS_pn-xf86-video-fbdev = "${SECURITY_X_LDFLAGS}"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/tclibc-uclibc.inc b/import-layers/yocto-poky/meta/conf/distro/include/tclibc-uclibc.inc
deleted file mode 100644
index 14c3cdbb8..000000000
--- a/import-layers/yocto-poky/meta/conf/distro/include/tclibc-uclibc.inc
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# uclibc specific configuration
-#
-
-LIBCEXTENSION = "-uclibc"
-
-# Add uclibc overrides to the overrides.
-LIBCOVERRIDE = ":libc-uclibc"
-OVERRIDES .= "${LIBCOVERRIDE}"
-
-PREFERRED_PROVIDER_virtual/libc ?= "uclibc"
-PREFERRED_PROVIDER_virtual/libiconv ?= "libiconv"
-PREFERRED_PROVIDER_virtual/libintl ?= "gettext"
-PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
-PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
-
-USE_NLS ?= "no"
-
-CXXFLAGS += "-fvisibility-inlines-hidden"
-
-IMAGE_LINGUAS = ""
-
-LIBC_DEPENDENCIES = "\
- uclibc \
- uclibc-dbg \
- uclibc-dev \
- uclibc-thread-db \
- "
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc b/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc
index c412420ea..ca3c5ec90 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/tcmode-default.inc
@@ -9,10 +9,10 @@ PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "gcc-cross-${TARGET_ARCH}"
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "gcc-runtime"
PREFERRED_PROVIDER_gdb = "gdb"
-PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils-crosssdk ?= "binutils-crosssdk-${SDK_ARCH}"
-PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc-initial = "gcc-crosssdk-initial-${SDK_ARCH}"
-PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc = "gcc-crosssdk-${SDK_ARCH}"
-PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ = "gcc-crosssdk-${SDK_ARCH}"
+PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils-crosssdk ?= "binutils-crosssdk-${SDK_SYS}"
+PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc-initial = "gcc-crosssdk-initial-${SDK_SYS}"
+PREFERRED_PROVIDER_virtual/${SDK_PREFIX}gcc = "gcc-crosssdk-${SDK_SYS}"
+PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ = "gcc-crosssdk-${SDK_SYS}"
PREFERRED_PROVIDER_virtual/${SDK_PREFIX}compilerlibs = "nativesdk-gcc-runtime"
# Default libc config
@@ -22,19 +22,19 @@ PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial"
PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial ?= "nativesdk-glibc-initial"
PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
-GCCVERSION ?= "5.3%"
+GCCVERSION ?= "6.2%"
SDKGCCVERSION ?= "${GCCVERSION}"
-BINUVERSION ?= "2.26%"
-GDBVERSION ?= "7.10%"
-GLIBCVERSION ?= "2.23"
+BINUVERSION ?= "2.27%"
+GDBVERSION ?= "7.11%"
+GLIBCVERSION ?= "2.24"
UCLIBCVERSION ?= "1.0%"
-LINUXLIBCVERSION ?= "4.4"
+LINUXLIBCVERSION ?= "4.8%"
PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-cross-initial-${TARGET_ARCH} ?= "${GCCVERSION}"
-PREFERRED_VERSION_gcc-crosssdk-${SDK_ARCH} ?= "${SDKGCCVERSION}"
-PREFERRED_VERSION_gcc-crosssdk-initial-${SDK_ARCH} ?= "${SDKGCCVERSION}"
+PREFERRED_VERSION_gcc-crosssdk-${SDK_SYS} ?= "${SDKGCCVERSION}"
+PREFERRED_VERSION_gcc-crosssdk-initial-${SDK_SYS} ?= "${SDKGCCVERSION}"
PREFERRED_VERSION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-runtime ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-sanitizers ?= "${GCCVERSION}"
@@ -68,7 +68,7 @@ PREFERRED_VERSION_uclibc ?= "${UCLIBCVERSION}"
PREFERRED_VERSION_uclibc-initial ?= "${UCLIBCVERSION}"
# don't use version earlier than 1.4 for gzip-native, as it's necessary for
# some packages using an archive format incompatible with earlier gzip
-PREFERRED_VERSION_gzip-native ?= "1.6"
+PREFERRED_VERSION_gzip-native ?= "1.8"
# Setup suitable toolchain flags
require conf/distro/include/as-needed.inc
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/world-broken.inc b/import-layers/yocto-poky/meta/conf/distro/include/world-broken.inc
index a5f6371d3..d4bdddfcf 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/world-broken.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/world-broken.inc
@@ -47,3 +47,10 @@ EXCLUDE_FROM_WORLD_pn-perf_libc-musl = "1"
# error: 'RTLD_NEXT' was not declared in this scope
EXCLUDE_FROM_WORLD_pn-gcc-sanitizers_libc-musl = "1"
+
+# gcc fails to build when libuwind is staged before building gcc since
+# it then finds the unwind.h header from libunwind and not from libgcc
+# and on arm specially they are different since libgcc defines some functions
+# as macros which are functions in libunwind and it fails during linking
+# libbacktrace/backtrace.c:76: undefined reference to `_Unwind_GetIP'
+EXCLUDE_FROM_WORLD_pn-libunwind_libc-musl_arm = "1"
diff --git a/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc b/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
index 85e613ac4..975edec9c 100644
--- a/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
+++ b/import-layers/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
@@ -6,6 +6,6 @@
# to the distro running on the build machine.
#
-UNINATIVE_URL = "http://downloads.yoctoproject.org/releases/uninative/0.95/"
-UNINATIVE_CHECKSUM[i686] ?= "5f27d7e0f4dd2ed80a7ff6a0d88af107b08e00765b31ed3aa180cc5ce15b0811"
-UNINATIVE_CHECKSUM[x86_64] ?= "26d46c61ad88cc245e31c88549717c0092a838d111b93ec169d88b08cc027581"
+UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/1.4/"
+UNINATIVE_CHECKSUM[i686] ?= "b4bc60511ce479736808273ffa043df4ed2a225407dd7ca150ae6220d9ce76d5"
+UNINATIVE_CHECKSUM[x86_64] ?= "101ff8f2580c193488db9e76f9646fb6ed38b65fb76f403acb0e2178ce7127ca"
diff --git a/import-layers/yocto-poky/meta/conf/documentation.conf b/import-layers/yocto-poky/meta/conf/documentation.conf
index dcc324c6c..06527cb99 100644
--- a/import-layers/yocto-poky/meta/conf/documentation.conf
+++ b/import-layers/yocto-poky/meta/conf/documentation.conf
@@ -28,7 +28,7 @@ do_install_ptest_base[doc] = "Copies the runtime test suite files from the compi
do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto style kernel"
do_kernel_configcheck[doc] = "Validates the kernel configuration for a linux-yocto style kernel"
do_kernel_configme[doc] = "Assembles the kernel configuration for a linux-yocto style kernel"
-do_kernel_link_vmlinux[doc] = "Creates a symbolic link in arch/$arch/boot for vmlinux kernel images"
+do_kernel_link_images[doc] = "Creates a symbolic link in arch/$arch/boot for vmlinux and vmlinuz kernel images"
do_listtasks[doc] = "Lists all defined tasks for a target"
do_menuconfig[doc] = "Runs 'make menuconfig' for the kernel"
do_package[doc] = "Analyzes the content of the holding area and splits it into subsets based on available packages and files"
@@ -349,7 +349,6 @@ QMAKE_PROFILES[doc] = "Specifies your own subset of .pro files to be built for u
RCONFLICTS[doc] = "The list of packages that conflict with another package. Note that the package will not be installed if the conflicting packages are not first removed."
RDEPENDS[doc] = "Lists a package's runtime dependencies (i.e. other packages) that must be installed for the package to be built. They must be the names of other packages as listed in the PACKAGES variable, not recipe names (PN)."
REQUIRED_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that must exist in the current configuration in order for the OpenEmbedded build system to build the recipe."
-RM_OLD_IMAGE[doc] = "Reclaims disk space by removing previously built versions of the same image from the images directory pointed to by the DEPLOY_DIR variable."
RM_WORK_EXCLUDE[doc] = "With rm_work enabled, this variable specifies a list of packages whose work directories should not be removed."
ROOTFS[doc] = "Indicates a filesystem image to include as the root filesystem."
ROOTFS_POSTPROCESS_COMMAND[doc] = "Added by classes to run post processing commands once the OpenEmbedded build system has created the root filesystem."
@@ -452,8 +451,12 @@ UBOOT_SUFFIX[doc] = "Points to the generated U-Boot extension."
UBOOT_TARGET[doc] = "Specifies the target used for building U-Boot."
USE_DEVFS[doc] = "When building images, specifies to populate or not /dev. This variable defaults to '1' (leave directory empty, surely because devtmpfs do the job). Set it to '0' to use makedevs (or consider using a custom file with IMAGE_DEVICE_TABLES)."
USER_CLASSES[doc] = "List of additional classes to use when building images that enable extra features."
+USERADD_ERROR_DYNAMIC[doc] = "If set to 'error', forces the OpenEmbedded build system to produce an error if the user identification (uid) and group identification (gid) values are not defined in any of the files listed in USERADD_UID_TABLES and USERADD_GID_TABLES. If set to 'warn', a warning will be issued instead."
+USERADD_GID_TABLES[doc] = "Specifies a password file to use for obtaining static group identification (gid) values when the OpenEmbedded build system adds a group to the system during package installation."
USERADD_PACKAGES[doc] = "When a recipe inherits the useradd class, this variable specifies the individual packages within the recipe that require users and/or groups to be added."
USERADD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the useradd command if you wish to add a user to the system when the package is installed."
+USERADD_UID_TABLES[doc] = "Specifies a password file to use for obtaining static user identification (uid) values when the OpenEmbedded build system adds a user to the system during package installation."
+USERADDEXTENSION[doc] = "When set to 'useradd-staticids', causes the OpenEmbedded build system to base all user and group additions on files listed in USERADD_UID_TABLES and USERADD_GID_TABLES."
#W
diff --git a/import-layers/yocto-poky/meta/conf/layer.conf b/import-layers/yocto-poky/meta/conf/layer.conf
index 10b98f5bd..24b4df07f 100644
--- a/import-layers/yocto-poky/meta/conf/layer.conf
+++ b/import-layers/yocto-poky/meta/conf/layer.conf
@@ -9,7 +9,7 @@ BBFILE_PRIORITY_core = "5"
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
-LAYERVERSION_core = "8"
+LAYERVERSION_core = "9"
BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
@@ -26,7 +26,6 @@ SIGGEN_EXCLUDERECIPES_ABISAFE += " \
connman-conf \
formfactor \
xserver-xf86-config \
- pointercal \
pointercal-xinput \
base-files \
keymaps \
@@ -47,6 +46,7 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
ppp-dialin->ppp \
resolvconf->bash \
docbook-xsl-stylesheets->perl \
+ ca-certificates->openssl \
initramfs-framework->${VIRTUAL-RUNTIME_base-utils} \
initramfs-framework->systemd \
initramfs-framework->eudev \
diff --git a/import-layers/yocto-poky/meta/conf/machine-sdk/i586.conf b/import-layers/yocto-poky/meta/conf/machine-sdk/i586.conf
index baacce70a..41e5e159d 100644
--- a/import-layers/yocto-poky/meta/conf/machine-sdk/i586.conf
+++ b/import-layers/yocto-poky/meta/conf/machine-sdk/i586.conf
@@ -1,3 +1,4 @@
SDK_ARCH = "i586"
SDK_CC_ARCH = "-march=i586"
+ABIEXTENSION_class-nativesdk = ""
diff --git a/import-layers/yocto-poky/meta/conf/machine-sdk/i686.conf b/import-layers/yocto-poky/meta/conf/machine-sdk/i686.conf
index ffdb46131..fe406972c 100644
--- a/import-layers/yocto-poky/meta/conf/machine-sdk/i686.conf
+++ b/import-layers/yocto-poky/meta/conf/machine-sdk/i686.conf
@@ -1,2 +1,3 @@
SDK_ARCH = "i686"
SDK_CC_ARCH = "-march=i686"
+ABIEXTENSION_class-nativesdk = ""
diff --git a/import-layers/yocto-poky/meta/conf/machine-sdk/x86_64.conf b/import-layers/yocto-poky/meta/conf/machine-sdk/x86_64.conf
index 812d67c8d..61439b4fb 100644
--- a/import-layers/yocto-poky/meta/conf/machine-sdk/x86_64.conf
+++ b/import-layers/yocto-poky/meta/conf/machine-sdk/x86_64.conf
@@ -1 +1,2 @@
SDK_ARCH = "x86_64"
+ABIEXTENSION_class-nativesdk = ""
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/arm/arch-armv7ve.inc b/import-layers/yocto-poky/meta/conf/machine/include/arm/arch-armv7ve.inc
index 79e1ef655..e13156c17 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/arm/arch-armv7ve.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/arm/arch-armv7ve.inc
@@ -5,8 +5,7 @@ TUNECONFLICTS[armv7ve] = "armv4 armv5 armv6 armv7 armv7a"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', ' -march=armv7ve', '', d)}"
MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', 'armv7ve:', '' ,d)}"
-require conf/machine/include/arm/arch-armv6.inc
-require conf/machine/include/arm/feature-arm-neon.inc
+require conf/machine/include/arm/arch-armv7a.inc
# Little Endian base configs
AVAILTUNES += "armv7ve armv7vet armv7ve-vfpv3d16 armv7vet-vfpv3d16 armv7ve-vfpv3 armv7vet-vfpv3 armv7ve-neon armv7vet-neon armv7ve-neon-vfpv4 armv7vet-neon-vfpv4"
@@ -30,8 +29,8 @@ TUNE_FEATURES_tune-armv7ve-neon = "${TUNE_FEATURES_tune-armv7ve} neon"
TUNE_FEATURES_tune-armv7vet-neon = "${TUNE_FEATURES_tune-armv7vet} neon"
TUNE_FEATURES_tune-armv7ve-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon} vfpv4"
TUNE_FEATURES_tune-armv7vet-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon} vfpv4"
-PACKAGE_EXTRA_ARCHS_tune-armv7ve = "${PACKAGE_EXTRA_ARCHS_tune-armv6} armv7ve armv7ve-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7vet = "${PACKAGE_EXTRA_ARCHS_tune-armv6t} armv7ve armv7ve-vfp armv7vet2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7ve armv7ve-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vet = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7ve armv7ve-vfp armv7vet2-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} armv7ve-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vet-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} armv7ve-vfpv3d16 armv7vet2-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3d16} armv7ve-vfpv3"
@@ -63,8 +62,8 @@ TUNE_FEATURES_tune-armv7vehf-neon = "${TUNE_FEATURES_tune-armv7ve-neon}
TUNE_FEATURES_tune-armv7vethf-neon = "${TUNE_FEATURES_tune-armv7vet-neon} callconvention-hard"
TUNE_FEATURES_tune-armv7vehf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} callconvention-hard"
TUNE_FEATURES_tune-armv7vethf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} callconvention-hard"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf} armv7vehf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7vethf = "${PACKAGE_EXTRA_ARCHS_tune-armv6thf} armv7vehf-vfp armv7vet2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7vehf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7vehf-vfp armv7vet2hf-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} armv7vehf-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vethf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} armv7vehf-vfpv3d16 armv7vet2hf-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3d16} armv7vehf-vfpv3"
@@ -96,8 +95,8 @@ TUNE_FEATURES_tune-armv7veb-neon = "${TUNE_FEATURES_tune-armv7ve-neon}
TUNE_FEATURES_tune-armv7vetb-neon = "${TUNE_FEATURES_tune-armv7vet-neon} bigendian"
TUNE_FEATURES_tune-armv7veb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} bigendian"
TUNE_FEATURES_tune-armv7vetb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv7veb = "${PACKAGE_EXTRA_ARCHS_tune-armv6b} armv7veb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7vetb = "${PACKAGE_EXTRA_ARCHS_tune-armv6tb} armv7veb-vfp armv7vet2b-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7veb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vetb = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb} armv7veb-vfp armv7vet2b-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb} armv7veb-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vetb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb} armv7veb-vfpv3d16 armv7vet2b-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3d16} armv7veb-vfpv3"
@@ -129,8 +128,8 @@ TUNE_FEATURES_tune-armv7vehfb-neon = "${TUNE_FEATURES_tune-armv7vehf-neon
TUNE_FEATURES_tune-armv7vethfb-neon = "${TUNE_FEATURES_tune-armv7vethf-neon} bigendian"
TUNE_FEATURES_tune-armv7vehfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4} bigendian"
TUNE_FEATURES_tune-armv7vethfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv7vehfb = "${PACKAGE_EXTRA_ARCHS_tune-armv6hfb} armv7vehfb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7vethfb = "${PACKAGE_EXTRA_ARCHS_tune-armv6thfb} armv7vehfb-vfp armv7vet2hfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7vehfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethfb = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7vehfb-vfp armv7vet2hfb-vfp"
PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb} armv7vehfb-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb} armv7vehfb-vfpv3d16 armv7vet2hfb-vfpv3d16"
PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3d16} armv7vehfb-vfpv3"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-neon.inc b/import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-neon.inc
index 50d917522..b34af8e7c 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-neon.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-neon.inc
@@ -8,7 +8,7 @@ TUNEVALID[neon] = "Enable Neon SIMD accelerator unit."
TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'neon', ' neon', '', d)}"
TUNEVALID[vfpv3d16] = "Enable Vector Floating Point Version 3 with 16 registers (vfpv3-d16) unit."
-TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', ' vfpv3d16', '', d)}"
+TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', ' vfpv3-d16', '', d)}"
TUNEVALID[vfpv3] = "Enable Vector Floating Point Version 3 with 32 registers (vfpv3) unit."
TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3', ' vfpv3', '' , d)}"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-vfp.inc b/import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-vfp.inc
index 4247255c5..9ef31e70e 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-vfp.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/arm/feature-arm-vfp.inc
@@ -6,7 +6,7 @@ TUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit."
TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', ' vfp', '', d)}"
TUNE_CCARGS .= "${@ (' -mfpu=%s ' % d.getVar('TUNE_CCARGS_MFPU', True).split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else ''}"
-ARMPKGSFX_FPU = "${@ ('-%s' % d.getVar('TUNE_CCARGS_MFPU', True).split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else ''}"
+ARMPKGSFX_FPU = "${@ ('-%s' % d.getVar('TUNE_CCARGS_MFPU', True).split()[-1].replace('vfpv3-d16', 'vfpv3d16')) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else ''}"
TUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP."
TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else '' }"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/mips/README b/import-layers/yocto-poky/meta/conf/machine/include/mips/README
index c375f316d..62fa1561b 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/mips/README
+++ b/import-layers/yocto-poky/meta/conf/machine/include/mips/README
@@ -1,3 +1,6 @@
+2016/09/30 - Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
+ - Add Release 6 support
+
2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
- Initial Version
@@ -6,9 +9,14 @@ MIPS currently defines 12 ABIs. Combinations of:
*) Hardware/Software Floating Point
*) o32, n32, n64 ABI
+Release 6 of the ISA is a major revision and doesn't build up on previous
+releases of the ISA.
+
+For more details about tuples, check https://wiki.debian.org/Multiarch/Tuples
+
TUNE_ARCH, the GNU canonical arch, is defined as:
-mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}
+"mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
The package arch is defined in such a way to generated a standard naming
scheme. The scheme is: <mips variant>[-nf][-n32]
@@ -34,3 +42,12 @@ that the tune is using a non-floating point ABI.
MIPSPKGSFX_ABI - This is used to specify an alternative ABI when the previous
values are not enough to distringuish the package. "-n32" is added when
building for N32 ABI.
+
+MIPSPKGSFX_R6 - This is used to specify the presence of release 6.
+"r6" is added in the tuple for release 6 of the isa.
+
+MIPSPKGSFX_64R6 - This is used to specify "isa" in the tuple.
+Release 6 onwards we use "mipsisa64" instead of just "mips64".
+
+MIPSPKGSFX_32R6 - This is used to specify "isa32" in the tuple.
+Release 6 onwards we use "mipsisa32" instead of just "mips".
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/mips/arch-mips.inc b/import-layers/yocto-poky/meta/conf/machine/include/mips/arch-mips.inc
index 89d17e7c2..6069ca1ec 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/mips/arch-mips.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/mips/arch-mips.inc
@@ -20,6 +20,9 @@ TUNECONFLICTS[n32] = "o32 n64"
ABIEXTENSION .= "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'n32', '' ,d)}"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'n32', ' -mabi=n32', '', d)}"
+# user mode qemu doesn't support mips64 n32: "Invalid ELF image for this architecture"
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'n32', 'qemu-usermode', '', d)}"
+
TUNEVALID[n64] = "MIPS64 n64 ABI"
TUNECONFLICTS[n64] = "o32 n32"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'n64', ' -mabi=64', '', d)}"
@@ -29,14 +32,22 @@ TUNEVALID[fpu-hard] = "Use hardware FPU"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', ' -mhard-float', ' -msoft-float', d)}"
TARGET_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '', 'soft', d)}"
+# MIPS r6 ABI
+TUNEVALID[r6] = "Use r6"
+TUNEVALID[mipsisa64r6] = "Use 64r6"
+TUNEVALID[mipsisa32r6] = "Use 32r6"
+
# Package naming
MIPSPKGSFX_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el', d)}"
MIPSPKGSFX_BYTE = "${@bb.utils.contains('TUNE_FEATURES', 'n64' , '64', '', d)}"
MIPSPKGSFX_BYTE .= "${@bb.utils.contains('TUNE_FEATURES', 'n32' , '64', '', d)}"
MIPSPKGSFX_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard' , '', '-nf', d)}"
MIPSPKGSFX_ABI = "${@bb.utils.contains('TUNE_FEATURES', 'n32', '-n32', '', d)}"
+MIPSPKGSFX_R6 = "${@bb.utils.contains('TUNE_FEATURES', 'r6', 'r6', '', d)}"
+MIPSPKGSFX_64R6 = "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', 'isa', '', d)}"
+MIPSPKGSFX_32R6 = "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa32r6', 'isa32', '', d)}"
-TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
+TUNE_ARCH = "mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}"
TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
# Base tunes
@@ -100,3 +111,29 @@ TUNE_FEATURES_tune-mips64el-nf = "n64"
BASE_LIB_tune-mips64el-nf = "lib64"
MIPSPKGSFX_VARIANT_tune-mips64el-nf = "${TUNE_ARCH}"
PACKAGE_EXTRA_ARCHS_tune-mips64el-nf = "mips64el-nf"
+
+# MIPS 64 + o32
+AVAILTUNES += "mips64-o32 mips64el-o32"
+
+TUNE_FEATURES_tune-mips64-o32 = "o32 bigendian fpu-hard"
+BASE_LIB_tune-mips64-o32 = "lib"
+MIPSPKGSFX_VARIANT_tune-mips64-o32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64-o32 = "mips mips64-o32"
+
+TUNE_FEATURES_tune-mips64el-o32 = "o32 fpu-hard"
+BASE_LIB_tune-mips64el-o32 = "lib"
+MIPSPKGSFX_VARIANT_tune-mips64el-o32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el-o32 = "mipsel mips64el-o32 mips64el-o32"
+
+# MIPS 64 o32 and Soft Float
+AVAILTUNES += "mips64-nf-o32 mips64el-nf-o32"
+
+TUNE_FEATURES_tune-mips64-nf-o32 = "o32 bigendian"
+BASE_LIB_tune-mips64-nf-o32 = "lib"
+MIPSPKGSFX_VARIANT_tune-mips64-nf-o32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64-nf-o32 = "mips-nf mips64-nf-o32"
+
+TUNE_FEATURES_tune-mips64el-nf-o32 = "o32"
+BASE_LIB_tune-mips64el-nf-o32 = "lib"
+MIPSPKGSFX_VARIANT_tune-mips64el-nf-o32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64el-nf-o32 = "mipsel-nf mips64el-nf-o32"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/mips/feature-mips-mips16e.inc b/import-layers/yocto-poky/meta/conf/machine/include/mips/feature-mips-mips16e.inc
new file mode 100644
index 000000000..05011dec4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/mips/feature-mips-mips16e.inc
@@ -0,0 +1,17 @@
+TUNEVALID[mips16e] = "Build target packages with MIPS16e ASE instructions"
+MIPS_MIPS16E_OPT = "${@['mno-mips16', 'mips16'][d.getVar('MIPS_INSTRUCTION_SET', True) == 'mips16e']}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' -${MIPS_MIPS16E_OPT}', '', d)}"
+
+MIPSPKGSFX_MIPS16E .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', '-m16', '', d) if d.getVar('MIPS_MIPS16E_OPT', True) == 'mips16' else ''}"
+
+# Whether to compile with code to allow interworking between the two
+# instruction sets. This allows mips16e code to be executed on a primarily
+# mips32/64 system and vice versa. It is strongly recommended that DISTROs not
+# turn this off - the actual cost is very small.
+TUNEVALID[no-interlink-compressed] = "Disable mixing of standard and MIPS16e code"
+MIPS16_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-interlink-compressed', ' -mno-interlink-compressed', ' -minterlink-compressed', d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' ${MIPS16_TUNE_CCARGS}', '', d)}"
+OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ':mips16e', '', d)}"
+
+# show status (if compiling in MIPS16e mode)
+BUILDCFG_VARS += "${@['', 'MIPS_INSTRUCTION_SET'][d.getVar('MIPS_INSTRUCTION_SET', True) == 'mips16e']}"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/mips/tune-mips-24k.inc b/import-layers/yocto-poky/meta/conf/machine/include/mips/tune-mips-24k.inc
new file mode 100644
index 000000000..828acd42e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/mips/tune-mips-24k.inc
@@ -0,0 +1,51 @@
+DEFAULTTUNE ?= "mips32r2-24kc"
+
+MIPSPKGSFX_MIPS16E ??= ""
+
+require conf/machine/include/tune-mips32r2.inc
+require conf/machine/include/mips/feature-mips-mips16e.inc
+
+
+TUNEVALID[24kc] = "Enable MIPS 24Kc processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "24kc", " -mtune=24kc", "", d)}"
+TUNEVALID[24kec] = "Enable MIPS 24KEc processor optimizations, including DSP"
+TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "24kec", " -mtune=24kec -mdsp", "", d)}"
+
+
+AVAILTUNES += "mips32r2-24kc mips32r2-24kec mips32r2-24kec-m16"
+AVAILTUNES += "mips32r2el-24kc mips32r2el-24kec mips32r2el-24kec-m16"
+
+# big endian: kc, kc+dsp=kec, kc+dsp+mips16e=kec-m16
+TUNE_FEATURES_tune-mips32r2-24kc = "${TUNE_FEATURES_tune-mips32r2-nf} 24kc"
+TUNE_FEATURES_tune-mips32r2-24kec = "${TUNE_FEATURES_tune-mips32r2-nf} 24kec"
+TUNE_FEATURES_tune-mips32r2-24kec-m16 = "${TUNE_FEATURES_tune-mips32r2-24kec} mips16e"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2-24kc = "mips32r2-24kc"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kc = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-nf} mips32r2-24kc-nf"
+QEMU_EXTRAOPTIONS_mips32r2-24kc-nf = " -cpu 24Kc"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2-24kec = "mips32r2-24kec"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kec = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kc} mips32r2-24kec-nf"
+QEMU_EXTRAOPTIONS_mips32r2-24kec-nf = " -cpu 24KEc"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2-24kec-m16 = "mips32r2-24kec${MIPSPKGSFX_MIPS16E}"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kec-m16 = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kec} mips32r2-24kec-m16-nf"
+QEMU_EXTRAOPTIONS_mips32r2-24kec-m16-nf = " -cpu 24KEc"
+
+
+# little endian: kc, kc+dsp=kec, kc+dsp+mips16e=kec-m16
+TUNE_FEATURES_tune-mips32r2el-24kc = "${TUNE_FEATURES_tune-mips32r2el-nf} 24kc"
+TUNE_FEATURES_tune-mips32r2el-24kec = "${TUNE_FEATURES_tune-mips32r2el-nf} 24kec"
+TUNE_FEATURES_tune-mips32r2el-24kec-m16 = "${TUNE_FEATURES_tune-mips32r2el-24kec} mips16e"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2el-24kc = "mips32r2el-24kc"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kc = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-nf} mips32r2el-24kc-nf"
+QEMU_EXTRAOPTIONS_mips32r2el-24kc-nf = " -cpu 24Kc"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2el-24kec = "mips32r2el-24kec"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kec = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kc} mips32r2el-24kec-nf"
+QEMU_EXTRAOPTIONS_mips32r2el-24kec-nf = " -cpu 24KEc"
+
+MIPSPKGSFX_VARIANT_tune-mips32r2el-24kec-m16 = "mips32r2el-24kec${MIPSPKGSFX_MIPS16E}"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kec-m16 = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kec} mips32r2el-24kec-m16-nf"
+QEMU_EXTRAOPTIONS_mips32r2el-24kec-m16-nf = " -cpu 24KEc"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc64.inc b/import-layers/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc64.inc
index 49419b6e0..f751c6b76 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc64.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc64.inc
@@ -7,6 +7,9 @@ TUNECONFLICTS[m64] = "m32 nf"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', ' -m64', '', d)}"
TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', [ 'm64' ], 'powerpc64', '', d)}"
+# user mode qemu doesn't support ppc64
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'm64', 'qemu-usermode', '', d)}"
+
AVAILTUNES += "powerpc64"
TUNE_FEATURES_tune-powerpc64 = "m64 fpu-hard"
BASE_LIB_tune-powerpc64 = "lib64"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc b/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc
index f44dbe658..2bc4dc2db 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc
@@ -29,3 +29,5 @@ EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
MACHINE_EXTRA_RRECOMMENDS += "rng-tools"
+
+IMAGE_CLASSES += "qemuboot"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/qemuboot-mips.inc b/import-layers/yocto-poky/meta/conf/machine/include/qemuboot-mips.inc
new file mode 100644
index 000000000..0c60cf297
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/qemuboot-mips.inc
@@ -0,0 +1,8 @@
+# For runqemu
+IMAGE_CLASSES += "qemuboot"
+QB_MEM = "-m 256"
+QB_MACHINE = "-machine malta"
+QB_KERNEL_CMDLINE_APPEND = "console=ttyS0 console=tty"
+# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
+QB_OPT_APPEND = "-vga cirrus -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
+QB_SYSTEM_NAME = "qemu-system-${TUNE_ARCH}"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/qemuboot-x86.inc b/import-layers/yocto-poky/meta/conf/machine/include/qemuboot-x86.inc
new file mode 100644
index 000000000..06ac983d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/qemuboot-x86.inc
@@ -0,0 +1,15 @@
+# For runqemu
+IMAGE_CLASSES += "qemuboot"
+QB_SYSTEM_NAME_x86 = "qemu-system-i386"
+QB_CPU_x86 = "-cpu qemu32"
+QB_CPU_KVM_x86 = "-cpu kvm32"
+
+QB_SYSTEM_NAME_x86-64 = "qemu-system-x86_64"
+QB_CPU_x86-64 = "-cpu core2duo"
+QB_CPU_KVM_x86-64 = "-cpu kvm64"
+
+QB_AUDIO_DRV = "alsa"
+QB_AUDIO_OPT = "-soundhw ac97,es1370"
+QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1"
+# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
+QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-mips32r2.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-mips32r2.inc
index 0e95ec852..5e398cbe7 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/tune-mips32r2.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-mips32r2.inc
@@ -6,6 +6,7 @@ TUNEVALID[mips32r2] = "Enable mips32r2 specific processor optimizations"
TUNECONFLICTS[mips32r2] = "n64 n32"
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', ' -march=mips32r2', '', d)}"
+# hard float
AVAILTUNES += "mips32r2 mips32r2el"
TUNE_FEATURES_tune-mips32r2 = "${TUNE_FEATURES_tune-mips} mips32r2"
@@ -15,3 +16,14 @@ PACKAGE_EXTRA_ARCHS_tune-mips32r2 = "mips mips32 mips32r2"
TUNE_FEATURES_tune-mips32r2el = "${TUNE_FEATURES_tune-mipsel} mips32r2"
MIPSPKGSFX_VARIANT_tune-mips32r2el = "mips32r2el"
PACKAGE_EXTRA_ARCHS_tune-mips32r2el = "mipsel mips32el mips32r2el"
+
+# soft float
+AVAILTUNES += "mips32r2-nf mips32r2el-nf"
+
+TUNE_FEATURES_tune-mips32r2-nf = "${TUNE_FEATURES_tune-mips-nf} mips32r2"
+MIPSPKGSFX_VARIANT_tune-mips32r2-nf = "mips32r2"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2-nf = "mips-nf mips32-nf mips32r2-nf"
+
+TUNE_FEATURES_tune-mips32r2el-nf = "${TUNE_FEATURES_tune-mipsel-nf} mips32r2"
+MIPSPKGSFX_VARIANT_tune-mips32r2el-nf = "mips32r2el"
+PACKAGE_EXTRA_ARCHS_tune-mips32r2el-nf = "mipsel-nf mips32el-nf mips32r2el-nf"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-mips32r6.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-mips32r6.inc
new file mode 100644
index 000000000..47213198c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-mips32r6.inc
@@ -0,0 +1,29 @@
+DEFAULTTUNE ?= "mipsisa32r6el"
+
+require conf/machine/include/mips/arch-mips.inc
+
+TUNEVALID[mipsisa32r6] = "Enable mipsisa32r6 specific processor optimizations"
+TUNECONFLICTS[mipsisa32r6] = "n64 n32"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa32r6', ' -march=mips32r6', '', d)}"
+
+# Base Tunes
+AVAILTUNES += "mipsisa32r6 mipsisa32r6el"
+
+TUNE_FEATURES_tune-mipsisa32r6 = "bigendian mipsisa32r6 fpu-hard r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa32r6 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6 = "mipsisa32r6"
+
+TUNE_FEATURES_tune-mipsisa32r6el = "fpu-hard mipsisa32r6 r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa32r6el = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6el = "mipsisa32r6el"
+
+# Soft Float
+AVAILTUNES += "mipsisa32r6-nf mipsisa32r6el-nf"
+
+TUNE_FEATURES_tune-mipsisa32r6-nf = "bigendian mipsisa32r6 r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa32r6-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6-nf = "mipsisa32r6-nf"
+
+TUNE_FEATURES_tune-mipsisa32r6el-nf = "mipsisa32r6 r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa32r6el-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa32r6el-nf = "mipsisa32r6el-nf"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-mips64r2.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-mips64r2.inc
new file mode 100644
index 000000000..75d7535ad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-mips64r2.inc
@@ -0,0 +1,84 @@
+DEFAULTTUNE ?= "mips64r2"
+
+require conf/machine/include/tune-mips64.inc
+
+TUNEVALID[mips64r2] = "Enable mips64r2 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips64r2', ' -march=mips64r2', '', d)}"
+
+# Base tunes
+AVAILTUNES += "mips64r2 mips64r2el"
+
+TUNE_FEATURES_tune-mips64r2 = "${TUNE_FEATURES_tune-mips64} mips64r2"
+BASE_LIB_tune-mips64r2 = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64r2 = "mips64r2"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2 = "mips64 mips64r2"
+
+TUNE_FEATURES_tune-mips64r2el = "${TUNE_FEATURES_tune-mips64el} mips64r2"
+BASE_LIB_tune-mips64r2el = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64r2el = "mips64r2el"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2el = "mips64el mips64r2el"
+
+# MIPS 64r2 Soft Float
+AVAILTUNES += "mips64r2-nf mips64r2el-nf"
+
+TUNE_FEATURES_tune-mips64r2-nf = "${TUNE_FEATURES_tune-mips64-nf} mips64r2"
+BASE_LIB_tune-mips64r2-nf = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64r2-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2-nf = "mips64-nf mips64r2-nf"
+
+TUNE_FEATURES_tune-mips64r2el-nf = "${TUNE_FEATURES_tune-mips64el-nf} mips64r2"
+BASE_LIB_tune-mips64r2el-nf = "lib64"
+MIPSPKGSFX_VARIANT_tune-mips64r2el-nf = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2el-nf = "mips64el-nf mips64r2el-nf"
+
+# MIPS 64r2 n32
+AVAILTUNES += "mips64r2-n32 mips64r2el-n32"
+
+TUNE_FEATURES_tune-mips64r2-n32 = "${TUNE_FEATURES_tune-mips64-n32} mips64r2"
+BASE_LIB_tune-mips64r2-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64r2-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2-n32 = "mips64-n32 mips64r2-n32"
+
+TUNE_FEATURES_tune-mips64r2el-n32 = "${TUNE_FEATURES_tune-mips64el-n32} mips64r2"
+BASE_LIB_tune-mips64r2el-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64r2el-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2el-n32 = "mips64el-n32 mips64r2el-n32"
+
+# MIPS 64r2 n32 and Soft Float
+AVAILTUNES += "mips64r2-nf-n32 mips64r2el-nf-n32"
+
+TUNE_FEATURES_tune-mips64r2-nf-n32 = "${TUNE_FEATURES_tune-mips64-nf-n32} mips64r2"
+BASE_LIB_tune-mips64r2-nf-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64r2-nf-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2-nf-n32 = "mips64-nf-n32 mips64r2-nf-n32"
+
+TUNE_FEATURES_tune-mips64r2el-nf-n32 = "${TUNE_FEATURES_tune-mips64el-nf-n32} mips64r2"
+BASE_LIB_tune-mips64r2el-nf-n32 = "lib32"
+MIPSPKGSFX_VARIANT_tune-mips64r2el-nf-n32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2el-nf-n32 = "mips64el-nf-n32 mips64r2el-nf-n32"
+
+# MIPS 64r2 o32
+AVAILTUNES += "mips64r2-o32 mips64r2el-o32"
+
+TUNE_FEATURES_tune-mips64r2-o32 = "${TUNE_FEATURES_tune-mips64-o32} mips64r2"
+BASE_LIB_tune-mips64r2-o32 = "lib"
+MIPSPKGSFX_VARIANT_tune-mips64r2-o32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2-o32 = "mips mips64-o32 mips64r2-o32"
+
+TUNE_FEATURES_tune-mips64r2el-o32 = "${TUNE_FEATURES_tune-mips64el-o32} mips64r2"
+BASE_LIB_tune-mips64r2el-o32 = "lib"
+MIPSPKGSFX_VARIANT_tune-mips64r2el-o32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2el-o32 = "mipsel mips64el-o32 mips64r2el-o32"
+
+# MIPS 64r2 o32 and Soft Float
+AVAILTUNES += "mips64r2-nf-o32 mips64r2el-nf-o32"
+
+TUNE_FEATURES_tune-mips64r2-nf-o32 = "${TUNE_FEATURES_tune-mips64-nf-o32} mips64r2"
+BASE_LIB_tune-mips64r2-nf-o32 = "lib"
+MIPSPKGSFX_VARIANT_tune-mips64r2-nf-o32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2-nf-o32 = "mips-nf mips64r2-nf-o32"
+
+TUNE_FEATURES_tune-mips64r2el-nf-o32 = "${TUNE_FEATURES_tune-mips64el-nf-o32} mips64r2"
+BASE_LIB_tune-mips64r2el-nf-o32 = "lib"
+MIPSPKGSFX_VARIANT_tune-mips64r2el-nf-o32 = "${TUNE_ARCH}"
+PACKAGE_EXTRA_ARCHS_tune-mips64r2el-nf-o32 = "mipsel-nf mips64r2el-nf-o32"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-mips64r6.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-mips64r6.inc
new file mode 100644
index 000000000..f0ad56468
--- /dev/null
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-mips64r6.inc
@@ -0,0 +1,32 @@
+DEFAULTTUNE ?= "mipsisa64r6el"
+
+require conf/machine/include/mips/arch-mips.inc
+
+TUNEVALID[mipsisa64r6] = "Enable mipsisa64r6 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', ' -march=mips64r6', '', d)}"
+
+# Base Tunes
+AVAILTUNES += "mipsisa64r6 mipsisa64r6el"
+
+TUNE_FEATURES_tune-mipsisa64r6 = "bigendian fpu-hard n64 mipsisa64r6 r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6 = "${TUNE_ARCH}"
+BASE_LIB_tune-mipsisa64r6 = "lib64"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6 = "mipsisa64r6"
+
+TUNE_FEATURES_tune-mipsisa64r6el = "fpu-hard r6 n64 mipsisa64r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6el = "${TUNE_ARCH}"
+BASE_LIB_tune-mipsisa64r6el = "lib64"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6el = "mipsisa64r6el"
+
+# Soft Float
+AVAILTUNES += "mipsisa64r6-nf mipsisa64r6el-nf"
+
+TUNE_FEATURES_tune-mipsisa64r6-nf = "bigendian r6 n64 mipsisa64r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6-nf = "${TUNE_ARCH}"
+BASE_LIB_tune-mipsisa64r6-nf = "lib64"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6-nf = "mipsisa64r6"
+
+TUNE_FEATURES_tune-mipsisa64r6el-nf = "r6 n64 mipsisa64r6"
+MIPSPKGSFX_VARIANT_tune-mipsisa64r6el-nf = "${TUNE_ARCH}"
+BASE_LIB_tune-mipsisa64r6el-nf = "lib64"
+PACKAGE_EXTRA_ARCHS_tune-mipsisa64r6el-nf = "mipsisa64r6el-nf"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce500mc.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce500mc.inc
index a1ca9be4f..bc26a0f87 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce500mc.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce500mc.inc
@@ -12,3 +12,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppce500mc = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppce50
# glibc configure options to get e500mc specific library (for sqrt)
GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'ppce500mc', '-with-cpu=e500mc', '', d)}"
+
+# pass -mcpu=e500mc for ppce500mc kernel cross compile
+TARGET_CC_KERNEL_ARCH = "-mcpu=e500mc"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce5500.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce5500.inc
index ace26146a..cebb24406 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce5500.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce5500.inc
@@ -18,3 +18,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e5500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc
# glibc configure options to get e5500 specific library (for sqrt)
GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'e5500', '--with-cpu=e5500', '', d)}"
+
+# QEMU usermode fails with invalid instruction error (YOCTO: #10304)
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e5500', ' qemu-usermode', '', d)}"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce6500.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce6500.inc
index da1e864e5..5db7e760c 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce6500.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-ppce6500.inc
@@ -19,3 +19,6 @@ PACKAGE_EXTRA_ARCHS_tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc
# glibc configure options to get e6500 specific library
GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}"
GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}"
+
+# QEMU usermode fails with invalid instruction error (YOCTO: #10304)
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'e6500', ' qemu-usermode', '', d)}"
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc b/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc
index 5663145be..479e89e54 100644
--- a/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc
+++ b/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc
@@ -20,7 +20,7 @@ SERIAL_CONSOLE ?= "115200 ttyS0"
# kernel-related variables
#
PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ??= "4.4%"
+PREFERRED_VERSION_linux-yocto ??= "4.8%"
#
# XSERVER subcomponents, used to build the XSERVER variable
diff --git a/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf b/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf
index cdad03fc4..17402ef3b 100644
--- a/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf
+++ b/import-layers/yocto-poky/meta/conf/machine/qemuarm.conf
@@ -10,3 +10,11 @@ KERNEL_IMAGETYPE = "zImage"
SERIAL_CONSOLES = "115200;ttyAMA0 115200;ttyAMA1"
+# For runqemu
+QB_SYSTEM_NAME = "qemu-system-arm"
+QB_MACHINE = "-machine versatilepb"
+QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 console=tty"
+# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
+QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
+PREFERRED_VERSION_linux-yocto ??= "4.8%"
+QB_DTB = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 'zImage-versatile-pb.dtb', d)}"
diff --git a/import-layers/yocto-poky/meta/conf/machine/qemuarm64.conf b/import-layers/yocto-poky/meta/conf/machine/qemuarm64.conf
index f59fb15c5..d0750624a 100644
--- a/import-layers/yocto-poky/meta/conf/machine/qemuarm64.conf
+++ b/import-layers/yocto-poky/meta/conf/machine/qemuarm64.conf
@@ -8,3 +8,17 @@ require conf/machine/include/qemu.inc
KERNEL_IMAGETYPE = "Image"
SERIAL_CONSOLES = "38400;ttyAMA0 38400;hvc0"
+
+# For runqemu
+QB_SYSTEM_NAME = "qemu-system-aarch64"
+QB_MEM = "-m 512"
+QB_MACHINE = "-machine virt"
+QB_CPU = "-cpu cortex-a57"
+QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,38400"
+# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
+QB_OPT_APPEND = "-show-cursor -device virtio-rng-pci"
+QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-device,netdev=net0,mac=@MAC@"
+QB_SLIRP_OPT = "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
+QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
+QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon"
+QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
diff --git a/import-layers/yocto-poky/meta/conf/machine/qemumips.conf b/import-layers/yocto-poky/meta/conf/machine/qemumips.conf
index fbf813740..3182ea1b5 100644
--- a/import-layers/yocto-poky/meta/conf/machine/qemumips.conf
+++ b/import-layers/yocto-poky/meta/conf/machine/qemumips.conf
@@ -4,6 +4,7 @@
require conf/machine/include/qemu.inc
require conf/machine/include/tune-mips32r2.inc
+require conf/machine/include/qemuboot-mips.inc
KERNEL_IMAGETYPE = "vmlinux"
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
diff --git a/import-layers/yocto-poky/meta/conf/machine/qemumips64.conf b/import-layers/yocto-poky/meta/conf/machine/qemumips64.conf
index 8c3f1fe28..9529f4c4f 100644
--- a/import-layers/yocto-poky/meta/conf/machine/qemumips64.conf
+++ b/import-layers/yocto-poky/meta/conf/machine/qemumips64.conf
@@ -4,6 +4,7 @@
require conf/machine/include/qemu.inc
require conf/machine/include/tune-mips64.inc
+require conf/machine/include/qemuboot-mips.inc
KERNEL_IMAGETYPE = "vmlinux"
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
diff --git a/import-layers/yocto-poky/meta/conf/machine/qemuppc.conf b/import-layers/yocto-poky/meta/conf/machine/qemuppc.conf
index bf0038ddb..8703c2086 100644
--- a/import-layers/yocto-poky/meta/conf/machine/qemuppc.conf
+++ b/import-layers/yocto-poky/meta/conf/machine/qemuppc.conf
@@ -11,3 +11,11 @@ KERNEL_IMAGETYPE = "vmlinux"
SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
+# For runqemu
+QB_SYSTEM_NAME = "qemu-system-ppc"
+QB_MACHINE = "-machine mac99"
+QB_CPU = "-cpu G4"
+QB_KERNEL_CMDLINE_APPEND = "console=tty console=ttyS0"
+# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
+QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
+QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-pci,netdev=net0,mac=@MAC@"
diff --git a/import-layers/yocto-poky/meta/conf/machine/qemux86-64.conf b/import-layers/yocto-poky/meta/conf/machine/qemux86-64.conf
index 489194aa6..b191ddd3c 100644
--- a/import-layers/yocto-poky/meta/conf/machine/qemux86-64.conf
+++ b/import-layers/yocto-poky/meta/conf/machine/qemux86-64.conf
@@ -10,6 +10,7 @@ PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
require conf/machine/include/qemu.inc
DEFAULTTUNE ?= "core2-64"
require conf/machine/include/tune-core2.inc
+require conf/machine/include/qemuboot-x86.inc
KERNEL_IMAGETYPE = "bzImage"
@@ -22,7 +23,10 @@ XSERVER = "xserver-xorg \
xf86-input-evdev \
xf86-video-cirrus \
xf86-video-fbdev \
- xf86-video-vmware"
+ xf86-video-vmware \
+ xf86-video-modesetting \
+ xserver-xorg-module-libint10 \
+ "
MACHINE_FEATURES += "x86"
diff --git a/import-layers/yocto-poky/meta/conf/machine/qemux86.conf b/import-layers/yocto-poky/meta/conf/machine/qemux86.conf
index 3cc809158..8555fd6bf 100644
--- a/import-layers/yocto-poky/meta/conf/machine/qemux86.conf
+++ b/import-layers/yocto-poky/meta/conf/machine/qemux86.conf
@@ -9,6 +9,7 @@ PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
require conf/machine/include/qemu.inc
require conf/machine/include/tune-i586.inc
+require conf/machine/include/qemuboot-x86.inc
KERNEL_IMAGETYPE = "bzImage"
@@ -21,7 +22,10 @@ XSERVER = "xserver-xorg \
xf86-input-evdev \
xf86-video-cirrus \
xf86-video-fbdev \
- xf86-video-vmware"
+ xf86-video-vmware \
+ xf86-video-modesetting \
+ xserver-xorg-module-libint10 \
+ "
MACHINE_FEATURES += "x86"
diff --git a/import-layers/yocto-poky/meta/conf/multilib.conf b/import-layers/yocto-poky/meta/conf/multilib.conf
index 50303fb5d..1403a034a 100644
--- a/import-layers/yocto-poky/meta/conf/multilib.conf
+++ b/import-layers/yocto-poky/meta/conf/multilib.conf
@@ -24,4 +24,5 @@ OPKG_ARGS_append = " --force-maintainer --force-overwrite"
# inside the multilib sysroot. Fix this by explicitly adding the MACHINE's
# architecture-independent pkgconfig location to PKG_CONFIG_PATH.
PKG_CONFIG_PATH .= ":${STAGING_DIR}/${MACHINE}${datadir}/pkgconfig"
-PKG_CONFIG_PATH[vardepsexclude] = "MACHINE"
+PKG_CONFIG_PATH[vardepsexclude] = "MACHINE datadir STAGING_DIR"
+PKG_CONFIG_PATH[vardepvalueexclude] = ":${STAGING_DIR}/${MACHINE}${datadir}/pkgconfig"
diff --git a/import-layers/yocto-poky/meta/conf/sanity.conf b/import-layers/yocto-poky/meta/conf/sanity.conf
index 7021bf929..dcf60b74d 100644
--- a/import-layers/yocto-poky/meta/conf/sanity.conf
+++ b/import-layers/yocto-poky/meta/conf/sanity.conf
@@ -3,7 +3,7 @@
# See sanity.bbclass
#
# Expert users can confirm their sanity with "touch conf/sanity.conf"
-BB_MIN_VERSION = "1.29.1"
+BB_MIN_VERSION = "1.31.2"
SANITY_ABIFILE = "${TMPDIR}/abi_version"
diff --git a/import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/blacklist b/import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/blacklist
deleted file mode 100644
index 5fdb8f2b9..000000000
--- a/import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/blacklist
+++ /dev/null
@@ -1,6 +0,0 @@
-libneon27-gnutls
-openjdk-6-jre-headless
-openjdk-6-jre-lib
-openjdk-6-jre
-libdbus-1-3
-libneon27-gnutls
diff --git a/import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/filters b/import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/filters
deleted file mode 100644
index a447f70e9..000000000
--- a/import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/filters
+++ /dev/null
@@ -1,7 +0,0 @@
-/usr/local/lib/python2.6
-/usr/lib/python2.6
-/usr/lib/pymodules/python2.6
-/usr/lib/perl/5.10
-# which is part of the debianutils packages, but we don't want to put the entire
-# debianutils package in the whitelist.
-/usr/bin/which
diff --git a/import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/whitelist b/import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/whitelist
deleted file mode 100644
index f0fe9633d..000000000
--- a/import-layers/yocto-poky/meta/conf/swabber/Ubuntu-10.04.1-64/whitelist
+++ /dev/null
@@ -1,23 +0,0 @@
-base-files
-dash
-libacl1
-libattr1
-libbz2-1.0
-libc6
-libc-bin
-libglib2.0-0
-libncurses5
-libselinux1
-libsqlite3-0
-libssl0.9.8
-mime-support
-perl-base
-python2.6
-python2.6-minimal
-python-apport
-python-gst0.10
-python-imaging
-python-minimal
-python-support
-python-zope.interface
-zlib1g
diff --git a/import-layers/yocto-poky/meta/conf/swabber/generic/blacklist b/import-layers/yocto-poky/meta/conf/swabber/generic/blacklist
deleted file mode 100644
index 396bcb4bf..000000000
--- a/import-layers/yocto-poky/meta/conf/swabber/generic/blacklist
+++ /dev/null
@@ -1,2 +0,0 @@
-udev
-dkpg
diff --git a/import-layers/yocto-poky/meta/conf/swabber/generic/filters b/import-layers/yocto-poky/meta/conf/swabber/generic/filters
deleted file mode 100644
index 3b10fcb37..000000000
--- a/import-layers/yocto-poky/meta/conf/swabber/generic/filters
+++ /dev/null
@@ -1,10 +0,0 @@
-/tmp
-/etc/localtime
-/etc/ld.so.cache
-/etc/ld.so.conf
-/etc/passwd
-/etc/group
-/etc/nsswitch.conf
-/proc
-/dev/null
-/dev/tty
diff --git a/import-layers/yocto-poky/meta/conf/swabber/generic/whitelist b/import-layers/yocto-poky/meta/conf/swabber/generic/whitelist
deleted file mode 100644
index 48ec2af2c..000000000
--- a/import-layers/yocto-poky/meta/conf/swabber/generic/whitelist
+++ /dev/null
@@ -1,15 +0,0 @@
-bash
-bzip2
-ccache
-coreutils
-cpp
-file
-findutils
-gawk
-grep
-hostname
-make
-sed
-tar
-util-linux
-zlib1g
diff --git a/import-layers/yocto-poky/meta/conf/toasterconf.json b/import-layers/yocto-poky/meta/conf/toasterconf.json
index c27880e10..796125bbf 100644
--- a/import-layers/yocto-poky/meta/conf/toasterconf.json
+++ b/import-layers/yocto-poky/meta/conf/toasterconf.json
@@ -13,7 +13,7 @@
"name": "Local OpenEmbedded",
"sourcetype": "local",
"apiurl": "../../",
- "branches": ["HEAD", "master", "jethro", "krogoth"],
+ "branches": ["HEAD", "master"],
"layers": [
{
"name": "openembedded-core",
@@ -27,13 +27,13 @@
"name": "OpenEmbedded",
"sourcetype": "layerindex",
"apiurl": "http://layers.openembedded.org/layerindex/api/",
- "branches": ["master", "jethro", "krogoth"]
+ "branches": ["master"]
},
{
"name": "Imported layers",
"sourcetype": "imported",
"apiurl": "",
- "branches": ["master", "jethro", "krogoth", "HEAD"]
+ "branches": ["master", "HEAD"]
}
],
@@ -45,18 +45,6 @@
"dirpath": ""
},
{
- "name": "jethro",
- "giturl": "git://git.openembedded.org/bitbake",
- "branch": "1.28",
- "dirpath": ""
- },
- {
- "name": "krogoth",
- "giturl": "git://git.openembedded.org/bitbake",
- "branch": "1.30",
- "dirpath": ""
- },
- {
"name": "HEAD",
"giturl": "git://git.openembedded.org/bitbake",
"branch": "HEAD",
@@ -77,24 +65,6 @@
"helptext": "Toaster will run your builds using the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/\">OpenEmbedded master</a> branch, where active development takes place. This is not a stable branch, so your builds might not work as expected."
},
{
- "name": "jethro",
- "description": "OpenEmbedded Jethro",
- "bitbake": "jethro",
- "branch": "jethro",
- "defaultlayers": [ "openembedded-core" ],
- "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" : 0 },
- "helptext": "Toaster will run your builds with the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=jethro\">OpenEmbedded \"Jethro\"</a> branch"
- },
- {
- "name": "krogoth",
- "description": "OpenEmbedded Krogoth",
- "bitbake": "krogoth",
- "branch": "krogoth",
- "defaultlayers": [ "openembedded-core" ],
- "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" : 0 },
- "helptext": "Toaster will run your builds with the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=krogoth\">OpenEmbedded \"Krogoth\"</a> branch"
- },
- {
"name": "local",
"description": "Local OpenEmbedded",
"bitbake": "HEAD",
diff --git a/import-layers/yocto-poky/meta/files/ext-sdk-prepare.py b/import-layers/yocto-poky/meta/files/ext-sdk-prepare.py
index 605e2ebef..78c1d1630 100644
--- a/import-layers/yocto-poky/meta/files/ext-sdk-prepare.py
+++ b/import-layers/yocto-poky/meta/files/ext-sdk-prepare.py
@@ -5,93 +5,62 @@
import sys
import os
import subprocess
+import signal
-def exec_watch(cmd, **options):
- """Run program with stdout shown on sys.stdout"""
- if isinstance(cmd, basestring) and not "shell" in options:
- options["shell"] = True
+def reenable_sigint():
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
- process = subprocess.Popen(
- cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **options
- )
-
- buf = ''
- while True:
- out = process.stdout.read(1)
- if out:
- sys.stdout.write(out)
- sys.stdout.flush()
- buf += out
- elif out == '' and process.poll() != None:
- break
-
- return process.returncode, buf
+def run_command_interruptible(cmd):
+ """
+ Run a command with output displayed on the console, but ensure any Ctrl+C is
+ processed only by the child process.
+ """
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
+ try:
+ ret = subprocess.call(cmd, shell=True, preexec_fn=reenable_sigint)
+ finally:
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
+ return ret
-def check_unexpected(lines, recipes):
- """Check for unexpected output lines from dry run"""
- unexpected = []
- for line in lines.splitlines():
- if 'Running task' in line:
- for recipe in recipes:
- if recipe in line:
- break
- else:
- line = line.split('Running', 1)[-1]
- if 'do_rm_work' not in line:
- unexpected.append(line.rstrip())
- elif 'Running setscene' in line:
- unexpected.append(line.rstrip())
- return unexpected
+def get_last_consolelog():
+ '''Return the most recent console log file'''
+ logdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'tmp', 'log', 'cooker')
+ if os.path.exists(logdir):
+ mcdir = os.listdir(logdir)
+ if mcdir:
+ logdir = os.path.join(logdir, mcdir[0])
+ logfiles = [os.path.join(logdir, fn) for fn in os.listdir(logdir)]
+ logfiles.sort(key=os.path.getmtime)
+ if logfiles:
+ return os.path.join(logdir, logfiles[-1])
+ return None
def main():
if len(sys.argv) < 2:
+ print('Please specify output log file')
+ return 1
+ logfile = sys.argv[1]
+ if len(sys.argv) < 3:
sdk_targets = []
else:
- sdk_targets = ' '.join(sys.argv[1:]).split()
+ sdk_targets = ' '.join(sys.argv[2:]).split()
if not sdk_targets:
# Just do a parse so the cache is primed
- ret, _ = exec_watch('bitbake -p')
- return ret
-
- print('Preparing SDK for %s...' % ', '.join(sdk_targets))
-
- ret, out = exec_watch('bitbake %s --setscene-only' % ' '.join(sdk_targets))
- if ret:
+ ret = run_command_interruptible('bitbake -p --quiet')
return ret
- targetlist = []
- for target in sdk_targets:
- if ':' in target:
- target = target.split(':')[0]
- if not target in targetlist:
- targetlist.append(target)
-
- recipes = []
- for target in targetlist:
- try:
- out = subprocess.check_output(('bitbake -e %s' % target).split(), stderr=subprocess.STDOUT)
- for line in out.splitlines():
- if line.startswith('FILE='):
- splitval = line.rstrip().split('=')
- if len(splitval) > 1:
- recipes.append(splitval[1].strip('"'))
- break
- except subprocess.CalledProcessError as e:
- print('ERROR: Failed to get recipe for target %s:\n%s' % (target, e.output))
- return 1
-
- try:
- out = subprocess.check_output('bitbake %s -n' % ' '.join(sdk_targets), stderr=subprocess.STDOUT, shell=True)
- unexpected = check_unexpected(out, recipes)
- except subprocess.CalledProcessError as e:
- print('ERROR: Failed to execute dry-run:\n%s' % e.output)
- return 1
+ with open(logfile, 'a') as logf:
+ logf.write('Preparing SDK for %s...\n' % ', '.join(sdk_targets))
- if unexpected:
- print('ERROR: Unexpected tasks or setscene left over to be executed:')
- for line in unexpected:
- print(' ' + line)
- return 1
+ ret = run_command_interruptible('BB_SETSCENE_ENFORCE=1 bitbake --quiet %s' % ' '.join(sdk_targets))
+ lastlog = get_last_consolelog()
+ if lastlog:
+ with open(lastlog, 'r') as f:
+ for line in f:
+ logf.write(line)
+ if ret:
+ print('ERROR: SDK preparation failed: error log written to %s' % logfile)
+ return ret
if __name__ == "__main__":
try:
diff --git a/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh b/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh
index 397be1119..9295ddc86 100644
--- a/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh
+++ b/import-layers/yocto-poky/meta/files/toolchain-shar-extract.sh
@@ -1,6 +1,8 @@
#!/bin/sh
[ -z "$ENVCLEANED" ] && exec /usr/bin/env -i ENVCLEANED=1 HOME="$HOME" \
+ LC_ALL=en_US.UTF-8 \
+ TERM=$TERM \
http_proxy="$http_proxy" https_proxy="$https_proxy" ftp_proxy="$ftp_proxy" \
no_proxy="$no_proxy" all_proxy="$all_proxy" GIT_PROXY_COMMAND="$GIT_PROXY_COMMAND" "$0" "$@"
[ -f /etc/environment ] && . /etc/environment
@@ -26,7 +28,7 @@ fi
if [ "$INST_ARCH" != "$SDK_ARCH" ]; then
# Allow for installation of ix86 SDK on x86_64 host
if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then
- echo "Error: Installation machine not supported!"
+ echo "Error: Incompatible SDK installer! Your host is $INST_ARCH and this SDK was built for $SDK_ARCH hosts."
exit 1
fi
fi
@@ -45,7 +47,8 @@ relocate=1
savescripts=0
verbose=0
publish=0
-while getopts ":yd:npDRS" OPT; do
+listcontents=0
+while getopts ":yd:npDRSl" OPT; do
case $OPT in
y)
answer="Y"
@@ -70,6 +73,9 @@ while getopts ":yd:npDRS" OPT; do
S)
savescripts=1
;;
+ l)
+ listcontents=1
+ ;;
*)
echo "Usage: $(basename $0) [-y] [-d <dir>]"
echo " -y Automatic yes to all prompts"
@@ -81,11 +87,18 @@ while getopts ":yd:npDRS" OPT; do
echo " -S Save relocation scripts"
echo " -R Do not relocate executables"
echo " -D use set -x to see what is going on"
+ echo " -l list files that will be extracted"
exit 1
;;
esac
done
+payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
+if [ "$listcontents" = "1" ] ; then
+ tail -n +$payload_offset $0| tar tvJ || exit 1
+ exit
+fi
+
titlestr="@SDK_TITLE@ installer version @SDK_VERSION@"
printf "%s\n" "$titlestr"
printf "%${#titlestr}s\n" | tr " " "="
@@ -130,6 +143,16 @@ if [ "$SDK_EXTENSIBLE" = "1" ]; then
"characters such as spaces, @, \$ or +. Abort!"
exit 1
fi
+ # The build system doesn't work well with /tmp on NFS
+ fs_dev_path="$target_sdk_dir"
+ while [ ! -d "$fs_dev_path" ] ; do
+ fs_dev_path=`dirname $fs_dev_path`
+ done
+ fs_dev_type=`stat -f -c '%t' "$fs_dev_path"`
+ if [ "$fsdevtype" = "6969" ] ; then
+ echo "The target directory path $target_sdk_dir is on NFS, this is not possible. Abort!"
+ exit 1
+ fi
else
if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then
echo "The target directory path ($target_sdk_dir) contains spaces. Abort!"
@@ -185,8 +208,6 @@ if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; the
$SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1
fi
-payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
-
printf "Extracting SDK..."
tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
echo "done"
diff --git a/import-layers/yocto-poky/meta/files/toolchain-shar-relocate.sh b/import-layers/yocto-poky/meta/files/toolchain-shar-relocate.sh
index d4bcf0e55..e3c10018e 100644
--- a/import-layers/yocto-poky/meta/files/toolchain-shar-relocate.sh
+++ b/import-layers/yocto-poky/meta/files/toolchain-shar-relocate.sh
@@ -1,3 +1,8 @@
+if ! xargs --version > /dev/null 2>&1; then
+ echo "xargs is required by the relocation script, please install it first. Abort!"
+ exit 1
+fi
+
# fix dynamic loader paths in all ELF SDK binaries
native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
@@ -7,6 +12,10 @@ if [ "$dl_path" = "" ] ; then
fi
executable_files=$($SUDO_EXEC find $native_sysroot -type f \
\( -perm -0100 -o -perm -0010 -o -perm -0001 \) -printf "'%h/%f' ")
+if [ "x$executable_files" = "x" ]; then
+ echo "SDK relocate failed, could not get executalbe files"
+ exit 1
+fi
tdir=`mktemp -d`
if [ x$tdir = x ] ; then
@@ -14,7 +23,7 @@ if [ x$tdir = x ] ; then
exit 1
fi
cat <<EOF >> $tdir/relocate_sdk.sh
-#!/bin/bash
+#!/bin/sh
for py in python python2 python3
do
PYTHON=\`which \${py} 2>/dev/null\`
@@ -53,9 +62,18 @@ done | xargs -n100 file | grep ":.*\(ASCII\|script\|source\).*text" | \
-e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \
-e "s: /usr/bin/perl: /usr/bin/env perl:g"
+if [ $? -ne 0 ]; then
+ echo "Failed to replace perl. Relocate script failed. Abort!"
+ exit 1
+fi
+
# change all symlinks pointing to @SDKPATH@
for l in $($SUDO_EXEC find $native_sysroot -type l); do
$SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
+ if [ $? -ne 0 ]; then
+ echo "Failed to setup symlinks. Relocate script failed. Abort!"
+ exit 1
+ fi
done
echo done
diff --git a/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py b/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py
index 5395c768a..b6c0265c1 100644
--- a/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py
+++ b/import-layers/yocto-poky/meta/lib/oe/buildhistory_analysis.py
@@ -62,7 +62,7 @@ class ChangeRecord:
def pkglist_combine(depver):
pkglist = []
- for k,v in depver.iteritems():
+ for k,v in depver.items():
if v:
pkglist.append("%s (%s)" % (k,v))
else:
@@ -190,7 +190,7 @@ class FileChange:
def blob_to_dict(blob):
- alines = blob.data_stream.read().splitlines()
+ alines = [line for line in blob.data_stream.read().decode('utf-8').splitlines()]
adict = {}
for line in alines:
splitv = [i.strip() for i in line.split('=',1)]
@@ -220,7 +220,7 @@ def compare_file_lists(alines, blines):
adict = file_list_to_dict(alines)
bdict = file_list_to_dict(blines)
filechanges = []
- for path, splitv in adict.iteritems():
+ for path, splitv in adict.items():
newsplitv = bdict.pop(path, None)
if newsplitv:
# Check type
@@ -359,6 +359,24 @@ def compare_dict_blobs(path, ablob, bblob, report_all, report_ver):
if ' '.join(alist) == ' '.join(blist):
continue
+ if key == 'PKGR' and not report_all:
+ vers = []
+ # strip leading 'r' and dots
+ for ver in (astr.split()[0], bstr.split()[0]):
+ if ver.startswith('r'):
+ ver = ver[1:]
+ vers.append(ver.replace('.', ''))
+ maxlen = max(len(vers[0]), len(vers[1]))
+ try:
+ # pad with '0' and convert to int
+ vers = [int(ver.ljust(maxlen, '0')) for ver in vers]
+ except ValueError:
+ pass
+ else:
+ # skip decrements and increments
+ if abs(vers[0] - vers[1]) == 1:
+ continue
+
chg = ChangeRecord(path, key, astr, bstr, monitored)
changes.append(chg)
return changes
@@ -378,34 +396,34 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
if filename == 'latest':
changes.extend(compare_dict_blobs(path, d.a_blob, d.b_blob, report_all, report_ver))
elif filename.startswith('latest.'):
- chg = ChangeRecord(path, filename, d.a_blob.data_stream.read(), d.b_blob.data_stream.read(), True)
+ chg = ChangeRecord(path, filename, d.a_blob.data_stream.read().decode('utf-8'), d.b_blob.data_stream.read().decode('utf-8'), True)
changes.append(chg)
elif path.startswith('images/'):
filename = os.path.basename(d.a_blob.path)
if filename in img_monitor_files:
if filename == 'files-in-image.txt':
- alines = d.a_blob.data_stream.read().splitlines()
- blines = d.b_blob.data_stream.read().splitlines()
+ alines = d.a_blob.data_stream.read().decode('utf-8').splitlines()
+ blines = d.b_blob.data_stream.read().decode('utf-8').splitlines()
filechanges = compare_file_lists(alines,blines)
if filechanges:
chg = ChangeRecord(path, filename, None, None, True)
chg.filechanges = filechanges
changes.append(chg)
elif filename == 'installed-package-names.txt':
- alines = d.a_blob.data_stream.read().splitlines()
- blines = d.b_blob.data_stream.read().splitlines()
+ alines = d.a_blob.data_stream.read().decode('utf-8').splitlines()
+ blines = d.b_blob.data_stream.read().decode('utf-8').splitlines()
filechanges = compare_lists(alines,blines)
if filechanges:
chg = ChangeRecord(path, filename, None, None, True)
chg.filechanges = filechanges
changes.append(chg)
else:
- chg = ChangeRecord(path, filename, d.a_blob.data_stream.read(), d.b_blob.data_stream.read(), True)
+ chg = ChangeRecord(path, filename, d.a_blob.data_stream.read().decode('utf-8'), d.b_blob.data_stream.read().decode('utf-8'), True)
changes.append(chg)
elif filename == 'image-info.txt':
changes.extend(compare_dict_blobs(path, d.a_blob, d.b_blob, report_all, report_ver))
elif '/image-files/' in path:
- chg = ChangeRecord(path, filename, d.a_blob.data_stream.read(), d.b_blob.data_stream.read(), True)
+ chg = ChangeRecord(path, filename, d.a_blob.data_stream.read().decode('utf-8'), d.b_blob.data_stream.read().decode('utf-8'), True)
changes.append(chg)
# Look for added preinst/postinst/prerm/postrm
@@ -419,7 +437,7 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
if filename == 'latest':
addedpkgs.append(path)
elif filename.startswith('latest.'):
- chg = ChangeRecord(path, filename[7:], '', d.b_blob.data_stream.read(), True)
+ chg = ChangeRecord(path, filename[7:], '', d.b_blob.data_stream.read().decode('utf-8'), True)
addedchanges.append(chg)
for chg in addedchanges:
found = False
@@ -436,7 +454,7 @@ def process_changes(repopath, revision1, revision2='HEAD', report_all=False, rep
if path.startswith('packages/'):
filename = os.path.basename(d.a_blob.path)
if filename != 'latest' and filename.startswith('latest.'):
- chg = ChangeRecord(path, filename[7:], d.a_blob.data_stream.read(), '', True)
+ chg = ChangeRecord(path, filename[7:], d.a_blob.data_stream.read().decode('utf-8'), '', True)
changes.append(chg)
# Link related changes
diff --git a/import-layers/yocto-poky/meta/lib/oe/classextend.py b/import-layers/yocto-poky/meta/lib/oe/classextend.py
index 5107ecde2..4c8a00070 100644
--- a/import-layers/yocto-poky/meta/lib/oe/classextend.py
+++ b/import-layers/yocto-poky/meta/lib/oe/classextend.py
@@ -1,3 +1,5 @@
+import collections
+
class ClassExtender(object):
def __init__(self, extname, d):
self.extname = extname
@@ -77,7 +79,7 @@ class ClassExtender(object):
self.d.setVar("EXTENDPKGV", orig)
return
deps = bb.utils.explode_dep_versions2(deps)
- newdeps = {}
+ newdeps = collections.OrderedDict()
for dep in deps:
newdeps[self.map_depends(dep)] = deps[dep]
diff --git a/import-layers/yocto-poky/meta/lib/oe/classutils.py b/import-layers/yocto-poky/meta/lib/oe/classutils.py
index 58188fdd6..e7856c86f 100644
--- a/import-layers/yocto-poky/meta/lib/oe/classutils.py
+++ b/import-layers/yocto-poky/meta/lib/oe/classutils.py
@@ -1,4 +1,11 @@
-class ClassRegistry(type):
+
+class ClassRegistryMeta(type):
+ """Give each ClassRegistry their own registry"""
+ def __init__(cls, name, bases, attrs):
+ cls.registry = {}
+ type.__init__(cls, name, bases, attrs)
+
+class ClassRegistry(type, metaclass=ClassRegistryMeta):
"""Maintain a registry of classes, indexed by name.
Note that this implementation requires that the names be unique, as it uses
@@ -12,12 +19,6 @@ Subclasses of ClassRegistry may define an 'implemented' property to exert
control over whether the class will be added to the registry (e.g. to keep
abstract base classes out of the registry)."""
priority = 0
- class __metaclass__(type):
- """Give each ClassRegistry their own registry"""
- def __init__(cls, name, bases, attrs):
- cls.registry = {}
- type.__init__(cls, name, bases, attrs)
-
def __init__(cls, name, bases, attrs):
super(ClassRegistry, cls).__init__(name, bases, attrs)
try:
@@ -34,7 +35,7 @@ abstract base classes out of the registry)."""
@classmethod
def prioritized(tcls):
- return sorted(tcls.registry.values(),
+ return sorted(list(tcls.registry.values()),
key=lambda v: v.priority, reverse=True)
def unregister(cls):
diff --git a/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py b/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py
index 7b9a0ee06..afaff6859 100644
--- a/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py
+++ b/import-layers/yocto-poky/meta/lib/oe/copy_buildsystem.py
@@ -17,7 +17,7 @@ class BuildSystem(object):
def __init__(self, context, d):
self.d = d
self.context = context
- self.layerdirs = d.getVar('BBLAYERS', True).split()
+ self.layerdirs = [os.path.abspath(pth) for pth in d.getVar('BBLAYERS', True).split()]
self.layers_exclude = (d.getVar('SDK_LAYERS_EXCLUDE', True) or "").split()
def copy_bitbake_and_layers(self, destdir, workspace_name=None):
@@ -26,7 +26,7 @@ class BuildSystem(object):
bb.utils.mkdirhier(destdir)
layers = list(self.layerdirs)
- corebase = self.d.getVar('COREBASE', True)
+ corebase = os.path.abspath(self.d.getVar('COREBASE', True))
layers.append(corebase)
# Exclude layers
@@ -124,7 +124,7 @@ class BuildSystem(object):
def generate_locked_sigs(sigfile, d):
bb.utils.mkdirhier(os.path.dirname(sigfile))
depd = d.getVar('BB_TASKDEPDATA', False)
- tasks = ['%s.%s' % (v[2], v[1]) for v in depd.itervalues()]
+ tasks = ['%s.%s' % (v[2], v[1]) for v in depd.values()]
bb.parse.siggen.dump_lockedsigs(sigfile, tasks)
def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output):
@@ -145,7 +145,7 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output
invalue = True
f.write(line)
-def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output):
+def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output=None):
merged = {}
arch_order = []
with open(lockedsigs_main, 'r') as f:
@@ -195,23 +195,46 @@ def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_outpu
fulltypes.append(typename)
f.write('SIGGEN_LOCKEDSIGS_TYPES = "%s"\n' % ' '.join(fulltypes))
- write_sigs_file(copy_output, tocopy.keys(), tocopy)
+ if copy_output:
+ write_sigs_file(copy_output, list(tocopy.keys()), tocopy)
if merged_output:
write_sigs_file(merged_output, arch_order, merged)
-def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring=""):
+def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring="", filterfile=None):
+ import shutil
bb.note('Generating sstate-cache...')
nativelsbstring = d.getVar('NATIVELSBSTRING', True)
- bb.process.run("gen-lockedsig-cache %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring))
- if fixedlsbstring:
+ bb.process.run("gen-lockedsig-cache %s %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring, filterfile or ''))
+ if fixedlsbstring and nativelsbstring != fixedlsbstring:
nativedir = output_sstate_cache + '/' + nativelsbstring
if os.path.isdir(nativedir):
destdir = os.path.join(output_sstate_cache, fixedlsbstring)
- bb.utils.mkdirhier(destdir)
+ for root, _, files in os.walk(nativedir):
+ for fn in files:
+ src = os.path.join(root, fn)
+ dest = os.path.join(destdir, os.path.relpath(src, nativedir))
+ if os.path.exists(dest):
+ # Already exists, and it'll be the same file, so just delete it
+ os.unlink(src)
+ else:
+ bb.utils.mkdirhier(os.path.dirname(dest))
+ shutil.move(src, dest)
+
+def check_sstate_task_list(d, targets, filteroutfile, cmdprefix='', cwd=None, logfile=None):
+ import subprocess
- dirlist = os.listdir(nativedir)
- for i in dirlist:
- src = os.path.join(nativedir, i)
- dest = os.path.join(destdir, i)
- os.rename(src, dest)
+ bb.note('Generating sstate task list...')
+
+ if not cwd:
+ cwd = os.getcwd()
+ if logfile:
+ logparam = '-l %s' % logfile
+ else:
+ logparam = ''
+ cmd = "%sBB_SETSCENE_ENFORCE=1 PSEUDO_DISABLED=1 oe-check-sstate %s -s -o %s %s" % (cmdprefix, targets, filteroutfile, logparam)
+ env = dict(d.getVar('BB_ORIGENV', False))
+ env.pop('BUILDDIR', '')
+ pathitems = env['PATH'].split(':')
+ env['PATH'] = ':'.join([item for item in pathitems if not item.endswith('/bitbake/bin')])
+ bb.process.run(cmd, stderr=subprocess.STDOUT, env=env, cwd=cwd, executable='/bin/bash')
diff --git a/import-layers/yocto-poky/meta/lib/oe/data.py b/import-layers/yocto-poky/meta/lib/oe/data.py
index e49572177..ee48950a8 100644
--- a/import-layers/yocto-poky/meta/lib/oe/data.py
+++ b/import-layers/yocto-poky/meta/lib/oe/data.py
@@ -7,11 +7,11 @@ def typed_value(key, d):
flags = d.getVarFlags(key)
if flags is not None:
flags = dict((flag, d.expand(value))
- for flag, value in flags.iteritems())
+ for flag, value in list(flags.items()))
else:
flags = {}
try:
return oe.maketype.create(d.getVar(key, True) or '', var_type, **flags)
- except (TypeError, ValueError), exc:
+ except (TypeError, ValueError) as exc:
bb.msg.fatal("Data", "%s: %s" % (key, str(exc)))
diff --git a/import-layers/yocto-poky/meta/lib/oe/distro_check.py b/import-layers/yocto-poky/meta/lib/oe/distro_check.py
index 8655a6fc1..87c52fae9 100644
--- a/import-layers/yocto-poky/meta/lib/oe/distro_check.py
+++ b/import-layers/yocto-poky/meta/lib/oe/distro_check.py
@@ -1,53 +1,35 @@
from contextlib import contextmanager
-@contextmanager
+
+from bb.utils import export_proxies
+
def create_socket(url, d):
import urllib
- socket = urllib.urlopen(url, proxies=get_proxies(d))
+
+ socket = None
try:
- yield socket
- finally:
- socket.close()
+ export_proxies(d)
+ socket = urllib.request.urlopen(url)
+ except:
+ bb.warn("distro_check: create_socket url %s can't access" % url)
-def get_proxies(d):
- proxies = {}
- for key in ['http', 'https', 'ftp', 'ftps', 'no', 'all']:
- proxy = d.getVar(key + '_proxy', True)
- if proxy:
- proxies[key] = proxy
- return proxies
+ return socket
def get_links_from_url(url, d):
"Return all the href links found on the web location"
- import sgmllib
-
- class LinksParser(sgmllib.SGMLParser):
- def parse(self, s):
- "Parse the given string 's'."
- self.feed(s)
- self.close()
-
- def __init__(self, verbose=0):
- "Initialise an object passing 'verbose' to the superclass."
- sgmllib.SGMLParser.__init__(self, verbose)
- self.hyperlinks = []
-
- def start_a(self, attributes):
- "Process a hyperlink and its 'attributes'."
- for name, value in attributes:
- if name == "href":
- self.hyperlinks.append(value.strip('/'))
-
- def get_hyperlinks(self):
- "Return the list of hyperlinks."
- return self.hyperlinks
+ from bs4 import BeautifulSoup, SoupStrainer
+
+ hyperlinks = []
- with create_socket(url,d) as sock:
+ webpage = ''
+ sock = create_socket(url,d)
+ if sock:
webpage = sock.read()
- linksparser = LinksParser()
- linksparser.parse(webpage)
- return linksparser.get_hyperlinks()
+ soup = BeautifulSoup(webpage, "html.parser", parse_only=SoupStrainer("a"))
+ for line in soup.find_all('a', href=True):
+ hyperlinks.append(line['href'].strip('/'))
+ return hyperlinks
def find_latest_numeric_release(url, d):
"Find the latest listed numeric release on the given url"
@@ -104,8 +86,8 @@ def get_source_package_list_from_url(url, section, d):
bb.note("Reading %s: %s" % (url, section))
links = get_links_from_url(url, d)
- srpms = filter(is_src_rpm, links)
- names_list = map(package_name_from_srpm, srpms)
+ srpms = list(filter(is_src_rpm, links))
+ names_list = list(map(package_name_from_srpm, srpms))
new_pkgs = []
for pkgs in names_list:
@@ -162,14 +144,18 @@ def find_latest_debian_release(url, d):
def get_debian_style_source_package_list(url, section, d):
"Return the list of package-names stored in the debian style Sources.gz file"
- with create_socket(url,d) as sock:
- webpage = sock.read()
- import tempfile
- tmpfile = tempfile.NamedTemporaryFile(mode='wb', prefix='oecore.', suffix='.tmp', delete=False)
- tmpfilename=tmpfile.name
- tmpfile.write(sock.read())
- tmpfile.close()
+ import tempfile
import gzip
+
+ webpage = ''
+ sock = create_socket(url,d)
+ if sock:
+ webpage = sock.read()
+
+ tmpfile = tempfile.NamedTemporaryFile(mode='wb', prefix='oecore.', suffix='.tmp', delete=False)
+ tmpfilename=tmpfile.name
+ tmpfile.write(sock.read())
+ tmpfile.close()
bb.note("Reading %s: %s" % (url, section))
f = gzip.open(tmpfilename)
@@ -266,9 +252,9 @@ def update_distro_data(distro_check_dir, datetime, d):
import fcntl
try:
if not os.path.exists(datetime_file):
- open(datetime_file, 'w+b').close() # touch the file so that the next open won't fail
+ open(datetime_file, 'w+').close() # touch the file so that the next open won't fail
- f = open(datetime_file, "r+b")
+ f = open(datetime_file, "r+")
fcntl.lockf(f, fcntl.LOCK_EX)
saved_datetime = f.read()
if saved_datetime[0:8] != datetime[0:8]:
@@ -357,8 +343,8 @@ def compare_in_distro_packages_list(distro_check_dir, d):
if tmp != None:
- list = tmp.split(' ')
- for item in list:
+ list = tmp.split(' ')
+ for item in list:
matching_distros.append(item)
bb.note("Matching: %s" % matching_distros)
return matching_distros
diff --git a/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py b/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py
index b83ee8672..38eb0cb13 100644
--- a/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py
+++ b/import-layers/yocto-poky/meta/lib/oe/gpg_sign.py
@@ -71,11 +71,11 @@ class LocalSigner(object):
passphrase = fobj.readline();
job = subprocess.Popen(cmd, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
- (_, stderr) = job.communicate(passphrase)
+ (_, stderr) = job.communicate(passphrase.encode("utf-8"))
if job.returncode:
raise bb.build.FuncFailed("GPG exited with code %d: %s" %
- (job.returncode, stderr))
+ (job.returncode, stderr.decode("utf-8")))
except IOError as e:
bb.error("IO error (%s): %s" % (e.errno, e.strerror))
@@ -90,7 +90,7 @@ class LocalSigner(object):
"""Return the gpg version"""
import subprocess
try:
- return subprocess.check_output((self.gpg_bin, "--version")).split()[2]
+ return subprocess.check_output((self.gpg_bin, "--version")).split()[2].decode("utf-8")
except subprocess.CalledProcessError as e:
raise bb.build.FuncFailed("Could not get gpg version: %s" % e)
@@ -113,4 +113,3 @@ def get_signer(d, backend):
return LocalSigner(d)
else:
bb.fatal("Unsupported signing backend '%s'" % backend)
-
diff --git a/import-layers/yocto-poky/meta/lib/oe/license.py b/import-layers/yocto-poky/meta/lib/oe/license.py
index f0f661c3b..8d2fd1709 100644
--- a/import-layers/yocto-poky/meta/lib/oe/license.py
+++ b/import-layers/yocto-poky/meta/lib/oe/license.py
@@ -47,7 +47,7 @@ class LicenseVisitor(ast.NodeVisitor):
"""Get elements based on OpenEmbedded license strings"""
def get_elements(self, licensestr):
new_elements = []
- elements = filter(lambda x: x.strip(), license_operator.split(licensestr))
+ elements = list([x for x in license_operator.split(licensestr) if x.strip()])
for pos, element in enumerate(elements):
if license_pattern.match(element):
if pos > 0 and license_pattern.match(elements[pos-1]):
@@ -118,8 +118,8 @@ def is_included(licensestr, whitelist=None, blacklist=None):
def choose_licenses(alpha, beta):
"""Select the option in an OR which is the 'best' (has the most
included licenses)."""
- alpha_weight = len(filter(include_license, alpha))
- beta_weight = len(filter(include_license, beta))
+ alpha_weight = len(list(filter(include_license, alpha)))
+ beta_weight = len(list(filter(include_license, beta)))
if alpha_weight > beta_weight:
return alpha
else:
@@ -132,8 +132,8 @@ def is_included(licensestr, whitelist=None, blacklist=None):
blacklist = []
licenses = flattened_licenses(licensestr, choose_licenses)
- excluded = filter(lambda lic: exclude_license(lic), licenses)
- included = filter(lambda lic: include_license(lic), licenses)
+ excluded = [lic for lic in licenses if exclude_license(lic)]
+ included = [lic for lic in licenses if include_license(lic)]
if excluded:
return False, excluded
else:
@@ -215,3 +215,21 @@ def manifest_licenses(licensestr, dont_want_licenses, canonical_license, d):
manifest.licensestr = manifest.licensestr.replace('[', '(').replace(']', ')')
return (manifest.licensestr, manifest.licenses)
+
+class ListVisitor(LicenseVisitor):
+ """Record all different licenses found in the license string"""
+ def __init__(self):
+ self.licenses = set()
+
+ def visit_Str(self, node):
+ self.licenses.add(node.s)
+
+def list_licenses(licensestr):
+ """Simply get a list of all licenses mentioned in a license string.
+ Binary operators are not applied or taken into account in any way"""
+ visitor = ListVisitor()
+ try:
+ visitor.visit_string(licensestr)
+ except SyntaxError as exc:
+ raise LicenseSyntaxError(licensestr, exc)
+ return visitor.licenses
diff --git a/import-layers/yocto-poky/meta/lib/oe/maketype.py b/import-layers/yocto-poky/meta/lib/oe/maketype.py
index 139f33369..f88981dd9 100644
--- a/import-layers/yocto-poky/meta/lib/oe/maketype.py
+++ b/import-layers/yocto-poky/meta/lib/oe/maketype.py
@@ -6,7 +6,8 @@ the arguments of the type's factory for details.
"""
import inspect
-import types
+import oe.types as types
+import collections
available_types = {}
@@ -53,7 +54,9 @@ def get_callable_args(obj):
if type(obj) is type:
obj = obj.__init__
- args, varargs, keywords, defaults = inspect.getargspec(obj)
+ sig = inspect.signature(obj)
+ args = list(sig.parameters.keys())
+ defaults = list(s for s in sig.parameters.keys() if sig.parameters[s].default != inspect.Parameter.empty)
flaglist = []
if args:
if len(args) > 1 and args[0] == 'self':
@@ -93,7 +96,7 @@ for name in dir(types):
continue
obj = getattr(types, name)
- if not callable(obj):
+ if not isinstance(obj, collections.Callable):
continue
register(name, obj)
diff --git a/import-layers/yocto-poky/meta/lib/oe/manifest.py b/import-layers/yocto-poky/meta/lib/oe/manifest.py
index 42832f15d..95f8eb2df 100644
--- a/import-layers/yocto-poky/meta/lib/oe/manifest.py
+++ b/import-layers/yocto-poky/meta/lib/oe/manifest.py
@@ -4,11 +4,10 @@ import re
import bb
-class Manifest(object):
+class Manifest(object, metaclass=ABCMeta):
"""
This is an abstract class. Do not instantiate this directly.
"""
- __metaclass__ = ABCMeta
PKG_TYPE_MUST_INSTALL = "mip"
PKG_TYPE_MULTILIB = "mlp"
@@ -219,7 +218,7 @@ class RpmManifest(Manifest):
if var in self.vars_to_split:
split_pkgs = self._split_multilib(self.d.getVar(var, True))
if split_pkgs is not None:
- pkgs = dict(pkgs.items() + split_pkgs.items())
+ pkgs = dict(list(pkgs.items()) + list(split_pkgs.items()))
else:
pkg_list = self.d.getVar(var, True)
if pkg_list is not None:
@@ -269,7 +268,7 @@ class OpkgManifest(Manifest):
if var in self.vars_to_split:
split_pkgs = self._split_multilib(self.d.getVar(var, True))
if split_pkgs is not None:
- pkgs = dict(pkgs.items() + split_pkgs.items())
+ pkgs = dict(list(pkgs.items()) + list(split_pkgs.items()))
else:
pkg_list = self.d.getVar(var, True)
if pkg_list is not None:
diff --git a/import-layers/yocto-poky/meta/lib/oe/package.py b/import-layers/yocto-poky/meta/lib/oe/package.py
index 288768954..02642f29f 100644
--- a/import-layers/yocto-poky/meta/lib/oe/package.py
+++ b/import-layers/yocto-poky/meta/lib/oe/package.py
@@ -8,7 +8,7 @@ def runstrip(arg):
# 8 - shared library
# 16 - kernel module
- import commands, stat, subprocess
+ import stat, subprocess
(file, elftype, strip) = arg
@@ -64,8 +64,8 @@ def filedeprunner(arg):
def process_deps(pipe, pkg, pkgdest, provides, requires):
for line in pipe:
- f = line.split(" ", 1)[0].strip()
- line = line.split(" ", 1)[1].strip()
+ f = line.decode("utf-8").split(" ", 1)[0].strip()
+ line = line.decode("utf-8").split(" ", 1)[1].strip()
if line.startswith("Requires:"):
i = requires
@@ -114,7 +114,12 @@ def read_shlib_providers(d):
m = list_re.match(file)
if m:
dep_pkg = m.group(1)
- fd = open(os.path.join(dir, file))
+ try:
+ fd = open(os.path.join(dir, file))
+ except IOError:
+ # During a build unrelated shlib files may be deleted, so
+ # handle files disappearing between the listdirs and open.
+ continue
lines = fd.readlines()
fd.close()
for l in lines:
@@ -149,7 +154,7 @@ def npm_split_package_dirs(pkgdir):
if os.path.exists(pkgfile):
with open(pkgfile, 'r') as f:
data = json.loads(f.read())
- packages[pkgname] = (relpth, data)
+ packages[pkgname] = (relpth, data)
# We want the main package for a module sorted *after* its subpackages
# (so that it doesn't otherwise steal the files for the subpackage), so
# this is a cheap way to do that whilst still having an otherwise
diff --git a/import-layers/yocto-poky/meta/lib/oe/package_manager.py b/import-layers/yocto-poky/meta/lib/oe/package_manager.py
index b4b359a8c..3cee9730a 100644
--- a/import-layers/yocto-poky/meta/lib/oe/package_manager.py
+++ b/import-layers/yocto-poky/meta/lib/oe/package_manager.py
@@ -5,9 +5,11 @@ import subprocess
import shutil
import multiprocessing
import re
+import collections
import bb
import tempfile
import oe.utils
+import oe.path
import string
from oe.gpg_sign import get_signer
@@ -17,20 +19,79 @@ def create_index(arg):
try:
bb.note("Executing '%s' ..." % index_cmd)
- result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True)
+ result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
except subprocess.CalledProcessError as e:
return("Index creation command '%s' failed with return code %d:\n%s" %
- (e.cmd, e.returncode, e.output))
+ (e.cmd, e.returncode, e.output.decode("utf-8")))
if result:
bb.note(result)
return None
-
-class Indexer(object):
- __metaclass__ = ABCMeta
-
+"""
+This method parse the output from the package managerand return
+a dictionary with the information of the packages. This is used
+when the packages are in deb or ipk format.
+"""
+def opkg_query(cmd_output):
+ verregex = re.compile(' \([=<>]* [^ )]*\)')
+ output = dict()
+ pkg = ""
+ arch = ""
+ ver = ""
+ filename = ""
+ dep = []
+ pkgarch = ""
+ for line in cmd_output.splitlines():
+ line = line.rstrip()
+ if ':' in line:
+ if line.startswith("Package: "):
+ pkg = line.split(": ")[1]
+ elif line.startswith("Architecture: "):
+ arch = line.split(": ")[1]
+ elif line.startswith("Version: "):
+ ver = line.split(": ")[1]
+ elif line.startswith("File: ") or line.startswith("Filename:"):
+ filename = line.split(": ")[1]
+ if "/" in filename:
+ filename = os.path.basename(filename)
+ elif line.startswith("Depends: "):
+ depends = verregex.sub('', line.split(": ")[1])
+ for depend in depends.split(", "):
+ dep.append(depend)
+ elif line.startswith("Recommends: "):
+ recommends = verregex.sub('', line.split(": ")[1])
+ for recommend in recommends.split(", "):
+ dep.append("%s [REC]" % recommend)
+ elif line.startswith("PackageArch: "):
+ pkgarch = line.split(": ")[1]
+
+ # When there is a blank line save the package information
+ elif not line:
+ # IPK doesn't include the filename
+ if not filename:
+ filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
+ if pkg:
+ output[pkg] = {"arch":arch, "ver":ver,
+ "filename":filename, "deps": dep, "pkgarch":pkgarch }
+ pkg = ""
+ arch = ""
+ ver = ""
+ filename = ""
+ dep = []
+ pkgarch = ""
+
+ if pkg:
+ if not filename:
+ filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
+ output[pkg] = {"arch":arch, "ver":ver,
+ "filename":filename, "deps": dep }
+
+ return output
+
+
+class Indexer(object, metaclass=ABCMeta):
def __init__(self, d, deploy_dir):
self.d = d
self.deploy_dir = deploy_dir
@@ -42,13 +103,8 @@ class Indexer(object):
class RpmIndexer(Indexer):
def get_ml_prefix_and_os_list(self, arch_var=None, os_var=None):
- package_archs = {
- 'default': [],
- }
-
- target_os = {
- 'default': "",
- }
+ package_archs = collections.OrderedDict()
+ target_os = collections.OrderedDict()
if arch_var is not None and os_var is not None:
package_archs['default'] = self.d.getVar(arch_var, True).split()
@@ -79,7 +135,7 @@ class RpmIndexer(Indexer):
target_os[eext[1]] = localdata.getVar("TARGET_OS",
True).strip()
- ml_prefix_list = dict()
+ ml_prefix_list = collections.OrderedDict()
for mlib in package_archs:
if mlib == 'default':
ml_prefix_list[mlib] = package_archs[mlib]
@@ -281,9 +337,7 @@ class DpkgIndexer(Indexer):
-class PkgsList(object):
- __metaclass__ = ABCMeta
-
+class PkgsList(object, metaclass=ABCMeta):
def __init__(self, d, rootfs_dir):
self.d = d
self.rootfs_dir = rootfs_dir
@@ -293,57 +347,6 @@ class PkgsList(object):
pass
- """
- This method parse the output from the package manager
- and return a dictionary with the information of the
- installed packages. This is used whne the packages are
- in deb or ipk format
- """
- def opkg_query(self, cmd_output):
- verregex = re.compile(' \([=<>]* [^ )]*\)')
- output = dict()
- filename = ""
- dep = []
- pkg = ""
- for line in cmd_output.splitlines():
- line = line.rstrip()
- if ':' in line:
- if line.startswith("Package: "):
- pkg = line.split(": ")[1]
- elif line.startswith("Architecture: "):
- arch = line.split(": ")[1]
- elif line.startswith("Version: "):
- ver = line.split(": ")[1]
- elif line.startswith("File: "):
- filename = line.split(": ")[1]
- elif line.startswith("Depends: "):
- depends = verregex.sub('', line.split(": ")[1])
- for depend in depends.split(", "):
- dep.append(depend)
- elif line.startswith("Recommends: "):
- recommends = verregex.sub('', line.split(": ")[1])
- for recommend in recommends.split(", "):
- dep.append("%s [REC]" % recommend)
- else:
- # IPK doesn't include the filename
- if not filename:
- filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
- if pkg:
- output[pkg] = {"arch":arch, "ver":ver,
- "filename":filename, "deps": dep }
- pkg = ""
- filename = ""
- dep = []
-
- if pkg:
- if not filename:
- filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
- output[pkg] = {"arch":arch, "ver":ver,
- "filename":filename, "deps": dep }
-
- return output
-
-
class RpmPkgsList(PkgsList):
def __init__(self, d, rootfs_dir, arch_var=None, os_var=None):
super(RpmPkgsList, self).__init__(d, rootfs_dir)
@@ -357,10 +360,10 @@ class RpmPkgsList(PkgsList):
# Determine rpm version
cmd = "%s --version" % self.rpm_cmd
try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Getting rpm version failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
'''
Translate the RPM/Smart format names to the OE multilib format names
@@ -401,10 +404,10 @@ class RpmPkgsList(PkgsList):
"-t", self.image_rpmlib]
try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip()
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Cannot get the package dependencies. Command '%s' "
- "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
return output
@@ -415,10 +418,10 @@ class RpmPkgsList(PkgsList):
try:
# bb.note(cmd)
- tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip()
+ tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Cannot get the installed packages list. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
output = dict()
deps = dict()
@@ -475,11 +478,13 @@ class OpkgPkgsList(PkgsList):
# output streams separately and check for empty stderr.
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
cmd_output, cmd_stderr = p.communicate()
+ cmd_output = cmd_output.decode("utf-8")
+ cmd_stderr = cmd_stderr.decode("utf-8")
if p.returncode or cmd_stderr:
bb.fatal("Cannot get the installed packages list. Command '%s' "
"returned %d and stderr:\n%s" % (cmd, p.returncode, cmd_stderr))
- return self.opkg_query(cmd_output)
+ return opkg_query(cmd_output)
class DpkgPkgsList(PkgsList):
@@ -492,19 +497,18 @@ class DpkgPkgsList(PkgsList):
cmd.append("-f=Package: ${Package}\nArchitecture: ${PackageArch}\nVersion: ${Version}\nFile: ${Package}_${Version}_${Architecture}.deb\nDepends: ${Depends}\nRecommends: ${Recommends}\n\n")
try:
- cmd_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip()
+ cmd_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Cannot get the installed packages list. Command '%s' "
- "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
- return self.opkg_query(cmd_output)
+ return opkg_query(cmd_output)
-class PackageManager(object):
+class PackageManager(object, metaclass=ABCMeta):
"""
This is an abstract class. Do not instantiate this directly.
"""
- __metaclass__ = ABCMeta
def __init__(self, d):
self.d = d
@@ -594,15 +598,15 @@ class PackageManager(object):
globs]
exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY', True)
if exclude:
- cmd.extend(['-x', exclude])
+ cmd.extend(['--exclude=' + '|'.join(exclude.split())])
try:
bb.note("Installing complementary packages ...")
bb.note('Running %s' % cmd)
- complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+ complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Could not compute complementary packages list. Command "
"'%s' returned %d:\n%s" %
- (' '.join(cmd), e.returncode, e.output))
+ (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
self.install(complementary_pkgs.split(), attempt_only=True)
os.remove(installed_pkgs_file)
@@ -631,8 +635,8 @@ class PackageManager(object):
def construct_uris(self, uris, base_paths):
def _append(arr1, arr2, sep='/'):
res = []
- narr1 = map(lambda a: string.rstrip(a, sep), arr1)
- narr2 = map(lambda a: string.lstrip(string.rstrip(a, sep), sep), arr2)
+ narr1 = [a.rstrip(sep) for a in arr1]
+ narr2 = [a.rstrip(sep).lstrip(sep) for a in arr2]
for a1 in narr1:
if arr2:
for a2 in narr2:
@@ -682,7 +686,8 @@ class RpmPM(PackageManager):
if not os.path.exists(self.d.expand('${T}/saved')):
bb.utils.mkdirhier(self.d.expand('${T}/saved'))
- self.indexer = RpmIndexer(self.d, self.deploy_dir)
+ packageindex_dir = os.path.join(self.d.getVar('WORKDIR', True), 'rpms')
+ self.indexer = RpmIndexer(self.d, packageindex_dir)
self.pkgs_list = RpmPkgsList(self.d, self.target_rootfs, arch_var, os_var)
self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
@@ -697,18 +702,19 @@ class RpmPM(PackageManager):
arch_list = self.feed_archs.split()
else:
# List must be prefered to least preferred order
- default_platform_extra = set()
- platform_extra = set()
+ default_platform_extra = list()
+ platform_extra = list()
bbextendvariant = self.d.getVar('BBEXTENDVARIANT', True) or ""
for mlib in self.ml_os_list:
for arch in self.ml_prefix_list[mlib]:
plt = arch.replace('-', '_') + '-.*-' + self.ml_os_list[mlib]
if mlib == bbextendvariant:
- default_platform_extra.add(plt)
+ if plt not in default_platform_extra:
+ default_platform_extra.append(plt)
else:
- platform_extra.add(plt)
-
- platform_extra = platform_extra.union(default_platform_extra)
+ if plt not in platform_extra:
+ platform_extra.append(plt)
+ platform_extra = default_platform_extra + platform_extra
for canonical_arch in platform_extra:
arch = canonical_arch.split('-')[0]
@@ -724,7 +730,7 @@ class RpmPM(PackageManager):
for uri in feed_uris:
if arch_list:
for arch in arch_list:
- bb.note('Note: adding Smart channel url%d%s (%s)' %
+ bb.note('Adding Smart channel url%d%s (%s)' %
(uri_iterator, arch, channel_priority))
self._invoke_smart('channel --add url%d-%s type=rpm-md baseurl=%s/%s -y'
% (uri_iterator, arch, uri, arch))
@@ -732,7 +738,7 @@ class RpmPM(PackageManager):
(uri_iterator, arch, channel_priority))
channel_priority -= 5
else:
- bb.note('Note: adding Smart channel url%d (%s)' %
+ bb.note('Adding Smart channel url%d (%s)' %
(uri_iterator, channel_priority))
self._invoke_smart('channel --add url%d type=rpm-md baseurl=%s -y'
% (uri_iterator, uri))
@@ -774,12 +780,12 @@ class RpmPM(PackageManager):
try:
complementary_pkgs = subprocess.check_output(cmd,
stderr=subprocess.STDOUT,
- shell=True)
+ shell=True).decode("utf-8")
# bb.note(complementary_pkgs)
return complementary_pkgs
except subprocess.CalledProcessError as e:
bb.fatal("Could not invoke smart. Command "
- "'%s' returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "'%s' returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
def _search_pkg_name_in_feeds(self, pkg, feed_archs):
for arch in feed_archs:
@@ -798,7 +804,7 @@ class RpmPM(PackageManager):
(self.smart_cmd, self.smart_opt, pkg)
cmd += " | sed -ne 's/ *Provides://p'"
bb.note('cmd: %s' % cmd)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
# Found a provider
if output:
bb.note('Found providers for %s: %s' % (pkg, output))
@@ -833,11 +839,13 @@ class RpmPM(PackageManager):
new_pkg = self._search_pkg_name_in_feeds(subst, feed_archs)
if not new_pkg:
# Failed to translate, package not found!
- err_msg = '%s not found in the %s feeds (%s).\n' % \
- (pkg, mlib, " ".join(feed_archs))
+ err_msg = '%s not found in the %s feeds (%s) in %s.' % \
+ (pkg, mlib, " ".join(feed_archs), self.d.getVar('DEPLOY_DIR_RPM', True))
if not attempt_only:
- err_msg += " ".join(self.fullpkglist)
- bb.fatal(err_msg)
+ bb.error(err_msg)
+ bb.fatal("This is often caused by an empty package declared " \
+ "in a recipe's PACKAGES variable. (Empty packages are " \
+ "not constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)")
bb.warn(err_msg)
else:
new_pkgs.append(new_pkg)
@@ -850,11 +858,13 @@ class RpmPM(PackageManager):
default_archs = self.ml_prefix_list['default']
new_pkg = self._search_pkg_name_in_feeds(pkg, default_archs)
if not new_pkg:
- err_msg = '%s not found in the base feeds (%s).\n' % \
- (pkg, ' '.join(default_archs))
+ err_msg = '%s not found in the feeds (%s) in %s.' % \
+ (pkg, " ".join(default_archs), self.d.getVar('DEPLOY_DIR_RPM', True))
if not attempt_only:
- err_msg += " ".join(self.fullpkglist)
- bb.fatal(err_msg)
+ bb.error(err_msg)
+ bb.fatal("This is often caused by an empty package declared " \
+ "in a recipe's PACKAGES variable. (Empty packages are " \
+ "not constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)")
bb.warn(err_msg)
else:
new_pkgs.append(new_pkg)
@@ -946,7 +956,7 @@ class RpmPM(PackageManager):
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as e:
bb.fatal("Create rpm database failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
# Import GPG key to RPM database of the target system
if self.d.getVar('RPM_SIGN_PACKAGES', True) == '1':
pubkey_path = self.d.getVar('RPM_GPG_PUBKEY', True)
@@ -1006,9 +1016,19 @@ class RpmPM(PackageManager):
ch_already_added = []
for canonical_arch in platform_extra:
arch = canonical_arch.split('-')[0]
- arch_channel = os.path.join(self.deploy_dir, arch)
- if os.path.exists(arch_channel) and not arch in ch_already_added:
- bb.note('Note: adding Smart channel %s (%s)' %
+ arch_channel = os.path.join(self.d.getVar('WORKDIR', True), 'rpms', arch)
+ oe.path.remove(arch_channel)
+ deploy_arch_dir = os.path.join(self.deploy_dir, arch)
+ if not os.path.exists(deploy_arch_dir):
+ continue
+
+ lockfilename = self.d.getVar('DEPLOY_DIR_RPM', True) + "/rpm.lock"
+ lf = bb.utils.lockfile(lockfilename, False)
+ oe.path.copyhardlinktree(deploy_arch_dir, arch_channel)
+ bb.utils.unlockfile(lf)
+
+ if not arch in ch_already_added:
+ bb.note('Adding Smart channel %s (%s)' %
(arch, channel_priority))
self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y'
% (arch, arch_channel))
@@ -1080,8 +1100,8 @@ class RpmPM(PackageManager):
native_root)
open(self.scriptlet_wrapper, 'w+').write(scriptlet_content)
- bb.note("Note: configuring RPM cross-install scriptlet_wrapper")
- os.chmod(self.scriptlet_wrapper, 0755)
+ bb.note("configuring RPM cross-install scriptlet_wrapper")
+ os.chmod(self.scriptlet_wrapper, 0o755)
cmd = 'config --set rpm-extra-macros._cross_scriptlet_wrapper=%s' % \
self.scriptlet_wrapper
self._invoke_smart(cmd)
@@ -1099,7 +1119,7 @@ class RpmPM(PackageManager):
sub_rdep = sub_data.get("RDEPENDS_" + pkg)
if not sub_rdep:
continue
- done = bb.utils.explode_dep_versions2(sub_rdep).keys()
+ done = list(bb.utils.explode_dep_versions2(sub_rdep).keys())
next = done
# Find all the rdepends on dependency chain
while next:
@@ -1182,6 +1202,9 @@ class RpmPM(PackageManager):
new_depends[new_depend] = deps[depend]
pkgs = bb.utils.join_deps(new_depends, commasep=True).split(', ')
pkgs = self._pkg_translate_oe_to_smart(pkgs, attempt_only)
+ if not pkgs:
+ bb.note("There are no packages to install")
+ return
if not attempt_only:
bb.note('to be installed: %s' % ' '.join(pkgs))
cmd = "%s %s install -y %s" % \
@@ -1193,11 +1216,11 @@ class RpmPM(PackageManager):
cmd = "%s %s install --attempt -y %s" % \
(self.smart_cmd, self.smart_opt, ' '.join(pkgs))
try:
- output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
+ output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
bb.note(output)
except subprocess.CalledProcessError as e:
bb.fatal("Unable to install packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
'''
Remove pkgs with smart, the pkg name is smart/rpm format
@@ -1223,11 +1246,11 @@ class RpmPM(PackageManager):
try:
bb.note(cmd)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
bb.note(output)
except subprocess.CalledProcessError as e:
bb.note("Unable to remove packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
def upgrade(self):
bb.note('smart upgrade')
@@ -1300,7 +1323,7 @@ class RpmPM(PackageManager):
install_pkgs.append(pkg)
except subprocess.CalledProcessError as e:
bb.note("Unable to dump install packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
# Recovery rpmsys channel
self._invoke_smart('channel --enable rpmsys')
return install_pkgs
@@ -1342,7 +1365,7 @@ class RpmPM(PackageManager):
available_pkgs.append(pkg.strip())
except subprocess.CalledProcessError as e:
bb.note("Unable to list all available packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
self.fullpkglist = available_pkgs
@@ -1369,12 +1392,12 @@ class RpmPM(PackageManager):
try:
bb.note(cmd)
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip()
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
bb.note(output)
- os.chmod(saved_dir, 0755)
+ os.chmod(saved_dir, 0o755)
except subprocess.CalledProcessError as e:
bb.fatal("Invoke save_rpmpostinst failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
'''Write common configuration for target usage'''
def rpm_setup_smart_target_config(self):
@@ -1398,8 +1421,157 @@ class RpmPM(PackageManager):
for f in rpm_db_locks:
bb.utils.remove(f, True)
+ """
+ Returns a dictionary with the package info.
+ """
+ def package_info(self, pkg):
+ cmd = "%s %s info --urls %s" % (self.smart_cmd, self.smart_opt, pkg)
+ try:
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Unable to list available packages. Command '%s' "
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+
+ # Set default values to avoid UnboundLocalError
+ arch = ""
+ ver = ""
+ filename = ""
+
+ #Parse output
+ for line in output.splitlines():
+ line = line.rstrip()
+ if line.startswith("Name:"):
+ pkg = line.split(": ")[1]
+ elif line.startswith("Version:"):
+ tmp_str = line.split(": ")[1]
+ ver, arch = tmp_str.split("@")
+ break
+
+ # Get filename
+ index = re.search("^URLs", output, re.MULTILINE)
+ tmp_str = output[index.end():]
+ for line in tmp_str.splitlines():
+ if "/" in line:
+ line = line.lstrip()
+ filename = line.split(" ")[0]
+ break
+
+ # To have the same data type than other package_info methods
+ filepath = os.path.join(self.deploy_dir, arch, filename)
+ pkg_dict = {}
+ pkg_dict[pkg] = {"arch":arch, "ver":ver, "filename":filename,
+ "filepath": filepath}
+
+ return pkg_dict
+
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+
+ """
+ def extract(self, pkg):
+ pkg_info = self.package_info(pkg)
+ if not pkg_info:
+ bb.fatal("Unable to get information for package '%s' while "
+ "trying to extract the package." % pkg)
+
+ pkg_path = pkg_info[pkg]["filepath"]
+
+ cpio_cmd = bb.utils.which(os.getenv("PATH"), "cpio")
+ rpm2cpio_cmd = bb.utils.which(os.getenv("PATH"), "rpm2cpio")
+
+ if not os.path.isfile(pkg_path):
+ bb.fatal("Unable to extract package for '%s'."
+ "File %s doesn't exists" % (pkg, pkg_path))
+
+ tmp_dir = tempfile.mkdtemp()
+ current_dir = os.getcwd()
+ os.chdir(tmp_dir)
+
+ try:
+ cmd = "%s %s | %s -idmv" % (rpm2cpio_cmd, pkg_path, cpio_cmd)
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ except subprocess.CalledProcessError as e:
+ bb.utils.remove(tmp_dir, recurse=True)
+ bb.fatal("Unable to extract %s package. Command '%s' "
+ "returned %d:\n%s" % (pkg_path, cmd, e.returncode, e.output.decode("utf-8")))
+ except OSError as e:
+ bb.utils.remove(tmp_dir, recurse=True)
+ bb.fatal("Unable to extract %s package. Command '%s' "
+ "returned %d:\n%s at %s" % (pkg_path, cmd, e.errno, e.strerror, e.filename))
+
+ bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
+ os.chdir(current_dir)
+
+ return tmp_dir
+
+
+class OpkgDpkgPM(PackageManager):
+ """
+ This is an abstract class. Do not instantiate this directly.
+ """
+ def __init__(self, d):
+ super(OpkgDpkgPM, self).__init__(d)
+
+ """
+ Returns a dictionary with the package info.
+
+ This method extracts the common parts for Opkg and Dpkg
+ """
+ def package_info(self, pkg, cmd):
+
+ try:
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+ except subprocess.CalledProcessError as e:
+ bb.fatal("Unable to list available packages. Command '%s' "
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+ return opkg_query(output)
+
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+
+ This method extracts the common parts for Opkg and Dpkg
+ """
+ def extract(self, pkg, pkg_info):
+
+ ar_cmd = bb.utils.which(os.getenv("PATH"), "ar")
+ tar_cmd = bb.utils.which(os.getenv("PATH"), "tar")
+ pkg_path = pkg_info[pkg]["filepath"]
+
+ if not os.path.isfile(pkg_path):
+ bb.fatal("Unable to extract package for '%s'."
+ "File %s doesn't exists" % (pkg, pkg_path))
+
+ tmp_dir = tempfile.mkdtemp()
+ current_dir = os.getcwd()
+ os.chdir(tmp_dir)
+
+ try:
+ cmd = "%s x %s" % (ar_cmd, pkg_path)
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ cmd = "%s xf data.tar.*" % tar_cmd
+ output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+ except subprocess.CalledProcessError as e:
+ bb.utils.remove(tmp_dir, recurse=True)
+ bb.fatal("Unable to extract %s package. Command '%s' "
+ "returned %d:\n%s" % (pkg_path, cmd, e.returncode, e.output.decode("utf-8")))
+ except OSError as e:
+ bb.utils.remove(tmp_dir, recurse=True)
+ bb.fatal("Unable to extract %s package. Command '%s' "
+ "returned %d:\n%s at %s" % (pkg_path, cmd, e.errno, e.strerror, e.filename))
+
+ bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
+ bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
+ bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz"))
+ os.chdir(current_dir)
-class OpkgPM(PackageManager):
+ return tmp_dir
+
+
+class OpkgPM(OpkgDpkgPM):
def __init__(self, d, target_rootfs, config_file, archs, task_name='target'):
super(OpkgPM, self).__init__(d)
@@ -1411,7 +1583,7 @@ class OpkgPM(PackageManager):
self.deploy_dir = self.d.getVar("DEPLOY_DIR_IPK", True)
self.deploy_lock_file = os.path.join(self.deploy_dir, "deploy.lock")
self.opkg_cmd = bb.utils.which(os.getenv('PATH'), "opkg")
- self.opkg_args = "--volatile-cache -f %s -o %s " % (self.config_file, target_rootfs)
+ self.opkg_args = "--volatile-cache -f %s -t %s -o %s " % (self.config_file, self.d.expand('${T}/ipktemp/') ,target_rootfs)
self.opkg_args += self.d.getVar("OPKG_ARGS", True)
opkg_lib_dir = self.d.getVar('OPKGLIBDIR', True)
@@ -1552,12 +1724,12 @@ class OpkgPM(PackageManager):
for arch in archs:
if (self.feed_archs is None) and (not os.path.exists(os.path.join(self.deploy_dir, arch))):
continue
- bb.note('Note: adding opkg feed url-%s-%d (%s)' %
+ bb.note('Adding opkg feed url-%s-%d (%s)' %
(arch, uri_iterator, uri))
config_file.write("src/gz uri-%s-%d %s/%s\n" %
(arch, uri_iterator, uri, arch))
else:
- bb.note('Note: adding opkg feed url-%d (%s)' %
+ bb.note('Adding opkg feed url-%d (%s)' %
(uri_iterator, uri))
config_file.write("src/gz uri-%d %s\n" %
(uri_iterator, uri))
@@ -1574,7 +1746,7 @@ class OpkgPM(PackageManager):
except subprocess.CalledProcessError as e:
self.deploy_dir_unlock()
bb.fatal("Unable to update the package index files. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
self.deploy_dir_unlock()
@@ -1595,12 +1767,12 @@ class OpkgPM(PackageManager):
try:
bb.note("Installing the following packages: %s" % ' '.join(pkgs))
bb.note(cmd)
- output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
+ output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
bb.note(output)
except subprocess.CalledProcessError as e:
(bb.fatal, bb.note)[attempt_only]("Unable to install packages. "
"Command '%s' returned %d:\n%s" %
- (cmd, e.returncode, e.output))
+ (cmd, e.returncode, e.output.decode("utf-8")))
def remove(self, pkgs, with_dependencies=True):
if with_dependencies:
@@ -1612,11 +1784,11 @@ class OpkgPM(PackageManager):
try:
bb.note(cmd)
- output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
+ output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
bb.note(output)
except subprocess.CalledProcessError as e:
bb.fatal("Unable to remove packages. Command '%s' "
- "returned %d:\n%s" % (e.cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (e.cmd, e.returncode, e.output.decode("utf-8")))
def write_index(self):
self.deploy_dir_lock()
@@ -1659,10 +1831,10 @@ class OpkgPM(PackageManager):
pkg_info = cmd + pkg
try:
- output = subprocess.check_output(pkg_info.split(), stderr=subprocess.STDOUT).strip()
+ output = subprocess.check_output(pkg_info.split(), stderr=subprocess.STDOUT).strip().decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Cannot get package info. Command '%s' "
- "returned %d:\n%s" % (pkg_info, e.returncode, e.output))
+ "returned %d:\n%s" % (pkg_info, e.returncode, e.output.decode("utf-8")))
if output == "":
bb.note("Ignored bad recommendation: '%s' is "
@@ -1699,7 +1871,7 @@ class OpkgPM(PackageManager):
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as e:
bb.fatal("Unable to update. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
# Dummy installation
cmd = "%s %s --noaction install %s " % (self.opkg_cmd,
@@ -1709,7 +1881,7 @@ class OpkgPM(PackageManager):
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
except subprocess.CalledProcessError as e:
bb.fatal("Unable to dummy install packages. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
bb.utils.remove(temp_rootfs, True)
@@ -1734,8 +1906,37 @@ class OpkgPM(PackageManager):
self.opkg_dir,
symlinks=True)
+ """
+ Returns a dictionary with the package info.
+ """
+ def package_info(self, pkg):
+ cmd = "%s %s info %s" % (self.opkg_cmd, self.opkg_args, pkg)
+ pkg_info = super(OpkgPM, self).package_info(pkg, cmd)
+
+ pkg_arch = pkg_info[pkg]["arch"]
+ pkg_filename = pkg_info[pkg]["filename"]
+ pkg_info[pkg]["filepath"] = \
+ os.path.join(self.deploy_dir, pkg_arch, pkg_filename)
+
+ return pkg_info
+
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+ """
+ def extract(self, pkg):
+ pkg_info = self.package_info(pkg)
+ if not pkg_info:
+ bb.fatal("Unable to get information for package '%s' while "
+ "trying to extract the package." % pkg)
+
+ tmp_dir = super(OpkgPM, self).extract(pkg, pkg_info)
+ bb.utils.remove(os.path.join(tmp_dir, "data.tar.gz"))
-class DpkgPM(PackageManager):
+ return tmp_dir
+
+class DpkgPM(OpkgDpkgPM):
def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None):
super(DpkgPM, self).__init__(d)
self.target_rootfs = target_rootfs
@@ -1746,6 +1947,7 @@ class DpkgPM(PackageManager):
self.apt_conf_dir = apt_conf_dir
self.apt_conf_file = os.path.join(self.apt_conf_dir, "apt.conf")
self.apt_get_cmd = bb.utils.which(os.getenv('PATH'), "apt-get")
+ self.apt_cache_cmd = bb.utils.which(os.getenv('PATH'), "apt-cache")
self.apt_args = d.getVar("APT_ARGS", True)
@@ -1823,7 +2025,7 @@ class DpkgPM(PackageManager):
subprocess.check_output(p_full, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
bb.note("%s for package %s failed with %d:\n%s" %
- (suffix[1], pkg_name, e.returncode, e.output))
+ (suffix[1], pkg_name, e.returncode, e.output.decode("utf-8")))
failed_pkgs.append(pkg_name)
break
@@ -1841,7 +2043,7 @@ class DpkgPM(PackageManager):
subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
bb.fatal("Unable to update the package index files. Command '%s' "
- "returned %d:\n%s" % (e.cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (e.cmd, e.returncode, e.output.decode("utf-8")))
self.deploy_dir_unlock()
@@ -1860,7 +2062,7 @@ class DpkgPM(PackageManager):
except subprocess.CalledProcessError as e:
(bb.fatal, bb.note)[attempt_only]("Unable to install packages. "
"Command '%s' returned %d:\n%s" %
- (cmd, e.returncode, e.output))
+ (cmd, e.returncode, e.output.decode("utf-8")))
# rename *.dpkg-new files/dirs
for root, dirs, files in os.walk(self.target_rootfs):
@@ -1891,7 +2093,7 @@ class DpkgPM(PackageManager):
subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
bb.fatal("Unable to remove packages. Command '%s' "
- "returned %d:\n%s" % (e.cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (e.cmd, e.returncode, e.output.decode("utf-8")))
def write_index(self):
self.deploy_dir_lock()
@@ -1925,11 +2127,11 @@ class DpkgPM(PackageManager):
for uri in feed_uris:
if arch_list:
for arch in arch_list:
- bb.note('Note: adding dpkg channel at (%s)' % uri)
+ bb.note('Adding dpkg channel at (%s)' % uri)
sources_file.write("deb %s/%s ./\n" %
(uri, arch))
else:
- bb.note('Note: adding dpkg channel at (%s)' % uri)
+ bb.note('Adding dpkg channel at (%s)' % uri)
sources_file.write("deb %s ./\n" % uri)
def _create_configs(self, archs, base_archs):
@@ -2024,11 +2226,40 @@ class DpkgPM(PackageManager):
subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
bb.fatal("Cannot fix broken dependencies. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, e.output))
+ "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
def list_installed(self):
return DpkgPkgsList(self.d, self.target_rootfs).list_pkgs()
+ """
+ Returns a dictionary with the package info.
+ """
+ def package_info(self, pkg):
+ cmd = "%s show %s" % (self.apt_cache_cmd, pkg)
+ pkg_info = super(DpkgPM, self).package_info(pkg, cmd)
+
+ pkg_arch = pkg_info[pkg]["pkgarch"]
+ pkg_filename = pkg_info[pkg]["filename"]
+ pkg_info[pkg]["filepath"] = \
+ os.path.join(self.deploy_dir, pkg_arch, pkg_filename)
+
+ return pkg_info
+
+ """
+ Returns the path to a tmpdir where resides the contents of a package.
+
+ Deleting the tmpdir is responsability of the caller.
+ """
+ def extract(self, pkg):
+ pkg_info = self.package_info(pkg)
+ if not pkg_info:
+ bb.fatal("Unable to get information for package '%s' while "
+ "trying to extract the package." % pkg)
+
+ tmp_dir = super(DpkgPM, self).extract(pkg, pkg_info)
+ bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz"))
+
+ return tmp_dir
def generate_index_files(d):
classes = d.getVar('PACKAGE_CLASSES', True).replace("package_", "").split()
diff --git a/import-layers/yocto-poky/meta/lib/oe/packagedata.py b/import-layers/yocto-poky/meta/lib/oe/packagedata.py
index bc0fd06bc..21d4de914 100644
--- a/import-layers/yocto-poky/meta/lib/oe/packagedata.py
+++ b/import-layers/yocto-poky/meta/lib/oe/packagedata.py
@@ -8,7 +8,7 @@ def read_pkgdatafile(fn):
pkgdata = {}
def decode(str):
- c = codecs.getdecoder("string_escape")
+ c = codecs.getdecoder("unicode_escape")
return c(str)[0]
if os.access(fn, os.R_OK):
@@ -66,7 +66,7 @@ def _pkgmap(d):
bb.warn("No files in %s?" % pkgdatadir)
files = []
- for pn in filter(lambda f: not os.path.isdir(os.path.join(pkgdatadir, f)), files):
+ for pn in [f for f in files if not os.path.isdir(os.path.join(pkgdatadir, f))]:
try:
pkgdata = read_pkgdatafile(os.path.join(pkgdatadir, pn))
except OSError:
diff --git a/import-layers/yocto-poky/meta/lib/oe/packagegroup.py b/import-layers/yocto-poky/meta/lib/oe/packagegroup.py
index a6fee5f95..97819279b 100644
--- a/import-layers/yocto-poky/meta/lib/oe/packagegroup.py
+++ b/import-layers/yocto-poky/meta/lib/oe/packagegroup.py
@@ -16,11 +16,11 @@ def packages(features, d):
yield pkg
def required_packages(features, d):
- req = filter(lambda feature: not is_optional(feature, d), features)
+ req = [feature for feature in features if not is_optional(feature, d)]
return packages(req, d)
def optional_packages(features, d):
- opt = filter(lambda feature: is_optional(feature, d), features)
+ opt = [feature for feature in features if is_optional(feature, d)]
return packages(opt, d)
def active_packages(features, d):
diff --git a/import-layers/yocto-poky/meta/lib/oe/patch.py b/import-layers/yocto-poky/meta/lib/oe/patch.py
index 9d3617290..0332f100f 100644
--- a/import-layers/yocto-poky/meta/lib/oe/patch.py
+++ b/import-layers/yocto-poky/meta/lib/oe/patch.py
@@ -117,43 +117,50 @@ class PatchSet(object):
return None
return os.sep.join(filesplit[striplevel:])
- copiedmode = False
- filelist = []
- with open(patchfile) as f:
- for line in f:
- if line.startswith('--- '):
- patchpth = patchedpath(line)
- if not patchpth:
- break
- if copiedmode:
- addedfile = patchpth
- else:
- removedfile = patchpth
- elif line.startswith('+++ '):
- addedfile = patchedpath(line)
- if not addedfile:
- break
- elif line.startswith('*** '):
- copiedmode = True
- removedfile = patchedpath(line)
- if not removedfile:
- break
- else:
- removedfile = None
- addedfile = None
-
- if addedfile and removedfile:
- if removedfile == '/dev/null':
- mode = 'A'
- elif addedfile == '/dev/null':
- mode = 'D'
- else:
- mode = 'M'
- if srcdir:
- fullpath = os.path.abspath(os.path.join(srcdir, addedfile))
- else:
- fullpath = addedfile
- filelist.append((fullpath, mode))
+ for encoding in ['utf-8', 'latin-1']:
+ try:
+ copiedmode = False
+ filelist = []
+ with open(patchfile) as f:
+ for line in f:
+ if line.startswith('--- '):
+ patchpth = patchedpath(line)
+ if not patchpth:
+ break
+ if copiedmode:
+ addedfile = patchpth
+ else:
+ removedfile = patchpth
+ elif line.startswith('+++ '):
+ addedfile = patchedpath(line)
+ if not addedfile:
+ break
+ elif line.startswith('*** '):
+ copiedmode = True
+ removedfile = patchedpath(line)
+ if not removedfile:
+ break
+ else:
+ removedfile = None
+ addedfile = None
+
+ if addedfile and removedfile:
+ if removedfile == '/dev/null':
+ mode = 'A'
+ elif addedfile == '/dev/null':
+ mode = 'D'
+ else:
+ mode = 'M'
+ if srcdir:
+ fullpath = os.path.abspath(os.path.join(srcdir, addedfile))
+ else:
+ fullpath = addedfile
+ filelist.append((fullpath, mode))
+ except UnicodeDecodeError:
+ continue
+ break
+ else:
+ raise PatchError('Unable to decode %s' % patchfile)
return filelist
@@ -274,30 +281,43 @@ class GitApplyTree(PatchTree):
def __init__(self, dir, d):
PatchTree.__init__(self, dir, d)
+ self.commituser = d.getVar('PATCH_GIT_USER_NAME', True)
+ self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL', True)
@staticmethod
def extractPatchHeader(patchfile):
"""
Extract just the header lines from the top of a patch file
"""
- lines = []
- with open(patchfile, 'r') as f:
- for line in f.readlines():
- if line.startswith('Index: ') or line.startswith('diff -') or line.startswith('---'):
- break
- lines.append(line)
+ for encoding in ['utf-8', 'latin-1']:
+ lines = []
+ try:
+ with open(patchfile, 'r', encoding=encoding) as f:
+ for line in f:
+ if line.startswith('Index: ') or line.startswith('diff -') or line.startswith('---'):
+ break
+ lines.append(line)
+ except UnicodeDecodeError:
+ continue
+ break
+ else:
+ raise PatchError('Unable to find a character encoding to decode %s' % patchfile)
return lines
@staticmethod
def decodeAuthor(line):
from email.header import decode_header
authorval = line.split(':', 1)[1].strip().replace('"', '')
- return decode_header(authorval)[0][0]
+ result = decode_header(authorval)[0][0]
+ if hasattr(result, 'decode'):
+ result = result.decode('utf-8')
+ return result
@staticmethod
def interpretPatchHeader(headerlines):
import re
author_re = re.compile('[\S ]+ <\S+@\S+\.\S+>')
+ from_commit_re = re.compile('^From [a-z0-9]{40} .*')
outlines = []
author = None
date = None
@@ -327,11 +347,39 @@ class GitApplyTree(PatchTree):
# git is fussy about author formatting i.e. it must be Name <email@domain>
if author_re.match(authorval):
author = authorval
+ elif from_commit_re.match(line):
+ # We don't want the From <commit> line - if it's present it will break rebasing
+ continue
outlines.append(line)
+
+ if not subject:
+ firstline = None
+ for line in headerlines:
+ line = line.strip()
+ if firstline:
+ if line:
+ # Second line is not blank, the first line probably isn't usable
+ firstline = None
+ break
+ elif line:
+ firstline = line
+ if firstline and not firstline.startswith(('#', 'Index:', 'Upstream-Status:')) and len(firstline) < 100:
+ subject = firstline
+
return outlines, author, date, subject
@staticmethod
- def prepareCommit(patchfile):
+ def gitCommandUserOptions(cmd, commituser=None, commitemail=None, d=None):
+ if d:
+ commituser = d.getVar('PATCH_GIT_USER_NAME', True)
+ commitemail = d.getVar('PATCH_GIT_USER_EMAIL', True)
+ if commituser:
+ cmd += ['-c', 'user.name="%s"' % commituser]
+ if commitemail:
+ cmd += ['-c', 'user.email="%s"' % commitemail]
+
+ @staticmethod
+ def prepareCommit(patchfile, commituser=None, commitemail=None):
"""
Prepare a git commit command line based on the header from a patch file
(typically this is useful for patches that cannot be applied with "git am" due to formatting)
@@ -340,21 +388,24 @@ class GitApplyTree(PatchTree):
# Process patch header and extract useful information
lines = GitApplyTree.extractPatchHeader(patchfile)
outlines, author, date, subject = GitApplyTree.interpretPatchHeader(lines)
- if not author or not subject:
+ if not author or not subject or not date:
try:
- shellcmd = ["git", "log", "--format=email", "--diff-filter=A", "--", patchfile]
+ shellcmd = ["git", "log", "--format=email", "--follow", "--diff-filter=A", "--", patchfile]
out = runcmd(["sh", "-c", " ".join(shellcmd)], os.path.dirname(patchfile))
except CmdError:
out = None
if out:
_, newauthor, newdate, newsubject = GitApplyTree.interpretPatchHeader(out.splitlines())
- if not author or not date:
- # These really need to go together
+ if not author:
+ # If we're setting the author then the date should be set as well
author = newauthor
date = newdate
+ elif not date:
+ # If we don't do this we'll get the current date, at least this will be closer
+ date = newdate
if not subject:
subject = newsubject
- if subject:
+ if subject and outlines and not outlines[0].strip() == subject:
outlines.insert(0, '%s\n\n' % subject.strip())
# Write out commit message to a file
@@ -363,7 +414,9 @@ class GitApplyTree(PatchTree):
for line in outlines:
tf.write(line)
# Prepare git command
- cmd = ["git", "commit", "-F", tmpfile]
+ cmd = ["git"]
+ GitApplyTree.gitCommandUserOptions(cmd, commituser, commitemail)
+ cmd += ["commit", "-F", tmpfile]
# git doesn't like plain email addresses as authors
if author and '<' in author:
cmd.append('--author="%s"' % author)
@@ -384,16 +437,24 @@ class GitApplyTree(PatchTree):
out = runcmd(["sh", "-c", " ".join(shellcmd)], tree)
if out:
for srcfile in out.split():
- patchlines = []
- outfile = None
- with open(srcfile, 'r') as f:
- for line in f:
- if line.startswith(GitApplyTree.patch_line_prefix):
- outfile = line.split()[-1].strip()
- continue
- if line.startswith(GitApplyTree.ignore_commit_prefix):
- continue
- patchlines.append(line)
+ for encoding in ['utf-8', 'latin-1']:
+ patchlines = []
+ outfile = None
+ try:
+ with open(srcfile, 'r', encoding=encoding) as f:
+ for line in f:
+ if line.startswith(GitApplyTree.patch_line_prefix):
+ outfile = line.split()[-1].strip()
+ continue
+ if line.startswith(GitApplyTree.ignore_commit_prefix):
+ continue
+ patchlines.append(line)
+ except UnicodeDecodeError:
+ continue
+ break
+ else:
+ raise PatchError('Unable to find a character encoding to decode %s' % srcfile)
+
if not outfile:
outfile = os.path.basename(srcfile)
with open(os.path.join(outdir, outfile), 'w') as of:
@@ -434,12 +495,14 @@ class GitApplyTree(PatchTree):
# change other places which read it back
f.write('echo >> $1\n')
f.write('echo "%s: $PATCHFILE" >> $1\n' % GitApplyTree.patch_line_prefix)
- os.chmod(commithook, 0755)
+ os.chmod(commithook, 0o755)
shutil.copy2(commithook, applyhook)
try:
patchfilevar = 'PATCHFILE="%s"' % os.path.basename(patch['file'])
try:
- shellcmd = [patchfilevar, "git", "--work-tree=%s" % reporoot, "am", "-3", "--keep-cr", "-p%s" % patch['strippath']]
+ shellcmd = [patchfilevar, "git", "--work-tree=%s" % reporoot]
+ self.gitCommandUserOptions(shellcmd, self.commituser, self.commitemail)
+ shellcmd += ["am", "-3", "--keep-cr", "-p%s" % patch['strippath']]
return _applypatchhelper(shellcmd, patch, force, reverse, run)
except CmdError:
# Need to abort the git am, or we'll still be within it at the end
@@ -469,7 +532,7 @@ class GitApplyTree(PatchTree):
shellcmd = ["git", "reset", "HEAD", self.patchdir]
output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
# Commit the result
- (tmpfile, shellcmd) = self.prepareCommit(patch['file'])
+ (tmpfile, shellcmd) = self.prepareCommit(patch['file'], self.commituser, self.commitemail)
try:
shellcmd.insert(0, patchfilevar)
output += runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
@@ -672,7 +735,7 @@ class UserResolver(Resolver):
f.write("echo 'Run \"quilt refresh\" when patch is corrected, press CTRL+D to exit.'\n")
f.write("echo ''\n")
f.write(" ".join(patchcmd) + "\n")
- os.chmod(rcfile, 0775)
+ os.chmod(rcfile, 0o775)
self.terminal("bash --rcfile " + rcfile, 'Patch Rejects: Please fix patch rejects manually', self.patchset.d)
diff --git a/import-layers/yocto-poky/meta/lib/oe/path.py b/import-layers/yocto-poky/meta/lib/oe/path.py
index 413ebfb39..06a5af265 100644
--- a/import-layers/yocto-poky/meta/lib/oe/path.py
+++ b/import-layers/yocto-poky/meta/lib/oe/path.py
@@ -65,22 +65,30 @@ def copytree(src, dst):
# This way we also preserve hardlinks between files in the tree.
bb.utils.mkdirhier(dst)
- cmd = 'tar -cf - -C %s -p . | tar -xf - -C %s' % (src, dst)
- check_output(cmd, shell=True, stderr=subprocess.STDOUT)
+ cmd = "tar --xattrs --xattrs-include='*' -cf - -C %s -p . | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dst)
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
def copyhardlinktree(src, dst):
""" Make the hard link when possible, otherwise copy. """
bb.utils.mkdirhier(dst)
if os.path.isdir(src) and not len(os.listdir(src)):
- return
+ return
if (os.stat(src).st_dev == os.stat(dst).st_dev):
# Need to copy directories only with tar first since cp will error if two
# writers try and create a directory at the same time
- cmd = 'cd %s; find . -type d -print | tar -cf - -C %s -p --files-from - --no-recursion | tar -xf - -C %s' % (src, src, dst)
- check_output(cmd, shell=True, stderr=subprocess.STDOUT)
- cmd = 'cd %s; find . -print0 | cpio --null -pdlu %s' % (src, dst)
- check_output(cmd, shell=True, stderr=subprocess.STDOUT)
+ cmd = "cd %s; find . -type d -print | tar --xattrs --xattrs-include='*' -cf - -C %s -p --no-recursion --files-from - | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, src, dst)
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
+ source = ''
+ if os.path.isdir(src):
+ import glob
+ if len(glob.glob('%s/.??*' % src)) > 0:
+ source = '%s/.??* ' % src
+ source = source + '%s/*' % src
+ else:
+ source = src
+ cmd = 'cp -afl --preserve=xattr %s %s' % (source, dst)
+ subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
else:
copytree(src, dst)
@@ -105,47 +113,6 @@ def symlink(source, destination, force=False):
if e.errno != errno.EEXIST or os.readlink(destination) != source:
raise
-class CalledProcessError(Exception):
- def __init__(self, retcode, cmd, output = None):
- self.retcode = retcode
- self.cmd = cmd
- self.output = output
- def __str__(self):
- return "Command '%s' returned non-zero exit status %d with output %s" % (self.cmd, self.retcode, self.output)
-
-# Not needed when we move to python 2.7
-def check_output(*popenargs, **kwargs):
- r"""Run command with arguments and return its output as a byte string.
-
- If the exit code was non-zero it raises a CalledProcessError. The
- CalledProcessError object will have the return code in the returncode
- attribute and output in the output attribute.
-
- The arguments are the same as for the Popen constructor. Example:
-
- >>> check_output(["ls", "-l", "/dev/null"])
- 'crw-rw-rw- 1 root root 1, 3 Oct 18 2007 /dev/null\n'
-
- The stdout argument is not allowed as it is used internally.
- To capture standard error in the result, use stderr=STDOUT.
-
- >>> check_output(["/bin/sh", "-c",
- ... "ls -l non_existent_file ; exit 0"],
- ... stderr=STDOUT)
- 'ls: non_existent_file: No such file or directory\n'
- """
- if 'stdout' in kwargs:
- raise ValueError('stdout argument not allowed, it will be overridden.')
- process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
- output, unused_err = process.communicate()
- retcode = process.poll()
- if retcode:
- cmd = kwargs.get("args")
- if cmd is None:
- cmd = popenargs[0]
- raise CalledProcessError(retcode, cmd, output=output)
- return output
-
def find(dir, **walkoptions):
""" Given a directory, recurses into that directory,
returning all files as absolute paths. """
diff --git a/import-layers/yocto-poky/meta/lib/oe/prservice.py b/import-layers/yocto-poky/meta/lib/oe/prservice.py
index b0cbcb1fb..0054f954c 100644
--- a/import-layers/yocto-poky/meta/lib/oe/prservice.py
+++ b/import-layers/yocto-poky/meta/lib/oe/prservice.py
@@ -1,7 +1,7 @@
def prserv_make_conn(d, check = False):
import prserv.serv
- host_params = filter(None, (d.getVar("PRSERV_HOST", True) or '').split(':'))
+ host_params = list([_f for _f in (d.getVar("PRSERV_HOST", True) or '').split(':') if _f])
try:
conn = None
conn = prserv.serv.PRServerConnection(host_params[0], int(host_params[1]))
@@ -9,7 +9,7 @@ def prserv_make_conn(d, check = False):
if not conn.ping():
raise Exception('service not available')
d.setVar("__PRSERV_CONN",conn)
- except Exception, exc:
+ except Exception as exc:
bb.fatal("Connecting to PR service %s:%s failed: %s" % (host_params[0], host_params[1], str(exc)))
return conn
@@ -114,7 +114,7 @@ def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
bb.utils.unlockfile(lf)
def prserv_check_avail(d):
- host_params = filter(None, (d.getVar("PRSERV_HOST", True) or '').split(':'))
+ host_params = list([_f for _f in (d.getVar("PRSERV_HOST", True) or '').split(':') if _f])
try:
if len(host_params) != 2:
raise TypeError
diff --git a/import-layers/yocto-poky/meta/lib/oe/qa.py b/import-layers/yocto-poky/meta/lib/oe/qa.py
index 3cfeee737..fbe719d8e 100644
--- a/import-layers/yocto-poky/meta/lib/oe/qa.py
+++ b/import-layers/yocto-poky/meta/lib/oe/qa.py
@@ -43,48 +43,48 @@ class ELFFile:
if not os.path.isfile(self.name):
raise NotELFFileError("%s is not a normal file" % self.name)
- self.file = file(self.name, "r")
- # Read 4k which should cover most of the headers we're after
- self.data = self.file.read(4096)
+ with open(self.name, "rb") as f:
+ # Read 4k which should cover most of the headers we're after
+ self.data = f.read(4096)
if len(self.data) < ELFFile.EI_NIDENT + 4:
raise NotELFFileError("%s is not an ELF" % self.name)
- self.my_assert(self.data[0], chr(0x7f) )
- self.my_assert(self.data[1], 'E')
- self.my_assert(self.data[2], 'L')
- self.my_assert(self.data[3], 'F')
+ self.my_assert(self.data[0], 0x7f)
+ self.my_assert(self.data[1], ord('E'))
+ self.my_assert(self.data[2], ord('L'))
+ self.my_assert(self.data[3], ord('F'))
if self.bits == 0:
- if self.data[ELFFile.EI_CLASS] == chr(ELFFile.ELFCLASS32):
+ if self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS32:
self.bits = 32
- elif self.data[ELFFile.EI_CLASS] == chr(ELFFile.ELFCLASS64):
+ elif self.data[ELFFile.EI_CLASS] == ELFFile.ELFCLASS64:
self.bits = 64
else:
# Not 32-bit or 64.. lets assert
raise NotELFFileError("ELF but not 32 or 64 bit.")
elif self.bits == 32:
- self.my_assert(self.data[ELFFile.EI_CLASS], chr(ELFFile.ELFCLASS32))
+ self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS32)
elif self.bits == 64:
- self.my_assert(self.data[ELFFile.EI_CLASS], chr(ELFFile.ELFCLASS64))
+ self.my_assert(self.data[ELFFile.EI_CLASS], ELFFile.ELFCLASS64)
else:
raise NotELFFileError("Must specify unknown, 32 or 64 bit size.")
- self.my_assert(self.data[ELFFile.EI_VERSION], chr(ELFFile.EV_CURRENT) )
+ self.my_assert(self.data[ELFFile.EI_VERSION], ELFFile.EV_CURRENT)
self.sex = self.data[ELFFile.EI_DATA]
- if self.sex == chr(ELFFile.ELFDATANONE):
+ if self.sex == ELFFile.ELFDATANONE:
raise NotELFFileError("self.sex == ELFDATANONE")
- elif self.sex == chr(ELFFile.ELFDATA2LSB):
+ elif self.sex == ELFFile.ELFDATA2LSB:
self.sex = "<"
- elif self.sex == chr(ELFFile.ELFDATA2MSB):
+ elif self.sex == ELFFile.ELFDATA2MSB:
self.sex = ">"
else:
raise NotELFFileError("Unknown self.sex")
def osAbi(self):
- return ord(self.data[ELFFile.EI_OSABI])
+ return self.data[ELFFile.EI_OSABI]
def abiVersion(self):
- return ord(self.data[ELFFile.EI_ABIVERSION])
+ return self.data[ELFFile.EI_ABIVERSION]
def abiSize(self):
return self.bits
@@ -144,8 +144,28 @@ class ELFFile:
bb.note("%s %s %s failed: %s" % (objdump, cmd, self.name, e))
return ""
+def elf_machine_to_string(machine):
+ """
+ Return the name of a given ELF e_machine field or the hex value as a string
+ if it isn't recognised.
+ """
+ try:
+ return {
+ 0x02: "SPARC",
+ 0x03: "x86",
+ 0x08: "MIPS",
+ 0x14: "PowerPC",
+ 0x28: "ARM",
+ 0x2A: "SuperH",
+ 0x32: "IA-64",
+ 0x3E: "x86-64",
+ 0xB7: "AArch64"
+ }[machine]
+ except:
+ return "Unknown (%s)" % repr(machine)
+
if __name__ == "__main__":
import sys
elf = ELFFile(sys.argv[1])
elf.open()
- print elf.isDynamic()
+ print(elf.isDynamic())
diff --git a/import-layers/yocto-poky/meta/lib/oe/recipeutils.py b/import-layers/yocto-poky/meta/lib/oe/recipeutils.py
index 6c7adb5bd..58e4028ae 100644
--- a/import-layers/yocto-poky/meta/lib/oe/recipeutils.py
+++ b/import-layers/yocto-poky/meta/lib/oe/recipeutils.py
@@ -2,7 +2,7 @@
#
# Some code borrowed from the OE layer index
#
-# Copyright (C) 2013-2015 Intel Corporation
+# Copyright (C) 2013-2016 Intel Corporation
#
import sys
@@ -11,31 +11,32 @@ import os.path
import tempfile
import textwrap
import difflib
-import utils
+from . import utils
import shutil
import re
import fnmatch
+import glob
from collections import OrderedDict, defaultdict
# Help us to find places to insert values
-recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRC_URI', 'S', 'do_fetch()', 'do_unpack()', 'do_patch()', 'EXTRA_OECONF', 'do_configure()', 'EXTRA_OEMAKE', 'do_compile()', 'do_install()', 'do_populate_sysroot()', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'do_package()', 'do_deploy()']
+recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LICENSE_FLAGS', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRCPV', 'SRC_URI', 'S', 'do_fetch()', 'do_unpack()', 'do_patch()', 'EXTRA_OECONF', 'EXTRA_OECMAKE', 'EXTRA_OESCONS', 'do_configure()', 'EXTRA_OEMAKE', 'do_compile()', 'do_install()', 'do_populate_sysroot()', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'populate_packages()', 'do_package()', 'do_deploy()']
# Variables that sometimes are a bit long but shouldn't be wrapped
nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]']
list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM']
meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION']
-def pn_to_recipe(cooker, pn):
+def pn_to_recipe(cooker, pn, mc=''):
"""Convert a recipe name (PN) to the path to the recipe file"""
import bb.providers
- if pn in cooker.recipecache.pkg_pn:
- best = bb.providers.findBestProvider(pn, cooker.data, cooker.recipecache, cooker.recipecache.pkg_pn)
+ if pn in cooker.recipecaches[mc].pkg_pn:
+ best = bb.providers.findBestProvider(pn, cooker.data, cooker.recipecaches[mc], cooker.recipecaches[mc].pkg_pn)
return best[3]
- elif pn in cooker.recipecache.providers:
- filenames = cooker.recipecache.providers[pn]
- eligible, foundUnique = bb.providers.filterProviders(filenames, pn, cooker.expanded_data, cooker.recipecache)
+ elif pn in cooker.recipecaches[mc].providers:
+ filenames = cooker.recipecaches[mc].providers[pn]
+ eligible, foundUnique = bb.providers.filterProviders(filenames, pn, cooker.expanded_data, cooker.recipecaches[mc])
filename = eligible[0]
return filename
else:
@@ -49,13 +50,14 @@ def get_unavailable_reasons(cooker, pn):
return taskdata.get_reasons(pn)
-def parse_recipe(fn, appendfiles, d):
+def parse_recipe(cooker, fn, appendfiles):
"""
Parse an individual recipe file, optionally with a list of
bbappend files.
"""
import bb.cache
- envdata = bb.cache.Cache.loadDataFull(fn, appendfiles, d)
+ parser = bb.cache.NoCache(cooker.databuilder)
+ envdata = parser.loadDataFull(fn, appendfiles)
return envdata
@@ -78,7 +80,7 @@ def parse_recipe_simple(cooker, pn, d, appends=True):
appendfiles = cooker.collection.get_file_appends(recipefile)
else:
appendfiles = None
- return parse_recipe(recipefile, appendfiles, d)
+ return parse_recipe(cooker, recipefile, appendfiles)
def get_var_files(fn, varlist, d):
@@ -158,15 +160,19 @@ def split_var_value(value, assignment=True):
return outlist
-def patch_recipe_file(fn, values, patch=False, relpath=''):
- """Update or insert variable values into a recipe file (assuming you
- have already identified the exact file you want to update.)
+def patch_recipe_lines(fromlines, values, trailing_newline=True):
+ """Update or insert variable values into lines from a recipe.
Note that some manual inspection/intervention may be required
since this cannot handle all situations.
"""
import bb.utils
+ if trailing_newline:
+ newline = '\n'
+ else:
+ newline = ''
+
recipe_progression_res = []
recipe_progression_restrs = []
for item in recipe_progression:
@@ -190,14 +196,14 @@ def patch_recipe_file(fn, values, patch=False, relpath=''):
remainingnames = {}
for k in values.keys():
remainingnames[k] = get_recipe_pos(k)
- remainingnames = OrderedDict(sorted(remainingnames.iteritems(), key=lambda x: x[1]))
+ remainingnames = OrderedDict(sorted(remainingnames.items(), key=lambda x: x[1]))
modifying = False
def outputvalue(name, lines, rewindcomments=False):
if values[name] is None:
return
- rawtext = '%s = "%s"\n' % (name, values[name])
+ rawtext = '%s = "%s"%s' % (name, values[name], newline)
addlines = []
if name in nowrap_vars:
addlines.append(rawtext)
@@ -205,19 +211,19 @@ def patch_recipe_file(fn, values, patch=False, relpath=''):
splitvalue = split_var_value(values[name], assignment=False)
if len(splitvalue) > 1:
linesplit = ' \\\n' + (' ' * (len(name) + 4))
- addlines.append('%s = "%s%s"\n' % (name, linesplit.join(splitvalue), linesplit))
+ addlines.append('%s = "%s%s"%s' % (name, linesplit.join(splitvalue), linesplit, newline))
else:
addlines.append(rawtext)
else:
wrapped = textwrap.wrap(rawtext)
for wrapline in wrapped[:-1]:
- addlines.append('%s \\\n' % wrapline)
- addlines.append('%s\n' % wrapped[-1])
+ addlines.append('%s \\%s' % (wrapline, newline))
+ addlines.append('%s%s' % (wrapped[-1], newline))
if rewindcomments:
# Ensure we insert the lines before any leading comments
# (that we'd want to ensure remain leading the next value)
for i, ln in reversed(list(enumerate(lines))):
- if ln[0] != '#':
+ if not ln.startswith('#'):
lines[i+1:i+1] = addlines
break
else:
@@ -230,7 +236,7 @@ def patch_recipe_file(fn, values, patch=False, relpath=''):
if modifying:
# Insert anything that should come before this variable
pos = get_recipe_pos(varname)
- for k in remainingnames.keys()[:]:
+ for k in list(remainingnames):
if remainingnames[k] > -1 and pos >= remainingnames[k] and not k in existingnames:
outputvalue(k, newlines, rewindcomments=True)
del remainingnames[k]
@@ -247,19 +253,33 @@ def patch_recipe_file(fn, values, patch=False, relpath=''):
# First run - establish which values we want to set are already in the file
varlist = [re.escape(item) for item in values.keys()]
- with open(fn, 'r') as f:
- changed, fromlines = bb.utils.edit_metadata(f, varlist, patch_recipe_varfunc)
+ bb.utils.edit_metadata(fromlines, varlist, patch_recipe_varfunc)
# Second run - actually set everything
modifying = True
varlist.extend(recipe_progression_restrs)
changed, tolines = bb.utils.edit_metadata(fromlines, varlist, patch_recipe_varfunc, match_overrides=True)
if remainingnames:
- if tolines[-1].strip() != '':
+ if tolines and tolines[-1].strip() != '':
tolines.append('\n')
for k in remainingnames.keys():
outputvalue(k, tolines)
+ return changed, tolines
+
+
+def patch_recipe_file(fn, values, patch=False, relpath=''):
+ """Update or insert variable values into a recipe file (assuming you
+ have already identified the exact file you want to update.)
+ Note that some manual inspection/intervention may be required
+ since this cannot handle all situations.
+ """
+
+ with open(fn, 'r') as f:
+ fromlines = f.readlines()
+
+ _, tolines = patch_recipe_lines(fromlines, values)
+
if patch:
relfn = os.path.relpath(fn, relpath)
diff = difflib.unified_diff(fromlines, tolines, 'a/%s' % relfn, 'b/%s' % relfn)
@@ -318,7 +338,7 @@ def patch_recipe(d, fn, varvalues, patch=False, relpath=''):
varfiles = get_var_files(fn, varlist, d)
locs = localise_file_vars(fn, varfiles, varlist)
patches = []
- for f,v in locs.iteritems():
+ for f,v in locs.items():
vals = {k: varvalues[k] for k in v}
patchdata = patch_recipe_file(f, vals, patch, relpath)
if patch:
@@ -347,6 +367,7 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True):
# Copy local files to target directory and gather any remote files
bb_dir = os.path.dirname(d.getVar('FILE', True)) + os.sep
remotes = []
+ copied = []
includes = [path for path in d.getVar('BBINCLUDED', True).split() if
path.startswith(bb_dir) and os.path.exists(path)]
for path in fetch.localpaths() + includes:
@@ -358,13 +379,14 @@ def copy_recipe_files(d, tgt_dir, whole_dir=False, download=True):
if not os.path.exists(subdir):
os.makedirs(subdir)
shutil.copy2(path, os.path.join(tgt_dir, relpath))
+ copied.append(relpath)
else:
remotes.append(path)
# Simply copy whole meta dir, if requested
if whole_dir:
shutil.copytree(bb_dir, tgt_dir)
- return remotes
+ return copied, remotes
def get_recipe_local_files(d, patches=False):
@@ -378,8 +400,16 @@ def get_recipe_local_files(d, patches=False):
bb.utils.exec_flat_python_func('patch_path', uri, fetch, '')):
continue
# Skip files that are referenced by absolute path
- if not os.path.isabs(fetch.ud[uri].basepath):
- ret[fetch.ud[uri].basepath] = fetch.localpath(uri)
+ fname = fetch.ud[uri].basepath
+ if os.path.isabs(fname):
+ continue
+ # Handle subdir=
+ subdir = fetch.ud[uri].parm.get('subdir', '')
+ if subdir:
+ if os.path.isabs(subdir):
+ continue
+ fname = os.path.join(subdir, fname)
+ ret[fname] = fetch.localpath(uri)
return ret
@@ -419,8 +449,8 @@ def get_recipe_patched_files(d):
def validate_pn(pn):
"""Perform validation on a recipe name (PN) for a new recipe."""
reserved_names = ['forcevariable', 'append', 'prepend', 'remove']
- if not re.match('[0-9a-z-.]+', pn):
- return 'Recipe name "%s" is invalid: only characters 0-9, a-z, - and . are allowed' % pn
+ if not re.match('^[0-9a-z-.+]+$', pn):
+ return 'Recipe name "%s" is invalid: only characters 0-9, a-z, -, + and . are allowed' % pn
elif pn in reserved_names:
return 'Recipe name "%s" is invalid: is a reserved keyword' % pn
elif pn.startswith('pn-'):
@@ -430,6 +460,60 @@ def validate_pn(pn):
return ''
+def get_bbfile_path(d, destdir, extrapathhint=None):
+ """
+ Determine the correct path for a recipe within a layer
+ Parameters:
+ d: Recipe-specific datastore
+ destdir: destination directory. Can be the path to the base of the layer or a
+ partial path somewhere within the layer.
+ extrapathhint: a path relative to the base of the layer to try
+ """
+ import bb.cookerdata
+
+ destdir = os.path.abspath(destdir)
+ destlayerdir = find_layerdir(destdir)
+
+ # Parse the specified layer's layer.conf file directly, in case the layer isn't in bblayers.conf
+ confdata = d.createCopy()
+ confdata.setVar('BBFILES', '')
+ confdata.setVar('LAYERDIR', destlayerdir)
+ destlayerconf = os.path.join(destlayerdir, "conf", "layer.conf")
+ confdata = bb.cookerdata.parse_config_file(destlayerconf, confdata)
+ pn = d.getVar('PN', True)
+
+ bbfilespecs = (confdata.getVar('BBFILES', True) or '').split()
+ if destdir == destlayerdir:
+ for bbfilespec in bbfilespecs:
+ if not bbfilespec.endswith('.bbappend'):
+ for match in glob.glob(bbfilespec):
+ splitext = os.path.splitext(os.path.basename(match))
+ if splitext[1] == '.bb':
+ mpn = splitext[0].split('_')[0]
+ if mpn == pn:
+ return os.path.dirname(match)
+
+ # Try to make up a path that matches BBFILES
+ # this is a little crude, but better than nothing
+ bpn = d.getVar('BPN', True)
+ recipefn = os.path.basename(d.getVar('FILE', True))
+ pathoptions = [destdir]
+ if extrapathhint:
+ pathoptions.append(os.path.join(destdir, extrapathhint))
+ if destdir == destlayerdir:
+ pathoptions.append(os.path.join(destdir, 'recipes-%s' % bpn, bpn))
+ pathoptions.append(os.path.join(destdir, 'recipes', bpn))
+ pathoptions.append(os.path.join(destdir, bpn))
+ elif not destdir.endswith(('/' + pn, '/' + bpn)):
+ pathoptions.append(os.path.join(destdir, bpn))
+ closepath = ''
+ for pathoption in pathoptions:
+ bbfilepath = os.path.join(pathoption, 'test.bb')
+ for bbfilespec in bbfilespecs:
+ if fnmatch.fnmatchcase(bbfilepath, bbfilespec):
+ return pathoption
+ return None
+
def get_bbappend_path(d, destlayerdir, wildcardver=False):
"""Determine how a bbappend for a recipe should be named and located within another layer"""
@@ -536,7 +620,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
bbappendlines = []
if extralines:
if isinstance(extralines, dict):
- for name, value in extralines.iteritems():
+ for name, value in extralines.items():
bbappendlines.append((name, '=', value))
else:
# Do our best to split it
@@ -550,14 +634,14 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
raise Exception('Invalid extralines value passed')
def popline(varname):
- for i in xrange(0, len(bbappendlines)):
+ for i in range(0, len(bbappendlines)):
if bbappendlines[i][0] == varname:
line = bbappendlines.pop(i)
return line
return None
def appendline(varname, op, value):
- for i in xrange(0, len(bbappendlines)):
+ for i in range(0, len(bbappendlines)):
item = bbappendlines[i]
if item[0] == varname:
bbappendlines[i] = (item[0], item[1], item[2] + ' ' + value)
@@ -576,7 +660,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
copyfiles = {}
if srcfiles:
instfunclines = []
- for newfile, origsrcfile in srcfiles.iteritems():
+ for newfile, origsrcfile in srcfiles.items():
srcfile = origsrcfile
srcurientry = None
if not srcfile:
@@ -644,7 +728,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
if removevar in removevalues:
remove = removevalues[removevar]
- if isinstance(remove, basestring):
+ if isinstance(remove, str):
if remove in splitval:
splitval.remove(remove)
changed = True
@@ -674,7 +758,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
varnames = [item[0] for item in bbappendlines]
if removevalues:
- varnames.extend(removevalues.keys())
+ varnames.extend(list(removevalues.keys()))
with open(appendpath, 'r') as f:
(updated, newlines) = bb.utils.edit_metadata(f, varnames, appendfile_varfunc)
@@ -699,7 +783,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
if copyfiles:
if machine:
destsubdir = os.path.join(destsubdir, machine)
- for newfile, srcfile in copyfiles.iteritems():
+ for newfile, srcfile in copyfiles.items():
filedest = os.path.join(appenddir, destsubdir, os.path.basename(srcfile))
if os.path.abspath(newfile) != os.path.abspath(filedest):
bb.note('Copying %s to %s' % (newfile, filedest))
@@ -710,14 +794,16 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
def find_layerdir(fn):
- """ Figure out relative path to base of layer for a file (e.g. a recipe)"""
- pth = os.path.dirname(fn)
+ """ Figure out the path to the base of the layer containing a file (e.g. a recipe)"""
+ pth = fn
layerdir = ''
while pth:
if os.path.exists(os.path.join(pth, 'conf', 'layer.conf')):
layerdir = pth
break
pth = os.path.dirname(pth)
+ if pth == '/':
+ return None
return layerdir
@@ -725,12 +811,12 @@ def replace_dir_vars(path, d):
"""Replace common directory paths with appropriate variable references (e.g. /etc becomes ${sysconfdir})"""
dirvars = {}
# Sort by length so we get the variables we're interested in first
- for var in sorted(d.keys(), key=len):
+ for var in sorted(list(d.keys()), key=len):
if var.endswith('dir') and var.lower() == var:
value = d.getVar(var, True)
if value.startswith('/') and not '\n' in value and value not in dirvars:
dirvars[value] = var
- for dirpath in sorted(dirvars.keys(), reverse=True):
+ for dirpath in sorted(list(dirvars.keys()), reverse=True):
path = path.replace(dirpath, '${%s}' % dirvars[dirpath])
return path
diff --git a/import-layers/yocto-poky/meta/lib/oe/rootfs.py b/import-layers/yocto-poky/meta/lib/oe/rootfs.py
index a95e1b739..a348b975c 100644
--- a/import-layers/yocto-poky/meta/lib/oe/rootfs.py
+++ b/import-layers/yocto-poky/meta/lib/oe/rootfs.py
@@ -10,17 +10,17 @@ import subprocess
import re
-class Rootfs(object):
+class Rootfs(object, metaclass=ABCMeta):
"""
This is an abstract class. Do not instantiate this directly.
"""
- __metaclass__ = ABCMeta
- def __init__(self, d):
+ def __init__(self, d, progress_reporter=None):
self.d = d
self.pm = None
self.image_rootfs = self.d.getVar('IMAGE_ROOTFS', True)
- self.deploy_dir_image = self.d.getVar('DEPLOY_DIR_IMAGE', True)
+ self.deploydir = self.d.getVar('IMGDEPLOYDIR', True)
+ self.progress_reporter = progress_reporter
self.install_order = Manifest.INSTALL_ORDER
@@ -40,51 +40,46 @@ class Rootfs(object):
def _log_check(self):
pass
- def _log_check_warn(self):
- r = re.compile('^(warn|Warn|NOTE: warn|NOTE: Warn|WARNING:)')
+ def _log_check_common(self, type, match):
+ # Ignore any lines containing log_check to avoid recursion, and ignore
+ # lines beginning with a + since sh -x may emit code which isn't
+ # actually executed, but may contain error messages
+ excludes = [ 'log_check', r'^\+' ]
+ if hasattr(self, 'log_check_expected_regexes'):
+ excludes.extend(self.log_check_expected_regexes)
+ excludes = [re.compile(x) for x in excludes]
+ r = re.compile(match)
log_path = self.d.expand("${T}/log.do_rootfs")
+ messages = []
with open(log_path, 'r') as log:
for line in log:
- if 'log_check' in line or 'NOTE:' in line:
- continue
-
- m = r.search(line)
+ for ee in excludes:
+ m = ee.search(line)
+ if m:
+ break
if m:
- bb.warn('[log_check] %s: found a warning message in the logfile (keyword \'%s\'):\n[log_check] %s'
- % (self.d.getVar('PN', True), m.group(), line))
-
- def _log_check_error(self):
- r = re.compile(self.log_check_regex)
- log_path = self.d.expand("${T}/log.do_rootfs")
- with open(log_path, 'r') as log:
- found_error = 0
- message = "\n"
- for line in log:
- if 'log_check' in line:
continue
- if hasattr(self, 'log_check_expected_errors_regexes'):
- m = None
- for ee in self.log_check_expected_errors_regexes:
- m = re.search(ee, line)
- if m:
- break
- if m:
- continue
-
m = r.search(line)
if m:
- found_error = 1
- bb.warn('[log_check] In line: [%s]' % line)
- bb.warn('[log_check] %s: found an error message in the logfile (keyword \'%s\'):\n[log_check] %s'
- % (self.d.getVar('PN', True), m.group(), line))
+ messages.append('[log_check] %s' % line)
+ if messages:
+ if len(messages) == 1:
+ msg = '1 %s message' % type
+ else:
+ msg = '%d %s messages' % (len(messages), type)
+ msg = '[log_check] %s: found %s in the logfile:\n%s' % \
+ (self.d.getVar('PN', True), msg, ''.join(messages))
+ if type == 'error':
+ bb.fatal(msg)
+ else:
+ bb.warn(msg)
- if found_error >= 1 and found_error <= 5:
- message += line + '\n'
- found_error += 1
+ def _log_check_warn(self):
+ self._log_check_common('warning', '^(warn|Warn|WARNING:)')
- if found_error == 6:
- bb.fatal(message)
+ def _log_check_error(self):
+ self._log_check_common('error', self.log_check_regex)
def _insert_feed_uris(self):
if bb.utils.contains("IMAGE_FEATURES", "package-management",
@@ -121,8 +116,10 @@ class Rootfs(object):
bb.note(" Copying back package database...")
for dir in dirs:
+ if not os.path.isdir(self.image_rootfs + '-orig' + dir):
+ continue
bb.utils.mkdirhier(self.image_rootfs + os.path.dirname(dir))
- shutil.copytree(self.image_rootfs + '-orig' + dir, self.image_rootfs + dir)
+ shutil.copytree(self.image_rootfs + '-orig' + dir, self.image_rootfs + dir, symlinks=True)
cpath = oe.cachedpath.CachedPath()
# Copy files located in /usr/lib/debug or /usr/src/debug
@@ -185,16 +182,19 @@ class Rootfs(object):
bb.utils.mkdirhier(self.image_rootfs)
- bb.utils.mkdirhier(self.deploy_dir_image)
+ bb.utils.mkdirhier(self.deploydir)
shutil.copytree(postinst_intercepts_dir, intercepts_dir)
shutil.copy(self.d.expand("${COREBASE}/meta/files/deploydir_readme.txt"),
- self.deploy_dir_image +
+ self.deploydir +
"/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt")
execute_pre_post_process(self.d, pre_process_cmds)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
# call the package manager dependent create method
self._create()
@@ -209,6 +209,9 @@ class Rootfs(object):
execute_pre_post_process(self.d, post_process_cmds)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
if bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
True, False, self.d):
delayed_postinsts = self._get_delayed_postinsts()
@@ -222,6 +225,9 @@ class Rootfs(object):
self._uninstall_unneeded()
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
self._insert_feed_uris()
self._run_ldconfig()
@@ -232,6 +238,10 @@ class Rootfs(object):
self._cleanup()
self._log_check()
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
+
def _uninstall_unneeded(self):
# Remove unneeded init script symlinks
delayed_postinsts = self._get_delayed_postinsts()
@@ -243,7 +253,9 @@ class Rootfs(object):
image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
True, False, self.d)
- if image_rorfs:
+ image_rorfs_force = self.d.getVar('FORCE_RO_REMOVE', True)
+
+ if image_rorfs or image_rorfs_force == "1":
# Remove components that we don't need if it's a read-only rootfs
unneeded_pkgs = self.d.getVar("ROOTFS_RO_UNNEEDED", True).split()
pkgs_installed = image_list_installed_packages(self.d)
@@ -363,8 +375,8 @@ class Rootfs(object):
class RpmRootfs(Rootfs):
- def __init__(self, d, manifest_dir):
- super(RpmRootfs, self).__init__(d)
+ def __init__(self, d, manifest_dir, progress_reporter=None):
+ super(RpmRootfs, self).__init__(d, progress_reporter)
self.log_check_regex = '(unpacking of archive failed|Cannot find package'\
'|exit 1|ERROR: |Error: |Error |ERROR '\
'|Failed |Failed: |Failed$|Failed\(\d+\):)'
@@ -422,11 +434,17 @@ class RpmRootfs(Rootfs):
execute_pre_post_process(self.d, rpm_pre_process_cmds)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
self.pm.dump_all_available_pkgs()
if self.inc_rpm_image_gen == "1":
self._create_incremental(pkgs_to_install)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
self.pm.update()
pkgs = []
@@ -437,12 +455,24 @@ class RpmRootfs(Rootfs):
else:
pkgs += pkgs_to_install[pkg_type]
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
self.pm.install(pkgs)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
self.pm.install(pkgs_attempt, True)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
self.pm.install_complementary()
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
self._setup_dbg_rootfs(['/etc/rpm', '/var/lib/rpm', '/var/lib/smart'])
execute_pre_post_process(self.d, rpm_post_process_cmds)
@@ -454,6 +484,10 @@ class RpmRootfs(Rootfs):
self.pm.rpm_setup_smart_target_config()
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
+
@staticmethod
def _depends_list():
return ['DEPLOY_DIR_RPM', 'INC_RPM_IMAGE_GEN', 'RPM_PREPROCESS_COMMANDS',
@@ -474,32 +508,6 @@ class RpmRootfs(Rootfs):
# already saved in /etc/rpm-postinsts
pass
- def _log_check_error(self):
- r = re.compile('(unpacking of archive failed|Cannot find package|exit 1|ERR|Fail)')
- log_path = self.d.expand("${T}/log.do_rootfs")
- with open(log_path, 'r') as log:
- found_error = 0
- message = "\n"
- for line in log.read().split('\n'):
- if 'log_check' in line:
- continue
- # sh -x may emit code which isn't actually executed
- if line.startswith('+'):
- continue
-
- m = r.search(line)
- if m:
- found_error = 1
- bb.warn('log_check: There were error messages in the logfile')
- bb.warn('log_check: Matched keyword: [%s]\n\n' % m.group())
-
- if found_error >= 1 and found_error <= 5:
- message += line + '\n'
- found_error += 1
-
- if found_error == 6:
- bb.fatal(message)
-
def _log_check(self):
self._log_check_warn()
self._log_check_error()
@@ -524,8 +532,8 @@ class RpmRootfs(Rootfs):
bb.utils.remove(self.pm.install_dir_path, True)
class DpkgOpkgRootfs(Rootfs):
- def __init__(self, d):
- super(DpkgOpkgRootfs, self).__init__(d)
+ def __init__(self, d, progress_reporter=None):
+ super(DpkgOpkgRootfs, self).__init__(d, progress_reporter)
def _get_pkgs_postinsts(self, status_file):
def _get_pkg_depends_list(pkg_depends):
@@ -565,7 +573,7 @@ class DpkgOpkgRootfs(Rootfs):
pkg_depends = m_depends.group(1)
# remove package dependencies not in postinsts
- pkg_names = pkgs.keys()
+ pkg_names = list(pkgs.keys())
for pkg_name in pkg_names:
deps = pkgs[pkg_name][:]
@@ -598,7 +606,7 @@ class DpkgOpkgRootfs(Rootfs):
pkgs = self._get_pkgs_postinsts(status_file)
if pkgs:
root = "__packagegroup_postinst__"
- pkgs[root] = pkgs.keys()
+ pkgs[root] = list(pkgs.keys())
_dep_resolve(pkgs, root, pkg_list, [])
pkg_list.remove(root)
@@ -619,10 +627,10 @@ class DpkgOpkgRootfs(Rootfs):
num += 1
class DpkgRootfs(DpkgOpkgRootfs):
- def __init__(self, d, manifest_dir):
- super(DpkgRootfs, self).__init__(d)
+ def __init__(self, d, manifest_dir, progress_reporter=None):
+ super(DpkgRootfs, self).__init__(d, progress_reporter)
self.log_check_regex = '^E:'
- self.log_check_expected_errors_regexes = \
+ self.log_check_expected_regexes = \
[
"^E: Unmet dependencies."
]
@@ -648,15 +656,31 @@ class DpkgRootfs(DpkgOpkgRootfs):
execute_pre_post_process(self.d, deb_pre_process_cmds)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+ # Don't support incremental, so skip that
+ self.progress_reporter.next_stage()
+
self.pm.update()
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
for pkg_type in self.install_order:
if pkg_type in pkgs_to_install:
self.pm.install(pkgs_to_install[pkg_type],
[False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
+ if self.progress_reporter:
+ # Don't support attemptonly, so skip that
+ self.progress_reporter.next_stage()
+ self.progress_reporter.next_stage()
+
self.pm.install_complementary()
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
self._setup_dbg_rootfs(['/var/lib/dpkg'])
self.pm.fix_broken_dependencies()
@@ -667,6 +691,9 @@ class DpkgRootfs(DpkgOpkgRootfs):
execute_pre_post_process(self.d, deb_post_process_cmds)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
@staticmethod
def _depends_list():
return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMANDS']
@@ -692,8 +719,8 @@ class DpkgRootfs(DpkgOpkgRootfs):
class OpkgRootfs(DpkgOpkgRootfs):
- def __init__(self, d, manifest_dir):
- super(OpkgRootfs, self).__init__(d)
+ def __init__(self, d, manifest_dir, progress_reporter=None):
+ super(OpkgRootfs, self).__init__(d, progress_reporter)
self.log_check_regex = '(exit 1|Collected errors)'
self.manifest = OpkgManifest(d, manifest_dir)
@@ -887,13 +914,24 @@ class OpkgRootfs(DpkgOpkgRootfs):
execute_pre_post_process(self.d, opkg_pre_process_cmds)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+ # Steps are a bit different in order, skip next
+ self.progress_reporter.next_stage()
+
self.pm.update()
self.pm.handle_bad_recommendations()
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
if self.inc_opkg_image_gen == "1":
self._remove_extra_packages(pkgs_to_install)
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
for pkg_type in self.install_order:
if pkg_type in pkgs_to_install:
# For multilib, we perform a sanity test before final install
@@ -905,15 +943,24 @@ class OpkgRootfs(DpkgOpkgRootfs):
self.pm.install(pkgs_to_install[pkg_type],
[False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
self.pm.install_complementary()
- self._setup_dbg_rootfs(['/var/lib/opkg'])
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
+ self._setup_dbg_rootfs(['/etc', '/var/lib/opkg', '/usr/lib/ssl'])
execute_pre_post_process(self.d, opkg_post_process_cmds)
if self.inc_opkg_image_gen == "1":
self.pm.backup_packaging_data()
+ if self.progress_reporter:
+ self.progress_reporter.next_stage()
+
@staticmethod
def _depends_list():
return ['IPKGCONF_SDK', 'IPK_FEED_URIS', 'DEPLOY_DIR_IPK', 'IPKGCONF_TARGET', 'INC_IPK_IMAGE_GEN', 'OPKG_ARGS', 'OPKGLIBDIR', 'OPKG_PREPROCESS_COMMANDS', 'OPKG_POSTPROCESS_COMMANDS', 'OPKGLIBDIR']
@@ -949,16 +996,16 @@ def variable_depends(d, manifest_dir=None):
cls = get_class_for_type(img_type)
return cls._depends_list()
-def create_rootfs(d, manifest_dir=None):
+def create_rootfs(d, manifest_dir=None, progress_reporter=None):
env_bkp = os.environ.copy()
img_type = d.getVar('IMAGE_PKGTYPE', True)
if img_type == "rpm":
- RpmRootfs(d, manifest_dir).create()
+ RpmRootfs(d, manifest_dir, progress_reporter).create()
elif img_type == "ipk":
- OpkgRootfs(d, manifest_dir).create()
+ OpkgRootfs(d, manifest_dir, progress_reporter).create()
elif img_type == "deb":
- DpkgRootfs(d, manifest_dir).create()
+ DpkgRootfs(d, manifest_dir, progress_reporter).create()
os.environ.clear()
os.environ.update(env_bkp)
diff --git a/import-layers/yocto-poky/meta/lib/oe/sdk.py b/import-layers/yocto-poky/meta/lib/oe/sdk.py
index f15fbdb36..c74525f92 100644
--- a/import-layers/yocto-poky/meta/lib/oe/sdk.py
+++ b/import-layers/yocto-poky/meta/lib/oe/sdk.py
@@ -8,9 +8,7 @@ import glob
import traceback
-class Sdk(object):
- __metaclass__ = ABCMeta
-
+class Sdk(object, metaclass=ABCMeta):
def __init__(self, d, manifest_dir):
self.d = d
self.sdk_output = self.d.getVar('SDK_OUTPUT', True)
@@ -155,14 +153,16 @@ class RpmSdk(Sdk):
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
- self.target_pm.remove_packaging_data()
+ if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+ self.target_pm.remove_packaging_data()
bb.note("Installing NATIVESDK packages")
self._populate_sysroot(self.host_pm, self.host_manifest)
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True))
- self.host_pm.remove_packaging_data()
+ if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+ self.host_pm.remove_packaging_data()
# Move host RPM library data
native_rpm_state_dir = os.path.join(self.sdk_output,
@@ -232,14 +232,16 @@ class OpkgSdk(Sdk):
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
- self.target_pm.remove_packaging_data()
+ if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+ self.target_pm.remove_packaging_data()
bb.note("Installing NATIVESDK packages")
self._populate_sysroot(self.host_pm, self.host_manifest)
execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True))
- self.host_pm.remove_packaging_data()
+ if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+ self.host_pm.remove_packaging_data()
target_sysconfdir = os.path.join(self.sdk_target_sysroot, self.sysconfdir)
host_sysconfdir = os.path.join(self.sdk_host_sysroot, self.sysconfdir)
@@ -247,12 +249,12 @@ class OpkgSdk(Sdk):
self.mkdirhier(target_sysconfdir)
shutil.copy(self.target_conf, target_sysconfdir)
os.chmod(os.path.join(target_sysconfdir,
- os.path.basename(self.target_conf)), 0644)
+ os.path.basename(self.target_conf)), 0o644)
self.mkdirhier(host_sysconfdir)
shutil.copy(self.host_conf, host_sysconfdir)
os.chmod(os.path.join(host_sysconfdir,
- os.path.basename(self.host_conf)), 0644)
+ os.path.basename(self.host_conf)), 0o644)
native_opkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path,
self.d.getVar('localstatedir_nativesdk', True).strip('/'),
@@ -314,6 +316,9 @@ class DpkgSdk(Sdk):
self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
+ if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+ self.target_pm.remove_packaging_data()
+
bb.note("Installing NATIVESDK packages")
self._populate_sysroot(self.host_pm, self.host_manifest)
@@ -322,6 +327,9 @@ class DpkgSdk(Sdk):
self._copy_apt_dir_to(os.path.join(self.sdk_output, self.sdk_native_path,
"etc", "apt"))
+ if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
+ self.host_pm.remove_packaging_data()
+
native_dpkg_state_dir = os.path.join(self.sdk_output, self.sdk_native_path,
"var", "lib", "dpkg")
self.mkdirhier(native_dpkg_state_dir)
diff --git a/import-layers/yocto-poky/meta/lib/oe/sstatesig.py b/import-layers/yocto-poky/meta/lib/oe/sstatesig.py
index 01dce660c..8224e3a12 100644
--- a/import-layers/yocto-poky/meta/lib/oe/sstatesig.py
+++ b/import-layers/yocto-poky/meta/lib/oe/sstatesig.py
@@ -130,7 +130,9 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
super(bb.siggen.SignatureGeneratorBasicHash, self).set_taskdata(coredata)
def dump_sigs(self, dataCache, options):
- self.dump_lockedsigs()
+ sigfile = os.getcwd() + "/locked-sigs.inc"
+ bb.plain("Writing locked sigs to %s" % sigfile)
+ self.dump_lockedsigs(sigfile)
return super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigs(dataCache, options)
def get_taskhash(self, fn, task, deps, dataCache):
@@ -181,11 +183,7 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
return
super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, stampbase, runtime)
- def dump_lockedsigs(self, sigfile=None, taskfilter=None):
- if not sigfile:
- sigfile = os.getcwd() + "/locked-sigs.inc"
-
- bb.plain("Writing locked sigs to %s" % sigfile)
+ def dump_lockedsigs(self, sigfile, taskfilter=None):
types = {}
for k in self.runtaskdeps:
if taskfilter:
@@ -210,7 +208,7 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
continue
f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.taskhash[k] + " \\\n")
f.write(' "\n')
- f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(types.keys())))
+ f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(list(types.keys()))))
def checkhashes(self, missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d):
warn_msgs = []
@@ -220,7 +218,7 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
for task in range(len(sq_fn)):
if task not in ret:
for pn in self.lockedsigs:
- if sq_hash[task] in self.lockedsigs[pn].itervalues():
+ if sq_hash[task] in iter(self.lockedsigs[pn].values()):
if sq_task[task] == 'do_shared_workdir':
continue
sstate_missing_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"
diff --git a/import-layers/yocto-poky/meta/lib/oe/terminal.py b/import-layers/yocto-poky/meta/lib/oe/terminal.py
index 634daa903..3901ad3f2 100644
--- a/import-layers/yocto-poky/meta/lib/oe/terminal.py
+++ b/import-layers/yocto-poky/meta/lib/oe/terminal.py
@@ -25,9 +25,7 @@ class Registry(oe.classutils.ClassRegistry):
return bool(cls.command)
-class Terminal(Popen):
- __metaclass__ = Registry
-
+class Terminal(Popen, metaclass=Registry):
def __init__(self, sh_cmd, title=None, env=None, d=None):
fmt_sh_cmd = self.format_command(sh_cmd, title)
try:
@@ -41,7 +39,7 @@ class Terminal(Popen):
def format_command(self, sh_cmd, title):
fmt = {'title': title or 'Terminal', 'command': sh_cmd}
- if isinstance(self.command, basestring):
+ if isinstance(self.command, str):
return shlex.split(self.command.format(**fmt))
else:
return [element.format(**fmt) for element in self.command]
@@ -53,7 +51,7 @@ class XTerminal(Terminal):
raise UnsupportedTerminal(self.name)
class Gnome(XTerminal):
- command = 'gnome-terminal -t "{title}" --disable-factory -x {command}'
+ command = 'gnome-terminal -t "{title}" -x {command}'
priority = 2
def __init__(self, sh_cmd, title=None, env=None, d=None):
@@ -63,12 +61,28 @@ class Gnome(XTerminal):
# Once fixed on the gnome-terminal project, this should be removed.
if os.getenv('LC_ALL'): os.putenv('LC_ALL','')
- # Check version
- vernum = check_terminal_version("gnome-terminal")
- if vernum and LooseVersion(vernum) >= '3.10':
- logger.debug(1, 'Gnome-Terminal 3.10 or later does not support --disable-factory')
- self.command = 'gnome-terminal -t "{title}" -x {command}'
- XTerminal.__init__(self, sh_cmd, title, env, d)
+ # We need to know when the command completes but gnome-terminal gives us no way
+ # to do this. We therefore write the pid to a file using a "phonehome" wrapper
+ # script, then monitor the pid until it exits. Thanks gnome!
+ import tempfile
+ pidfile = tempfile.NamedTemporaryFile(delete = False).name
+ try:
+ sh_cmd = "oe-gnome-terminal-phonehome " + pidfile + " " + sh_cmd
+ XTerminal.__init__(self, sh_cmd, title, env, d)
+ while os.stat(pidfile).st_size <= 0:
+ continue
+ with open(pidfile, "r") as f:
+ pid = int(f.readline())
+ finally:
+ os.unlink(pidfile)
+
+ import time
+ while True:
+ try:
+ os.kill(pid, 0)
+ time.sleep(0.1)
+ except OSError:
+ return
class Mate(XTerminal):
command = 'mate-terminal -t "{title}" -x {command}'
@@ -248,7 +262,7 @@ def check_terminal_version(terminalName):
newenv["LANG"] = "C"
p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE, stderr=sub.PIPE, env=newenv)
out, err = p.communicate()
- ver_info = out.rstrip().split('\n')
+ ver_info = out.decode().rstrip().split('\n')
except OSError as exc:
import errno
if exc.errno == errno.ENOENT:
diff --git a/import-layers/yocto-poky/meta/lib/oe/tests/test_elf.py b/import-layers/yocto-poky/meta/lib/oe/tests/test_elf.py
new file mode 100644
index 000000000..1f59037ed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oe/tests/test_elf.py
@@ -0,0 +1,21 @@
+import unittest
+import oe.qa
+
+class TestElf(unittest.TestCase):
+ def test_machine_name(self):
+ """
+ Test elf_machine_to_string()
+ """
+ self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
+ self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
+ self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
+
+ self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)")
+ self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")
+ self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown ('foobar')")
diff --git a/import-layers/yocto-poky/meta/lib/oe/tests/test_path.py b/import-layers/yocto-poky/meta/lib/oe/tests/test_path.py
index 3d41ce157..44d068143 100644
--- a/import-layers/yocto-poky/meta/lib/oe/tests/test_path.py
+++ b/import-layers/yocto-poky/meta/lib/oe/tests/test_path.py
@@ -55,7 +55,7 @@ class TestRealPath(unittest.TestCase):
for d in self.DIRS:
os.mkdir(os.path.join(self.root, d))
for f in self.FILES:
- file(os.path.join(self.root, f), "w")
+ open(os.path.join(self.root, f), "w")
for l in self.LINKS:
os.symlink(l[1], os.path.join(self.root, l[0]))
@@ -85,5 +85,5 @@ class TestRealPath(unittest.TestCase):
def test_loop(self):
for e in self.EXCEPTIONS:
- self.assertRaisesRegexp(OSError, r'\[Errno %u\]' % e[1],
+ self.assertRaisesRegex(OSError, r'\[Errno %u\]' % e[1],
self.__realpath, e[0], False, False)
diff --git a/import-layers/yocto-poky/meta/lib/oe/types.py b/import-layers/yocto-poky/meta/lib/oe/types.py
index 7f47c17d0..4ae58acfa 100644
--- a/import-layers/yocto-poky/meta/lib/oe/types.py
+++ b/import-layers/yocto-poky/meta/lib/oe/types.py
@@ -33,7 +33,7 @@ def choice(value, choices):
Acts as a multiple choice for the user. To use this, set the variable
type flag to 'choice', and set the 'choices' flag to a space separated
list of valid values."""
- if not isinstance(value, basestring):
+ if not isinstance(value, str):
raise TypeError("choice accepts a string, not '%s'" % type(value))
value = value.lower()
@@ -106,7 +106,7 @@ def boolean(value):
Valid values for false: 'no', 'n', 'false', 'f', '0'
"""
- if not isinstance(value, basestring):
+ if not isinstance(value, str):
raise TypeError("boolean accepts a string, not '%s'" % type(value))
value = value.lower()
diff --git a/import-layers/yocto-poky/meta/lib/oe/utils.py b/import-layers/yocto-poky/meta/lib/oe/utils.py
index 30d30629f..d6545b197 100644
--- a/import-layers/yocto-poky/meta/lib/oe/utils.py
+++ b/import-layers/yocto-poky/meta/lib/oe/utils.py
@@ -23,13 +23,13 @@ def ifelse(condition, iftrue = True, iffalse = False):
return iffalse
def conditional(variable, checkvalue, truevalue, falsevalue, d):
- if d.getVar(variable,1) == checkvalue:
+ if d.getVar(variable, True) == checkvalue:
return truevalue
else:
return falsevalue
def less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
- if float(d.getVar(variable,1)) <= float(checkvalue):
+ if float(d.getVar(variable, True)) <= float(checkvalue):
return truevalue
else:
return falsevalue
@@ -46,7 +46,7 @@ def both_contain(variable1, variable2, checkvalue, d):
val2 = d.getVar(variable2, True)
val1 = set(val1.split())
val2 = set(val2.split())
- if isinstance(checkvalue, basestring):
+ if isinstance(checkvalue, str):
checkvalue = set(checkvalue.split())
else:
checkvalue = set(checkvalue)
@@ -85,11 +85,11 @@ def prune_suffix(var, suffixes, d):
def str_filter(f, str, d):
from re import match
- return " ".join(filter(lambda x: match(f, x, 0), str.split()))
+ return " ".join([x for x in str.split() if match(f, x, 0)])
def str_filter_out(f, str, d):
from re import match
- return " ".join(filter(lambda x: not match(f, x, 0), str.split()))
+ return " ".join([x for x in str.split() if not match(f, x, 0)])
def param_bool(cfg, field, dflt = None):
"""Lookup <field> in <cfg> map and convert it to a boolean; take
@@ -134,7 +134,7 @@ def packages_filter_out_system(d):
PN-dbg PN-doc PN-locale-eb-gb removed.
"""
pn = d.getVar('PN', True)
- blacklist = map(lambda suffix: pn + suffix, ('', '-dbg', '-dev', '-doc', '-locale', '-staticdev'))
+ blacklist = [pn + suffix for suffix in ('', '-dbg', '-dev', '-doc', '-locale', '-staticdev')]
localepkg = pn + "-locale-"
pkgs = []
@@ -235,7 +235,7 @@ def format_pkg_list(pkg_dict, ret_format=None):
# so implement a version here
#
-from Queue import Queue
+from queue import Queue
from threading import Thread
class ThreadedWorker(Thread):
@@ -249,7 +249,7 @@ class ThreadedWorker(Thread):
self.worker_end = worker_end
def run(self):
- from Queue import Empty
+ from queue import Empty
if self.worker_init is not None:
self.worker_init(self)
@@ -264,8 +264,8 @@ class ThreadedWorker(Thread):
try:
func(self, *args, **kargs)
- except Exception, e:
- print e
+ except Exception as e:
+ print(e)
finally:
self.tasks.task_done()
@@ -304,3 +304,16 @@ def write_ld_so_conf(d):
with open(ldsoconf, "w") as f:
f.write(d.getVar("base_libdir", True) + '\n')
f.write(d.getVar("libdir", True) + '\n')
+
+class ImageQAFailed(bb.build.FuncFailed):
+ def __init__(self, description, name=None, logfile=None):
+ self.description = description
+ self.name = name
+ self.logfile=logfile
+
+ def __str__(self):
+ msg = 'Function failed: %s' % self.name
+ if self.description:
+ msg = msg + ' (%s)' % self.description
+
+ return msg
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/__init__.py b/import-layers/yocto-poky/meta/lib/oeqa/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/import-layers/yocto-poky/meta/lib/oeqa/__init__.py
+++ /dev/null
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/__init__.py b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/__init__.py
new file mode 100644
index 000000000..605f429ec
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/__init__.py
@@ -0,0 +1,19 @@
+# Copyright (c) 2016, Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+"""Build performance tests"""
+from .base import (BuildPerfTestCase,
+ BuildPerfTestLoader,
+ BuildPerfTestResult,
+ BuildPerfTestRunner,
+ KernelDropCaches,
+ runCmd2)
+from .test_basic import *
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py
new file mode 100644
index 000000000..59dd02521
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/base.py
@@ -0,0 +1,551 @@
+# Copyright (c) 2016, Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+"""Build performance test base classes and functionality"""
+import glob
+import json
+import logging
+import os
+import re
+import resource
+import shutil
+import socket
+import time
+import traceback
+import unittest
+from datetime import datetime, timedelta
+from functools import partial
+from multiprocessing import Process
+from multiprocessing import SimpleQueue
+
+import oe.path
+from oeqa.utils.commands import CommandError, runCmd, get_bb_vars
+from oeqa.utils.git import GitError, GitRepo
+
+# Get logger for this module
+log = logging.getLogger('build-perf')
+
+# Our own version of runCmd which does not raise AssertErrors which would cause
+# errors to interpreted as failures
+runCmd2 = partial(runCmd, assert_error=False)
+
+
+class KernelDropCaches(object):
+ """Container of the functions for dropping kernel caches"""
+ sudo_passwd = None
+
+ @classmethod
+ def check(cls):
+ """Check permssions for dropping kernel caches"""
+ from getpass import getpass
+ from locale import getdefaultlocale
+ cmd = ['sudo', '-k', '-n', 'tee', '/proc/sys/vm/drop_caches']
+ ret = runCmd2(cmd, ignore_status=True, data=b'0')
+ if ret.output.startswith('sudo:'):
+ pass_str = getpass(
+ "\nThe script requires sudo access to drop caches between "
+ "builds (echo 3 > /proc/sys/vm/drop_caches).\n"
+ "Please enter your sudo password: ")
+ cls.sudo_passwd = bytes(pass_str, getdefaultlocale()[1])
+
+ @classmethod
+ def drop(cls):
+ """Drop kernel caches"""
+ cmd = ['sudo', '-k']
+ if cls.sudo_passwd:
+ cmd.append('-S')
+ input_data = cls.sudo_passwd + b'\n'
+ else:
+ cmd.append('-n')
+ input_data = b''
+ cmd += ['tee', '/proc/sys/vm/drop_caches']
+ input_data += b'3'
+ runCmd2(cmd, data=input_data)
+
+
+def str_to_fn(string):
+ """Convert string to a sanitized filename"""
+ return re.sub(r'(\W+)', '-', string, flags=re.LOCALE)
+
+
+class ResultsJsonEncoder(json.JSONEncoder):
+ """Extended encoder for build perf test results"""
+ unix_epoch = datetime.utcfromtimestamp(0)
+
+ def default(self, obj):
+ """Encoder for our types"""
+ if isinstance(obj, datetime):
+ # NOTE: we assume that all timestamps are in UTC time
+ return (obj - self.unix_epoch).total_seconds()
+ if isinstance(obj, timedelta):
+ return obj.total_seconds()
+ return json.JSONEncoder.default(self, obj)
+
+
+class BuildPerfTestResult(unittest.TextTestResult):
+ """Runner class for executing the individual tests"""
+ # List of test cases to run
+ test_run_queue = []
+
+ def __init__(self, out_dir, *args, **kwargs):
+ super(BuildPerfTestResult, self).__init__(*args, **kwargs)
+
+ self.out_dir = out_dir
+ # Get Git parameters
+ try:
+ self.repo = GitRepo('.')
+ except GitError:
+ self.repo = None
+ self.git_commit, self.git_commit_count, self.git_branch = \
+ self.get_git_revision()
+ self.hostname = socket.gethostname()
+ self.product = os.getenv('OE_BUILDPERFTEST_PRODUCT', 'oe-core')
+ self.start_time = self.elapsed_time = None
+ self.successes = []
+ log.info("Using Git branch:commit %s:%s (%s)", self.git_branch,
+ self.git_commit, self.git_commit_count)
+
+ def get_git_revision(self):
+ """Get git branch and commit under testing"""
+ commit = os.getenv('OE_BUILDPERFTEST_GIT_COMMIT')
+ commit_cnt = os.getenv('OE_BUILDPERFTEST_GIT_COMMIT_COUNT')
+ branch = os.getenv('OE_BUILDPERFTEST_GIT_BRANCH')
+ if not self.repo and (not commit or not commit_cnt or not branch):
+ log.info("The current working directory doesn't seem to be a Git "
+ "repository clone. You can specify branch and commit "
+ "displayed in test results with OE_BUILDPERFTEST_GIT_BRANCH, "
+ "OE_BUILDPERFTEST_GIT_COMMIT and "
+ "OE_BUILDPERFTEST_GIT_COMMIT_COUNT environment variables")
+ else:
+ if not commit:
+ commit = self.repo.rev_parse('HEAD^0')
+ commit_cnt = self.repo.run_cmd(['rev-list', '--count', 'HEAD^0'])
+ if not branch:
+ branch = self.repo.get_current_branch()
+ if not branch:
+ log.debug('Currently on detached HEAD')
+ return str(commit), str(commit_cnt), str(branch)
+
+ def addSuccess(self, test):
+ """Record results from successful tests"""
+ super(BuildPerfTestResult, self).addSuccess(test)
+ self.successes.append((test, None))
+
+ def startTest(self, test):
+ """Pre-test hook"""
+ test.base_dir = self.out_dir
+ os.mkdir(test.out_dir)
+ log.info("Executing test %s: %s", test.name, test.shortDescription())
+ self.stream.write(datetime.now().strftime("[%Y-%m-%d %H:%M:%S] "))
+ super(BuildPerfTestResult, self).startTest(test)
+
+ def startTestRun(self):
+ """Pre-run hook"""
+ self.start_time = datetime.utcnow()
+
+ def stopTestRun(self):
+ """Pre-run hook"""
+ self.elapsed_time = datetime.utcnow() - self.start_time
+ self.write_results_json()
+
+ def all_results(self):
+ result_map = {'SUCCESS': self.successes,
+ 'FAIL': self.failures,
+ 'ERROR': self.errors,
+ 'EXP_FAIL': self.expectedFailures,
+ 'UNEXP_SUCCESS': self.unexpectedSuccesses,
+ 'SKIPPED': self.skipped}
+ for status, tests in result_map.items():
+ for test in tests:
+ yield (status, test)
+
+
+ def update_globalres_file(self, filename):
+ """Write results to globalres csv file"""
+ # Map test names to time and size columns in globalres
+ # The tuples represent index and length of times and sizes
+ # respectively
+ gr_map = {'test1': ((0, 1), (8, 1)),
+ 'test12': ((1, 1), (None, None)),
+ 'test13': ((2, 1), (9, 1)),
+ 'test2': ((3, 1), (None, None)),
+ 'test3': ((4, 3), (None, None)),
+ 'test4': ((7, 1), (10, 2))}
+
+ if self.repo:
+ git_tag_rev = self.repo.run_cmd(['describe', self.git_commit])
+ else:
+ git_tag_rev = self.git_commit
+
+ values = ['0'] * 12
+ for status, (test, msg) in self.all_results():
+ if status in ['ERROR', 'SKIPPED']:
+ continue
+ (t_ind, t_len), (s_ind, s_len) = gr_map[test.name]
+ if t_ind is not None:
+ values[t_ind:t_ind + t_len] = test.times
+ if s_ind is not None:
+ values[s_ind:s_ind + s_len] = test.sizes
+
+ log.debug("Writing globalres log to %s", filename)
+ with open(filename, 'a') as fobj:
+ fobj.write('{},{}:{},{},'.format(self.hostname,
+ self.git_branch,
+ self.git_commit,
+ git_tag_rev))
+ fobj.write(','.join(values) + '\n')
+
+ def write_results_json(self):
+ """Write test results into a json-formatted file"""
+ results = {'tester_host': self.hostname,
+ 'git_branch': self.git_branch,
+ 'git_commit': self.git_commit,
+ 'git_commit_count': self.git_commit_count,
+ 'product': self.product,
+ 'start_time': self.start_time,
+ 'elapsed_time': self.elapsed_time}
+
+ tests = {}
+ for status, (test, reason) in self.all_results():
+ tests[test.name] = {'name': test.name,
+ 'description': test.shortDescription(),
+ 'status': status,
+ 'start_time': test.start_time,
+ 'elapsed_time': test.elapsed_time,
+ 'cmd_log_file': os.path.relpath(test.cmd_log_file,
+ self.out_dir),
+ 'measurements': test.measurements}
+ results['tests'] = tests
+
+ with open(os.path.join(self.out_dir, 'results.json'), 'w') as fobj:
+ json.dump(results, fobj, indent=4, sort_keys=True,
+ cls=ResultsJsonEncoder)
+
+
+ def git_commit_results(self, repo_path, branch=None, tag=None):
+ """Commit results into a Git repository"""
+ repo = GitRepo(repo_path, is_topdir=True)
+ if not branch:
+ branch = self.git_branch
+ else:
+ # Replace keywords
+ branch = branch.format(git_branch=self.git_branch,
+ tester_host=self.hostname)
+
+ log.info("Committing test results into %s %s", repo_path, branch)
+ tmp_index = os.path.join(repo_path, '.git', 'index.oe-build-perf')
+ try:
+ # Create new commit object from the new results
+ env_update = {'GIT_INDEX_FILE': tmp_index,
+ 'GIT_WORK_TREE': self.out_dir}
+ repo.run_cmd('add .', env_update)
+ tree = repo.run_cmd('write-tree', env_update)
+ parent = repo.rev_parse(branch)
+ msg = "Results of {}:{}\n".format(self.git_branch, self.git_commit)
+ git_cmd = ['commit-tree', tree, '-m', msg]
+ if parent:
+ git_cmd += ['-p', parent]
+ commit = repo.run_cmd(git_cmd, env_update)
+
+ # Update branch head
+ git_cmd = ['update-ref', 'refs/heads/' + branch, commit]
+ if parent:
+ git_cmd.append(parent)
+ repo.run_cmd(git_cmd)
+
+ # Update current HEAD, if we're on branch 'branch'
+ if repo.get_current_branch() == branch:
+ log.info("Updating %s HEAD to latest commit", repo_path)
+ repo.run_cmd('reset --hard')
+
+ # Create (annotated) tag
+ if tag:
+ # Find tags matching the pattern
+ tag_keywords = dict(git_branch=self.git_branch,
+ git_commit=self.git_commit,
+ git_commit_count=self.git_commit_count,
+ tester_host=self.hostname,
+ tag_num='[0-9]{1,5}')
+ tag_re = re.compile(tag.format(**tag_keywords) + '$')
+ tag_keywords['tag_num'] = 0
+ for existing_tag in repo.run_cmd('tag').splitlines():
+ if tag_re.match(existing_tag):
+ tag_keywords['tag_num'] += 1
+
+ tag = tag.format(**tag_keywords)
+ msg = "Test run #{} of {}:{}\n".format(tag_keywords['tag_num'],
+ self.git_branch,
+ self.git_commit)
+ repo.run_cmd(['tag', '-a', '-m', msg, tag, commit])
+
+ finally:
+ if os.path.exists(tmp_index):
+ os.unlink(tmp_index)
+
+
+class BuildPerfTestCase(unittest.TestCase):
+ """Base class for build performance tests"""
+ SYSRES = 'sysres'
+ DISKUSAGE = 'diskusage'
+ build_target = None
+
+ def __init__(self, *args, **kwargs):
+ super(BuildPerfTestCase, self).__init__(*args, **kwargs)
+ self.name = self._testMethodName
+ self.base_dir = None
+ self.start_time = None
+ self.elapsed_time = None
+ self.measurements = []
+ self.bb_vars = get_bb_vars()
+ # TODO: remove 'times' and 'sizes' arrays when globalres support is
+ # removed
+ self.times = []
+ self.sizes = []
+
+ @property
+ def out_dir(self):
+ return os.path.join(self.base_dir, self.name)
+
+ @property
+ def cmd_log_file(self):
+ return os.path.join(self.out_dir, 'commands.log')
+
+ def setUp(self):
+ """Set-up fixture for each test"""
+ if self.build_target:
+ self.log_cmd_output(['bitbake', self.build_target,
+ '-c', 'fetchall'])
+
+ def run(self, *args, **kwargs):
+ """Run test"""
+ self.start_time = datetime.now()
+ super(BuildPerfTestCase, self).run(*args, **kwargs)
+ self.elapsed_time = datetime.now() - self.start_time
+
+ def log_cmd_output(self, cmd):
+ """Run a command and log it's output"""
+ cmd_str = cmd if isinstance(cmd, str) else ' '.join(cmd)
+ log.info("Logging command: %s", cmd_str)
+ try:
+ with open(self.cmd_log_file, 'a') as fobj:
+ runCmd2(cmd, stdout=fobj)
+ except CommandError as err:
+ log.error("Command failed: %s", err.retcode)
+ raise
+
+ def measure_cmd_resources(self, cmd, name, legend, save_bs=False):
+ """Measure system resource usage of a command"""
+ def _worker(data_q, cmd, **kwargs):
+ """Worker process for measuring resources"""
+ try:
+ start_time = datetime.now()
+ ret = runCmd2(cmd, **kwargs)
+ etime = datetime.now() - start_time
+ rusage_struct = resource.getrusage(resource.RUSAGE_CHILDREN)
+ iostat = {}
+ with open('/proc/{}/io'.format(os.getpid())) as fobj:
+ for line in fobj.readlines():
+ key, val = line.split(':')
+ iostat[key] = int(val)
+ rusage = {}
+ # Skip unused fields, (i.e. 'ru_ixrss', 'ru_idrss', 'ru_isrss',
+ # 'ru_nswap', 'ru_msgsnd', 'ru_msgrcv' and 'ru_nsignals')
+ for key in ['ru_utime', 'ru_stime', 'ru_maxrss', 'ru_minflt',
+ 'ru_majflt', 'ru_inblock', 'ru_oublock',
+ 'ru_nvcsw', 'ru_nivcsw']:
+ rusage[key] = getattr(rusage_struct, key)
+ data_q.put({'ret': ret,
+ 'start_time': start_time,
+ 'elapsed_time': etime,
+ 'rusage': rusage,
+ 'iostat': iostat})
+ except Exception as err:
+ data_q.put(err)
+
+ cmd_str = cmd if isinstance(cmd, str) else ' '.join(cmd)
+ log.info("Timing command: %s", cmd_str)
+ data_q = SimpleQueue()
+ try:
+ with open(self.cmd_log_file, 'a') as fobj:
+ proc = Process(target=_worker, args=(data_q, cmd,),
+ kwargs={'stdout': fobj})
+ proc.start()
+ data = data_q.get()
+ proc.join()
+ if isinstance(data, Exception):
+ raise data
+ except CommandError:
+ log.error("Command '%s' failed, see %s for more details", cmd_str,
+ self.cmd_log_file)
+ raise
+ etime = data['elapsed_time']
+
+ measurement = {'type': self.SYSRES,
+ 'name': name,
+ 'legend': legend}
+ measurement['values'] = {'start_time': data['start_time'],
+ 'elapsed_time': etime,
+ 'rusage': data['rusage'],
+ 'iostat': data['iostat']}
+ if save_bs:
+ bs_file = self.save_buildstats(legend)
+ measurement['values']['buildstats_file'] = \
+ os.path.relpath(bs_file, self.base_dir)
+
+ self.measurements.append(measurement)
+
+ # Append to 'times' array for globalres log
+ e_sec = etime.total_seconds()
+ self.times.append('{:d}:{:02d}:{:05.2f}'.format(int(e_sec / 3600),
+ int((e_sec % 3600) / 60),
+ e_sec % 60))
+
+ def measure_disk_usage(self, path, name, legend, apparent_size=False):
+ """Estimate disk usage of a file or directory"""
+ cmd = ['du', '-s', '--block-size', '1024']
+ if apparent_size:
+ cmd.append('--apparent-size')
+ cmd.append(path)
+
+ ret = runCmd2(cmd)
+ size = int(ret.output.split()[0])
+ log.debug("Size of %s path is %s", path, size)
+ measurement = {'type': self.DISKUSAGE,
+ 'name': name,
+ 'legend': legend}
+ measurement['values'] = {'size': size}
+ self.measurements.append(measurement)
+ # Append to 'sizes' array for globalres log
+ self.sizes.append(str(size))
+
+ def save_buildstats(self, label=None):
+ """Save buildstats"""
+ def split_nevr(nevr):
+ """Split name and version information from recipe "nevr" string"""
+ n_e_v, revision = nevr.rsplit('-', 1)
+ match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[0-9]\S*)$',
+ n_e_v)
+ if not match:
+ # If we're not able to parse a version starting with a number, just
+ # take the part after last dash
+ match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[^-]+)$',
+ n_e_v)
+ name = match.group('name')
+ version = match.group('version')
+ epoch = match.group('epoch')
+ return name, epoch, version, revision
+
+ def bs_to_json(filename):
+ """Convert (task) buildstats file into json format"""
+ bs_json = {'iostat': {},
+ 'rusage': {},
+ 'child_rusage': {}}
+ with open(filename) as fobj:
+ for line in fobj.readlines():
+ key, val = line.split(':', 1)
+ val = val.strip()
+ if key == 'Started':
+ start_time = datetime.utcfromtimestamp(float(val))
+ bs_json['start_time'] = start_time
+ elif key == 'Ended':
+ end_time = datetime.utcfromtimestamp(float(val))
+ elif key.startswith('IO '):
+ split = key.split()
+ bs_json['iostat'][split[1]] = int(val)
+ elif key.find('rusage') >= 0:
+ split = key.split()
+ ru_key = split[-1]
+ if ru_key in ('ru_stime', 'ru_utime'):
+ val = float(val)
+ else:
+ val = int(val)
+ ru_type = 'rusage' if split[0] == 'rusage' else \
+ 'child_rusage'
+ bs_json[ru_type][ru_key] = val
+ elif key == 'Status':
+ bs_json['status'] = val
+ bs_json['elapsed_time'] = end_time - start_time
+ return bs_json
+
+ log.info('Saving buildstats in JSON format')
+ bs_dirs = sorted(os.listdir(self.bb_vars['BUILDSTATS_BASE']))
+ if len(bs_dirs) > 1:
+ log.warning("Multiple buildstats found for test %s, only "
+ "archiving the last one", self.name)
+ bs_dir = os.path.join(self.bb_vars['BUILDSTATS_BASE'], bs_dirs[-1])
+
+ buildstats = []
+ for fname in os.listdir(bs_dir):
+ recipe_dir = os.path.join(bs_dir, fname)
+ if not os.path.isdir(recipe_dir):
+ continue
+ name, epoch, version, revision = split_nevr(fname)
+ recipe_bs = {'name': name,
+ 'epoch': epoch,
+ 'version': version,
+ 'revision': revision,
+ 'tasks': {}}
+ for task in os.listdir(recipe_dir):
+ recipe_bs['tasks'][task] = bs_to_json(os.path.join(recipe_dir,
+ task))
+ buildstats.append(recipe_bs)
+
+ # Write buildstats into json file
+ postfix = '.' + str_to_fn(label) if label else ''
+ postfix += '.json'
+ outfile = os.path.join(self.out_dir, 'buildstats' + postfix)
+ with open(outfile, 'w') as fobj:
+ json.dump(buildstats, fobj, indent=4, sort_keys=True,
+ cls=ResultsJsonEncoder)
+ return outfile
+
+ def rm_tmp(self):
+ """Cleanup temporary/intermediate files and directories"""
+ log.debug("Removing temporary and cache files")
+ for name in ['bitbake.lock', 'conf/sanity_info',
+ self.bb_vars['TMPDIR']]:
+ oe.path.remove(name, recurse=True)
+
+ def rm_sstate(self):
+ """Remove sstate directory"""
+ log.debug("Removing sstate-cache")
+ oe.path.remove(self.bb_vars['SSTATE_DIR'], recurse=True)
+
+ def rm_cache(self):
+ """Drop bitbake caches"""
+ oe.path.remove(self.bb_vars['PERSISTENT_DIR'], recurse=True)
+
+ @staticmethod
+ def sync():
+ """Sync and drop kernel caches"""
+ log.debug("Syncing and dropping kernel caches""")
+ KernelDropCaches.drop()
+ os.sync()
+ # Wait a bit for all the dirty blocks to be written onto disk
+ time.sleep(3)
+
+
+class BuildPerfTestLoader(unittest.TestLoader):
+ """Test loader for build performance tests"""
+ sortTestMethodsUsing = None
+
+
+class BuildPerfTestRunner(unittest.TextTestRunner):
+ """Test loader for build performance tests"""
+ sortTestMethodsUsing = None
+
+ def __init__(self, out_dir, *args, **kwargs):
+ super(BuildPerfTestRunner, self).__init__(*args, **kwargs)
+ self.out_dir = out_dir
+
+ def _makeResult(self):
+ return BuildPerfTestResult(self.out_dir, self.stream, self.descriptions,
+ self.verbosity)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py
new file mode 100644
index 000000000..7a48c1e77
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/buildperf/test_basic.py
@@ -0,0 +1,127 @@
+# Copyright (c) 2016, Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+# more details.
+#
+"""Basic set of build performance tests"""
+import os
+import shutil
+
+import oe.path
+from oeqa.buildperf import BuildPerfTestCase
+from oeqa.utils.commands import get_bb_vars
+
+
+class Test1P1(BuildPerfTestCase):
+ build_target = 'core-image-sato'
+
+ def test1(self):
+ """Measure wall clock of bitbake core-image-sato and size of tmp dir"""
+ self.rm_tmp()
+ self.rm_sstate()
+ self.rm_cache()
+ self.sync()
+ self.measure_cmd_resources(['bitbake', self.build_target], 'build',
+ 'bitbake ' + self.build_target, save_bs=True)
+ self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir')
+
+
+class Test1P2(BuildPerfTestCase):
+ build_target = 'virtual/kernel'
+
+ def test12(self):
+ """Measure bitbake virtual/kernel"""
+ # Build and cleans state in order to get all dependencies pre-built
+ self.log_cmd_output(['bitbake', self.build_target])
+ self.log_cmd_output(['bitbake', self.build_target, '-c', 'cleansstate'])
+
+ self.sync()
+ self.measure_cmd_resources(['bitbake', self.build_target], 'build',
+ 'bitbake ' + self.build_target)
+
+
+class Test1P3(BuildPerfTestCase):
+ build_target = 'core-image-sato'
+
+ def test13(self):
+ """Build core-image-sato with rm_work enabled"""
+ postfile = os.path.join(self.out_dir, 'postfile.conf')
+ with open(postfile, 'w') as fobj:
+ fobj.write('INHERIT += "rm_work"\n')
+ try:
+ self.rm_tmp()
+ self.rm_sstate()
+ self.rm_cache()
+ self.sync()
+ cmd = ['bitbake', '-R', postfile, self.build_target]
+ self.measure_cmd_resources(cmd, 'build',
+ 'bitbake' + self.build_target,
+ save_bs=True)
+ self.measure_disk_usage(self.bb_vars['TMPDIR'], 'tmpdir', 'tmpdir')
+ finally:
+ os.unlink(postfile)
+
+
+class Test2(BuildPerfTestCase):
+ build_target = 'core-image-sato'
+
+ def test2(self):
+ """Measure bitbake core-image-sato -c rootfs with sstate"""
+ # Build once in order to populate sstate cache
+ self.log_cmd_output(['bitbake', self.build_target])
+
+ self.rm_tmp()
+ self.rm_cache()
+ self.sync()
+ cmd = ['bitbake', self.build_target, '-c', 'rootfs']
+ self.measure_cmd_resources(cmd, 'do_rootfs', 'bitbake do_rootfs')
+
+
+class Test3(BuildPerfTestCase):
+
+ def test3(self):
+ """Parsing time metrics (bitbake -p)"""
+ # Drop all caches and parse
+ self.rm_cache()
+ oe.path.remove(os.path.join(self.bb_vars['TMPDIR'], 'cache'), True)
+ self.measure_cmd_resources(['bitbake', '-p'], 'parse_1',
+ 'bitbake -p (no caches)')
+ # Drop tmp/cache
+ oe.path.remove(os.path.join(self.bb_vars['TMPDIR'], 'cache'), True)
+ self.measure_cmd_resources(['bitbake', '-p'], 'parse_2',
+ 'bitbake -p (no tmp/cache)')
+ # Parse with fully cached data
+ self.measure_cmd_resources(['bitbake', '-p'], 'parse_3',
+ 'bitbake -p (cached)')
+
+
+class Test4(BuildPerfTestCase):
+ build_target = 'core-image-sato'
+
+ def test4(self):
+ """eSDK metrics"""
+ self.log_cmd_output("bitbake {} -c do_populate_sdk_ext".format(
+ self.build_target))
+ self.bb_vars = get_bb_vars(None, self.build_target)
+ tmp_dir = self.bb_vars['TMPDIR']
+ installer = os.path.join(
+ self.bb_vars['SDK_DEPLOY'],
+ self.bb_vars['TOOLCHAINEXT_OUTPUTNAME'] + '.sh')
+ # Measure installer size
+ self.measure_disk_usage(installer, 'installer_bin', 'eSDK installer',
+ apparent_size=True)
+ # Measure deployment time and deployed size
+ deploy_dir = os.path.join(tmp_dir, 'esdk-deploy')
+ if os.path.exists(deploy_dir):
+ shutil.rmtree(deploy_dir)
+ self.sync()
+ self.measure_cmd_resources([installer, '-y', '-d', deploy_dir],
+ 'deploy', 'eSDK deploy')
+ self.measure_disk_usage(deploy_dir, 'deploy_dir', 'deploy dir',
+ apparent_size=True)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/controllers/masterimage.py b/import-layers/yocto-poky/meta/lib/oeqa/controllers/masterimage.py
index 522f9ebd7..9ce3bf803 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/controllers/masterimage.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/controllers/masterimage.py
@@ -24,9 +24,7 @@ from oeqa.utils import CommandError
from abc import ABCMeta, abstractmethod
-class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget):
-
- __metaclass__ = ABCMeta
+class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta):
supported_image_fstypes = ['tar.gz', 'tar.bz2']
@@ -199,3 +197,43 @@ class GummibootTarget(MasterImageHardwareTarget):
self.power_cycle(self.master)
# there are better ways than a timeout but this should work for now
time.sleep(120)
+
+
+class SystemdbootTarget(MasterImageHardwareTarget):
+
+ def __init__(self, d):
+ super(SystemdbootTarget, self).__init__(d)
+ # this the value we need to set in the LoaderEntryOneShot EFI variable
+ # so the system boots the 'test' bootloader label and not the default
+ # The first four bytes are EFI bits, and the rest is an utf-16le string
+ # (EFI vars values need to be utf-16)
+ # $ echo -en "test\0" | iconv -f ascii -t utf-16le | hexdump -C
+ # 00000000 74 00 65 00 73 00 74 00 00 00 |t.e.s.t...|
+ self.efivarvalue = r'\x07\x00\x00\x00\x74\x00\x65\x00\x73\x00\x74\x00\x00\x00'
+ self.deploy_cmds = [
+ 'mount -L boot /boot',
+ 'mkdir -p /mnt/testrootfs',
+ 'mount -L testrootfs /mnt/testrootfs',
+ 'modprobe efivarfs',
+ 'mount -t efivarfs efivarfs /sys/firmware/efi/efivars',
+ 'cp ~/test-kernel /boot',
+ 'rm -rf /mnt/testrootfs/*',
+ 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype,
+ 'printf "%s" > /sys/firmware/efi/efivars/LoaderEntryOneShot-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f' % self.efivarvalue
+ ]
+
+ def _deploy(self):
+ # make sure these aren't mounted
+ self.master.run("umount /boot; umount /mnt/testrootfs; umount /sys/firmware/efi/efivars;")
+ # from now on, every deploy cmd should return 0
+ # else an exception will be thrown by sshcontrol
+ self.master.ignore_status = False
+ self.master.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype)
+ self.master.copy_to(self.kernel, "~/test-kernel")
+ for cmd in self.deploy_cmds:
+ self.master.run(cmd)
+
+ def _start(self, params=None):
+ self.power_cycle(self.master)
+ # there are better ways than a timeout but this should work for now
+ time.sleep(120)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/oetest.py b/import-layers/yocto-poky/meta/lib/oeqa/oetest.py
index 3ed5bb8c2..95d3bf72f 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/oetest.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/oetest.py
@@ -12,6 +12,8 @@ import unittest
import inspect
import subprocess
import signal
+import shutil
+import functools
try:
import bb
except ImportError:
@@ -54,18 +56,29 @@ def filterByTagExp(testsuite, tagexp):
@LogResults
class oeTest(unittest.TestCase):
+ pscmd = "ps"
longMessage = True
@classmethod
def hasPackage(self, pkg):
- for item in oeTest.tc.pkgmanifest.split('\n'):
- if re.match(pkg, item):
+ """
+ True if the full package name exists in the manifest, False otherwise.
+ """
+ return pkg in oeTest.tc.pkgmanifest
+
+ @classmethod
+ def hasPackageMatch(self, match):
+ """
+ True if match exists in the manifest as a regular expression substring,
+ False otherwise.
+ """
+ for s in oeTest.tc.pkgmanifest:
+ if re.match(match, s):
return True
return False
@classmethod
def hasFeature(self,feature):
-
if feature in oeTest.tc.imagefeatures or \
feature in oeTest.tc.distrofeatures:
return True
@@ -78,6 +91,9 @@ class oeRuntimeTest(oeTest):
super(oeRuntimeTest, self).__init__(methodName)
def setUp(self):
+ # Install packages in the DUT
+ self.tc.install_uninstall_packages(self.id())
+
# Check if test needs to run
if self.tc.sigterm:
self.fail("Got SIGTERM")
@@ -91,6 +107,9 @@ class oeRuntimeTest(oeTest):
pass
def tearDown(self):
+ # Unistall packages in the DUT
+ self.tc.install_uninstall_packages(self.id(), False)
+
res = getResults()
# If a test fails or there is an exception dump
# for QemuTarget only
@@ -117,6 +136,15 @@ class oeRuntimeTest(oeTest):
if status != 0:
return status
+class OETestCalledProcessError(subprocess.CalledProcessError):
+ def __str__(self):
+ if hasattr(self, "stderr"):
+ return "Command '%s' returned non-zero exit status %d with output %s and stderr %s" % (self.cmd, self.returncode, self.output, self.stderr)
+ else:
+ return "Command '%s' returned non-zero exit status %d with output %s" % (self.cmd, self.returncode, self.output)
+
+subprocess.CalledProcessError = OETestCalledProcessError
+
class oeSDKTest(oeTest):
def __init__(self, methodName='runTest'):
self.sdktestdir = oeSDKTest.tc.sdktestdir
@@ -124,13 +152,12 @@ class oeSDKTest(oeTest):
@classmethod
def hasHostPackage(self, pkg):
-
if re.search(pkg, oeTest.tc.hostpkgmanifest):
return True
return False
def _run(self, cmd):
- return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True)
+ return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True, stderr=subprocess.STDOUT).decode("utf-8")
class oeSDKExtTest(oeSDKTest):
def _run(self, cmd):
@@ -142,7 +169,7 @@ class oeSDKExtTest(oeSDKTest):
env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
return subprocess.check_output(". %s > /dev/null;"\
- " %s;" % (self.tc.sdkenv, cmd), shell=True, env=env)
+ " %s;" % (self.tc.sdkenv, cmd), stderr=subprocess.STDOUT, shell=True, env=env).decode("utf-8")
def getmodule(pos=2):
# stack returns a list of tuples containg frame information
@@ -185,15 +212,22 @@ def custom_verbose(msg, *args, **kwargs):
_buffer_logger = ""
class TestContext(object):
- def __init__(self, d):
+ def __init__(self, d, exported=False):
self.d = d
self.testsuites = self._get_test_suites()
- self.testslist = self._get_tests_list(d.getVar("BBPATH", True).split(':'))
+
+ if exported:
+ path = [os.path.dirname(os.path.abspath(__file__))]
+ extrapath = ""
+ else:
+ path = d.getVar("BBPATH", True).split(':')
+ extrapath = "lib/oeqa"
+
+ self.testslist = self._get_tests_list(path, extrapath)
self.testsrequired = self._get_test_suites_required()
- self.filesdir = os.path.join(os.path.dirname(os.path.abspath(
- oeqa.runtime.__file__)), "files")
+ self.filesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "runtime/files")
self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
@@ -212,7 +246,7 @@ class TestContext(object):
return " ".join(tcs)
# return test list by type also filter if TEST_SUITES is specified
- def _get_tests_list(self, bbpath):
+ def _get_tests_list(self, bbpath, extrapath):
testslist = []
type = self._get_test_namespace()
@@ -226,11 +260,11 @@ class TestContext(object):
continue
found = False
for p in bbpath:
- if os.path.exists(os.path.join(p, 'lib', 'oeqa', type, testname + '.py')):
+ if os.path.exists(os.path.join(p, extrapath, type, testname + ".py")):
testslist.append("oeqa." + type + "." + testname)
found = True
break
- elif os.path.exists(os.path.join(p, 'lib', 'oeqa', type, testname.split(".")[0] + '.py')):
+ elif os.path.exists(os.path.join(p, extrapath, type, testname.split(".")[0] + ".py")):
testslist.append("oeqa." + type + "." + testname)
found = True
break
@@ -239,8 +273,6 @@ class TestContext(object):
if "auto" in self.testsuites:
def add_auto_list(path):
- if not os.path.exists(os.path.join(path, '__init__.py')):
- bb.fatal('Tests directory %s exists but is missing __init__.py' % path)
files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')])
for f in files:
module = 'oeqa.' + type + '.' + f[:-3]
@@ -255,6 +287,51 @@ class TestContext(object):
return testslist
+ def getTestModules(self):
+ """
+ Returns all the test modules in the testlist.
+ """
+
+ import pkgutil
+
+ modules = []
+ for test in self.testslist:
+ if re.search("\w+\.\w+\.test_\S+", test):
+ test = '.'.join(t.split('.')[:3])
+ module = pkgutil.get_loader(test)
+ modules.append(module)
+
+ return modules
+
+ def getModulefromID(self, test_id):
+ """
+ Returns the test module based on a test id.
+ """
+
+ module_name = ".".join(test_id.split(".")[:3])
+ modules = self.getTestModules()
+ for module in modules:
+ if module.name == module_name:
+ return module
+
+ return None
+
+ def getTests(self, test):
+ '''Return all individual tests executed when running the suite.'''
+ # Unfortunately unittest does not have an API for this, so we have
+ # to rely on implementation details. This only needs to work
+ # for TestSuite containing TestCase.
+ method = getattr(test, '_testMethodName', None)
+ if method:
+ # leaf case: a TestCase
+ yield test
+ else:
+ # Look into TestSuite.
+ tests = getattr(test, '_tests', [])
+ for t1 in tests:
+ for t2 in self.getTests(t1):
+ yield t2
+
def loadTests(self):
setattr(oeTest, "tc", self)
@@ -263,36 +340,20 @@ class TestContext(object):
suites = [testloader.loadTestsFromName(name) for name in self.testslist]
suites = filterByTagExp(suites, getattr(self, "tagexp", None))
- def getTests(test):
- '''Return all individual tests executed when running the suite.'''
- # Unfortunately unittest does not have an API for this, so we have
- # to rely on implementation details. This only needs to work
- # for TestSuite containing TestCase.
- method = getattr(test, '_testMethodName', None)
- if method:
- # leaf case: a TestCase
- yield test
- else:
- # Look into TestSuite.
- tests = getattr(test, '_tests', [])
- for t1 in tests:
- for t2 in getTests(t1):
- yield t2
-
# Determine dependencies between suites by looking for @skipUnlessPassed
# method annotations. Suite A depends on suite B if any method in A
# depends on a method on B.
for suite in suites:
suite.dependencies = []
suite.depth = 0
- for test in getTests(suite):
+ for test in self.getTests(suite):
methodname = getattr(test, '_testMethodName', None)
if methodname:
method = getattr(test, methodname)
depends_on = getattr(method, '_depends_on', None)
if depends_on:
for dep_suite in suites:
- if depends_on in [getattr(t, '_testMethodName', None) for t in getTests(dep_suite)]:
+ if depends_on in [getattr(t, '_testMethodName', None) for t in self.getTests(dep_suite)]:
if dep_suite not in suite.dependencies and \
dep_suite is not suite:
suite.dependencies.append(dep_suite)
@@ -314,7 +375,14 @@ class TestContext(object):
for index, suite in enumerate(suites):
set_suite_depth(suite)
suite.index = index
- suites.sort(cmp=lambda a,b: cmp((a.depth, a.index), (b.depth, b.index)))
+
+ def cmp(a, b):
+ return (a > b) - (a < b)
+
+ def cmpfunc(a, b):
+ return cmp((a.depth, a.index), (b.depth, b.index))
+
+ suites.sort(key=functools.cmp_to_key(cmpfunc))
self.suite = testloader.suiteClass(suites)
@@ -331,35 +399,24 @@ class TestContext(object):
return runner.run(self.suite)
-class ImageTestContext(TestContext):
- def __init__(self, d, target, host_dumper):
- super(ImageTestContext, self).__init__(d)
-
- self.tagexp = d.getVar("TEST_SUITES_TAGS", True)
+class RuntimeTestContext(TestContext):
+ def __init__(self, d, target, exported=False):
+ super(RuntimeTestContext, self).__init__(d, exported)
self.target = target
- self.host_dumper = host_dumper
+ self.pkgmanifest = {}
manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True),
d.getVar("IMAGE_LINK_NAME", True) + ".manifest")
nomanifest = d.getVar("IMAGE_NO_MANIFEST", True)
if nomanifest is None or nomanifest != "1":
try:
with open(manifest) as f:
- self.pkgmanifest = f.read()
+ for line in f:
+ (pkg, arch, version) = line.strip().split()
+ self.pkgmanifest[pkg] = (version, arch)
except IOError as e:
bb.fatal("No package manifest file found. Did you build the image?\n%s" % e)
- else:
- self.pkgmanifest = ""
-
- self.sigterm = False
- self.origsigtermhandler = signal.getsignal(signal.SIGTERM)
- signal.signal(signal.SIGTERM, self._sigterm_exception)
-
- def _sigterm_exception(self, signum, stackframe):
- bb.warn("TestImage received SIGTERM, shutting down...")
- self.sigterm = True
- self.target.stop()
def _get_test_namespace(self):
return "runtime"
@@ -382,8 +439,223 @@ class ImageTestContext(TestContext):
return [t for t in self.d.getVar("TEST_SUITES", True).split() if t != "auto"]
def loadTests(self):
- super(ImageTestContext, self).loadTests()
- setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps")
+ super(RuntimeTestContext, self).loadTests()
+ if oeTest.hasPackage("procps"):
+ oeRuntimeTest.pscmd = "ps -ef"
+
+ def extract_packages(self):
+ """
+ Find packages that will be needed during runtime.
+ """
+
+ modules = self.getTestModules()
+ bbpaths = self.d.getVar("BBPATH", True).split(":")
+
+ shutil.rmtree(self.d.getVar("TEST_EXTRACTED_DIR", True))
+ shutil.rmtree(self.d.getVar("TEST_PACKAGED_DIR", True))
+ for module in modules:
+ json_file = self._getJsonFile(module)
+ if json_file:
+ needed_packages = self._getNeededPackages(json_file)
+ self._perform_package_extraction(needed_packages)
+
+ def _perform_package_extraction(self, needed_packages):
+ """
+ Extract packages that will be needed during runtime.
+ """
+
+ import oe.path
+
+ extracted_path = self.d.getVar("TEST_EXTRACTED_DIR", True)
+ packaged_path = self.d.getVar("TEST_PACKAGED_DIR", True)
+
+ for key,value in needed_packages.items():
+ packages = ()
+ if isinstance(value, dict):
+ packages = (value, )
+ elif isinstance(value, list):
+ packages = value
+ else:
+ bb.fatal("Failed to process needed packages for %s; "
+ "Value must be a dict or list" % key)
+
+ for package in packages:
+ pkg = package["pkg"]
+ rm = package.get("rm", False)
+ extract = package.get("extract", True)
+ if extract:
+ dst_dir = os.path.join(extracted_path, pkg)
+ else:
+ dst_dir = os.path.join(packaged_path)
+
+ # Extract package and copy it to TEST_EXTRACTED_DIR
+ pkg_dir = self._extract_in_tmpdir(pkg)
+ if extract:
+
+ # Same package used for more than one test,
+ # don't need to extract again.
+ if os.path.exists(dst_dir):
+ continue
+ oe.path.copytree(pkg_dir, dst_dir)
+ shutil.rmtree(pkg_dir)
+
+ # Copy package to TEST_PACKAGED_DIR
+ else:
+ self._copy_package(pkg)
+
+ def _getJsonFile(self, module):
+ """
+ Returns the path of the JSON file for a module, empty if doesn't exitst.
+ """
+
+ module_file = module.path
+ json_file = "%s.json" % module_file.rsplit(".", 1)[0]
+ if os.path.isfile(module_file) and os.path.isfile(json_file):
+ return json_file
+ else:
+ return ""
+
+ def _getNeededPackages(self, json_file, test=None):
+ """
+ Returns a dict with needed packages based on a JSON file.
+
+
+ If a test is specified it will return the dict just for that test.
+ """
+
+ import json
+
+ needed_packages = {}
+
+ with open(json_file) as f:
+ test_packages = json.load(f)
+ for key,value in test_packages.items():
+ needed_packages[key] = value
+
+ if test:
+ if test in needed_packages:
+ needed_packages = needed_packages[test]
+ else:
+ needed_packages = {}
+
+ return needed_packages
+
+ def _extract_in_tmpdir(self, pkg):
+ """"
+ Returns path to a temp directory where the package was
+ extracted without dependencies.
+ """
+
+ from oeqa.utils.package_manager import get_package_manager
+
+ pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR", True), pkg)
+ pm = get_package_manager(self.d, pkg_path)
+ extract_dir = pm.extract(pkg)
+ shutil.rmtree(pkg_path)
+
+ return extract_dir
+
+ def _copy_package(self, pkg):
+ """
+ Copy the RPM, DEB or IPK package to dst_dir
+ """
+
+ from oeqa.utils.package_manager import get_package_manager
+
+ pkg_path = os.path.join(self.d.getVar("TEST_INSTALL_TMP_DIR", True), pkg)
+ dst_dir = self.d.getVar("TEST_PACKAGED_DIR", True)
+ pm = get_package_manager(self.d, pkg_path)
+ pkg_info = pm.package_info(pkg)
+ file_path = pkg_info[pkg]["filepath"]
+ shutil.copy2(file_path, dst_dir)
+ shutil.rmtree(pkg_path)
+
+ def install_uninstall_packages(self, test_id, pkg_dir, install):
+ """
+ Check if the test requires a package and Install/Unistall it in the DUT
+ """
+
+ test = test_id.split(".")[4]
+ module = self.getModulefromID(test_id)
+ json = self._getJsonFile(module)
+ if json:
+ needed_packages = self._getNeededPackages(json, test)
+ if needed_packages:
+ self._install_uninstall_packages(needed_packages, pkg_dir, install)
+
+ def _install_uninstall_packages(self, needed_packages, pkg_dir, install=True):
+ """
+ Install/Unistall packages in the DUT without using a package manager
+ """
+
+ if isinstance(needed_packages, dict):
+ packages = [needed_packages]
+ elif isinstance(needed_packages, list):
+ packages = needed_packages
+
+ for package in packages:
+ pkg = package["pkg"]
+ rm = package.get("rm", False)
+ extract = package.get("extract", True)
+ src_dir = os.path.join(pkg_dir, pkg)
+
+ # Install package
+ if install and extract:
+ self.target.connection.copy_dir_to(src_dir, "/")
+
+ # Unistall package
+ elif not install and rm:
+ self.target.connection.delete_dir_structure(src_dir, "/")
+
+class ImageTestContext(RuntimeTestContext):
+ def __init__(self, d, target, host_dumper):
+ super(ImageTestContext, self).__init__(d, target)
+
+ self.tagexp = d.getVar("TEST_SUITES_TAGS", True)
+
+ self.host_dumper = host_dumper
+
+ self.sigterm = False
+ self.origsigtermhandler = signal.getsignal(signal.SIGTERM)
+ signal.signal(signal.SIGTERM, self._sigterm_exception)
+
+ def _sigterm_exception(self, signum, stackframe):
+ bb.warn("TestImage received SIGTERM, shutting down...")
+ self.sigterm = True
+ self.target.stop()
+
+ def install_uninstall_packages(self, test_id, install=True):
+ """
+ Check if the test requires a package and Install/Unistall it in the DUT
+ """
+
+ pkg_dir = self.d.getVar("TEST_EXTRACTED_DIR", True)
+ super(ImageTestContext, self).install_uninstall_packages(test_id, pkg_dir, install)
+
+class ExportTestContext(RuntimeTestContext):
+ def __init__(self, d, target, exported=False, parsedArgs={}):
+ """
+ This class is used when exporting tests and when are executed outside OE environment.
+
+ parsedArgs can contain the following:
+ - tag: Filter test by tag.
+ """
+ super(ExportTestContext, self).__init__(d, target, exported)
+
+ tag = parsedArgs.get("tag", None)
+ self.tagexp = tag if tag != None else d.getVar("TEST_SUITES_TAGS", True)
+
+ self.sigterm = None
+
+ def install_uninstall_packages(self, test_id, install=True):
+ """
+ Check if the test requires a package and Install/Unistall it in the DUT
+ """
+
+ export_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+ extracted_dir = self.d.getVar("TEST_EXPORT_EXTRACTED_DIR", True)
+ pkg_dir = os.path.join(export_dir, extracted_dir)
+ super(ExportTestContext, self).install_uninstall_packages(test_id, pkg_dir, install)
class SDKTestContext(TestContext):
def __init__(self, d, sdktestdir, sdkenv, tcname, *args):
@@ -396,8 +668,11 @@ class SDKTestContext(TestContext):
if not hasattr(self, 'target_manifest'):
self.target_manifest = d.getVar("SDK_TARGET_MANIFEST", True)
try:
+ self.pkgmanifest = {}
with open(self.target_manifest) as f:
- self.pkgmanifest = f.read()
+ for line in f:
+ (pkg, arch, version) = line.strip().split()
+ self.pkgmanifest[pkg] = (version, arch)
except IOError as e:
bb.fatal("No package manifest file found. Did you build the sdk image?\n%s" % e)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runexported.py b/import-layers/yocto-poky/meta/lib/oeqa/runexported.py
index cc89e13c0..7e245c412 100755
--- a/import-layers/yocto-poky/meta/lib/oeqa/runexported.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runexported.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (C) 2013 Intel Corporation
@@ -30,9 +30,9 @@ except ImportError:
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "oeqa")))
-from oeqa.oetest import TestContext
+from oeqa.oetest import ExportTestContext
+from oeqa.utils.commands import runCmd, updateEnv
from oeqa.utils.sshcontrol import SSHControl
-from oeqa.utils.dump import get_host_dumper
# this isn't pretty but we need a fake target object
# for running the tests externally as we don't care
@@ -69,10 +69,6 @@ class MyDataDict(dict):
def getVar(self, key, unused = None):
return self.get(key, "")
-class ExportTestContext(TestContext):
- def __init__(self, d):
- self.d = d
-
def main():
parser = argparse.ArgumentParser()
@@ -85,6 +81,7 @@ def main():
specified in the json if that directory actually exists or it will error out.")
parser.add_argument("-l", "--log-dir", dest="log_dir", help="This sets the path for TEST_LOG_DIR. If not specified \
the current dir is used. This is used for usually creating a ssh log file and a scp test file.")
+ parser.add_argument("-a", "--tag", dest="tag", help="Only run test with specified tag.")
parser.add_argument("json", help="The json file exported by the build system", default="testdata.json", nargs='?')
args = parser.parse_args()
@@ -111,30 +108,41 @@ def main():
if not os.path.isdir(d["DEPLOY_DIR"]):
print("WARNING: The path to DEPLOY_DIR does not exist: %s" % d["DEPLOY_DIR"])
+ parsedArgs = {}
+ parsedArgs["tag"] = args.tag
+
+ extract_sdk(d)
target = FakeTarget(d)
for key in loaded["target"].keys():
setattr(target, key, loaded["target"][key])
- host_dumper = get_host_dumper(d)
- host_dumper.parent_dir = loaded["host_dumper"]["parent_dir"]
- host_dumper.cmds = loaded["host_dumper"]["cmds"]
-
target.exportStart()
- tc = ExportTestContext(d)
-
- setattr(tc, "d", d)
- setattr(tc, "target", target)
- setattr(tc, "host_dumper", host_dumper)
- for key in loaded.keys():
- if key != "d" and key != "target" and key != "host_dumper":
- setattr(tc, key, loaded[key])
-
+ tc = ExportTestContext(d, target, True, parsedArgs)
tc.loadTests()
tc.runTests()
return 0
+def extract_sdk(d):
+ """
+ Extract SDK if needed
+ """
+
+ export_dir = os.path.dirname(os.path.realpath(__file__))
+ tools_dir = d.getVar("TEST_EXPORT_SDK_DIR", True)
+ tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME", True)
+ tarball_path = os.path.join(export_dir, tools_dir, tarball_name)
+ extract_path = os.path.join(export_dir, "sysroot")
+ if os.path.isfile(tarball_path):
+ print ("Found SDK tarball %s. Extracting..." % tarball_path)
+ result = runCmd("%s -y -d %s" % (tarball_path, extract_path))
+ for f in os.listdir(extract_path):
+ if f.startswith("environment-setup"):
+ print("Setting up SDK environment...")
+ env_file = os.path.join(extract_path, f)
+ updateEnv(env_file)
+
if __name__ == "__main__":
try:
ret = main()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/__init__.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/__init__.py
deleted file mode 100644
index 4cf3fa76b..000000000
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# Enable other layers to have tests in the same named directory
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/_ptest.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/_ptest.py
index 0621028b8..71324d3da 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/_ptest.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/_ptest.py
@@ -11,7 +11,7 @@ import subprocess
def setUpModule():
if not oeRuntimeTest.hasFeature("package-management"):
skipModule("Image doesn't have package management feature")
- if not oeRuntimeTest.hasPackage("smart"):
+ if not oeRuntimeTest.hasPackage("smartpm"):
skipModule("Image doesn't have smart installed")
if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]:
skipModule("Rpm is not the primary package manager")
@@ -105,7 +105,7 @@ class PtestRunnerTest(oeRuntimeTest):
def test_ptestrunner(self):
self.add_smart_channel()
(runnerstatus, result) = self.target.run('which ptest-runner', 0)
- cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest") and (runnerstatus != 0)
+ cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackageMatch("-ptest") and (runnerstatus != 0)
if cond:
self.install_packages(self.install_complementary("*-ptest"))
self.install_packages(['ptest-runner'])
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildgalculator.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildgalculator.py
new file mode 100644
index 000000000..28ba29e5c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildgalculator.py
@@ -0,0 +1,23 @@
+from oeqa.oetest import oeRuntimeTest, skipModule
+from oeqa.utils.decorators import *
+from oeqa.utils.targetbuild import TargetBuildProject
+
+def setUpModule():
+ if not oeRuntimeTest.hasFeature("tools-sdk"):
+ skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES")
+
+class GalculatorTest(oeRuntimeTest):
+ @skipUnlessPassed("test_ssh")
+ def test_galculator(self):
+ try:
+ project = TargetBuildProject(oeRuntimeTest.tc.target, oeRuntimeTest.tc.d,
+ "http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2")
+ project.download_archive()
+
+ self.assertEqual(project.run_configure(), 0,
+ msg="Running configure failed")
+
+ self.assertEqual(project.run_make(), 0,
+ msg="Running make failed")
+ finally:
+ project.clean()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildiptables.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildiptables.py
index 09e252df8..bc75d0a0c 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildiptables.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildiptables.py
@@ -11,7 +11,7 @@ class BuildIptablesTest(oeRuntimeTest):
@classmethod
def setUpClass(self):
self.project = TargetBuildProject(oeRuntimeTest.tc.target, oeRuntimeTest.tc.d,
- "http://netfilter.org/projects/iptables/files/iptables-1.4.13.tar.bz2")
+ "http://downloads.yoctoproject.org/mirror/sources/iptables-1.4.13.tar.bz2")
self.project.download_archive()
@testcase(206)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildsudoku.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildsudoku.py
deleted file mode 100644
index 802b06001..000000000
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/buildsudoku.py
+++ /dev/null
@@ -1,28 +0,0 @@
-from oeqa.oetest import oeRuntimeTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import TargetBuildProject
-
-def setUpModule():
- if not oeRuntimeTest.hasFeature("tools-sdk"):
- skipModule("Image doesn't have tools-sdk in IMAGE_FEATURES")
-
-class SudokuTest(oeRuntimeTest):
-
- @classmethod
- def setUpClass(self):
- self.project = TargetBuildProject(oeRuntimeTest.tc.target, oeRuntimeTest.tc.d,
- "http://downloads.sourceforge.net/project/sudoku-savant/sudoku-savant/sudoku-savant-1.3/sudoku-savant-1.3.tar.bz2")
- self.project.download_archive()
-
- @testcase(207)
- @skipUnlessPassed("test_ssh")
- def test_sudoku(self):
- self.assertEqual(self.project.run_configure(), 0,
- msg="Running configure failed")
-
- self.assertEqual(self.project.run_make(), 0,
- msg="Running make failed")
-
- @classmethod
- def tearDownClass(self):
- self.project.clean()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/connman.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/connman.py
index bd9dba3bd..003fefe2c 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/connman.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/connman.py
@@ -27,5 +27,5 @@ class ConnmanTest(oeRuntimeTest):
def test_connmand_running(self):
(status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
if status != 0:
- print self.service_status("connman")
+ print(self.service_status("connman"))
self.fail("No connmand process running")
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/test.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/test.py
index f3a2273c5..f389225d7 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/test.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/files/test.py
@@ -3,4 +3,4 @@ import os
os.system('touch /tmp/testfile.python')
a = 9.01e+21 - 9.01e+21 + 0.01
-print "the value of a is %s" % a
+print("the value of a is %s" % a)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/parselogs.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/parselogs.py
index dec9ebe87..8efe2d1de 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/parselogs.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/parselogs.py
@@ -55,18 +55,25 @@ x86_common = [
'Could not enable PowerButton event',
'probe of LNXPWRBN:00 failed with error -22',
'pmd_set_huge: Cannot satisfy',
+ 'failed to setup card detect gpio',
+ 'amd_nb: Cannot enumerate AMD northbridges',
+ 'failed to retrieve link info, disabling eDP',
] + common_errors
qemux86_common = [
'wrong ELF class',
"fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.",
"can't claim BAR ",
+ 'amd_nb: Cannot enumerate AMD northbridges',
+ 'uvesafb: 5000 ms task timeout, infinitely waiting',
+ 'tsc: HPET/PMTIMER calibration failed',
] + common_errors
ignore_errors = {
'default' : common_errors,
'qemux86' : [
'Failed to access perfctr msr (MSR',
+ 'pci 0000:00:00.0: [Firmware Bug]: reg 0x..: invalid BAR (can\'t size)',
] + qemux86_common,
'qemux86-64' : qemux86_common,
'qemumips' : [
@@ -81,16 +88,28 @@ ignore_errors = {
'host side 80-wire cable detection failed, limiting max speed',
'mode "640x480" test failed',
'Failed to load module "glx"',
+ 'can\'t handle BAR above 4GB',
+ 'Cannot reserve Legacy IO',
] + common_errors,
'qemuarm' : [
'mmci-pl18x: probe of fpga:05 failed with error -22',
'mmci-pl18x: probe of fpga:0b failed with error -22',
- 'Failed to load module "glx"'
+ 'Failed to load module "glx"',
+ 'OF: amba_device_add() failed (-19) for /amba/smc@10100000',
+ 'OF: amba_device_add() failed (-19) for /amba/mpmc@10110000',
+ 'OF: amba_device_add() failed (-19) for /amba/sctl@101e0000',
+ 'OF: amba_device_add() failed (-19) for /amba/watchdog@101e1000',
+ 'OF: amba_device_add() failed (-19) for /amba/sci@101f0000',
+ 'OF: amba_device_add() failed (-19) for /amba/ssp@101f4000',
+ 'OF: amba_device_add() failed (-19) for /amba/fpga/sci@a000',
+ 'Failed to initialize \'/amba/timer@101e3000\': -22',
+ 'jitterentropy: Initialization failed with host not compliant with requirements: 2',
] + common_errors,
'qemuarm64' : [
'Fatal server error:',
'(EE) Server terminated with error (1). Closing log file.',
'dmi: Firmware registration failed.',
+ 'irq: type mismatch, failed to map hwirq-27 for /intc',
] + common_errors,
'emenlow' : [
'[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness',
@@ -110,11 +129,19 @@ ignore_errors = {
'(EE) Failed to load module psbdrv',
'(EE) open /dev/fb0: No such file or directory',
'(EE) AIGLX: reverting to software rendering',
+ 'dmi: Firmware registration failed.',
+ 'ioremap error for 0x78',
] + x86_common,
'intel-corei7-64' : x86_common,
'crownbay' : x86_common,
'genericx86' : x86_common,
- 'genericx86-64' : x86_common,
+ 'genericx86-64' : [
+ 'Direct firmware load for i915',
+ 'Failed to load firmware i915',
+ 'Failed to fetch GuC',
+ 'Failed to initialize GuC',
+ 'The driver is built-in, so to load the firmware you need to',
+ ] + x86_common,
'edgerouter' : [
'Fatal server error:',
] + common_errors,
@@ -153,6 +180,9 @@ class ParseLogsTest(oeRuntimeTest):
def getMachine(self):
return oeRuntimeTest.tc.d.getVar("MACHINE", True)
+ def getWorkdir(self):
+ return oeRuntimeTest.tc.d.getVar("WORKDIR", True)
+
#get some information on the CPU of the machine to display at the beginning of the output. This info might be useful in some cases.
def getHardwareInfo(self):
hwi = ""
@@ -190,16 +220,19 @@ class ParseLogsTest(oeRuntimeTest):
#copy the log files to be parsed locally
def transfer_logs(self, log_list):
- target_logs = 'target_logs'
+ workdir = self.getWorkdir()
+ self.target_logs = workdir + '/' + 'target_logs'
+ target_logs = self.target_logs
if not os.path.exists(target_logs):
os.makedirs(target_logs)
+ bb.utils.remove(self.target_logs + "/*")
for f in log_list:
self.target.copy_from(f, target_logs)
#get the local list of logs
def get_local_log_list(self, log_locations):
self.transfer_logs(self.getLogList(log_locations))
- logs = [ os.path.join('target_logs',f) for f in os.listdir('target_logs') if os.path.isfile(os.path.join('target_logs',f)) ]
+ logs = [ os.path.join(self.target_logs, f) for f in os.listdir(self.target_logs) if os.path.isfile(os.path.join(self.target_logs, f)) ]
return logs
#build the grep command to be used with filters and exclusions
@@ -238,7 +271,7 @@ class ParseLogsTest(oeRuntimeTest):
result = None
thegrep = self.build_grepcmd(errors, ignore_errors, log)
try:
- result = subprocess.check_output(thegrep, shell=True)
+ result = subprocess.check_output(thegrep, shell=True).decode("utf-8")
except:
pass
if (result is not None):
@@ -246,7 +279,7 @@ class ParseLogsTest(oeRuntimeTest):
rez = result.splitlines()
for xrez in rez:
try:
- grep_output = subprocess.check_output(['grep', '-F', xrez, '-B', str(lines_before), '-A', str(lines_after), log])
+ grep_output = subprocess.check_output(['grep', '-F', xrez, '-B', str(lines_before), '-A', str(lines_after), log]).decode("utf-8")
except:
pass
results[log.replace('target_logs/','')][xrez]=grep_output
@@ -262,7 +295,7 @@ class ParseLogsTest(oeRuntimeTest):
self.write_dmesg()
log_list = self.get_local_log_list(self.log_locations)
result = self.parse_logs(self.errors, self.ignore_errors, log_list)
- print self.getHardwareInfo()
+ print(self.getHardwareInfo())
errcount = 0
for log in result:
self.msg += "Log: "+log+"\n"
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/ping.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/ping.py
index 80c460161..0f2744792 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/ping.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/ping.py
@@ -14,7 +14,7 @@ class PingTest(oeRuntimeTest):
endtime = time.time() + 60
while count < 5 and time.time() < endtime:
proc = subprocess.Popen("ping -c 1 %s" % self.target.ip, shell=True, stdout=subprocess.PIPE)
- output += proc.communicate()[0]
+ output += proc.communicate()[0].decode("utf-8")
if proc.poll() == 0:
count += 1
else:
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/python.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/python.py
index 26edb7a9b..29a231c7c 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/python.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/python.py
@@ -4,7 +4,7 @@ from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
def setUpModule():
- if not oeRuntimeTest.hasPackage("python"):
+ if not oeRuntimeTest.hasPackage("python-core"):
skipModule("No python package in the image")
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/rpm.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/rpm.py
index 624c515aa..7f514ca00 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/rpm.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/rpm.py
@@ -51,12 +51,32 @@ class RpmInstallRemoveTest(oeRuntimeTest):
@testcase(1096)
@skipUnlessPassed('test_ssh')
def test_rpm_query_nonroot(self):
- (status, output) = self.target.run('useradd test1')
- self.assertTrue(status == 0, msg="Failed to create new user: " + output)
- (status, output) = self.target.run('sudo -u test1 id')
- self.assertTrue('(test1)' in output, msg="Failed to execute as new user")
- (status, output) = self.target.run('sudo -u test1 rpm -qa')
- self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output))
+
+ def set_up_test_user(u):
+ (status, output) = self.target.run("id -u %s" % u)
+ if status == 0:
+ pass
+ else:
+ (status, output) = self.target.run("useradd %s" % u)
+ self.assertTrue(status == 0, msg="Failed to create new user: " + output)
+
+ def exec_as_test_user(u):
+ (status, output) = self.target.run("su -c id %s" % u)
+ self.assertTrue("({0})".format(u) in output, msg="Failed to execute as new user")
+ (status, output) = self.target.run("su -c \"rpm -qa\" %s " % u)
+ self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output))
+
+ def unset_up_test_user(u):
+ (status, output) = self.target.run("userdel -r %s" % u)
+ self.assertTrue(status == 0, msg="Failed to erase user: %s" % output)
+
+ tuser = 'test1'
+
+ try:
+ set_up_test_user(tuser)
+ exec_as_test_user(tuser)
+ finally:
+ unset_up_test_user(tuser)
@testcase(195)
@skipUnlessPassed('test_rpm_install')
@@ -98,4 +118,3 @@ class RpmInstallRemoveTest(oeRuntimeTest):
@classmethod
def tearDownClass(self):
oeRuntimeTest.tc.target.run('rm -f /tmp/rpm-doc.rpm')
-
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/smart.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/smart.py
index 126d61463..6cdb10d63 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/smart.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/smart.py
@@ -1,5 +1,7 @@
import unittest
import re
+import oe
+import subprocess
from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.httpserver import HTTPService
@@ -7,7 +9,7 @@ from oeqa.utils.httpserver import HTTPService
def setUpModule():
if not oeRuntimeTest.hasFeature("package-management"):
skipModule("Image doesn't have package management feature")
- if not oeRuntimeTest.hasPackage("smart"):
+ if not oeRuntimeTest.hasPackage("smartpm"):
skipModule("Image doesn't have smart installed")
if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES", True).split()[0]:
skipModule("Rpm is not the primary package manager")
@@ -53,9 +55,50 @@ class SmartBasicTest(SmartTest):
class SmartRepoTest(SmartTest):
@classmethod
+ def create_index(self, arg):
+ index_cmd = arg
+ try:
+ bb.note("Executing '%s' ..." % index_cmd)
+ result = subprocess.check_output(index_cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+ except subprocess.CalledProcessError as e:
+ return("Index creation command '%s' failed with return code %d:\n%s" %
+ (e.cmd, e.returncode, e.output.decode("utf-8")))
+ if result:
+ bb.note(result)
+ return None
+
+ @classmethod
def setUpClass(self):
self.repolist = []
- self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), oeRuntimeTest.tc.target.server_ip)
+
+ # Index RPMs
+ rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
+ index_cmds = []
+ rpm_dirs_found = False
+ archs = (oeRuntimeTest.tc.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
+ for arch in archs:
+ rpm_dir = os.path.join(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR_RPM', True), arch)
+ idx_path = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR', True), 'rpm', arch)
+ db_path = os.path.join(oeRuntimeTest.tc.d.getVar('WORKDIR', True), 'rpmdb', arch)
+ if not os.path.isdir(rpm_dir):
+ continue
+ if os.path.exists(db_path):
+ bb.utils.remove(dbpath, True)
+ lockfilename = oeRuntimeTest.tc.d.getVar('DEPLOY_DIR_RPM', True) + "/rpm.lock"
+ lf = bb.utils.lockfile(lockfilename, False)
+ oe.path.copyhardlinktree(rpm_dir, idx_path)
+ # Full indexes overload a 256MB image so reduce the number of rpms
+ # in the feed. Filter to p* since we use the psplash packages and
+ # this leaves some allarch and machine arch packages too.
+ bb.utils.remove(idx_path + "*/[a-oq-z]*.rpm")
+ bb.utils.unlockfile(lf)
+ index_cmds.append("%s --dbpath %s --update -q %s" % (rpm_createrepo, db_path, idx_path))
+ rpm_dirs_found = True
+ # Create repodata¬
+ result = oe.utils.multiprocess_exec(index_cmds, self.create_index)
+ if result:
+ bb.fatal('%s' % ('\n'.join(result)))
+ self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('WORKDIR', True), oeRuntimeTest.tc.target.server_ip)
self.repo_server.start()
@classmethod
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/syslog.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/syslog.py
index 2601dd9ea..8f550329e 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/syslog.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/syslog.py
@@ -9,7 +9,6 @@ def setUpModule():
class SyslogTest(oeRuntimeTest):
@testcase(201)
- @skipUnlessPassed("test_syslog_help")
def test_syslog_running(self):
(status,output) = self.target.run(oeRuntimeTest.pscmd + ' | grep -i [s]yslogd')
self.assertEqual(status, 0, msg="no syslogd process, ps output: %s" % self.target.run(oeRuntimeTest.pscmd)[1])
@@ -19,8 +18,16 @@ class SyslogTestConfig(oeRuntimeTest):
@testcase(1149)
@skipUnlessPassed("test_syslog_running")
def test_syslog_logger(self):
- (status,output) = self.target.run('logger foobar && test -e /var/log/messages && grep foobar /var/log/messages || logread | grep foobar')
- self.assertEqual(status, 0, msg="Test log string not found in /var/log/messages. Output: %s " % output)
+ (status, output) = self.target.run('logger foobar')
+ self.assertEqual(status, 0, msg="Can't log into syslog. Output: %s " % output)
+
+ (status, output) = self.target.run('grep foobar /var/log/messages')
+ if status != 0:
+ if oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager", "") == "systemd":
+ (status, output) = self.target.run('journalctl -o cat | grep foobar')
+ else:
+ (status, output) = self.target.run('logread | grep foobar')
+ self.assertEqual(status, 0, msg="Test log string not found in /var/log/messages or logread. Output: %s " % output)
@testcase(1150)
@skipUnlessPassed("test_syslog_running")
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/runtime/systemd.py b/import-layers/yocto-poky/meta/lib/oeqa/runtime/systemd.py
index 2b2f10d71..8de799cd6 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/runtime/systemd.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/runtime/systemd.py
@@ -57,7 +57,7 @@ class SystemdBasicTests(SystemdTest):
self.systemctl('--version')
@testcase(551)
- @skipUnlessPassed('test_system_basic')
+ @skipUnlessPassed('test_systemd_basic')
def test_systemd_list(self):
self.systemctl('list-unit-files')
@@ -153,7 +153,7 @@ class SystemdJournalTests(SystemdTest):
if check_match: break
# put the startup time in the test log
if check_match:
- print "%s" % check_match
+ print("%s" % check_match)
else:
self.skipTest("Error at obtaining the boot time from journalctl")
boot_time_sec = 0
@@ -174,5 +174,5 @@ class SystemdJournalTests(SystemdTest):
self.skipTest("Error when parsing time from boot string")
#Assert the target boot time against systemd's unit start timeout
if boot_time_sec > systemd_TimeoutStartSec:
- print "Target boot time %s exceeds systemd's TimeoutStartSec %s"\
- %(boot_time_sec, systemd_TimeoutStartSec)
+ print("Target boot time %s exceeds systemd's TimeoutStartSec %s"\
+ %(boot_time_sec, systemd_TimeoutStartSec))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildgalculator.py b/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildgalculator.py
new file mode 100644
index 000000000..dc2fa9ce1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildgalculator.py
@@ -0,0 +1,27 @@
+from oeqa.oetest import oeSDKTest, skipModule
+from oeqa.utils.decorators import *
+from oeqa.utils.targetbuild import SDKBuildProject
+
+def setUpModule():
+ if not (oeSDKTest.hasPackage("gtk+3") or oeSDKTest.hasPackage("libgtk-3.0")):
+ skipModule("Image doesn't have gtk+3 in manifest")
+
+class GalculatorTest(oeSDKTest):
+ def test_galculator(self):
+ try:
+ project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/galculator/",
+ oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
+ "http://galculator.mnim.org/downloads/galculator-2.1.4.tar.bz2")
+
+ project.download_archive()
+
+ # regenerate configure to get support for --with-libtool-sysroot
+ legacy_preconf=("autoreconf -i -f -I ${OECORE_TARGET_SYSROOT}/usr/share/aclocal -I m4;")
+
+ self.assertEqual(project.run_configure(extra_cmds=legacy_preconf),
+ 0, msg="Running configure failed")
+
+ self.assertEqual(project.run_make(), 0,
+ msg="Running make failed")
+ finally:
+ project.clean()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildiptables.py b/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildiptables.py
index 062e5316e..f0cb8a428 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildiptables.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildiptables.py
@@ -8,7 +8,7 @@ class BuildIptablesTest(oeSDKTest):
@classmethod
def setUpClass(self):
self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/iptables/", oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
- "http://netfilter.org/projects/iptables/files/iptables-1.4.13.tar.bz2")
+ "http://downloads.yoctoproject.org/mirror/sources/iptables-1.4.13.tar.bz2")
self.project.download_archive()
def test_iptables(self):
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildsudoku.py b/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildsudoku.py
deleted file mode 100644
index dea77c659..000000000
--- a/import-layers/yocto-poky/meta/lib/oeqa/sdk/buildsudoku.py
+++ /dev/null
@@ -1,26 +0,0 @@
-from oeqa.oetest import oeSDKTest, skipModule
-from oeqa.utils.decorators import *
-from oeqa.utils.targetbuild import SDKBuildProject
-
-def setUpModule():
- if not oeSDKTest.hasPackage("gtk\+"):
- skipModule("Image doesn't have gtk+ in manifest")
-
-class SudokuTest(oeSDKTest):
-
- @classmethod
- def setUpClass(self):
- self.project = SDKBuildProject(oeSDKTest.tc.sdktestdir + "/sudoku/", oeSDKTest.tc.sdkenv, oeSDKTest.tc.d,
- "http://downloads.sourceforge.net/project/sudoku-savant/sudoku-savant/sudoku-savant-1.3/sudoku-savant-1.3.tar.bz2")
- self.project.download_archive()
-
- def test_sudoku(self):
- self.assertEqual(self.project.run_configure(), 0,
- msg="Running configure failed")
-
- self.assertEqual(self.project.run_make(), 0,
- msg="Running make failed")
-
- @classmethod
- def tearDownClass(self):
- self.project.clean()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/sdkext/devtool.py b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/devtool.py
index c5bb3102a..65f41f687 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/sdkext/devtool.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/devtool.py
@@ -1,32 +1,108 @@
import shutil
-
+import subprocess
+import urllib.request
from oeqa.oetest import oeSDKExtTest
from oeqa.utils.decorators import *
class DevtoolTest(oeSDKExtTest):
-
@classmethod
def setUpClass(self):
self.myapp_src = os.path.join(self.tc.sdkextfilesdir, "myapp")
self.myapp_dst = os.path.join(self.tc.sdktestdir, "myapp")
shutil.copytree(self.myapp_src, self.myapp_dst)
+ self.myapp_cmake_src = os.path.join(self.tc.sdkextfilesdir, "myapp_cmake")
+ self.myapp_cmake_dst = os.path.join(self.tc.sdktestdir, "myapp_cmake")
+ shutil.copytree(self.myapp_cmake_src, self.myapp_cmake_dst)
+
+ def _test_devtool_build(self, directory):
+ self._run('devtool add myapp %s' % directory)
+ try:
+ self._run('devtool build myapp')
+ except Exception as e:
+ print(e.output)
+ self._run('devtool reset myapp')
+ raise e
+ self._run('devtool reset myapp')
+
+ def _test_devtool_build_package(self, directory):
+ self._run('devtool add myapp %s' % directory)
+ try:
+ self._run('devtool package myapp')
+ except Exception as e:
+ print(e.output)
+ self._run('devtool reset myapp')
+ raise e
+ self._run('devtool reset myapp')
+
def test_devtool_location(self):
output = self._run('which devtool')
self.assertEqual(output.startswith(self.tc.sdktestdir), True, \
msg="Seems that devtool isn't the eSDK one: %s" % output)
-
+
@skipUnlessPassed('test_devtool_location')
def test_devtool_add_reset(self):
self._run('devtool add myapp %s' % self.myapp_dst)
self._run('devtool reset myapp')
+
+ @testcase(1473)
+ @skipUnlessPassed('test_devtool_location')
+ def test_devtool_build_make(self):
+ self._test_devtool_build(self.myapp_dst)
+
+ @testcase(1474)
+ @skipUnlessPassed('test_devtool_location')
+ def test_devtool_build_esdk_package(self):
+ self._test_devtool_build_package(self.myapp_dst)
+ @testcase(1479)
@skipUnlessPassed('test_devtool_location')
- def test_devtool_build(self):
- self._run('devtool add myapp %s' % self.myapp_dst)
- self._run('devtool build myapp')
- self._run('devtool reset myapp')
+ def test_devtool_build_cmake(self):
+ self._test_devtool_build(self.myapp_cmake_dst)
+
+ @testcase(1482)
+ @skipUnlessPassed('test_devtool_location')
+ def test_extend_autotools_recipe_creation(self):
+ req = 'https://github.com/rdfa/librdfa'
+ recipe = "bbexample"
+ self._run('devtool add %s %s' % (recipe, req) )
+ try:
+ self._run('devtool build %s' % recipe)
+ except Exception as e:
+ print(e.output)
+ self._run('devtool reset %s' % recipe)
+ raise e
+ self._run('devtool reset %s' % recipe)
+
+ @testcase(1484)
+ @skipUnlessPassed('test_devtool_location')
+ def test_devtool_kernelmodule(self):
+ docfile = 'https://github.com/umlaeute/v4l2loopback.git'
+ recipe = 'v4l2loopback-driver'
+ self._run('devtool add %s %s' % (recipe, docfile) )
+ try:
+ self._run('devtool build %s' % recipe)
+ except Exception as e:
+ print(e.output)
+ self._run('devtool reset %s' % recipe)
+ raise e
+ self._run('devtool reset %s' % recipe)
+
+ @testcase(1478)
+ @skipUnlessPassed('test_devtool_location')
+ def test_recipes_for_nodejs(self):
+ package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0"
+ self._run('devtool add %s ' % package_nodejs)
+ try:
+ self._run('devtool build %s ' % package_nodejs)
+ except Exception as e:
+ print(e.output)
+ self._run('devtool reset %s' % package_nodejs)
+ raise e
+ self._run('devtool reset %s '% package_nodejs)
+
@classmethod
def tearDownClass(self):
shutil.rmtree(self.myapp_dst)
+ shutil.rmtree(self.myapp_cmake_dst)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/sdkext/files/myapp_cmake/CMakeLists.txt b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/files/myapp_cmake/CMakeLists.txt
new file mode 100644
index 000000000..19d773dd6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/files/myapp_cmake/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required (VERSION 2.6)
+project (myapp)
+# The version number.
+set (myapp_VERSION_MAJOR 1)
+set (myapp_VERSION_MINOR 0)
+
+# add the executable
+add_executable (myapp myapp.c)
+
+install(TARGETS myapp
+ RUNTIME DESTINATION bin)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/sdkext/files/myapp_cmake/myapp.c b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/files/myapp_cmake/myapp.c
new file mode 100644
index 000000000..f0b63f03f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/files/myapp_cmake/myapp.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+int
+main(int argc, char *argv[])
+{
+ printf("Hello world\n");
+
+ return 0;
+}
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/sdkext/sdk_update.py b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/sdk_update.py
index 7a2a6fe7c..2ade839c0 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/sdkext/sdk_update.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/sdkext/sdk_update.py
@@ -30,9 +30,6 @@ class SdkUpdateTest(oeSDKExtTest):
def test_sdk_update_http(self):
output = self._run("devtool sdk-update \"%s\"" % self.http_url)
- def test_sdk_update_local(self):
- output = self._run("devtool sdk-update \"%s\"" % self.publish_dir)
-
@classmethod
def tearDownClass(self):
self.http_service.stop()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/_toaster.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/_toaster.py
index c424659fd..15ea9df9e 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/_toaster.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/_toaster.py
@@ -2,7 +2,7 @@ import unittest
import os
import sys
import shlex, subprocess
-import urllib, commands, time, getpass, re, json, shlex
+import urllib.request, urllib.parse, urllib.error, subprocess, time, getpass, re, json, shlex
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
@@ -290,7 +290,7 @@ class Toaster_DB_Tests(ToasterSetup):
layers = Layer.objects.values('id', 'layer_index_url')
cnt_err = []
for layer in layers:
- resp = urllib.urlopen(layer['layer_index_url'])
+ resp = urllib.request.urlopen(layer['layer_index_url'])
if (resp.getcode() != 200):
cnt_err.append(layer['id'])
self.assertEqual(len(cnt_err), 0, msg = 'Errors for layer id: %s' % cnt_err)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/base.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/base.py
index e10455edc..26c93f905 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/base.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/base.py
@@ -28,17 +28,47 @@ class oeSelfTest(unittest.TestCase):
def __init__(self, methodName="runTest"):
self.builddir = os.environ.get("BUILDDIR")
self.localconf_path = os.path.join(self.builddir, "conf/local.conf")
+ self.localconf_backup = os.path.join(self.builddir, "conf/local.bk")
self.testinc_path = os.path.join(self.builddir, "conf/selftest.inc")
self.local_bblayers_path = os.path.join(self.builddir, "conf/bblayers.conf")
+ self.local_bblayers_backup = os.path.join(self.builddir,
+ "conf/bblayers.bk")
self.testinc_bblayers_path = os.path.join(self.builddir, "conf/bblayers.inc")
self.machineinc_path = os.path.join(self.builddir, "conf/machine.inc")
self.testlayer_path = oeSelfTest.testlayer_path
self._extra_tear_down_commands = []
- self._track_for_cleanup = [self.testinc_path, self.testinc_bblayers_path, self.machineinc_path]
+ self._track_for_cleanup = [
+ self.testinc_path, self.testinc_bblayers_path,
+ self.machineinc_path, self.localconf_backup,
+ self.local_bblayers_backup]
super(oeSelfTest, self).__init__(methodName)
def setUp(self):
os.chdir(self.builddir)
+ # Check if local.conf or bblayers.conf files backup exists
+ # from a previous failed test and restore them
+ if os.path.isfile(self.localconf_backup) or os.path.isfile(
+ self.local_bblayers_backup):
+ self.log.debug("Found a local.conf and/or bblayers.conf backup \
+from a previously aborted test. Restoring these files now, but tests should \
+be re-executed from a clean environment to ensure accurate results.")
+ try:
+ shutil.copyfile(self.localconf_backup, self.localconf_path)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+ try:
+ shutil.copyfile(self.local_bblayers_backup,
+ self.local_bblayers_path)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+ else:
+ # backup local.conf and bblayers.conf
+ shutil.copyfile(self.localconf_path, self.localconf_backup)
+ shutil.copyfile(self.local_bblayers_path,
+ self.local_bblayers_backup)
+ self.log.debug("Creating local.conf and bblayers.conf backups.")
# we don't know what the previous test left around in config or inc files
# if it failed so we need a fresh start
try:
@@ -67,7 +97,7 @@ class oeSelfTest(unittest.TestCase):
machine = custommachine
machine_conf = 'MACHINE ??= "%s"\n' % machine
self.set_machine_config(machine_conf)
- print 'MACHINE: %s' % machine
+ print('MACHINE: %s' % machine)
# tests might need their own setup
# but if they overwrite this one they have to call
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/bbtests.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/bbtests.py
index 26728a4b4..baae1e0e5 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/bbtests.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/bbtests.py
@@ -29,7 +29,7 @@ class BitbakeTests(oeSelfTest):
def test_event_handler(self):
self.write_config("INHERIT += \"test_events\"")
result = bitbake('m4-native')
- find_build_started = re.search("NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Preparing RunQueue", result.output)
+ find_build_started = re.search("NOTE: Test for bb\.event\.BuildStarted(\n.*)*NOTE: Executing RunQueue Tasks", result.output)
find_build_completed = re.search("Tasks Summary:.*(\n.*)*NOTE: Test for bb\.event\.BuildCompleted", result.output)
self.assertTrue(find_build_started, msg = "Match failed in:\n%s" % result.output)
self.assertTrue(find_build_completed, msg = "Match failed in:\n%s" % result.output)
@@ -64,12 +64,15 @@ class BitbakeTests(oeSelfTest):
@testcase(108)
def test_invalid_patch(self):
+ # This patch already exists in SRC_URI so adding it again will cause the
+ # patch to fail.
self.write_recipeinc('man', 'SRC_URI += "file://man-1.5h1-make.patch"')
+ self.write_config("INHERIT_remove = \"report-error\"")
result = bitbake('man -c patch', ignore_status=True)
self.delete_recipeinc('man')
bitbake('-cclean man')
line = self.getline(result, "Function failed: patch_do_patch")
- self.assertTrue(line and line.startswith("ERROR:"), msg = "Though no man-1.5h1-make.patch file exists, bitbake didn't output any err. message. bitbake output: %s" % result.output)
+ self.assertTrue(line and line.startswith("ERROR:"), msg = "Repeated patch application didn't fail. bitbake output: %s" % result.output)
@testcase(1354)
def test_force_task_1(self):
@@ -131,6 +134,7 @@ class BitbakeTests(oeSelfTest):
self.write_recipeinc('man', data)
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
+INHERIT_remove = \"report-error\"
""")
self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
@@ -141,7 +145,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \
doesn't exist, yet no error message encountered. bitbake output: %s" % result.output)
- line = self.getline(result, 'Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.')
+ line = self.getline(result, 'Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.')
self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \
doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output)
@@ -212,6 +216,7 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
def test_continue(self):
self.write_config("""DL_DIR = \"${TOPDIR}/download-selftest\"
SSTATE_DIR = \"${TOPDIR}/download-selftest\"
+INHERIT_remove = \"report-error\"
""")
self.track_for_cleanup(os.path.join(self.builddir, "download-selftest"))
self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask do_fail_task before do_fetch\n" )
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
index 35d5dfd29..9487898b0 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
@@ -30,22 +30,6 @@ class ImageOptionsTests(oeSelfTest):
incremental_removed = re.search("NOTE: load old install solution for incremental install\nNOTE: creating new install solution for incremental install(\n.*)*NOTE: incremental removed:.*openssh-sshd-.*", log_data_removed)
self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % log_data_removed)
- @testcase(925)
- def test_rm_old_image(self):
- bitbake("core-image-minimal")
- deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
- imagename = get_bb_var("IMAGE_LINK_NAME", target="core-image-minimal")
- deploydir_files = os.listdir(deploydir)
- track_original_files = []
- for image_file in deploydir_files:
- if imagename in image_file and os.path.islink(os.path.join(deploydir, image_file)):
- track_original_files.append(os.path.realpath(os.path.join(deploydir, image_file)))
- self.write_config("RM_OLD_IMAGE = \"1\"")
- bitbake("-C rootfs core-image-minimal")
- deploydir_files = os.listdir(deploydir)
- remaining_not_expected = [path for path in track_original_files if os.path.basename(path) in deploydir_files]
- self.assertFalse(remaining_not_expected, msg="\nThe following image files were not removed: %s" % ', '.join(map(str, remaining_not_expected)))
-
@testcase(286)
def test_ccache_tool(self):
bitbake("ccache-native")
@@ -89,8 +73,9 @@ class SanityOptionsTest(oeSelfTest):
def test_options_warnqa_errorqa_switch(self):
bitbake("xcursor-transparent-theme -ccleansstate")
+ self.write_config("INHERIT_remove = \"report-error\"")
if "packages-list" not in get_bb_var("ERROR_QA"):
- self.write_config("ERROR_QA_append = \" packages-list\"")
+ self.append_config("ERROR_QA_append = \" packages-list\"")
self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
res = bitbake("xcursor-transparent-theme", ignore_status=True)
@@ -199,78 +184,6 @@ class BuildhistoryTests(BuildhistoryBase):
self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True, error_regex=error)
- @testcase(1386)
- def test_buildhistory_does_not_change_signatures(self):
- """
- Summary: Ensure that buildhistory does not change signatures
- Expected: Only 'do_rootfs' task should be rerun
- Product: oe-core
- Author: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
- """
-
- tmpdir1_name = 'tmpsig1'
- tmpdir2_name = 'tmpsig2'
- builddir = os.environ.get('BUILDDIR')
- tmpdir1 = os.path.join(builddir, tmpdir1_name)
- tmpdir2 = os.path.join(builddir, tmpdir2_name)
-
- self.track_for_cleanup(tmpdir1)
- self.track_for_cleanup(tmpdir2)
-
- features = 'TMPDIR = "%s"\n' % tmpdir1
- self.write_config(features)
- bitbake('core-image-minimal -S none -c rootfs')
-
- features = 'TMPDIR = "%s"\n' % tmpdir2
- features += 'INHERIT += "buildhistory"\n'
- self.write_config(features)
- bitbake('core-image-minimal -S none -c rootfs')
-
- def get_files(d):
- f = []
- for root, dirs, files in os.walk(d):
- for name in files:
- f.append(os.path.join(root, name))
- return f
-
- files1 = get_files(tmpdir1 + '/stamps')
- files2 = get_files(tmpdir2 + '/stamps')
- files2 = [x.replace(tmpdir2_name, tmpdir1_name) for x in files2]
-
- f1 = set(files1)
- f2 = set(files2)
- sigdiff = f1 - f2
-
- self.assertEqual(len(sigdiff), 1, 'Expected 1 signature differences. Out: %s' % list(sigdiff))
-
- unexpected_diff = []
-
- # No new signatures should appear apart from do_rootfs
- found_do_rootfs_flag = False
-
- for sig in sigdiff:
- if 'do_rootfs' in sig:
- found_do_rootfs_flag = True
- else:
- unexpected_diff.append(sig)
-
- self.assertTrue(found_do_rootfs_flag, 'Task do_rootfs did not rerun.')
- self.assertFalse(unexpected_diff, 'Found unexpected signature differences. Out: %s' % unexpected_diff)
-
-
-class BuildImagesTest(oeSelfTest):
- @testcase(563)
- def test_directfb(self):
- """
- This method is used to test the build of directfb image for arm arch.
- In essence we build a coreimagedirectfb and test the exitcode of bitbake that in case of success is 0.
- """
- self.add_command_to_tearDown('cleanup-workdir')
- self.write_config("DISTRO_FEATURES_remove = \"x11\"\nDISTRO_FEATURES_append = \" directfb\"\nMACHINE ??= \"qemuarm\"")
- res = bitbake("core-image-directfb", ignore_status=True)
- self.assertEqual(res.status, 0, "\ncoreimagedirectfb failed to build. Please check logs for further details.\nbitbake output %s" % res.output)
-
class ArchiverTest(oeSelfTest):
@testcase(926)
def test_arch_work_dir_and_export_source(self):
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/devtool.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/devtool.py
index 132a73d0e..e992dcf77 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/devtool.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/devtool.py
@@ -5,10 +5,11 @@ import re
import shutil
import tempfile
import glob
+import fnmatch
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer, runqemu
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer, runqemu, get_test_layer
from oeqa.utils.decorators import testcase
class DevtoolBase(oeSelfTest):
@@ -50,7 +51,7 @@ class DevtoolBase(oeSelfTest):
missingvars = {}
- for var, value in checkvars.iteritems():
+ for var, value in checkvars.items():
if value is not None:
missingvars[var] = value
self.assertEqual(missingvars, {}, 'Some expected variables not found in recipe: %s' % checkvars)
@@ -207,12 +208,14 @@ class DevtoolTests(DevtoolBase):
tempdir = tempfile.mkdtemp(prefix='devtoolqa')
self.track_for_cleanup(tempdir)
pn = 'dbus-wait'
+ srcrev = '6cc6077a36fe2648a5f993fe7c16c9632f946517'
# We choose an https:// git URL here to check rewriting the URL works
url = 'https://git.yoctoproject.org/git/dbus-wait'
# Force fetching to "noname" subdir so we verify we're picking up the name from autoconf
# instead of the directory name
result = runCmd('git clone %s noname' % url, cwd=tempdir)
srcdir = os.path.join(tempdir, 'noname')
+ result = runCmd('git reset --hard %s' % srcrev, cwd=srcdir)
self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure script in source directory')
# Test devtool add
self.track_for_cleanup(self.workspacedir)
@@ -235,7 +238,7 @@ class DevtoolTests(DevtoolBase):
checkvars['S'] = '${WORKDIR}/git'
checkvars['PV'] = '0.1+git${SRCPV}'
checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/dbus-wait;protocol=https'
- checkvars['SRCREV'] = '${AUTOREV}'
+ checkvars['SRCREV'] = srcrev
checkvars['DEPENDS'] = set(['dbus'])
self._test_recipe_contents(recipefile, checkvars, [])
@@ -345,7 +348,7 @@ class DevtoolTests(DevtoolBase):
self.track_for_cleanup(self.workspacedir)
self.add_command_to_tearDown('bitbake -c cleansstate %s' % testrecipe)
self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
- result = runCmd('devtool add %s %s -f %s' % (testrecipe, srcdir, url))
+ result = runCmd('devtool add %s %s -a -f %s' % (testrecipe, srcdir, url))
self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created: %s' % result.output)
self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure.ac in source directory')
# Test devtool status
@@ -357,7 +360,7 @@ class DevtoolTests(DevtoolBase):
self.assertIn('_git.bb', recipefile, 'Recipe file incorrectly named')
checkvars = {}
checkvars['S'] = '${WORKDIR}/git'
- checkvars['PV'] = '1.11+git${SRCPV}'
+ checkvars['PV'] = '1.12+git${SRCPV}'
checkvars['SRC_URI'] = url
checkvars['SRCREV'] = '${AUTOREV}'
self._test_recipe_contents(recipefile, checkvars, [])
@@ -465,12 +468,11 @@ class DevtoolTests(DevtoolBase):
testrecipes = 'perf kernel-devsrc package-index core-image-minimal meta-toolchain packagegroup-core-sdk meta-ide-support'.split()
# Find actual name of gcc-source since it now includes the version - crude, but good enough for this purpose
result = runCmd('bitbake-layers show-recipes gcc-source*')
- reading = False
for line in result.output.splitlines():
- if line.startswith('=='):
- reading = True
- elif reading and not line.startswith(' '):
- testrecipes.append(line.split(':')[0])
+ # just match those lines that contain a real target
+ m = re.match('(?P<recipe>^[a-zA-Z0-9.-]+)(?P<colon>:$)', line)
+ if m:
+ testrecipes.append(m.group('recipe'))
for testrecipe in testrecipes:
# Check it's a valid recipe
bitbake('%s -e' % testrecipe)
@@ -816,28 +818,28 @@ class DevtoolTests(DevtoolBase):
# Check bbappend contents
result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
- expectedlines = ['SRCREV = "%s"\n' % result.output,
- '\n',
- 'SRC_URI = "%s"\n' % git_uri,
- '\n']
+ expectedlines = set(['SRCREV = "%s"\n' % result.output,
+ '\n',
+ 'SRC_URI = "%s"\n' % git_uri,
+ '\n'])
with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, f.readlines())
+ self.assertEqual(expectedlines, set(f.readlines()))
# Check we can run it again and bbappend isn't modified
result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, f.readlines())
+ self.assertEqual(expectedlines, set(f.readlines()))
# Drop new commit and check SRCREV changes
result = runCmd('git reset HEAD^', cwd=tempsrcdir)
result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir))
self.assertFalse(os.path.exists(os.path.join(appenddir, testrecipe)), 'Patch directory should not be created')
result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
- expectedlines = ['SRCREV = "%s"\n' % result.output,
- '\n',
- 'SRC_URI = "%s"\n' % git_uri,
- '\n']
+ expectedlines = set(['SRCREV = "%s"\n' % result.output,
+ '\n',
+ 'SRC_URI = "%s"\n' % git_uri,
+ '\n'])
with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, f.readlines())
+ self.assertEqual(expectedlines, set(f.readlines()))
# Put commit back and check we can run it if layer isn't in bblayers.conf
os.remove(bbappendfile)
result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempsrcdir)
@@ -846,12 +848,12 @@ class DevtoolTests(DevtoolBase):
self.assertIn('WARNING: Specified layer is not currently enabled in bblayers.conf', result.output)
self.assertFalse(os.path.exists(os.path.join(appenddir, testrecipe)), 'Patch directory should not be created')
result = runCmd('git rev-parse HEAD', cwd=tempsrcdir)
- expectedlines = ['SRCREV = "%s"\n' % result.output,
- '\n',
- 'SRC_URI = "%s"\n' % git_uri,
- '\n']
+ expectedlines = set(['SRCREV = "%s"\n' % result.output,
+ '\n',
+ 'SRC_URI = "%s"\n' % git_uri,
+ '\n'])
with open(bbappendfile, 'r') as f:
- self.assertEqual(expectedlines, f.readlines())
+ self.assertEqual(expectedlines, set(f.readlines()))
# Deleting isn't expected to work under these circumstances
@testcase(1370)
@@ -1188,3 +1190,159 @@ class DevtoolTests(DevtoolBase):
s = "Microsoft Made No Profit From Anyone's Zunes Yo"
result = runCmd("devtool --quiet selftest-reverse \"%s\"" % s)
self.assertEqual(result.output, s[::-1])
+
+ def _setup_test_devtool_finish_upgrade(self):
+ # Check preconditions
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ self.track_for_cleanup(self.workspacedir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ # Use a "real" recipe from meta-selftest
+ recipe = 'devtool-upgrade-test1'
+ oldversion = '1.5.3'
+ newversion = '1.6.0'
+ oldrecipefile = get_bb_var('FILE', recipe)
+ recipedir = os.path.dirname(oldrecipefile)
+ result = runCmd('git status --porcelain .', cwd=recipedir)
+ if result.output.strip():
+ self.fail('Recipe directory for %s contains uncommitted changes' % recipe)
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ # Check that recipe is not already under devtool control
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output)
+ # Do the upgrade
+ result = runCmd('devtool upgrade %s %s -V %s' % (recipe, tempdir, newversion))
+ # Check devtool status and make sure recipe is present
+ result = runCmd('devtool status')
+ self.assertIn(recipe, result.output)
+ self.assertIn(tempdir, result.output)
+ # Make a change to the source
+ result = runCmd('sed -i \'/^#include "pv.h"/a \\/* Here is a new comment *\\/\' src/pv/number.c', cwd=tempdir)
+ result = runCmd('git status --porcelain', cwd=tempdir)
+ self.assertIn('M src/pv/number.c', result.output)
+ result = runCmd('git commit src/pv/number.c -m "Add a comment to the code"', cwd=tempdir)
+ # Check if patch is there
+ recipedir = os.path.dirname(oldrecipefile)
+ olddir = os.path.join(recipedir, recipe + '-' + oldversion)
+ patchfn = '0001-Add-a-note-line-to-the-quick-reference.patch'
+ self.assertTrue(os.path.exists(os.path.join(olddir, patchfn)), 'Original patch file does not exist')
+ return recipe, oldrecipefile, recipedir, olddir, newversion, patchfn
+
+ def test_devtool_finish_upgrade_origlayer(self):
+ recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade()
+ # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
+ self.assertIn('/meta-selftest/', recipedir)
+ # Try finish to the original layer
+ self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
+ result = runCmd('devtool finish %s meta-selftest' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
+ self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after finish')
+ self.assertFalse(os.path.exists(oldrecipefile), 'Old recipe file should have been deleted but wasn\'t')
+ self.assertFalse(os.path.exists(os.path.join(olddir, patchfn)), 'Old patch file should have been deleted but wasn\'t')
+ newrecipefile = os.path.join(recipedir, '%s_%s.bb' % (recipe, newversion))
+ newdir = os.path.join(recipedir, recipe + '-' + newversion)
+ self.assertTrue(os.path.exists(newrecipefile), 'New recipe file should have been copied into existing layer but wasn\'t')
+ self.assertTrue(os.path.exists(os.path.join(newdir, patchfn)), 'Patch file should have been copied into new directory but wasn\'t')
+ self.assertTrue(os.path.exists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch')), 'New patch file should have been created but wasn\'t')
+
+ def test_devtool_finish_upgrade_otherlayer(self):
+ recipe, oldrecipefile, recipedir, olddir, newversion, patchfn = self._setup_test_devtool_finish_upgrade()
+ # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
+ self.assertIn('/meta-selftest/', recipedir)
+ # Try finish to a different layer - should create a bbappend
+ # This cleanup isn't strictly necessary but do it anyway just in case it goes wrong and writes to here
+ self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
+ oe_core_dir = os.path.join(get_bb_var('COREBASE'), 'meta')
+ newrecipedir = os.path.join(oe_core_dir, 'recipes-test', 'devtool')
+ newrecipefile = os.path.join(newrecipedir, '%s_%s.bb' % (recipe, newversion))
+ self.track_for_cleanup(newrecipedir)
+ result = runCmd('devtool finish %s oe-core' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
+ self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after finish')
+ self.assertTrue(os.path.exists(oldrecipefile), 'Old recipe file should not have been deleted')
+ self.assertTrue(os.path.exists(os.path.join(olddir, patchfn)), 'Old patch file should not have been deleted')
+ newdir = os.path.join(newrecipedir, recipe + '-' + newversion)
+ self.assertTrue(os.path.exists(newrecipefile), 'New recipe file should have been copied into existing layer but wasn\'t')
+ self.assertTrue(os.path.exists(os.path.join(newdir, patchfn)), 'Patch file should have been copied into new directory but wasn\'t')
+ self.assertTrue(os.path.exists(os.path.join(newdir, '0002-Add-a-comment-to-the-code.patch')), 'New patch file should have been created but wasn\'t')
+
+ def _setup_test_devtool_finish_modify(self):
+ # Check preconditions
+ self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+ # Try modifying a recipe
+ self.track_for_cleanup(self.workspacedir)
+ recipe = 'mdadm'
+ oldrecipefile = get_bb_var('FILE', recipe)
+ recipedir = os.path.dirname(oldrecipefile)
+ result = runCmd('git status --porcelain .', cwd=recipedir)
+ if result.output.strip():
+ self.fail('Recipe directory for %s contains uncommitted changes' % recipe)
+ tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+ self.track_for_cleanup(tempdir)
+ self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+ result = runCmd('devtool modify %s %s' % (recipe, tempdir))
+ self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile')), 'Extracted source could not be found')
+ # Test devtool status
+ result = runCmd('devtool status')
+ self.assertIn(recipe, result.output)
+ self.assertIn(tempdir, result.output)
+ # Make a change to the source
+ result = runCmd('sed -i \'/^#include "mdadm.h"/a \\/* Here is a new comment *\\/\' maps.c', cwd=tempdir)
+ result = runCmd('git status --porcelain', cwd=tempdir)
+ self.assertIn('M maps.c', result.output)
+ result = runCmd('git commit maps.c -m "Add a comment to the code"', cwd=tempdir)
+ for entry in os.listdir(recipedir):
+ filesdir = os.path.join(recipedir, entry)
+ if os.path.isdir(filesdir):
+ break
+ else:
+ self.fail('Unable to find recipe files directory for %s' % recipe)
+ return recipe, oldrecipefile, recipedir, filesdir
+
+ def test_devtool_finish_modify_origlayer(self):
+ recipe, oldrecipefile, recipedir, filesdir = self._setup_test_devtool_finish_modify()
+ # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
+ self.assertIn('/meta/', recipedir)
+ # Try finish to the original layer
+ self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
+ result = runCmd('devtool finish %s meta' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
+ self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after finish')
+ expected_status = [(' M', '.*/%s$' % os.path.basename(oldrecipefile)),
+ ('??', '.*/.*-Add-a-comment-to-the-code.patch$')]
+ self._check_repo_status(recipedir, expected_status)
+
+ def test_devtool_finish_modify_otherlayer(self):
+ recipe, oldrecipefile, recipedir, filesdir = self._setup_test_devtool_finish_modify()
+ # Ensure the recipe is where we think it should be (so that cleanup doesn't trash things)
+ self.assertIn('/meta/', recipedir)
+ relpth = os.path.relpath(recipedir, os.path.join(get_bb_var('COREBASE'), 'meta'))
+ appenddir = os.path.join(get_test_layer(), relpth)
+ self.track_for_cleanup(appenddir)
+ # Try finish to the original layer
+ self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % (recipedir, os.path.dirname(recipedir), recipedir))
+ result = runCmd('devtool finish %s meta-selftest' % recipe)
+ result = runCmd('devtool status')
+ self.assertNotIn(recipe, result.output, 'Recipe should have been reset by finish but wasn\'t')
+ self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after finish')
+ result = runCmd('git status --porcelain .', cwd=recipedir)
+ if result.output.strip():
+ self.fail('Recipe directory for %s contains the following unexpected changes after finish:\n%s' % (recipe, result.output.strip()))
+ recipefn = os.path.splitext(os.path.basename(oldrecipefile))[0]
+ recipefn = recipefn.split('_')[0] + '_%'
+ appendfile = os.path.join(appenddir, recipefn + '.bbappend')
+ self.assertTrue(os.path.exists(appendfile), 'bbappend %s should have been created but wasn\'t' % appendfile)
+ newdir = os.path.join(appenddir, recipe)
+ files = os.listdir(newdir)
+ foundpatch = None
+ for fn in files:
+ if fnmatch.fnmatch(fn, '*-Add-a-comment-to-the-code.patch'):
+ foundpatch = fn
+ if not foundpatch:
+ self.fail('No patch file created next to bbappend')
+ files.remove(foundpatch)
+ if files:
+ self.fail('Unexpected file(s) copied next to bbappend: %s' % ', '.join(files))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/eSDK.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/eSDK.py
new file mode 100644
index 000000000..9d5c68094
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/eSDK.py
@@ -0,0 +1,103 @@
+import unittest
+import tempfile
+import shutil
+import os
+import glob
+import logging
+import subprocess
+import oeqa.utils.ftools as ftools
+from oeqa.utils.decorators import testcase
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.httpserver import HTTPService
+
+class oeSDKExtSelfTest(oeSelfTest):
+ """
+ # Bugzilla Test Plan: 6033
+ # This code is planned to be part of the automation for eSDK containig
+ # Install libraries and headers, image generation binary feeds.
+ """
+
+ @staticmethod
+ def get_esdk_environment(env_eSDK, tmpdir_eSDKQA):
+ # XXX: at this time use the first env need to investigate
+ # what environment load oe-selftest, i586, x86_64
+ pattern = os.path.join(tmpdir_eSDKQA, 'environment-setup-*')
+ return glob.glob(pattern)[0]
+
+ @staticmethod
+ def run_esdk_cmd(env_eSDK, tmpdir_eSDKQA, cmd, postconfig=None, **options):
+ if postconfig:
+ esdk_conf_file = os.path.join(tmpdir_eSDKQA, 'conf', 'local.conf')
+ with open(esdk_conf_file, 'a+') as f:
+ f.write(postconfig)
+ if not options:
+ options = {}
+ if not 'shell' in options:
+ options['shell'] = True
+
+ runCmd("cd %s; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), **options)
+
+ @staticmethod
+ def generate_eSDK(image):
+ pn_task = '%s -c populate_sdk_ext' % image
+ bitbake(pn_task)
+
+ @staticmethod
+ def get_eSDK_toolchain(image):
+ pn_task = '%s -c populate_sdk_ext' % image
+
+ sdk_deploy = get_bb_var('SDK_DEPLOY', pn_task)
+ toolchain_name = get_bb_var('TOOLCHAINEXT_OUTPUTNAME', pn_task)
+ return os.path.join(sdk_deploy, toolchain_name + '.sh')
+
+
+ @classmethod
+ def setUpClass(cls):
+ # Start to serve sstate dir
+ sstate_dir = os.path.join(os.environ['BUILDDIR'], 'sstate-cache')
+ cls.http_service = HTTPService(sstate_dir)
+ cls.http_service.start()
+
+ http_url = "127.0.0.1:%d" % cls.http_service.port
+
+ image = 'core-image-minimal'
+
+ cls.tmpdir_eSDKQA = tempfile.mkdtemp(prefix='eSDKQA')
+ oeSDKExtSelfTest.generate_eSDK(image)
+
+ # Install eSDK
+ ext_sdk_path = oeSDKExtSelfTest.get_eSDK_toolchain(image)
+ runCmd("%s -y -d \"%s\"" % (ext_sdk_path, cls.tmpdir_eSDKQA))
+
+ cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', cls.tmpdir_eSDKQA)
+
+ # Configure eSDK to use sstate mirror from poky
+ sstate_config="""
+SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
+SSTATE_MIRRORS = "file://.* http://%s/PATH"
+ """ % http_url
+ with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f:
+ f.write(sstate_config)
+
+
+ @classmethod
+ def tearDownClass(cls):
+ shutil.rmtree(cls.tmpdir_eSDKQA)
+ cls.http_service.stop()
+
+ @testcase (1471)
+ def test_install_libraries_headers(self):
+ pn_sstate = 'bc'
+ bitbake(pn_sstate)
+ cmd = "devtool sdk-install %s " % pn_sstate
+ oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
+
+ @testcase(1472)
+ def test_image_generation_binary_feeds(self):
+ image = 'core-image-minimal'
+ cmd = "devtool build-image %s" % image
+ oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/esdk_prepare.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/esdk_prepare.py
deleted file mode 100755
index 1b36a0d68..000000000
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/esdk_prepare.py
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env python
-
-import shutil, tempfile
-import sys
-import os
-import imp
-import unittest
-try:
- from oeqa.utils.commands import get_bb_var
-except ImportError:
- pass
-
-# module under test
-module_file_name = "ext-sdk-prepare.py"
-module_path = ""
-
-class ExtSdkPrepareTest(unittest.TestCase):
-
- """ unit test for fix for Yocto #9019 """
-
- @classmethod
- def setUpClass(self):
- # copy module under test to temp dir
- self.test_dir = tempfile.mkdtemp()
- module_dest_path = os.path.join(self.test_dir, module_file_name)
- try:
- shutil.copy(module_path, self.test_dir)
- # load module under test
- self.test_mod = imp.load_source("", module_dest_path)
- except:
- print "error: unable to copy or load %s [src: %s, dst: %s]" % \
- (module_file_name, module_path, module_dest_path)
- sys.exit(1)
-
- def test_prepare_unexpected(self):
- # test data
- # note: pathnames have been truncated from the actual bitbake
- # output as they are not important for the test.
- test_data = (
- 'NOTE: Running noexec task 9 of 6539 (ID: 28, quilt/quilt-native_0.64.bb, do_build)\n'
- 'NOTE: Running task 10 of 6539 (ID: 29, quilt/quilt-native_0.64.bb, do_package)\n'
- 'NOTE: Running task 11 of 6539 (ID: 30, quilt/quilt-native_0.64.bb, do_rm_work)\n'
- 'NOTE: Running noexec task 6402 of 6539 (ID: 1, images/core-image-sato.bb, do_patch)\n'
- 'NOTE: Running task 6538 of 6539 (ID: 14, images/core-image-sato.bb, do_rm_work)\n'
- )
- # expected warning output
- expected = [ (' task 10 of 6539 (ID: 29, quilt/quilt-native_0.64.bb, do_package)') ]
- # recipe to test, matching test input data
- recipes = [ "core-image-sato.bb" ]
-
- # run the test
- output = self.test_mod.check_unexpected(test_data, recipes)
- self.assertEqual(output, expected)
-
- @classmethod
- def tearDownClass(self):
- # remove temp dir
- shutil.rmtree(self.test_dir)
-
-if __name__ == '__main__':
- # running from command line - i.e., not under oe-selftest
- # directory containing module under test comes from command line
- if len(sys.argv) == 2 and os.path.isdir(sys.argv[1]):
- module_path = os.path.join(sys.argv[1], module_file_name)
- suite = unittest.TestLoader().loadTestsFromTestCase(ExtSdkPrepareTest)
- unittest.TextTestRunner().run(suite)
- else:
- progname = os.path.basename(sys.argv[0])
- print "%s: missing directory path" % progname
- print "usage: %s /path/to/directory-of(ext-sdk-prepare.py)" % progname
- sys.exit(1)
-else:
- # running under oe-selftest
- # determine module source dir from COREBASE and expected path
- module_path = os.path.join(get_bb_var("COREBASE"), "meta", "files", module_file_name)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/imagefeatures.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/imagefeatures.py
index 8a53899c7..d015c4908 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/imagefeatures.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/imagefeatures.py
@@ -98,3 +98,30 @@ class ImageFeatures(oeSelfTest):
# Build a core-image-weston
bitbake('core-image-weston')
+ def test_bmap(self):
+ """
+ Summary: Check bmap support
+ Expected: 1. core-image-minimal can be build with bmap support
+ 2. core-image-minimal is sparse
+ Product: oe-core
+ Author: Ed Bartosh <ed.bartosh@linux.intel.com>
+ """
+
+ features = 'IMAGE_FSTYPES += " ext4 ext4.bmap"'
+ self.write_config(features)
+
+ image_name = 'core-image-minimal'
+ bitbake(image_name)
+
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+ link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
+ image_path = os.path.join(deploy_dir_image, "%s.ext4" % link_name)
+ bmap_path = "%s.bmap" % image_path
+
+ # check if result image and bmap file are in deploy directory
+ self.assertTrue(os.path.exists(image_path))
+ self.assertTrue(os.path.exists(bmap_path))
+
+ # check if result image is sparse
+ image_stat = os.stat(image_path)
+ self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/liboe.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/liboe.py
new file mode 100644
index 000000000..35131eb24
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/liboe.py
@@ -0,0 +1,93 @@
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.commands import get_bb_var, bitbake, runCmd
+import oe.path
+import glob
+import os
+import os.path
+
+class LibOE(oeSelfTest):
+ def test_copy_tree_special(self):
+ """
+ Summary: oe.path.copytree() should copy files with special character
+ Expected: 'test file with spÂŁc!al @nd spaces' should exist in
+ copy destination
+ Product: OE-Core
+ Author: Joshua Lock <joshua.g.lock@intel.com>
+ """
+ tmp_dir = get_bb_var('TMPDIR')
+ testloc = oe.path.join(tmp_dir, 'liboetests')
+ src = oe.path.join(testloc, 'src')
+ dst = oe.path.join(testloc, 'dst')
+ bb.utils.mkdirhier(testloc)
+ bb.utils.mkdirhier(src)
+ testfilename = 'test file with spÂŁc!al @nd spaces'
+
+ # create the test file and copy it
+ open(oe.path.join(src, testfilename), 'w+b').close()
+ oe.path.copytree(src, dst)
+
+ # ensure path exists in dest
+ fileindst = os.path.isfile(oe.path.join(dst, testfilename))
+ self.assertTrue(fileindst, "File with spaces doesn't exist in dst")
+
+ oe.path.remove(testloc)
+
+ def test_copy_tree_xattr(self):
+ """
+ Summary: oe.path.copytree() should preserve xattr on copied files
+ Expected: testxattr file in destination should have user.oetest
+ extended attribute
+ Product: OE-Core
+ Author: Joshua Lock <joshua.g.lock@intel.com>
+ """
+ tmp_dir = get_bb_var('TMPDIR')
+ testloc = oe.path.join(tmp_dir, 'liboetests')
+ src = oe.path.join(testloc, 'src')
+ dst = oe.path.join(testloc, 'dst')
+ bb.utils.mkdirhier(testloc)
+ bb.utils.mkdirhier(src)
+ testfilename = 'testxattr'
+
+ # ensure we have setfattr available
+ bitbake("attr-native")
+ bindir = get_bb_var('STAGING_BINDIR_NATIVE')
+
+ # create a file with xattr and copy it
+ open(oe.path.join(src, testfilename), 'w+b').close()
+ runCmd('%s/setfattr -n user.oetest -v "testing liboe" %s' % (bindir, oe.path.join(src, testfilename)))
+ oe.path.copytree(src, dst)
+
+ # ensure file in dest has user.oetest xattr
+ result = runCmd('%s/getfattr -n user.oetest %s' % (bindir, oe.path.join(dst, testfilename)))
+ self.assertIn('user.oetest="testing liboe"', result.output, 'Extended attribute not sert in dst')
+
+ oe.path.remove(testloc)
+
+ def test_copy_hardlink_tree_count(self):
+ """
+ Summary: oe.path.copyhardlinktree() shouldn't miss out files
+ Expected: src and dst should have the same number of files
+ Product: OE-Core
+ Author: Joshua Lock <joshua.g.lock@intel.com>
+ """
+ tmp_dir = get_bb_var('TMPDIR')
+ testloc = oe.path.join(tmp_dir, 'liboetests')
+ src = oe.path.join(testloc, 'src')
+ dst = oe.path.join(testloc, 'dst')
+ bb.utils.mkdirhier(testloc)
+ bb.utils.mkdirhier(src)
+ testfiles = ['foo', 'bar', '.baz', 'quux']
+
+ def touchfile(tf):
+ open(oe.path.join(src, tf), 'w+b').close()
+
+ for f in testfiles:
+ touchfile(f)
+
+ oe.path.copyhardlinktree(src, dst)
+
+ dstcnt = len(os.listdir(dst))
+ srccnt = len(os.listdir(src))
+ self.assertEquals(dstcnt, len(testfiles), "Number of files in dst (%s) differs from number of files in src(%s)." % (dstcnt, srccnt))
+
+ oe.path.remove(testloc)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/lic-checksum.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/lic-checksum.py
index cac6d8445..2e81373ae 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/lic-checksum.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/lic-checksum.py
@@ -12,20 +12,24 @@ class LicenseTests(oeSelfTest):
# the license qa to fail due to a mismatched md5sum.
@testcase(1197)
def test_nonmatching_checksum(self):
- bitbake_cmd = '-c configure emptytest'
+ bitbake_cmd = '-c populate_lic emptytest'
error_msg = 'emptytest: The new md5 checksum is 8d777f385d3dfec8815d20f7496026dc'
lic_file, lic_path = tempfile.mkstemp()
os.close(lic_file)
self.track_for_cleanup(lic_path)
- self.write_recipeinc('emptytest', 'INHIBIT_DEFAULT_DEPS = "1"')
- self.append_recipeinc('emptytest', 'LIC_FILES_CHKSUM = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e"' % lic_path)
+ self.write_recipeinc('emptytest', """
+INHIBIT_DEFAULT_DEPS = "1"
+LIC_FILES_CHKSUM = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e"
+SRC_URI = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e"
+""" % (lic_path, lic_path))
result = bitbake(bitbake_cmd)
with open(lic_path, "w") as f:
f.write("data")
+ self.write_config("INHERIT_remove = \"report-error\"")
result = bitbake(bitbake_cmd, ignore_status=True)
if error_msg not in result.output:
raise AssertionError(result.output)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/pkgdata.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/pkgdata.py
index 138b03aad..5a63f89ff 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/pkgdata.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/pkgdata.py
@@ -131,15 +131,15 @@ class OePkgdataUtilTests(oeSelfTest):
# Test recipe-space package name
result = runCmd('oe-pkgdata-util list-pkg-files zlib-dev zlib-doc')
files = splitoutput(result.output)
- self.assertIn('zlib-dev', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib-doc', files.keys(), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
self.assertIn(os.path.join(includedir, 'zlib.h'), files['zlib-dev'])
self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['zlib-doc'])
# Test runtime package name
result = runCmd('oe-pkgdata-util list-pkg-files -r libz1 libz-dev')
files = splitoutput(result.output)
- self.assertIn('libz1', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz-dev', files.keys(), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
self.assertGreater(len(files['libz1']), 1)
libspec = os.path.join(base_libdir, 'libz.so.1.*')
found = False
@@ -152,12 +152,12 @@ class OePkgdataUtilTests(oeSelfTest):
# Test recipe
result = runCmd('oe-pkgdata-util list-pkg-files -p zlib')
files = splitoutput(result.output)
- self.assertIn('zlib-dbg', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib-doc', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib-dev', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib-staticdev', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertNotIn('zlib-locale', files.keys(), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-dbg', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-staticdev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertNotIn('zlib-locale', list(files.keys()), "listed pkgs. files: %s" %result.output)
# (ignore ptest, might not be there depending on config)
self.assertIn(os.path.join(includedir, 'zlib.h'), files['zlib-dev'])
self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['zlib-doc'])
@@ -165,36 +165,36 @@ class OePkgdataUtilTests(oeSelfTest):
# Test recipe, runtime
result = runCmd('oe-pkgdata-util list-pkg-files -p zlib -r')
files = splitoutput(result.output)
- self.assertIn('libz-dbg', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz-doc', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz-dev', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz-staticdev', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz1', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertNotIn('libz-locale', files.keys(), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz-dbg', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz-staticdev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertNotIn('libz-locale', list(files.keys()), "listed pkgs. files: %s" %result.output)
self.assertIn(os.path.join(includedir, 'zlib.h'), files['libz-dev'])
self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['libz-doc'])
self.assertIn(os.path.join(libdir, 'libz.a'), files['libz-staticdev'])
# Test recipe, unpackaged
result = runCmd('oe-pkgdata-util list-pkg-files -p zlib -u')
files = splitoutput(result.output)
- self.assertIn('zlib-dbg', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib-doc', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib-dev', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib-staticdev', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('zlib-locale', files.keys(), "listed pkgs. files: %s" %result.output) # this is the key one
+ self.assertIn('zlib-dbg', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-staticdev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('zlib-locale', list(files.keys()), "listed pkgs. files: %s" %result.output) # this is the key one
self.assertIn(os.path.join(includedir, 'zlib.h'), files['zlib-dev'])
self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['zlib-doc'])
self.assertIn(os.path.join(libdir, 'libz.a'), files['zlib-staticdev'])
# Test recipe, runtime, unpackaged
result = runCmd('oe-pkgdata-util list-pkg-files -p zlib -r -u')
files = splitoutput(result.output)
- self.assertIn('libz-dbg', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz-doc', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz-dev', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz-staticdev', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz1', files.keys(), "listed pkgs. files: %s" %result.output)
- self.assertIn('libz-locale', files.keys(), "listed pkgs. files: %s" %result.output) # this is the key one
+ self.assertIn('libz-dbg', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz-doc', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz-staticdev', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" %result.output)
+ self.assertIn('libz-locale', list(files.keys()), "listed pkgs. files: %s" %result.output) # this is the key one
self.assertIn(os.path.join(includedir, 'zlib.h'), files['libz-dev'])
self.assertIn(os.path.join(mandir, 'man3/zlib.3'), files['libz-doc'])
self.assertIn(os.path.join(libdir, 'libz.a'), files['libz-staticdev'])
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/recipetool.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/recipetool.py
index e72911b0a..db1f8deeb 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/recipetool.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/recipetool.py
@@ -1,7 +1,7 @@
import os
import logging
import tempfile
-import urlparse
+import urllib.parse
from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
from oeqa.utils.decorators import testcase
@@ -278,7 +278,7 @@ class RecipetoolTests(RecipetoolBase):
'}\n']
_, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/etc/selftest-replaceme-patched', self.testfile, '', expectedlines, ['testfile'])
for line in output.splitlines():
- if line.startswith('WARNING: '):
+ if 'WARNING: ' in line:
self.assertIn('add-file.patch', line, 'Unexpected warning found in output:\n%s' % line)
break
else:
@@ -383,13 +383,13 @@ class RecipetoolTests(RecipetoolBase):
@testcase(1194)
def test_recipetool_create_git(self):
# Ensure we have the right data in shlibs/pkgdata
- bitbake('libpng pango libx11 libxext jpeg libxsettings-client libcheck')
+ bitbake('libpng pango libx11 libxext jpeg libcheck')
# Try adding a recipe
tempsrc = os.path.join(self.tempdir, 'srctree')
os.makedirs(tempsrc)
recipefile = os.path.join(self.tempdir, 'libmatchbox.bb')
srcuri = 'git://git.yoctoproject.org/libmatchbox'
- result = runCmd('recipetool create -o %s %s -x %s' % (recipefile, srcuri, tempsrc))
+ result = runCmd(['recipetool', 'create', '-o', recipefile, srcuri + ";rev=9f7cf8895ae2d39c465c04cc78e918c157420269", '-x', tempsrc])
self.assertTrue(os.path.isfile(recipefile), 'recipetool did not create recipe file; output:\n%s' % result.output)
checkvars = {}
checkvars['LICENSE'] = 'LGPLv2.1'
@@ -397,7 +397,7 @@ class RecipetoolTests(RecipetoolBase):
checkvars['S'] = '${WORKDIR}/git'
checkvars['PV'] = '1.11+git${SRCPV}'
checkvars['SRC_URI'] = srcuri
- checkvars['DEPENDS'] = set(['libcheck', 'libjpeg-turbo', 'libpng', 'libx11', 'libxsettings-client', 'libxext', 'pango'])
+ checkvars['DEPENDS'] = set(['libcheck', 'libjpeg-turbo', 'libpng', 'libx11', 'libxext', 'pango'])
inherits = ['autotools', 'pkgconfig']
self._test_recipe_contents(recipefile, checkvars, inherits)
@@ -442,6 +442,49 @@ class RecipetoolTests(RecipetoolBase):
inherits = ['cmake', 'python-dir', 'gettext', 'pkgconfig']
self._test_recipe_contents(recipefile, checkvars, inherits)
+ def test_recipetool_create_github(self):
+ # Basic test to see if github URL mangling works
+ temprecipe = os.path.join(self.tempdir, 'recipe')
+ os.makedirs(temprecipe)
+ recipefile = os.path.join(temprecipe, 'meson_git.bb')
+ srcuri = 'https://github.com/mesonbuild/meson'
+ result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
+ self.assertTrue(os.path.isfile(recipefile))
+ checkvars = {}
+ checkvars['LICENSE'] = set(['Apache-2.0'])
+ checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https'
+ inherits = ['setuptools']
+ self._test_recipe_contents(recipefile, checkvars, inherits)
+
+ def test_recipetool_create_github_tarball(self):
+ # Basic test to ensure github URL mangling doesn't apply to release tarballs
+ temprecipe = os.path.join(self.tempdir, 'recipe')
+ os.makedirs(temprecipe)
+ pv = '0.32.0'
+ recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv)
+ srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv)
+ result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
+ self.assertTrue(os.path.isfile(recipefile))
+ checkvars = {}
+ checkvars['LICENSE'] = set(['Apache-2.0'])
+ checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz'
+ inherits = ['setuptools']
+ self._test_recipe_contents(recipefile, checkvars, inherits)
+
+ def test_recipetool_create_git_http(self):
+ # Basic test to check http git URL mangling works
+ temprecipe = os.path.join(self.tempdir, 'recipe')
+ os.makedirs(temprecipe)
+ recipefile = os.path.join(temprecipe, 'matchbox-terminal_git.bb')
+ srcuri = 'http://git.yoctoproject.org/git/matchbox-terminal'
+ result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri))
+ self.assertTrue(os.path.isfile(recipefile))
+ checkvars = {}
+ checkvars['LICENSE'] = set(['GPLv2'])
+ checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/matchbox-terminal;protocol=http'
+ inherits = ['pkgconfig', 'autotools']
+ self._test_recipe_contents(recipefile, checkvars, inherits)
+
class RecipetoolAppendsrcBase(RecipetoolBase):
def _try_recipetool_appendsrcfile(self, testrecipe, newfile, destfile, options, expectedlines, expectedfiles):
cmd = 'recipetool appendsrcfile %s %s %s %s %s' % (options, self.templayerdir, testrecipe, newfile, destfile)
@@ -471,7 +514,7 @@ class RecipetoolAppendsrcBase(RecipetoolBase):
'''Return the first file:// in SRC_URI for the specified recipe.'''
src_uri = get_bb_var('SRC_URI', recipe).split()
for uri in src_uri:
- p = urlparse.urlparse(uri)
+ p = urllib.parse.urlparse(uri)
if p.scheme == 'file':
return p.netloc + p.path
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/runtime-test.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/runtime-test.py
new file mode 100644
index 000000000..c2d5b45a4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/runtime-test.py
@@ -0,0 +1,105 @@
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
+from oeqa.utils.decorators import testcase
+import os
+
+class TestExport(oeSelfTest):
+
+ def test_testexport_basic(self):
+ """
+ Summary: Check basic testexport functionality with only ping test enabled.
+ Expected: 1. testexport directory must be created.
+ 2. runexported.py must run without any error/exception.
+ 3. ping test must succeed.
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+
+ features = 'INHERIT += "testexport"\n'
+ # These aren't the actual IP addresses but testexport class needs something defined
+ features += 'TEST_SERVER_IP = "192.168.7.1"\n'
+ features += 'TEST_TARGET_IP = "192.168.7.1"\n'
+ features += 'TEST_SUITES = "ping"\n'
+ self.write_config(features)
+
+ # Build tesexport for core-image-minimal
+ bitbake('core-image-minimal')
+ bitbake('-c testexport core-image-minimal')
+
+ # Verify if TEST_EXPORT_DIR was created
+ testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal')
+ isdir = os.path.isdir(testexport_dir)
+ self.assertEqual(True, isdir, 'Failed to create testexport dir: %s' % testexport_dir)
+
+ with runqemu('core-image-minimal') as qemu:
+ # Attempt to run runexported.py to perform ping test
+ runexported_path = os.path.join(testexport_dir, "runexported.py")
+ testdata_path = os.path.join(testexport_dir, "testdata.json")
+ cmd = "%s -t %s -s %s %s" % (runexported_path, qemu.ip, qemu.server_ip, testdata_path)
+ result = runCmd(cmd)
+ self.assertEqual(0, result.status, 'runexported.py returned a non 0 status')
+
+ # Verify ping test was succesful
+ failure = True if 'FAIL' in result.output else False
+ self.assertNotEqual(True, failure, 'ping test failed')
+
+ def test_testexport_sdk(self):
+ """
+ Summary: Check sdk functionality for testexport.
+ Expected: 1. testexport directory must be created.
+ 2. SDK tarball must exists.
+ 3. Uncompressing of tarball must succeed.
+ 4. Check if the SDK directory is added to PATH.
+ 5. Run tar from the SDK directory.
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+
+ features = 'INHERIT += "testexport"\n'
+ # These aren't the actual IP addresses but testexport class needs something defined
+ features += 'TEST_SERVER_IP = "192.168.7.1"\n'
+ features += 'TEST_TARGET_IP = "192.168.7.1"\n'
+ features += 'TEST_SUITES = "ping"\n'
+ features += 'TEST_SUITES_TAGS = "selftest_sdk"\n'
+ features += 'TEST_EXPORT_SDK_ENABLED = "1"\n'
+ features += 'TEST_EXPORT_SDK_PACKAGES = "nativesdk-tar"\n'
+ self.write_config(features)
+
+ # Build tesexport for core-image-minimal
+ bitbake('core-image-minimal')
+ bitbake('-c testexport core-image-minimal')
+
+ # Check for SDK
+ testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal')
+ sdk_dir = get_bb_var('TEST_EXPORT_SDK_DIR', 'core-image-minimal')
+ tarball_name = "%s.sh" % get_bb_var('TEST_EXPORT_SDK_NAME', 'core-image-minimal')
+ tarball_path = os.path.join(testexport_dir, sdk_dir, tarball_name)
+ self.assertEqual(os.path.isfile(tarball_path), True, "Couldn't find SDK tarball: %s" % tarball_path)
+
+ # Run runexported.py
+ runexported_path = os.path.join(testexport_dir, "runexported.py")
+ testdata_path = os.path.join(testexport_dir, "testdata.json")
+ cmd = "%s %s" % (runexported_path, testdata_path)
+ result = runCmd(cmd)
+ self.assertEqual(0, result.status, 'runexported.py returned a non 0 status')
+
+
+class TestImage(oeSelfTest):
+
+ def test_testimage_install(self):
+ """
+ Summary: Check install packages functionality for testimage/testexport.
+ Expected: 1. Import tests from a directory other than meta.
+ 2. Check install/unistall of socat.
+ Product: oe-core
+ Author: Mariano Lopez <mariano.lopez@intel.com>
+ """
+
+ features = 'INHERIT += "testimage"\n'
+ features += 'TEST_SUITES = "ping ssh selftest"\n'
+ features += 'TEST_SUITES_TAGS = "selftest_package_install"\n'
+ self.write_config(features)
+
+ # Build core-image-sato and testimage
+ bitbake('core-image-full-cmdline socat')
+ bitbake('-c testimage core-image-full-cmdline')
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/signing.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/signing.py
index 1babca07d..4c12d6d94 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/signing.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/signing.py
@@ -12,30 +12,22 @@ from oeqa.utils.ftools import write_file
class Signing(oeSelfTest):
gpg_dir = ""
- pub_key_name = 'key.pub'
- secret_key_name = 'key.secret'
+ pub_key_path = ""
+ secret_key_path = ""
@classmethod
def setUpClass(cls):
- # Import the gpg keys
+ # Check that we can find the gpg binary and fail early if we can't
+ if not shutil.which("gpg"):
+ raise AssertionError("This test needs GnuPG")
- cls.gpg_dir = os.path.join(cls.testlayer_path, 'files/signing/')
+ cls.gpg_home_dir = tempfile.TemporaryDirectory(prefix="oeqa-signing-")
+ cls.gpg_dir = cls.gpg_home_dir.name
- # key.secret key.pub are located in gpg_dir
- pub_key_location = cls.gpg_dir + cls.pub_key_name
- secret_key_location = cls.gpg_dir + cls.secret_key_name
- runCmd('gpg --homedir %s --import %s %s' % (cls.gpg_dir, pub_key_location, secret_key_location))
+ cls.pub_key_path = os.path.join(cls.testlayer_path, 'files', 'signing', "key.pub")
+ cls.secret_key_path = os.path.join(cls.testlayer_path, 'files', 'signing', "key.secret")
- @classmethod
- def tearDownClass(cls):
- # Delete the files generated by 'gpg --import'
-
- gpg_files = glob.glob(cls.gpg_dir + '*.gpg*')
- random_seed_file = cls.gpg_dir + 'random_seed'
- gpg_files.append(random_seed_file)
-
- for gpg_file in gpg_files:
- runCmd('rm -f ' + gpg_file)
+ runCmd('gpg --homedir %s --import %s %s' % (cls.gpg_dir, cls.pub_key_path, cls.secret_key_path))
@testcase(1362)
def test_signing_packages(self):
@@ -57,7 +49,7 @@ class Signing(oeSelfTest):
feature = 'INHERIT += "sign_rpm"\n'
feature += 'RPM_GPG_PASSPHRASE = "test123"\n'
feature += 'RPM_GPG_NAME = "testuser"\n'
- feature += 'RPM_GPG_PUBKEY = "%s%s"\n' % (self.gpg_dir, self.pub_key_name)
+ feature += 'RPM_GPG_PUBKEY = "%s"\n' % self.pub_key_path
feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
self.write_config(feature)
@@ -81,8 +73,8 @@ class Signing(oeSelfTest):
# Use a temporary rpmdb
rpmdb = tempfile.mkdtemp(prefix='oeqa-rpmdb')
- runCmd('%s/rpm --define "_dbpath %s" --import %s%s' %
- (staging_bindir_native, rpmdb, self.gpg_dir, self.pub_key_name))
+ runCmd('%s/rpm --define "_dbpath %s" --import %s' %
+ (staging_bindir_native, rpmdb, self.pub_key_path))
ret = runCmd('%s/rpm --define "_dbpath %s" --checksig %s' %
(staging_bindir_native, rpmdb, pkg_deploy))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/sstatetests.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/sstatetests.py
index acaf405ac..6642539eb 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/sstatetests.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/sstatetests.py
@@ -237,6 +237,7 @@ TMPDIR = "${TOPDIR}/tmp-sstatesamehash"
BUILD_ARCH = "x86_64"
BUILD_OS = "linux"
SDKMACHINE = "x86_64"
+PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
""")
self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
bitbake("core-image-sato -S none")
@@ -246,6 +247,7 @@ TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
BUILD_ARCH = "i686"
BUILD_OS = "linux"
SDKMACHINE = "i686"
+PACKAGE_CLASSES = "package_rpm package_ipk package_deb"
""")
self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
bitbake("core-image-sato -S none")
@@ -264,7 +266,7 @@ SDKMACHINE = "i686"
files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/")
files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash").replace("i686-linux", "x86_64-linux").replace("i686" + targetvendor + "-linux", "x86_64" + targetvendor + "-linux", ) for x in files2]
self.maxDiff = None
- self.assertItemsEqual(files1, files2)
+ self.assertCountEqual(files1, files2)
@testcase(1271)
@@ -298,7 +300,7 @@ NATIVELSBSTRING = \"DistroB\"
files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/")
files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
self.maxDiff = None
- self.assertItemsEqual(files1, files2)
+ self.assertCountEqual(files1, files2)
@testcase(1368)
def test_sstate_allarch_samesigs(self):
@@ -309,19 +311,48 @@ NATIVELSBSTRING = \"DistroB\"
the two MACHINE values.
"""
+ configA = """
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
+MACHINE = \"qemux86-64\"
+"""
+ configB = """
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
+MACHINE = \"qemuarm\"
+"""
+ self.sstate_allarch_samesigs(configA, configB)
+
+ def test_sstate_allarch_samesigs_multilib(self):
+ """
+ The sstate checksums of allarch multilib packages should be independent of whichever
+ MACHINE is set. Check this using bitbake -S.
+ Also, rather than duplicate the test, check nativesdk stamps are the same between
+ the two MACHINE values.
+ """
+
+ configA = """
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
+MACHINE = \"qemux86-64\"
+require conf/multilib.conf
+MULTILIBS = \"multilib:lib32\"
+DEFAULTTUNE_virtclass-multilib-lib32 = \"x86\"
+"""
+ configB = """
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
+MACHINE = \"qemuarm\"
+require conf/multilib.conf
+MULTILIBS = \"\"
+"""
+ self.sstate_allarch_samesigs(configA, configB)
+
+ def sstate_allarch_samesigs(self, configA, configB):
+
topdir = get_bb_var('TOPDIR')
targetos = get_bb_var('TARGET_OS')
targetvendor = get_bb_var('TARGET_VENDOR')
- self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
-MACHINE = \"qemux86\"
-""")
+ self.write_config(configA)
self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
bitbake("world meta-toolchain -S none")
- self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
-MACHINE = \"qemuarm\"
-""")
+ self.write_config(configB)
self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
bitbake("world meta-toolchain -S none")
@@ -393,7 +424,7 @@ DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps")
files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
self.maxDiff = None
- self.assertItemsEqual(files1, files2)
+ self.assertCountEqual(files1, files2)
def test_sstate_noop_samesigs(self):
@@ -411,9 +442,11 @@ PARALLEL_MAKE = "-j 1"
DL_DIR = "${TOPDIR}/download1"
TIME = "111111"
DATE = "20161111"
-INHERIT_remove = "buildstats-summary buildhistory"
+INHERIT_remove = "buildstats-summary buildhistory uninative"
+http_proxy = ""
""")
self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
+ self.track_for_cleanup(topdir + "/download1")
bitbake("world meta-toolchain -S none")
self.write_config("""
TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
@@ -422,9 +455,13 @@ PARALLEL_MAKE = "-j 2"
DL_DIR = "${TOPDIR}/download2"
TIME = "222222"
DATE = "20161212"
+# Always remove uninative as we're changing proxies
+INHERIT_remove = "uninative"
INHERIT += "buildstats-summary buildhistory"
+http_proxy = "http://example.com/"
""")
self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
+ self.track_for_cleanup(topdir + "/download2")
bitbake("world meta-toolchain -S none")
def get_files(d):
@@ -439,23 +476,23 @@ INHERIT += "buildstats-summary buildhistory"
files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/")
files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/")
# Remove items that are identical in both sets
- for k,v in files1.viewitems() & files2.viewitems():
+ for k,v in files1.items() & files2.items():
del files1[k]
del files2[k]
if not files1 and not files2:
# No changes, so we're done
return
- for k in files1.viewkeys() | files2.viewkeys():
+ for k in files1.keys() | files2.keys():
if k in files1 and k in files2:
- print "%s differs:" % k
- print subprocess.check_output(("bitbake-diffsigs",
+ print("%s differs:" % k)
+ print(subprocess.check_output(("bitbake-diffsigs",
topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k],
- topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]))
+ topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k])))
elif k in files1 and k not in files2:
- print "%s in files1" % k
+ print("%s in files1" % k)
elif k not in files1 and k in files2:
- print "%s in files2" % k
+ print("%s in files2" % k)
else:
assert "shouldn't reach here"
self.fail("sstate hashes not identical.")
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/selftest/wic.py b/import-layers/yocto-poky/meta/lib/oeqa/selftest/wic.py
index a569fbf74..faac11e21 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/selftest/wic.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/selftest/wic.py
@@ -49,7 +49,7 @@ class Wic(oeSelfTest):
# setUpClass being unavailable.
if not Wic.image_is_ready:
bitbake('syslinux syslinux-native parted-native gptfdisk-native '
- 'dosfstools-native mtools-native')
+ 'dosfstools-native mtools-native bmap-tools-native')
bitbake('core-image-minimal')
Wic.image_is_ready = True
@@ -276,3 +276,26 @@ class Wic(oeSelfTest):
status, output = qemu.run_serial(command)
self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output))
self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
+
+ def test_bmap(self):
+ """Test generation of .bmap file"""
+ image = "directdisk"
+ status = runCmd("wic create %s -e core-image-minimal --bmap" % image).status
+ self.assertEqual(0, status)
+ self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
+ self.assertEqual(1, len(glob(self.resultdir + "%s-*direct.bmap" % image)))
+
+ def test_systemd_bootdisk(self):
+ """Test creation of systemd-bootdisk image"""
+ image = "systemd-bootdisk"
+ self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
+ % image).status)
+ self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
+
+ def test_sdimage_bootpart(self):
+ """Test creation of sdimage-bootpart image"""
+ image = "sdimage-bootpart"
+ self.write_config('IMAGE_BOOT_FILES = "bzImage"\n')
+ self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
+ % image).status)
+ self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py b/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py
index 5422a617c..24669f461 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/targetcontrol.py
@@ -43,9 +43,7 @@ def get_target_controller(d):
return controller(d)
-class BaseTarget(object):
-
- __metaclass__ = ABCMeta
+class BaseTarget(object, metaclass=ABCMeta):
supported_image_fstypes = []
@@ -68,7 +66,7 @@ class BaseTarget(object):
bb.note("SSH log file: %s" % self.sshlog)
@abstractmethod
- def start(self, params=None, ssh=True):
+ def start(self, params=None, ssh=True, extra_bootparams=None):
pass
@abstractmethod
@@ -121,12 +119,17 @@ class QemuTarget(BaseTarget):
self.image_fstype = self.get_image_fstype(d)
self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime)
- self.origrootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
- self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype)
+ self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
dump_target_cmds = d.getVar("testimage_dump_target", True)
dump_host_cmds = d.getVar("testimage_dump_host", True)
dump_dir = d.getVar("TESTIMAGE_DUMP_DIR", True)
+ if d.getVar("QEMU_USE_KVM", False) is not None \
+ and d.getVar("QEMU_USE_KVM", False) == "True" \
+ and "x86" in d.getVar("MACHINE", True):
+ use_kvm = True
+ else:
+ use_kvm = False
# Log QemuRunner log output to a file
import oe.path
@@ -155,17 +158,14 @@ class QemuTarget(BaseTarget):
display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True),
logfile = self.qemulog,
boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True)),
+ use_kvm = use_kvm,
dump_dir = dump_dir,
dump_host_cmds = d.getVar("testimage_dump_host", True))
self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, self.runner)
def deploy(self):
- try:
- bb.utils.mkdirhier(self.testdir)
- shutil.copyfile(self.origrootfs, self.rootfs)
- except Exception as e:
- bb.fatal("Error copying rootfs: %s" % e)
+ bb.utils.mkdirhier(self.testdir)
qemuloglink = os.path.join(self.testdir, "qemu_boot_log")
if os.path.islink(qemuloglink):
@@ -176,8 +176,8 @@ class QemuTarget(BaseTarget):
bb.note("Qemu log file: %s" % self.qemulog)
super(QemuTarget, self).deploy()
- def start(self, params=None, ssh=True):
- if self.runner.start(params, get_ip=ssh):
+ def start(self, params=None, ssh=True, extra_bootparams=None):
+ if self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams):
if ssh:
self.ip = self.runner.ip
self.server_ip = self.runner.server_ip
@@ -232,7 +232,7 @@ class SimpleRemoteTarget(BaseTarget):
def deploy(self):
super(SimpleRemoteTarget, self).deploy()
- def start(self, params=None, ssh=True):
+ def start(self, params=None, ssh=True, extra_bootparams=None):
if ssh:
self.connection = SSHControl(self.ip, logfile=self.sshlog, port=self.port)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py
index 48f644129..5cd0f7477 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/commands.py
@@ -41,7 +41,7 @@ class Command(object):
self.data = data
self.options = dict(self.defaultopts)
- if isinstance(self.cmd, basestring):
+ if isinstance(self.cmd, str):
self.options["shell"] = True
if self.data:
self.options['stdin'] = subprocess.PIPE
@@ -78,7 +78,10 @@ class Command(object):
self.process.kill()
self.thread.join()
- self.output = self.output.rstrip()
+ if not self.output:
+ self.output = ""
+ else:
+ self.output = self.output.decode("utf-8", errors='replace').rstrip()
self.status = self.process.poll()
self.log.debug("Command '%s' returned %d as exit code." % (self.cmd, self.status))
@@ -103,6 +106,7 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, **opti
result.command = command
result.status = cmd.status
result.output = cmd.output
+ result.error = cmd.error
result.pid = cmd.process.pid
if result.status and not ignore_status:
@@ -123,7 +127,7 @@ def bitbake(command, ignore_status=False, timeout=None, postconfig=None, **optio
else:
extra_args = ""
- if isinstance(command, basestring):
+ if isinstance(command, str):
cmd = "bitbake " + extra_args + " " + command
else:
cmd = [ "bitbake" ] + [a for a in (command + extra_args.split(" ")) if a not in [""]]
@@ -141,22 +145,45 @@ def get_bb_env(target=None, postconfig=None):
else:
return bitbake("-e", postconfig=postconfig).output
-def get_bb_var(var, target=None, postconfig=None):
- val = None
+def get_bb_vars(variables=None, target=None, postconfig=None):
+ """Get values of multiple bitbake variables"""
bbenv = get_bb_env(target, postconfig=postconfig)
+
+ var_re = re.compile(r'^(export )?(?P<var>\w+)="(?P<value>.*)"$')
+ unset_re = re.compile(r'^unset (?P<var>\w+)$')
lastline = None
+ values = {}
for line in bbenv.splitlines():
- if re.search("^(export )?%s=" % var, line):
- val = line.split('=', 1)[1]
- val = val.strip('\"')
- break
- elif re.match("unset %s$" % var, line):
- # Handle [unexport] variables
- if lastline.startswith('# "'):
- val = lastline.split('\"')[1]
- break
+ match = var_re.match(line)
+ val = None
+ if match:
+ val = match.group('value')
+ else:
+ match = unset_re.match(line)
+ if match:
+ # Handle [unexport] variables
+ if lastline.startswith('# "'):
+ val = lastline.split('"')[1]
+ if val:
+ var = match.group('var')
+ if variables is None:
+ values[var] = val
+ else:
+ if var in variables:
+ values[var] = val
+ variables.remove(var)
+ # Stop after all required variables have been found
+ if not variables:
+ break
lastline = line
- return val
+ if variables:
+ # Fill in missing values
+ for var in variables:
+ values[var] = None
+ return values
+
+def get_bb_var(var, target=None, postconfig=None):
+ return get_bb_vars([var], target, postconfig)[var]
def get_test_layer():
layers = get_bb_var("BBLAYERS").split()
@@ -196,7 +223,7 @@ def runqemu(pn, ssh=True):
tinfoil.config_data.setVar("TEST_QEMUBOOT_TIMEOUT", "1000")
import oe.recipeutils
recipefile = oe.recipeutils.pn_to_recipe(tinfoil.cooker, pn)
- recipedata = oe.recipeutils.parse_recipe(recipefile, [], tinfoil.config_data)
+ recipedata = oe.recipeutils.parse_recipe(tinfoil.cooker, recipefile, [])
# The QemuRunner log is saved out, but we need to ensure it is at the right
# log level (and then ensure that since it's a child of the BitBake logger,
@@ -237,3 +264,15 @@ def runqemu(pn, ssh=True):
qemu.stop()
except:
pass
+
+def updateEnv(env_file):
+ """
+ Source a file and update environment.
+ """
+
+ cmd = ". %s; env -0" % env_file
+ result = runCmd(cmd)
+
+ for line in result.output.split("\0"):
+ (key, _, value) = line.partition("=")
+ os.environ[key] = value
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/decorators.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/decorators.py
index 0d79223a2..25f9c54e6 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/decorators.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/decorators.py
@@ -57,6 +57,7 @@ class skipIfFailure(object):
self.testcase = testcase
def __call__(self,f):
+ @wraps(f)
def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in (res.getFailList() or res.getErrorList()):
@@ -71,6 +72,7 @@ class skipIfSkipped(object):
self.testcase = testcase
def __call__(self,f):
+ @wraps(f)
def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in res.getSkipList():
@@ -85,6 +87,7 @@ class skipUnlessPassed(object):
self.testcase = testcase
def __call__(self,f):
+ @wraps(f)
def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in res.getSkipList() or \
@@ -97,11 +100,11 @@ class skipUnlessPassed(object):
return wrapped_f
class testcase(object):
-
def __init__(self, test_case):
self.test_case = test_case
def __call__(self, func):
+ @wraps(func)
def wrapped_f(*args, **kwargs):
return func(*args, **kwargs)
wrapped_f.test_case = self.test_case
@@ -112,6 +115,8 @@ class NoParsingFilter(logging.Filter):
def filter(self, record):
return record.levelno == 100
+import inspect
+
def LogResults(original_class):
orig_method = original_class.run
@@ -121,6 +126,19 @@ def LogResults(original_class):
logfile = os.path.join(os.getcwd(),'results-'+caller+'.'+timestamp+'.log')
linkfile = os.path.join(os.getcwd(),'results-'+caller+'.log')
+ def get_class_that_defined_method(meth):
+ if inspect.ismethod(meth):
+ for cls in inspect.getmro(meth.__self__.__class__):
+ if cls.__dict__.get(meth.__name__) is meth:
+ return cls
+ meth = meth.__func__ # fallback to __qualname__ parsing
+ if inspect.isfunction(meth):
+ cls = getattr(inspect.getmodule(meth),
+ meth.__qualname__.split('.<locals>', 1)[0].rsplit('.', 1)[0])
+ if isinstance(cls, type):
+ return cls
+ return None
+
#rewrite the run method of unittest.TestCase to add testcase logging
def run(self, result, *args, **kws):
orig_method(self, result, *args, **kws)
@@ -132,7 +150,7 @@ def LogResults(original_class):
except AttributeError:
test_case = self._testMethodName
- class_name = str(testMethod.im_class).split("'")[1]
+ class_name = str(get_class_that_defined_method(testMethod)).split("'")[1]
#create custom logging level for filtering.
custom_log_level = 100
@@ -171,10 +189,24 @@ def LogResults(original_class):
if passed:
local_log.results("Testcase "+str(test_case)+": PASSED")
+ # XXX: In order to avoid race condition when test if exists the linkfile
+ # use bb.utils.lock, the best solution is to create a unique name for the
+ # link file.
+ try:
+ import bb
+ has_bb = True
+ lockfilename = linkfile + '.lock'
+ except ImportError:
+ has_bb = False
+
+ if has_bb:
+ lf = bb.utils.lockfile(lockfilename, block=True)
# Create symlink to the current log
- if os.path.exists(linkfile):
+ if os.path.lexists(linkfile):
os.remove(linkfile)
os.symlink(logfile, linkfile)
+ if has_bb:
+ bb.utils.unlockfile(lf)
original_class.run = run
@@ -212,7 +244,7 @@ def tag(*args, **kwargs):
def wrap_ob(ob):
for name in args:
setattr(ob, __tag_prefix + name, True)
- for name, value in kwargs.iteritems():
+ for name, value in kwargs.items():
setattr(ob, __tag_prefix + name, value)
return ob
return wrap_ob
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/dump.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/dump.py
index 63a591d36..71422a9ae 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/dump.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/dump.py
@@ -3,7 +3,7 @@ import sys
import errno
import datetime
import itertools
-from commands import runCmd
+from .commands import runCmd
def get_host_dumper(d):
cmds = d.getVar("testimage_dump_host", True)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/git.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/git.py
new file mode 100644
index 000000000..ae85d2766
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/git.py
@@ -0,0 +1,68 @@
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# Released under the MIT license (see COPYING.MIT)
+#
+"""Git repository interactions"""
+import os
+
+from oeqa.utils.commands import runCmd
+
+
+class GitError(Exception):
+ """Git error handling"""
+ pass
+
+class GitRepo(object):
+ """Class representing a Git repository clone"""
+ def __init__(self, path, is_topdir=False):
+ self.top_dir = self._run_git_cmd_at(['rev-parse', '--show-toplevel'],
+ path)
+ realpath = os.path.realpath(path)
+ if is_topdir and realpath != self.top_dir:
+ raise GitError("{} is not a Git top directory".format(realpath))
+
+ @staticmethod
+ def _run_git_cmd_at(git_args, cwd, **kwargs):
+ """Run git command at a specified directory"""
+ git_cmd = 'git ' if isinstance(git_args, str) else ['git']
+ git_cmd += git_args
+ ret = runCmd(git_cmd, ignore_status=True, cwd=cwd, **kwargs)
+ if ret.status:
+ cmd_str = git_cmd if isinstance(git_cmd, str) \
+ else ' '.join(git_cmd)
+ raise GitError("'{}' failed with exit code {}: {}".format(
+ cmd_str, ret.status, ret.output))
+ return ret.output.strip()
+
+ @staticmethod
+ def init(path):
+ """Initialize a new Git repository"""
+ GitRepo._run_git_cmd_at('init', cwd=path)
+ return GitRepo(path, is_topdir=True)
+
+ def run_cmd(self, git_args, env_update=None):
+ """Run Git command"""
+ env = None
+ if env_update:
+ env = os.environ.copy()
+ env.update(env_update)
+ return self._run_git_cmd_at(git_args, self.top_dir, env=env)
+
+ def rev_parse(self, revision):
+ """Do git rev-parse"""
+ try:
+ return self.run_cmd(['rev-parse', revision])
+ except GitError:
+ # Revision does not exist
+ return None
+
+ def get_current_branch(self):
+ """Get current branch"""
+ try:
+ # Strip 11 chars, i.e. 'refs/heads' from the beginning
+ return self.run_cmd(['symbolic-ref', 'HEAD'])[11:]
+ except GitError:
+ return None
+
+
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/httpserver.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/httpserver.py
index 76518d8ef..7d1233145 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/httpserver.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/httpserver.py
@@ -1,8 +1,9 @@
-import SimpleHTTPServer
+import http.server
import multiprocessing
import os
+from socketserver import ThreadingMixIn
-class HTTPServer(SimpleHTTPServer.BaseHTTPServer.HTTPServer):
+class HTTPServer(ThreadingMixIn, http.server.HTTPServer):
def server_start(self, root_dir):
import signal
@@ -10,7 +11,7 @@ class HTTPServer(SimpleHTTPServer.BaseHTTPServer.HTTPServer):
os.chdir(root_dir)
self.serve_forever()
-class HTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
+class HTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
def log_message(self, format_str, *args):
pass
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/logparser.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/logparser.py
index 87b50354c..b377dcd27 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/logparser.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/logparser.py
@@ -3,7 +3,7 @@
import sys
import os
import re
-import ftools
+from . import ftools
# A parser that can be used to identify weather a line is a test result or a section statement.
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py
new file mode 100644
index 000000000..099ecc972
--- /dev/null
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/package_manager.py
@@ -0,0 +1,29 @@
+def get_package_manager(d, root_path):
+ """
+ Returns an OE package manager that can install packages in root_path.
+ """
+ from oe.package_manager import RpmPM, OpkgPM, DpkgPM
+
+ pkg_class = d.getVar("IMAGE_PKGTYPE", True)
+ if pkg_class == "rpm":
+ pm = RpmPM(d,
+ root_path,
+ d.getVar('TARGET_VENDOR', True))
+ pm.create_configs()
+
+ elif pkg_class == "ipk":
+ pm = OpkgPM(d,
+ root_path,
+ d.getVar("IPKGCONF_TARGET", True),
+ d.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True))
+
+ elif pkg_class == "deb":
+ pm = DpkgPM(d,
+ root_path,
+ d.getVar('PACKAGE_ARCHS', True),
+ d.getVar('DPKG_ARCH', True))
+
+ pm.write_index()
+ pm.update()
+
+ return pm
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
index 784cf964f..8f1b5b980 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
@@ -20,16 +20,17 @@ from oeqa.utils.dump import HostDumper
import logging
logger = logging.getLogger("BitBake.QemuRunner")
+logger.addHandler(logging.StreamHandler())
# Get Unicode non printable control chars
-control_range = range(0,32)+range(127,160)
-control_chars = [unichr(x) for x in control_range
- if unichr(x) not in string.printable]
+control_range = list(range(0,32))+list(range(127,160))
+control_chars = [chr(x) for x in control_range
+ if chr(x) not in string.printable]
re_control_char = re.compile('[%s]' % re.escape("".join(control_chars)))
class QemuRunner:
- def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, boottime, dump_dir, dump_host_cmds):
+ def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, boottime, dump_dir, dump_host_cmds, use_kvm):
# Popen object for runqemu
self.runqemu = None
@@ -49,6 +50,7 @@ class QemuRunner:
self.boottime = boottime
self.logged = False
self.thread = None
+ self.use_kvm = use_kvm
self.runqemutime = 60
self.host_dumper = HostDumper(dump_host_cmds, dump_dir)
@@ -71,7 +73,8 @@ class QemuRunner:
if self.logfile:
# It is needed to sanitize the data received from qemu
# because is possible to have control characters
- msg = re_control_char.sub('', unicode(msg, 'utf-8'))
+ msg = msg.decode("utf-8")
+ msg = re_control_char.sub('', msg)
with codecs.open(self.logfile, "a", encoding="utf-8") as f:
f.write("%s" % msg)
@@ -79,7 +82,7 @@ class QemuRunner:
import fcntl
fl = fcntl.fcntl(o, fcntl.F_GETFL)
fcntl.fcntl(o, fcntl.F_SETFL, fl | os.O_NONBLOCK)
- return os.read(o.fileno(), 1000000)
+ return os.read(o.fileno(), 1000000).decode("utf-8")
def handleSIGCHLD(self, signum, frame):
@@ -91,7 +94,7 @@ class QemuRunner:
self._dump_host()
raise SystemExit
- def start(self, qemuparams = None, get_ip = True):
+ def start(self, qemuparams = None, get_ip = True, extra_bootparams = None):
if self.display:
os.environ["DISPLAY"] = self.display
# Set this flag so that Qemu doesn't do any grabs as SDL grabs
@@ -114,12 +117,16 @@ class QemuRunner:
try:
threadsock, threadport = self.create_socket()
self.server_socket, self.serverport = self.create_socket()
- except socket.error, msg:
+ except socket.error as msg:
logger.error("Failed to create listening socket: %s" % msg[1])
return False
- self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8 printk.time=1" qemuparams="-serial tcp:127.0.0.1:{}"'.format(threadport)
+ bootparams = 'console=tty1 console=ttyS0,115200n8 printk.time=1'
+ if extra_bootparams:
+ bootparams = bootparams + ' ' + extra_bootparams
+
+ self.qemuparams = 'bootparams="{0}" qemuparams="-serial tcp:127.0.0.1:{1}"'.format(bootparams, threadport)
if not self.display:
self.qemuparams = 'nographic ' + self.qemuparams
if qemuparams:
@@ -128,7 +135,15 @@ class QemuRunner:
self.origchldhandler = signal.getsignal(signal.SIGCHLD)
signal.signal(signal.SIGCHLD, self.handleSIGCHLD)
- launch_cmd = 'runqemu tcpserial=%s %s %s %s' % (self.serverport, self.machine, self.rootfs, self.qemuparams)
+ launch_cmd = 'runqemu snapshot '
+ if self.use_kvm:
+ logger.info('Using kvm for runqemu')
+ launch_cmd += 'kvm '
+ else:
+ logger.info('Not using kvm for runqemu')
+ launch_cmd += 'tcpserial=%s %s %s %s' % (self.serverport, self.machine, self.rootfs, self.qemuparams)
+ logger.info('launchcmd=%s'%(launch_cmd))
+
# FIXME: We pass in stdin=subprocess.PIPE here to work around stty
# blocking at the end of the runqemu script when using this within
# oe-selftest (this makes stty error out immediately). There ought
@@ -137,12 +152,12 @@ class QemuRunner:
output = self.runqemu.stdout
#
- # We need the preexec_fn above so that all runqemu processes can easily be killed
+ # We need the preexec_fn above so that all runqemu processes can easily be killed
# (by killing their process group). This presents a problem if this controlling
- # process itself is killed however since those processes don't notice the death
+ # process itself is killed however since those processes don't notice the death
# of the parent and merrily continue on.
#
- # Rather than hack runqemu to deal with this, we add something here instead.
+ # Rather than hack runqemu to deal with this, we add something here instead.
# Basically we fork off another process which holds an open pipe to the parent
# and also is setpgrp. If/when the pipe sees EOF from the parent dieing, it kills
# the process group. This is like pctrl's PDEATHSIG but for a process group
@@ -192,7 +207,7 @@ class QemuRunner:
else:
self.ip = ips[0]
self.server_ip = ips[1]
- except IndexError, ValueError:
+ except (IndexError, ValueError):
logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used:\n%s\nand output from runqemu:\n%s" % (cmdline, self.getOutput(output)))
self._dump_host()
self.stop()
@@ -219,6 +234,7 @@ class QemuRunner:
stopread = False
qemusock = None
bootlog = ''
+ data = b''
while time.time() < endtime and not stopread:
sread, swrite, serror = select.select(socklist, [], [], 5)
for sock in sread:
@@ -229,14 +245,19 @@ class QemuRunner:
socklist.remove(self.server_socket)
logger.info("Connection from %s:%s" % addr)
else:
- data = sock.recv(1024)
+ data = data + sock.recv(1024)
if data:
- bootlog += data
- if re.search(".* login:", bootlog):
- self.server_socket = qemusock
- stopread = True
- reachedlogin = True
- logger.info("Reached login banner")
+ try:
+ data = data.decode("utf-8", errors="surrogateescape")
+ bootlog += data
+ data = b''
+ if re.search(".* login:", bootlog):
+ self.server_socket = qemusock
+ stopread = True
+ reachedlogin = True
+ logger.info("Reached login banner")
+ except UnicodeDecodeError:
+ continue
else:
socklist.remove(sock)
sock.close()
@@ -277,13 +298,14 @@ class QemuRunner:
if hasattr(self, "origchldhandler"):
signal.signal(signal.SIGCHLD, self.origchldhandler)
if self.runqemu:
- os.kill(self.monitorpid, signal.SIGKILL)
- logger.info("Sending SIGTERM to runqemu")
- try:
- os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM)
- except OSError as e:
- if e.errno != errno.ESRCH:
- raise
+ if hasattr(self, "monitorpid"):
+ os.kill(self.monitorpid, signal.SIGKILL)
+ logger.info("Sending SIGTERM to runqemu")
+ try:
+ os.killpg(os.getpgid(self.runqemu.pid), signal.SIGTERM)
+ except OSError as e:
+ if e.errno != errno.ESRCH:
+ raise
endtime = time.time() + self.runqemutime
while self.runqemu.poll() is None and time.time() < endtime:
time.sleep(1)
@@ -325,7 +347,7 @@ class QemuRunner:
# Walk the process tree from the process specified looking for a qemu-system. Return its [pid'cmd]
#
ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command'], stdout=subprocess.PIPE).communicate()[0]
- processes = ps.split('\n')
+ processes = ps.decode("utf-8").split('\n')
nfields = len(processes[0].split()) - 1
pids = {}
commands = {}
@@ -354,9 +376,9 @@ class QemuRunner:
if p not in parents:
parents.append(p)
newparents = next
- #print "Children matching %s:" % str(parents)
+ #print("Children matching %s:" % str(parents))
for p in parents:
- # Need to be careful here since runqemu-internal runs "ldd qemu-system-xxxx"
+ # Need to be careful here since runqemu runs "ldd qemu-system-xxxx"
# Also, old versions of ldd (2.11) run "LD_XXXX qemu-system-xxxx"
basecmd = commands[p].split()[0]
basecmd = os.path.basename(basecmd)
@@ -370,14 +392,14 @@ class QemuRunner:
data = ''
status = 0
- self.server_socket.sendall(command)
+ self.server_socket.sendall(command.encode('utf-8'))
keepreading = True
while keepreading:
sread, _, _ = select.select([self.server_socket],[],[],5)
if sread:
answer = self.server_socket.recv(1024)
if answer:
- data += answer
+ data += answer.decode('utf-8')
# Search the prompt to stop
if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data):
keepreading = False
@@ -442,7 +464,7 @@ class LoggingThread(threading.Thread):
def stop(self):
self.logger.info("Stopping logging thread")
if self.running:
- os.write(self.writepipe, "stop")
+ os.write(self.writepipe, bytes("stop", "utf-8"))
def teardown(self):
self.logger.info("Tearing down logging thread")
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/qemutinyrunner.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/qemutinyrunner.py
index 4f95101f3..d554f0dbc 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/qemutinyrunner.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/qemutinyrunner.py
@@ -13,7 +13,7 @@ import re
import socket
import select
import bb
-from qemurunner import QemuRunner
+from .qemurunner import QemuRunner
class QemuTinyRunner(QemuRunner):
@@ -50,7 +50,7 @@ class QemuTinyRunner(QemuRunner):
self.server_socket.connect(self.socketfile)
bb.note("Created listening socket for qemu serial console.")
tries = 0
- except socket.error, msg:
+ except socket.error as msg:
self.server_socket.close()
bb.fatal("Failed to create listening socket.")
tries -= 1
@@ -60,7 +60,7 @@ class QemuTinyRunner(QemuRunner):
with open(self.logfile, "a") as f:
f.write("%s" % msg)
- def start(self, qemuparams = None):
+ def start(self, qemuparams = None, ssh=True, extra_bootparams=None):
if self.display:
os.environ["DISPLAY"] = self.display
@@ -102,7 +102,7 @@ class QemuTinyRunner(QemuRunner):
bb.note("Qemu pid didn't appeared in %s seconds" % self.runqemutime)
output = self.runqemu.stdout
self.stop()
- bb.note("Output from runqemu:\n%s" % output.read())
+ bb.note("Output from runqemu:\n%s" % output.read().decode("utf-8"))
return False
return self.is_alive()
@@ -131,7 +131,7 @@ class QemuTinyRunner(QemuRunner):
# Walk the process tree from the process specified looking for a qemu-system. Return its [pid'cmd]
#
ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command'], stdout=subprocess.PIPE).communicate()[0]
- processes = ps.split('\n')
+ processes = ps.decode("utf-8").split('\n')
nfields = len(processes[0].split()) - 1
pids = {}
commands = {}
@@ -160,11 +160,11 @@ class QemuTinyRunner(QemuRunner):
if p not in parents:
parents.append(p)
newparents = next
- #print "Children matching %s:" % str(parents)
+ #print("Children matching %s:" % str(parents))
for p in parents:
- # Need to be careful here since runqemu-internal runs "ldd qemu-system-xxxx"
+ # Need to be careful here since runqemu runs "ldd qemu-system-xxxx"
# Also, old versions of ldd (2.11) run "LD_XXXX qemu-system-xxxx"
basecmd = commands[p].split()[0]
basecmd = os.path.basename(basecmd)
if "qemu-system" in basecmd and "-serial unix" in commands[p]:
- return [int(p),commands[p]] \ No newline at end of file
+ return [int(p),commands[p]]
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/sshcontrol.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/sshcontrol.py
index 165874416..05d650255 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/sshcontrol.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/sshcontrol.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Copyright (C) 2013 Intel Corporation
#
# Released under the MIT license (see COPYING.MIT)
@@ -51,16 +52,19 @@ class SSHProcess(object):
endtime = self.starttime + timeout
eof = False
while time.time() < endtime and not eof:
- if select.select([self.process.stdout], [], [], 5)[0] != []:
- data = os.read(self.process.stdout.fileno(), 1024)
- if not data:
- self.process.stdout.close()
- eof = True
- else:
- output += data
- self.log(data)
- endtime = time.time() + timeout
-
+ try:
+ if select.select([self.process.stdout], [], [], 5)[0] != []:
+ data = os.read(self.process.stdout.fileno(), 1024)
+ if not data:
+ self.process.stdout.close()
+ eof = True
+ else:
+ data = data.decode("utf-8")
+ output += data
+ self.log(data)
+ endtime = time.time() + timeout
+ except InterruptedError:
+ continue
# process hasn't returned yet
if not eof:
@@ -145,9 +149,97 @@ class SSHControl(object):
return self._internal_run(command, timeout, self.ignore_status)
def copy_to(self, localpath, remotepath):
- command = self.scp + [localpath, '%s@%s:%s' % (self.user, self.ip, remotepath)]
- return self._internal_run(command, ignore_status=False)
+ if os.path.islink(localpath):
+ link = os.readlink(localpath)
+ dst_dir, dst_base = os.path.split(remotepath)
+ return self.run("cd %s; ln -s %s %s" % (dst_dir, link, dst_base))
+ else:
+ command = self.scp + [localpath, '%s@%s:%s' % (self.user, self.ip, remotepath)]
+ return self._internal_run(command, ignore_status=False)
def copy_from(self, remotepath, localpath):
command = self.scp + ['%s@%s:%s' % (self.user, self.ip, remotepath), localpath]
return self._internal_run(command, ignore_status=False)
+
+ def copy_dir_to(self, localpath, remotepath):
+ """
+ Copy recursively localpath directory to remotepath in target.
+ """
+
+ for root, dirs, files in os.walk(localpath):
+ # Create directories in the target as needed
+ for d in dirs:
+ tmp_dir = os.path.join(root, d).replace(localpath, "")
+ new_dir = os.path.join(remotepath, tmp_dir.lstrip("/"))
+ cmd = "mkdir -p %s" % new_dir
+ self.run(cmd)
+
+ # Copy files into the target
+ for f in files:
+ tmp_file = os.path.join(root, f).replace(localpath, "")
+ dst_file = os.path.join(remotepath, tmp_file.lstrip("/"))
+ src_file = os.path.join(root, f)
+ self.copy_to(src_file, dst_file)
+
+
+ def delete_files(self, remotepath, files):
+ """
+ Delete files in target's remote path.
+ """
+
+ cmd = "rm"
+ if not isinstance(files, list):
+ files = [files]
+
+ for f in files:
+ cmd = "%s %s" % (cmd, os.path.join(remotepath, f))
+
+ self.run(cmd)
+
+
+ def delete_dir(self, remotepath):
+ """
+ Delete remotepath directory in target.
+ """
+
+ cmd = "rmdir %s" % remotepath
+ self.run(cmd)
+
+
+ def delete_dir_structure(self, localpath, remotepath):
+ """
+ Delete recursively localpath structure directory in target's remotepath.
+
+ This function is very usefult to delete a package that is installed in
+ the DUT and the host running the test has such package extracted in tmp
+ directory.
+
+ Example:
+ pwd: /home/user/tmp
+ tree: .
+ └── work
+ ├── dir1
+ │   └── file1
+ └── dir2
+
+ localpath = "/home/user/tmp" and remotepath = "/home/user"
+
+ With the above variables this function will try to delete the
+ directory in the DUT in this order:
+ /home/user/work/dir1/file1
+ /home/user/work/dir1 (if dir is empty)
+ /home/user/work/dir2 (if dir is empty)
+ /home/user/work (if dir is empty)
+ """
+
+ for root, dirs, files in os.walk(localpath, topdown=False):
+ # Delete files first
+ tmpdir = os.path.join(root).replace(localpath, "")
+ remotedir = os.path.join(remotepath, tmpdir.lstrip("/"))
+ self.delete_files(remotedir, files)
+
+ # Remove dirs if empty
+ for d in dirs:
+ tmpdir = os.path.join(root, d).replace(localpath, "")
+ remotedir = os.path.join(remotepath, tmpdir.lstrip("/"))
+ self.delete_dir(remotepath)
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/targetbuild.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/targetbuild.py
index f850d78df..59593f5ef 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/targetbuild.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/targetbuild.py
@@ -10,18 +10,17 @@ import bb.utils
import subprocess
from abc import ABCMeta, abstractmethod
-class BuildProject():
-
- __metaclass__ = ABCMeta
+class BuildProject(metaclass=ABCMeta):
def __init__(self, d, uri, foldername=None, tmpdir="/tmp/"):
self.d = d
self.uri = uri
self.archive = os.path.basename(uri)
self.localarchive = os.path.join(tmpdir,self.archive)
- self.fname = re.sub(r'.tar.bz2|tar.gz$', '', self.archive)
if foldername:
self.fname = foldername
+ else:
+ self.fname = re.sub(r'\.tar\.bz2$|\.tar\.gz$|\.tar\.xz$', '', self.archive)
# Download self.archive to self.localarchive
def _download_archive(self):
@@ -118,10 +117,10 @@ class SDKBuildProject(BuildProject):
subprocess.check_call(cmd, shell=True)
#Change targetdir to project folder
- self.targetdir = self.targetdir + self.fname
+ self.targetdir = os.path.join(self.targetdir, self.fname)
- def run_configure(self, configure_args=''):
- return super(SDKBuildProject, self).run_configure(configure_args=(configure_args or '$CONFIGURE_FLAGS'), extra_cmds=' gnu-configize; ')
+ def run_configure(self, configure_args='', extra_cmds=' gnu-configize; '):
+ return super(SDKBuildProject, self).run_configure(configure_args=(configure_args or '$CONFIGURE_FLAGS'), extra_cmds=extra_cmds)
def run_install(self, install_args=''):
return super(SDKBuildProject, self).run_install(install_args=(install_args or "DESTDIR=%s/../install" % self.targetdir))
@@ -134,4 +133,3 @@ class SDKBuildProject(BuildProject):
def _run(self, cmd):
self.log("Running . %s; " % self.sdkenv + cmd)
return subprocess.call(". %s; " % self.sdkenv + cmd, shell=True)
-
diff --git a/import-layers/yocto-poky/meta/lib/oeqa/utils/testexport.py b/import-layers/yocto-poky/meta/lib/oeqa/utils/testexport.py
index 243463bc1..57be2ca44 100644
--- a/import-layers/yocto-poky/meta/lib/oeqa/utils/testexport.py
+++ b/import-layers/yocto-poky/meta/lib/oeqa/utils/testexport.py
@@ -6,7 +6,7 @@
import os, re, glob as g, shutil as sh,sys
from time import sleep
-from commands import runCmd
+from .commands import runCmd
from difflib import SequenceMatcher as SM
try:
@@ -17,13 +17,13 @@ except ImportError:
pass
def plain(self, msg):
if msg:
- print msg
+ print(msg)
def warn(self, msg):
if msg:
- print "WARNING: " + msg
+ print("WARNING: " + msg)
def fatal(self, msg):
if msg:
- print "FATAL:" + msg
+ print("FATAL:" + msg)
sys.exit(1)
bb = my_log()
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch
deleted file mode 100644
index d1aa3aa17..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 5d32b65af750e2007730f3d55a552a186aed81a6 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Wed, 20 Jan 2016 14:08:29 +0200
-Subject: [PATCH] Fix out of source build
-
-Since the source directory contains another config.h, the build
-directory should be searched first.
-
-Upstream-Status: Submitted
-[https://sourceforge.net/p/acpid2/tickets/10/]
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- sock.c | 2 +-
- ud_socket.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/sock.c b/sock.c
-index 644d460..9e04501 100644
---- a/sock.c
-+++ b/sock.c
-@@ -21,7 +21,7 @@
- */
-
- #ifdef HAVE_CONFIG_H
--#include "config.h"
-+#include <config.h>
- #endif
-
- #include <unistd.h>
-diff --git a/ud_socket.c b/ud_socket.c
-index 1790917..83b2aa9 100644
---- a/ud_socket.c
-+++ b/ud_socket.c
-@@ -4,7 +4,7 @@
- */
-
- #ifdef HAVE_CONFIG_H
--#include "config.h"
-+#include <config.h>
- #endif
-
- #include <stdio.h>
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.26.bb b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.26.bb
deleted file mode 100644
index c3bd51f7d..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.26.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require acpid.inc
-
-SRC_URI += "file://0001-Fix-out-of-source-build.patch"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
- file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5"
-
-SRC_URI[md5sum] = "f6d772e35ed907f1cc14ad1a546fd473"
-SRC_URI[sha256sum] = "8384f37e4f260f50183e2e20039823d8f06aed9db56924fe92097b7e0b2e0343"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.27.bb b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.27.bb
new file mode 100644
index 000000000..509fcfe9a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.27.bb
@@ -0,0 +1,7 @@
+require acpid.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+ file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5"
+
+SRC_URI[md5sum] = "e41bdf628e122edb4342fca432ea7db9"
+SRC_URI[sha256sum] = "820c223e53cc11d9d7229fb1ffc2c2205f1054082c80f83f5a4ec4df16d3a616"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb b/import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
index 4ff6ad087..82c264934 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://apm.h;beginline=6;endline=18;md5=7d4acc1250910a89f84ce3cc6557c4c2"
DEPENDS = "libtool-cross"
-SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/a/${BPN}/${BPN}_3.2.2.orig.tar.gz;name=tarball \
file://legacy.patch \
file://libtool.patch \
file://unlinux.patch \
@@ -26,6 +26,7 @@ SRC_URI[tarball.sha256sum] = "7f7d9f60b7766b852881d40b8ff91d8e39fccb0d1d913102a5
# for this package we're mostly interested in tracking debian patches,
# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apmd/"
UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
S = "${WORKDIR}/apmd-3.2.2.orig"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/aarch64-initplat.c-fix-const-qualifier.patch b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/aarch64-initplat.c-fix-const-qualifier.patch
new file mode 100644
index 000000000..965f074eb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/aarch64-initplat.c-fix-const-qualifier.patch
@@ -0,0 +1,35 @@
+From dc83b84dc8b4e71efce47143497aac6c126065cf Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 18 Jul 2016 08:40:29 -0700
+Subject: [PATCH] lib/aarch64/initplat.c: fix const qualifier
+
+Fixed:
+initplat.c:44:35: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
+ unsigned char *p = dest, *q = src;
+ ^~~
+cc1: all warnings being treated as errors
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ lib/aarch64/initplat.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/aarch64/initplat.c b/lib/aarch64/initplat.c
+index 2ac03a7..aae7beb 100644
+--- a/lib/aarch64/initplat.c
++++ b/lib/aarch64/initplat.c
+@@ -41,7 +41,8 @@ void *memset(void *s, int c, __SIZE_TYPE__ n)
+
+ void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n)
+ {
+- unsigned char *p = dest, *q = src;
++ unsigned char *p = dest;
++ const unsigned char *q = src;
+
+ while (n--)
+ *p++ = *q++;
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch
deleted file mode 100644
index ced128a31..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi/gnu-efi-Make-setjmp.S-portable-to-ARM.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 8a356d4b6a242ce63b73920d3ed33f88f9e12fe3 Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Sun, 6 Sep 2015 05:20:43 -0400
-Subject: [PATCH] gnu-efi: Make setjmp.S portable to ARM
-
-This patch fixes the following error:
-
- .../lib/arm/setjmp.S:18: Error: unrecognized symbol type ""
- .../lib/arm/setjmp.S:26: Error: unrecognized symbol type ""
-
-The problem is the assembly syntax that is used is not portable to ARM,
-where the '@' symbol is a comment:
-
- > Note on targets where the @ character is the start of a comment
- > (eg ARM) then another character is used instead. For example the
- > ARM port uses the % character.
-
-(From https://sourceware.org/binutils/docs-2.25/as/Section.html#Section)
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- lib/arm/setjmp.S | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/lib/arm/setjmp.S b/lib/arm/setjmp.S
-index 6e3fbf0..85c8705 100644
---- a/lib/arm/setjmp.S
-+++ b/lib/arm/setjmp.S
-@@ -15,7 +15,7 @@ BASIS,
- .text
- .arm
- .globl setjmp
-- .type setjmp, @function
-+ .type setjmp, %function
- setjmp:
- mov r3, r13
- stmia r0, {r3-r12,r14}
-@@ -23,6 +23,6 @@ setjmp:
- bx lr
-
- .globl longjmp
-- .type longjmp, @function
-+ .type longjmp, %function
- longjmp:
- ldmia r0, {r3-r12,r14}
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
deleted file mode 100644
index eca34599c..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "Libraries for producing EFI binaries"
-HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/"
-SECTION = "devel"
-LICENSE = "GPLv2+ | BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=9;md5=2240d7bbdf0928294c2f4a68b14d6591 \
- file://gnuefi/crt0-efi-aarch64.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \
- file://inc/efishellintf.h;beginline=13;endline=20;md5=202766b79d708eff3cc70fce15fb80c7 \
- file://inc/efishellparm.h;beginline=4;endline=11;md5=468b1231b05bbc84bae3a0d5774e3bb5 \
- file://lib/arm/div64.S;beginline=6;endline=12;md5=a96c84f5ad12b4f011f98b5d039242f2 \
- file://lib/arm/math.c;beginline=4;endline=10;md5=64dd1987cee1dcf59d11aa572cfa644e \
- file://lib/arm/initplat.c;beginline=4;endline=10;md5=64dd1987cee1dcf59d11aa572cfa644e \
- file://lib/arm/lib1funcs.S;beginline=9;endline=33;md5=f56d5ebbc87136bc66cfe24db82bcf01 \
- file://lib/aarch64/math.c;beginline=9;endline=33;md5=cfade4c560e033a7bb02dab282872c7d \
- file://lib/aarch64/initplat.c;beginline=9;endline=33;md5=900cb1ffbe3e1ded344102be921830f1 \
- "
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
- file://parallel-make-archives.patch \
- file://lib-Makefile-fix-parallel-issue.patch \
- file://gnu-efi-Make-setjmp.S-portable-to-ARM.patch \
- file://gcc46-compatibility.patch \
- "
-
-SRC_URI[md5sum] = "15a4bcbc18a9a5e8110ed955970622e6"
-SRC_URI[sha256sum] = "c530f21a15fd9c214dd92d29a6caa20fac989289267512020b6da1f5e6f5b4cb"
-
-COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
-
-def gnu_efi_arch(d):
- import re
- tarch = d.getVar("TARGET_ARCH", True)
- if re.match("i[3456789]86", tarch):
- return "ia32"
- return tarch
-
-EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \
- 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \
- "
-
-do_install() {
- oe_runmake install INSTALLROOT="${D}"
-}
-
-FILES_${PN} += "${libdir}/*.lds"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
new file mode 100644
index 000000000..e0d8ee76d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.4.bb
@@ -0,0 +1,54 @@
+SUMMARY = "Libraries for producing EFI binaries"
+HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/"
+SECTION = "devel"
+LICENSE = "GPLv2+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://gnuefi/crt0-efi-arm.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \
+ file://gnuefi/crt0-efi-aarch64.S;beginline=4;endline=16;md5=e582764a4776e60c95bf9ab617343d36 \
+ file://inc/efishellintf.h;beginline=13;endline=20;md5=202766b79d708eff3cc70fce15fb80c7 \
+ file://inc/efishellparm.h;beginline=4;endline=11;md5=468b1231b05bbc84bae3a0d5774e3bb5 \
+ file://lib/arm/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
+ file://lib/arm/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
+ file://lib/aarch64/math.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
+ file://lib/aarch64/initplat.c;beginline=2;endline=15;md5=8ed772501da77b2b3345aa6df8744c9e \
+ "
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
+ file://parallel-make-archives.patch \
+ file://lib-Makefile-fix-parallel-issue.patch \
+ file://gcc46-compatibility.patch \
+ file://aarch64-initplat.c-fix-const-qualifier.patch \
+ "
+
+SRC_URI[md5sum] = "612e0f327f31c4b8468ef55f4eeb9649"
+SRC_URI[sha256sum] = "51a00428c3ccb96db24089ed8394843c4f83cf8f42c6a4dfddb4b7c23f2bf8af"
+
+COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
+COMPATIBLE_HOST_armv4 = 'null'
+
+def gnu_efi_arch(d):
+ import re
+ tarch = d.getVar("TARGET_ARCH", True)
+ if re.match("i[3456789]86", tarch):
+ return "ia32"
+ return tarch
+
+EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \
+ 'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}' 'LIBDIR=${libdir}' \
+ "
+
+# gnu-efi's Makefile treats prefix as toolchain prefix, so don't
+# export it.
+prefix[unexport] = "1"
+
+do_install() {
+ oe_runmake install INSTALLROOT="${D}"
+}
+
+FILES_${PN} += "${libdir}/*.lds"
+
+BBCLASSEXTEND = "native"
+
+# It doesn't support sse, its make.defaults sets:
+# CFLAGS += -mno-mmx -mno-sse
+# So also remove -mfpmath=sse from TUNE_CCARGS
+TUNE_CCARGS_remove = "-mfpmath=sse"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch
new file mode 100644
index 000000000..6ec2363ae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch
@@ -0,0 +1,39 @@
+From f30c692c1f9ef0e93bee2b408a24baa017f1ca9d Mon Sep 17 00:00:00 2001
+From: Vladimir Serbinenko <phcoder@gmail.com>
+Date: Thu, 7 Nov 2013 01:01:47 +0100
+Subject: [PATCH] * grub-core/gettext/gettext.c (main_context),
+ (secondary_context): Define after defining type and not before.
+
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ ChangeLog | 5 +++++
+ grub-core/gettext/gettext.c | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
+index df73570..4880cef 100644
+--- a/grub-core/gettext/gettext.c
++++ b/grub-core/gettext/gettext.c
+@@ -34,8 +34,6 @@ GRUB_MOD_LICENSE ("GPLv3+");
+ http://www.gnu.org/software/autoconf/manual/gettext/MO-Files.html .
+ */
+
+-static struct grub_gettext_context main_context, secondary_context;
+-
+ static const char *(*grub_gettext_original) (const char *s);
+
+ struct grub_gettext_msg
+@@ -69,6 +67,8 @@ struct grub_gettext_context
+ struct grub_gettext_msg *grub_gettext_msg_list;
+ };
+
++static struct grub_gettext_context main_context, secondary_context;
++
+ #define MO_MAGIC_NUMBER 0x950412de
+
+ static grub_err_t
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch
index 09ef4dbff..1ff3c1ca0 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fix-enable_execute_stack-check.patch
@@ -10,7 +10,7 @@ cc1: all warnings being treated as errors
configure:20323: $? = 1
configure:20327: error: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow failed to produce assembly code
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/04/13
Index: grub-2.00/acinclude.m4
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch
index c557f13e2..dd30d94b7 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-2.00-fpmath-sse-387-fix.patch
@@ -6,7 +6,7 @@ configure:20574: i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic
conftest.c:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror]
cc1: all warnings being treated as errors
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/04/13
Index: grub-1.99/configure.ac
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
new file mode 100644
index 000000000..935c472cf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
@@ -0,0 +1,61 @@
+From 7461a3de38b66edbe2f5593f9bdab9f2704d32bc Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 17 Aug 2016 04:06:34 -0400
+Subject: [PATCH] grub module explicitly keeps symbole .module_license
+
+While using oe-core toolchain to strip grub module 'all_video.mod',
+it stripped symbol table:
+--------------
+root@localhost:~# objdump -t all_video.mod
+
+all_video.mod: file format elf64-x86-64
+
+SYMBOL TABLE:
+no symbols
+--------------
+
+It caused grub to load module all_video failed.
+--------------
+grub> insmod all_video
+error: no symbol table.
+--------------
+
+Tweak strip option to keep symbol .module_license could workaround
+the issue.
+--------------
+root@localhost:~# objdump -t all_video.mod
+
+all_video.mod: file format elf64-x86-64
+
+SYMBOL TABLE:
+0000000000000000 l d .text 0000000000000000 .text
+0000000000000000 l d .data 0000000000000000 .data
+0000000000000000 l d .module_license 0000000000000000 .module_license
+0000000000000000 l d .bss 0000000000000000 .bss
+0000000000000000 l d .moddeps 0000000000000000 .moddeps
+0000000000000000 l d .modname 0000000000000000 .modname
+--------------
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ grub-core/genmod.sh.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
+index 76df0bb..39a9cfc 100644
+--- a/grub-core/genmod.sh.in
++++ b/grub-core/genmod.sh.in
+@@ -59,7 +59,7 @@ if test x@TARGET_APPLE_CC@ != x1; then
+ if test x@platform@ != xemu; then
+ @STRIP@ --strip-unneeded \
+ -K grub_mod_init -K grub_mod_fini \
+- -K _grub_mod_init -K _grub_mod_fini \
++ -K _grub_mod_init -K _grub_mod_fini -K .module_license \
+ -R .note.gnu.gold-version -R .note.GNU-stack \
+ -R .note -R .comment $tmpfile || exit 1
+ fi
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
index 6259a1abe..5168d3ca5 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/files/grub2-remove-sparc64-setup-from-x86-builds.patch
@@ -1,104 +1,44 @@
+Subject: [PATCH] grub2: remove grub-sparc64-setup from x86 builds
+
+* remove the grub-sparc64-setup files from the x86 builds.
+
Upstream-Status: Inappropriate [embedded specific]
-remove the grub-sparc64-setup files from the x86 builds.
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ Makefile.util.def | 18 ------------------
+ 1 file changed, 18 deletions(-)
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+diff --git a/Makefile.util.def b/Makefile.util.def
+index b80187c..a670cf2 100644
+--- a/Makefile.util.def
++++ b/Makefile.util.def
+@@ -321,24 +321,6 @@ program = {
+ };
+
+ program = {
+- name = grub-sparc64-setup;
+- installdir = sbin;
+- mansection = 8;
+- common = util/grub-setup.c;
+- common = util/lvm.c;
+- common = grub-core/kern/emu/argp_common.c;
+- common = grub-core/lib/reed_solomon.c;
+- common = util/ieee1275/ofpath.c;
+-
+- ldadd = libgrubmods.a;
+- ldadd = libgrubkern.a;
+- ldadd = libgrubgcry.a;
+- ldadd = grub-core/gnulib/libgnu.a;
+- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
+- cppflags = '-DGRUB_SETUP_SPARC64=1';
+-};
+-
+-program = {
+ name = grub-ofpathname;
+ installdir = sbin;
+ mansection = 8;
+--
+2.8.1
---- a/Makefile.util.am 2014-08-15 11:41:02.441011278 -0700
-+++ b/Makefile.util.am 2014-08-15 11:44:26.245021142 -0700
-@@ -4692,9 +4692,9 @@
- endif
-
- if COND_emu
--sbin_PROGRAMS += grub-sparc64-setup
-+sbin_PROGRAMS +=
- if COND_MAN_PAGES
--man_MANS += grub-sparc64-setup.8
-+man_MANS +=
-
- grub-sparc64-setup.8: grub-sparc64-setup
- chmod a+x grub-sparc64-setup
-@@ -4715,9 +4715,9 @@
- endif
-
- if COND_i386_pc
--sbin_PROGRAMS += grub-sparc64-setup
-+sbin_PROGRAMS +=
- if COND_MAN_PAGES
--man_MANS += grub-sparc64-setup.8
-+man_MANS +=
-
- grub-sparc64-setup.8: grub-sparc64-setup
- chmod a+x grub-sparc64-setup
-@@ -4738,9 +4738,9 @@
- endif
-
- if COND_i386_efi
--sbin_PROGRAMS += grub-sparc64-setup
-+sbin_PROGRAMS +=
- if COND_MAN_PAGES
--man_MANS += grub-sparc64-setup.8
-+man_MANS +=
-
- grub-sparc64-setup.8: grub-sparc64-setup
- chmod a+x grub-sparc64-setup
-@@ -4761,9 +4761,9 @@
- endif
-
- if COND_i386_qemu
--sbin_PROGRAMS += grub-sparc64-setup
-+sbin_PROGRAMS +=
- if COND_MAN_PAGES
--man_MANS += grub-sparc64-setup.8
-+man_MANS +=
-
- grub-sparc64-setup.8: grub-sparc64-setup
- chmod a+x grub-sparc64-setup
-@@ -4784,9 +4784,9 @@
- endif
-
- if COND_i386_coreboot
--sbin_PROGRAMS += grub-sparc64-setup
-+sbin_PROGRAMS +=
- if COND_MAN_PAGES
--man_MANS += grub-sparc64-setup.8
-+man_MANS +=
-
- grub-sparc64-setup.8: grub-sparc64-setup
- chmod a+x grub-sparc64-setup
-@@ -4807,9 +4807,9 @@
- endif
-
- if COND_i386_multiboot
--sbin_PROGRAMS += grub-sparc64-setup
-+sbin_PROGRAMS +=
- if COND_MAN_PAGES
--man_MANS += grub-sparc64-setup.8
-+man_MANS +=
-
- grub-sparc64-setup.8: grub-sparc64-setup
- chmod a+x grub-sparc64-setup
-@@ -4830,9 +4830,9 @@
- endif
-
- if COND_i386_ieee1275
--sbin_PROGRAMS += grub-sparc64-setup
-+sbin_PROGRAMS +=
- if COND_MAN_PAGES
--man_MANS += grub-sparc64-setup.8
-+man_MANS +=
-
- grub-sparc64-setup.8: grub-sparc64-setup
- chmod a+x grub-sparc64-setup
-@@ -4853,9 +4853,9 @@
- endif
-
- if COND_x86_64_efi
--sbin_PROGRAMS += grub-sparc64-setup
-+sbin_PROGRAMS +=
- if COND_MAN_PAGES
--man_MANS += grub-sparc64-setup.8
-+man_MANS +=
-
- grub-sparc64-setup.8: grub-sparc64-setup
- chmod a+x grub-sparc64-setup
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
index 87ec29e32..ce3238f3a 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
@@ -20,7 +20,7 @@ conftest.c:1:0: error: SSE instruction set disabled, using 387
arithmetics [-Werror]
cc1: all warnings being treated as errors
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc
index 146dde60c..b10f633aa 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub2.inc
@@ -12,6 +12,7 @@ LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
+ file://grub-module-explicitly-keeps-symbole-.module_license.patch \
file://grub-2.00-fpmath-sse-387-fix.patch \
file://check-if-liblzma-is-disabled.patch \
file://fix-issue-with-flex-2.5.37.patch \
@@ -30,9 +31,10 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
file://0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch \
file://fix-texinfo.patch \
+ file://0001-grub-core-gettext-gettext.c-main_context-secondary_c.patch \
"
-DEPENDS = "flex-native bison-native"
+DEPENDS = "flex-native bison-native autogen-native"
SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
@@ -59,11 +61,10 @@ do_configure_prepend() {
# for its own purposes. Remove the OE versions from the environment to
# avoid conflicts.
unset TARGET_CPPFLAGS TARGET_CFLAGS TARGET_CXXFLAGS TARGET_LDFLAGS
+ ( cd ${S}
+ ${S}/autogen.sh )
}
# grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
# conflicted, remove it since no one uses it.
-SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib"
-remove_sysroot_mkconfig_lib() {
- rm -r "${SYSROOT_DESTDIR}${datadir}/grub/grub-mkconfig_lib"
-}
+SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.00.bb b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.00.bb
index 778074a38..07e1d101b 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.00.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_2.00.bb
@@ -1,6 +1,6 @@
require grub2.inc
-RDEPENDS_${PN} = "diffutils freetype"
+RDEPENDS_${PN} = "diffutils freetype grub-editenv"
PR = "r1"
EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
@@ -8,6 +8,10 @@ EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
+PACKAGES =+ "grub-editenv"
+
+FILES_grub-editenv = "${bindir}/grub-editenv"
+
do_install_append () {
install -d ${D}${sysconfdir}/grub.d
}
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_git.bb b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_git.bb
index 6919c9a35..493b6956e 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/grub/grub_git.bb
@@ -1,14 +1,12 @@
require grub2.inc
-DEPENDS += "autogen-native"
-
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_arm = "1"
FILESEXTRAPATHS =. "${FILE_DIRNAME}/grub-git:"
PV = "2.00+${SRCPV}"
-SRCREV = "b95e92678882f56056c64ae29092bc9cf129905f"
+SRCREV = "7a5b301e3adb8e054288518a325135a1883c1c6c"
SRC_URI = "git://git.savannah.gnu.org/grub.git \
file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
file://autogen.sh-exclude-pc.patch \
@@ -18,6 +16,7 @@ SRC_URI = "git://git.savannah.gnu.org/grub.git \
S = "${WORKDIR}/git"
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
+COMPATIBLE_HOST_armv7a = 'null'
inherit autotools gettext texinfo
@@ -33,11 +32,6 @@ EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
-do_configure_prepend() {
- ( cd ${S}
- ${S}/autogen.sh )
-}
-
do_install_append () {
install -d ${D}${sysconfdir}/grub.d
rm -rf ${D}${libdir}/charset.alias
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
index 2fed344ba..86a16c262 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/libacpi_fix_for_x32.patch
@@ -7,7 +7,7 @@ Fix libacpi for x32
Patch Received from: H.J. Lu <hjl.tools@gmail.com>
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/05
Index: libacpi-0.2/Makefile
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/use_correct_strip_in_cross_environment.patch b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/use_correct_strip_in_cross_environment.patch
index bca75fb47..ef376aa31 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/use_correct_strip_in_cross_environment.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/libacpi/files/use_correct_strip_in_cross_environment.patch
@@ -6,7 +6,7 @@ Used the cross strip instead of host strip to avoid this build error:
| make: *** [test-libacpi] Error 1
| ERROR: oe_runmake failed
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07
Index: libacpi-0.2/Makefile
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/lrzsz_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/lrzsz_fix_for_automake-1.12.patch
index b4529f4c7..682f1c9c8 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/lrzsz_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/lrzsz_fix_for_automake-1.12.patch
@@ -9,7 +9,7 @@ This patch fixes following issue with automake 1.12
| src/Makefile.am:11: error: automatic de-ANSI-fication support has been removed
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/03
Index: lrzsz-0.12.20/configure.in
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.4.1.bb b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.4.1.bb
deleted file mode 100644
index 33be525c5..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.4.1.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "PCI utilities"
-DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
-to PCI bus configuration space and several utilities based on this library.'
-HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
-SECTION = "console/utils"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS = "zlib kmod"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
- file://configure.patch \
- file://guess-fix.patch \
- file://makefile.patch"
-
-SRC_URI[md5sum] = "35763bb1eab7bc9bf6eb6efb72cbc8a1"
-SRC_URI[sha256sum] = "865554cc5604d1644bd8da38d94845405e2a319a6d5acabc6a0296417684a82a"
-
-inherit multilib_header
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
-PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
-
-PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes"
-
-# see configure.patch
-do_configure () {
- (
- cd lib && \
- # EXTRA_OECONF for this recipe could only possibly contain 'HWDB=yes/no', so we put it
- # before ./configure
- ${PCI_CONF_FLAG} ${EXTRA_OECONF} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
- )
-}
-
-export PREFIX = "${prefix}"
-export SBINDIR = "${sbindir}"
-export SHAREDIR = "${datadir}"
-export MANDIR = "${mandir}"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
-
-# The configure script breaks if the HOST variable is set
-HOST[unexport] = "1"
-
-do_install () {
- oe_runmake DESTDIR=${D} install install-lib
-
- install -d ${D}${bindir}
- ln -s ../sbin/lspci ${D}${bindir}/lspci
-
- oe_multilib_header pci/config.h
-}
-
-PACKAGES =+ "${PN}-ids libpci"
-FILES_${PN}-ids = "${datadir}/pci.ids*"
-FILES_libpci = "${libdir}/libpci.so.*"
-SUMMARY_${PN}-ids = "PCI utilities - device ID database"
-DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
-RDEPENDS_${PN} += "${PN}-ids"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.1.bb b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.1.bb
new file mode 100644
index 000000000..d32b11942
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.5.1.bb
@@ -0,0 +1,60 @@
+SUMMARY = "PCI utilities"
+DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
+to PCI bus configuration space and several utilities based on this library.'
+HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+DEPENDS = "zlib kmod"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
+ file://configure.patch \
+ file://guess-fix.patch \
+ file://makefile.patch"
+
+SRC_URI[md5sum] = "0879a8f7ac51f4e874cfc6b3521a13cc"
+SRC_URI[sha256sum] = "2bf3a4605a562fb6b8b7673bff85a474a5cf383ed7e4bd8886b4f0939013d42f"
+
+inherit multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
+PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
+
+PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes"
+
+# see configure.patch
+do_configure () {
+ (
+ cd lib && \
+ # PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
+ # so we put it before ./configure
+ ${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
+ )
+}
+
+export PREFIX = "${prefix}"
+export SBINDIR = "${sbindir}"
+export SHAREDIR = "${datadir}"
+export MANDIR = "${mandir}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
+
+# The configure script breaks if the HOST variable is set
+HOST[unexport] = "1"
+
+do_install () {
+ oe_runmake DESTDIR=${D} install install-lib
+
+ install -d ${D}${bindir}
+ ln -s ../sbin/lspci ${D}${bindir}/lspci
+
+ oe_multilib_header pci/config.h
+}
+
+PACKAGES =+ "${PN}-ids libpci"
+FILES_${PN}-ids = "${datadir}/pci.ids*"
+FILES_libpci = "${libdir}/libpci.so.*"
+SUMMARY_${PN}-ids = "PCI utilities - device ID database"
+DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
+RDEPENDS_${PN} += "${PN}-ids"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb b/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
index 3556a45cf..bf0f58a7c 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
@@ -9,5 +9,3 @@ SRC_URI[md5sum] = "885431c3cefb76ffdad8cb985134e996"
SRC_URI[sha256sum] = "57c27be8f04ef4d535bcfa988567316cc57659fe69068327486dab53791e6558"
PR = "r1"
-
-FILES_${PN} += "*/udev */*/udev"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/COPYING b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/COPYING
deleted file mode 100644
index 63f529381..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/COPYING
+++ /dev/null
@@ -1,2 +0,0 @@
-This is a blank COPYING file, and should be filled in by original author in future.
-
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/pointercal b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/pointercal
deleted file mode 100644
index e69de29bb..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/pointercal
+++ /dev/null
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarm/pointercal b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarm/pointercal
deleted file mode 100644
index abd84ca4b..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarm/pointercal
+++ /dev/null
@@ -1 +0,0 @@
-8313 4 -8526 7 8334 -82604 65536
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarmv6/pointercal b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarmv6/pointercal
deleted file mode 100644
index abd84ca4b..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarmv6/pointercal
+++ /dev/null
@@ -1 +0,0 @@
-8313 4 -8526 7 8334 -82604 65536
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarmv7/pointercal b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarmv7/pointercal
deleted file mode 100644
index abd84ca4b..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuarmv7/pointercal
+++ /dev/null
@@ -1 +0,0 @@
-8313 4 -8526 7 8334 -82604 65536
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemumips/pointercal b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemumips/pointercal
deleted file mode 100644
index abd84ca4b..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemumips/pointercal
+++ /dev/null
@@ -1 +0,0 @@
-8313 4 -8526 7 8334 -82604 65536
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuppc/pointercal b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuppc/pointercal
deleted file mode 100644
index c2d6e37bf..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemuppc/pointercal
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemux86-64/pointercal b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemux86-64/pointercal
deleted file mode 100644
index 640053d39..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemux86-64/pointercal
+++ /dev/null
@@ -1 +0,0 @@
-1280 0 1002 0 960 328 65536
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemux86/pointercal b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemux86/pointercal
deleted file mode 100644
index 640053d39..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal/qemux86/pointercal
+++ /dev/null
@@ -1 +0,0 @@
-1280 0 1002 0 960 328 65536
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal_0.0.bb b/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal_0.0.bb
deleted file mode 100644
index df735a59f..000000000
--- a/import-layers/yocto-poky/meta/recipes-bsp/pointercal/pointercal_0.0.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Touchscreen calibration data"
-SECTION = "base"
-PR = "r11"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4b5fcfc87fb615860d398b5e38685edf"
-
-SRC_URI = "file://pointercal \
- file://COPYING"
-
-S = "${WORKDIR}"
-
-do_install() {
- # Only install file if it has a contents
- if [ -s ${S}/pointercal ]; then
- install -d ${D}${sysconfdir}/
- install -m 0644 ${S}/pointercal ${D}${sysconfdir}/
- fi
-}
-
-ALLOW_EMPTY_${PN} = "1"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-INHIBIT_DEFAULT_DEPS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/import-layers/yocto-poky/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
new file mode 100644
index 000000000..103d2861e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -0,0 +1,61 @@
+From 9dcd2c80347493f73800d8c1cb539f1daef14394 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Tue, 26 Jul 2016 03:54:42 -0400
+Subject: [PATCH] use lnr wrapper instead of looking for --relative option for ln
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ Makefile.am | 6 +++---
+ configure.ac | 2 --
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 305099a..f08d023 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -247,7 +247,7 @@ define move-to-rootlibdir
+ $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
+ so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
+ rm -f $(DESTDIR)$(libdir)/$$libname && \
+- $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
++ lnr $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
+ mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
+ fi
+ endef
+@@ -321,7 +321,7 @@ define install-relative-aliases
+ while [ -n "$$1" ]; do \
+ $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
+ rm -f $(DESTDIR)$$dir/$$2 && \
+- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
++ lnr $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
+ shift 2 || exit $$?; \
+ done
+ endef
+@@ -2906,7 +2906,7 @@ systemd_dbus1_generator_LDADD = \
+ dbus1-generator-install-hook:
+ $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
+ $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+- $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
++ $(AM_V_LN)lnr $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+
+ dbus1-generator-uninstall-hook:
+ rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+diff --git a/configure.ac b/configure.ac
+index 329861a..52c6e3d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
+ AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
+ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
+
+-AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
+-
+ M4_DEFINES=
+
+ AC_CHECK_TOOL(OBJCOPY, objcopy)
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/systemd-boot/systemd-boot.bb b/import-layers/yocto-poky/meta/recipes-bsp/systemd-boot/systemd-boot.bb
new file mode 100644
index 000000000..5b1164ec9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/systemd-boot/systemd-boot.bb
@@ -0,0 +1,38 @@
+require recipes-core/systemd/systemd.inc
+
+DEPENDS = "intltool-native libcap util-linux gnu-efi"
+
+SRC_URI += "file://0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch"
+
+inherit autotools pkgconfig gettext
+inherit deploy
+
+EXTRA_OECONF = " --enable-gnuefi \
+ --with-efi-includedir=${STAGING_INCDIR} \
+ --with-efi-ldsdir=${STAGING_LIBDIR} \
+ --with-efi-libdir=${STAGING_LIBDIR} \
+ --disable-manpages \
+ "
+
+# Imported from gummiboot recipe
+TUNE_CCARGS_remove = "-mfpmath=sse"
+COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+
+do_compile() {
+ SYSTEMD_BOOT_EFI_ARCH="ia32"
+ if [ "${TARGET_ARCH}" = "x86_64" ]; then
+ SYSTEMD_BOOT_EFI_ARCH="x64"
+ fi
+
+ oe_runmake systemd-boot${SYSTEMD_BOOT_EFI_ARCH}.efi
+}
+
+do_install() {
+ # Bypass systemd installation with a NOP
+ :
+}
+
+do_deploy () {
+ install ${B}/systemd-boot*.efi ${DEPLOYDIR}
+}
+addtask deploy before do_build after do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
index dfda5c1d3..79f1548ef 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
@@ -40,10 +40,7 @@ do_install_class-cross () {
install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
}
-SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
-uboot_fw_utils_cross() {
- sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
-}
+SYSROOT_DIRS_append_class-cross = " ${bindir_cross}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
BBCLASSEXTEND = "cross"
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot.inc b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot.inc
index 3ba866de0..252aae945 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/import-layers/yocto-poky/meta/recipes-bsp/u-boot/u-boot.inc
@@ -9,10 +9,11 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-inherit uboot-config deploy
+inherit uboot-config uboot-extlinux-config uboot-sign deploy
EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
@@ -32,7 +33,6 @@ UBOOT_LOCALVERSION ?= ""
# but enable individual recipes to change this value.
UBOOT_SUFFIX ??= "bin"
UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
-UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
UBOOT_MAKE_TARGET ?= "all"
@@ -65,9 +65,15 @@ UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}"
+# U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf
+# to find EXTLINUX conf file.
+UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux"
+UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf"
+UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}"
+
do_compile () {
if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
- sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk
+ sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
fi
unset LDFLAGS
@@ -79,41 +85,48 @@ do_compile () {
echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
fi
-
- if [ "x${UBOOT_CONFIG}" != "x" ]
+
+ if [ -n "${UBOOT_CONFIG}" ]
then
+ unset i j k
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
- for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ i=$(expr $i + 1);
+ for type in ${UBOOT_CONFIG}; do
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
- oe_runmake O=${config} ${config}
- oe_runmake O=${config} ${UBOOT_MAKE_TARGET}
- cp ${S}/${config}/${UBOOT_BINARY} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
+ oe_runmake -C ${S} O=${B}/${config} ${config}
+ oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET}
+ for binary in ${UBOOT_BINARIES}; do
+ k=$(expr $k + 1);
+ if [ $k -eq $i ]; then
+ cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
+ fi
+ done
+ unset k
fi
done
unset j
done
unset i
else
- oe_runmake ${UBOOT_MACHINE}
- oe_runmake ${UBOOT_MAKE_TARGET}
+ oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
+ oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
fi
}
do_install () {
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
install -d ${D}/boot
- install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
+ install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
fi
@@ -123,21 +136,21 @@ do_install () {
unset i
else
install -d ${D}/boot
- install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+ install -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
fi
- if [ "x${UBOOT_ELF}" != "x" ]
+ if [ -n "${UBOOT_ELF}" ]
then
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install ${S}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
+ install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}
fi
@@ -146,7 +159,7 @@ do_install () {
done
unset i
else
- install ${S}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE}
+ install -m 644 ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE}
ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY}
fi
fi
@@ -156,17 +169,17 @@ do_install () {
install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
fi
- if [ "x${SPL_BINARY}" != "x" ]
+ if [ -n "${SPL_BINARY}" ]
then
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
+ install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}
fi
@@ -175,61 +188,67 @@ do_install () {
done
unset i
else
- install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
+ install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME}
fi
fi
- if [ "x${UBOOT_ENV}" != "x" ]
+ if [ -n "${UBOOT_ENV}" ]
then
- install ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE}
+ install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE}
ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY}
fi
+
+ if [ "${UBOOT_EXTLINUX}" = "1" ]
+ then
+ install -Dm 0644 ${UBOOT_EXTLINUX_CONFIG} ${D}/${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME}
+ fi
+
}
FILES_${PN} = "/boot ${sysconfdir}"
do_deploy () {
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
install -d ${DEPLOYDIR}
- install ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
+ install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
cd ${DEPLOYDIR}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
- fi
- done
+ fi
+ done
unset j
done
unset i
else
install -d ${DEPLOYDIR}
- install ${S}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+ install -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
cd ${DEPLOYDIR}
rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
fi
- if [ "x${UBOOT_ELF}" != "x" ]
+ if [ -n "${UBOOT_ELF}" ]
then
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install ${S}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
+ install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type}
@@ -240,24 +259,24 @@ do_deploy () {
done
unset i
else
- install ${S}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE}
+ install -m 644 ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE}
ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
fi
fi
- if [ "x${SPL_BINARY}" != "x" ]
+ if [ -n "${SPL_BINARY}" ]
then
- if [ "x${UBOOT_CONFIG}" != "x" ]
+ if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
- i=`expr $i + 1`;
+ i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
- j=`expr $j + 1`;
+ j=$(expr $j + 1);
if [ $j -eq $i ]
then
- install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
+ install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}
@@ -269,7 +288,7 @@ do_deploy () {
done
unset i
else
- install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
+ install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}
ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME}
ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
@@ -277,13 +296,20 @@ do_deploy () {
fi
- if [ "x${UBOOT_ENV}" != "x" ]
+ if [ -n "${UBOOT_ENV}" ]
then
- install ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE}
+ install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE}
rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY}
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
fi
+
+ if [ "${UBOOT_EXTLINUX}" = "1" ]
+ then
+ install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_SYMLINK}
+ ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}
+ ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}
+ fi
}
addtask deploy before do_build after do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d/aarch64-host.patch b/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d/aarch64-host.patch
new file mode 100644
index 000000000..701fed7b5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d/aarch64-host.patch
@@ -0,0 +1,18 @@
+Accept aarch64 as valid build host
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: v86d-0.1.10/configure
+===================================================================
+--- v86d-0.1.10.orig/configure
++++ v86d-0.1.10/configure
+@@ -26,7 +26,7 @@ copt_x86emu_test()
+ local m=`uname -m`
+ if [ "$m" = "i686" -o "$m" = "i586" -o "$m" = "i486" -o "$m" = "i386" ]; then
+ echo "n";
+- elif [ "$m" = "x86_64" ]; then
++ elif [ "$m" = "x86_64" -o "$m" = "aarch64" ]; then
+ echo "y";
+ else
+ echo "It looks like your architecture '$m' isn't supported by this version of v86d." >&2
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb b/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb
index f50207212..1046d6341 100644
--- a/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb
+++ b/import-layers/yocto-poky/meta/recipes-bsp/v86d/v86d_0.1.10.bb
@@ -13,7 +13,9 @@ SRC_URI = "http://distfiles.gentoo.org/distfiles/${BP}.tar.bz2 \
file://Update-x86emu-from-X.org.patch \
file://fbsetup \
file://uvesafb.conf \
- file://ar-from-env.patch"
+ file://ar-from-env.patch \
+ file://aarch64-host.patch \
+"
SRC_URI[md5sum] = "51c792ba7b874ad8c43f0d3da4cfabe0"
SRC_URI[sha256sum] = "634964ae18ef68c8493add2ce150e3b4502badeb0d9194b4bd81241d25e6735c"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
index 3966b4c6e..ac364618e 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
@@ -6,22 +6,20 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
require avahi.inc
-inherit python-dir pythonnative distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-PACKAGECONFIG ??= "dbus python"
-PACKAGECONFIG[python] = "--enable-python,--disable-python,python-native python"
+inherit distro_features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+SRC_URI += "file://0001-configure.ac-install-GtkBuilder-interface-files-for-.patch"
SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
-DEPENDS += "avahi gtk+ libglade"
+DEPENDS += "avahi"
-AVAHI_GTK = "--enable-gtk --disable-gtk3 --disable-pygtk"
+AVAHI_GTK = "gtk3"
S = "${WORKDIR}/avahi-${PV}"
-PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc python-avahi avahi-discover"
+PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc avahi-discover"
FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
FILES_${PN}-dev += "${libdir}/libavahi-ui${SOLIBSDEV}"
@@ -29,14 +27,10 @@ FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
-FILES_python-avahi = "${PYTHON_SITEPACKAGES_DIR}/avahi ${PYTHON_SITEPACKAGES_DIR}/avahi_discover"
FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
- ${datadir}/avahi/interfaces/avahi-discover* \
+ ${datadir}/avahi/interfaces/avahi-discover.ui \
${bindir}/avahi-discover-standalone \
- ${datadir}/avahi/interfaces/avahi-discover.glade"
-
-RDEPENDS_python-avahi = "python-core python-dbus"
-
+ "
do_install_append () {
rm ${D}${sysconfdir} -rf
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
index 81aad7935..234646d29 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
@@ -23,8 +23,14 @@ SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}
"
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
-PACKAGECONFIG ??= "dbus"
+# For gtk related PACKAGECONFIGs: gtk, gtk3 and pygtk
+AVAHI_GTK ?= ""
+
+PACKAGECONFIG ??= "dbus ${AVAHI_GTK}"
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+"
+PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"
+PACKAGECONFIG[pygtk] = "--enable-pygtk,--disable-pygtk,"
USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \
@@ -51,14 +57,12 @@ EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
--disable-manpages \
${EXTRA_OECONF_SYSVINIT} \
${EXTRA_OECONF_SYSTEMD} \
- ${AVAHI_GTK} \
"
# The distro choice determines what init scripts are installed
EXTRA_OECONF_SYSVINIT = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','--with-distro=debian','--with-distro=none',d)}"
EXTRA_OECONF_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES','systemd','--with-systemdsystemunitdir=${systemd_unitdir}/system/','--without-systemdsystemunitdir',d)}"
-AVAHI_GTK ?= "--disable-gtk --disable-gtk3"
LDFLAGS_append_libc-uclibc = " -lintl"
LDFLAGS_append_uclinux-uclibc = " -lintl"
@@ -71,7 +75,7 @@ do_configure_prepend() {
}
do_compile_prepend() {
- export GIR_EXTRA_LIBS_PATH="${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs"
+ export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs"
}
PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
index 6670106b1..bfa63044e 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
@@ -12,6 +12,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
+SRC_URI += "file://avahi-fix-resource-unavaiable.patch"
+
SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch
new file mode 100644
index 000000000..8ccef08df
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/0001-configure.ac-install-GtkBuilder-interface-files-for-.patch
@@ -0,0 +1,28 @@
+From a59f13fab31a6e25bb03b2c2bc3aea576f857b6c Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sun, 12 Jun 2016 18:32:49 +0300
+Subject: [PATCH] configure.ac: install GtkBuilder interface files for GTK+3
+ too
+
+Upstream-Status: Pending
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index aebb716..48bdf63 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -965,7 +965,7 @@ AC_SUBST(avahi_socket)
+ #
+ # Avahi interfaces dir
+ #
+-if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes"; then
++if test "x$HAVE_PYTHON_DBUS" = "xyes" -o "x$HAVE_GTK" = "xyes" -o "x$HAVE_GTK3" = "xyes"; then
+ interfacesdir="${datadir}/${PACKAGE}/interfaces/"
+ AC_SUBST(interfacesdir)
+ fi
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch
new file mode 100644
index 000000000..5a2fd75f5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/avahi/files/avahi-fix-resource-unavaiable.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Backport
+
+Backport from:
+https://github.com/experimental-platform/platform-hostname-avahi/pull/9
+
+It sometimes fails to run avahi with error: "Could not receive return value
+from daemon process". It has same root cause with
+https://github.com/lxc/lxc/issues/25.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From 5150983102ad5ad43f0dae203cb332c168eb5a71 Mon Sep 17 00:00:00 2001
+From: Hinnerk Haardt <haardt@information-control.de>
+Date: Thu, 17 Dec 2015 11:52:19 +0100
+Subject: [PATCH] Fix `chroot.c: fork() failed: Resource temporarily
+ unavailable` as per https://github.com/lxc/lxc/issues/25.
+
+---
+ avahi-daemon/avahi-daemon.conf | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/avahi-daemon/avahi-daemon.conf b/avahi-daemon/avahi-daemon.conf
+index 95166f8..3d5b7a6 100644
+--- a/avahi-daemon/avahi-daemon.conf
++++ b/avahi-daemon/avahi-daemon.conf
+@@ -65,4 +65,3 @@ rlimit-data=4194304
+ rlimit-fsize=0
+ rlimit-nofile=768
+ rlimit-stack=4194304
+-rlimit-nproc=3
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch
index a31ea81f8..5f5cb0d34 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch
@@ -5,6 +5,9 @@ Subject: [PATCH] Part 2 of: 4319. [security] Fix resolver assertion
failure due to improper DNAME handling when parsing
fetch reply messages. (CVE-2016-1286) [RT #41753]
+CVE: CVE-2016-1286
+Upstream-Status: Backport
+
(cherry picked from commit 2de89ee9de8c8da9dc153a754b02dcdbb7fe2374)
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
---
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2775.patch b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2775.patch
new file mode 100644
index 000000000..5393063c5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2775.patch
@@ -0,0 +1,90 @@
+From 9d8aba8a7778721ae2cee6e4670a8e6be6590b05 Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Wed, 12 Oct 2016 19:52:59 +0900
+Subject: [PATCH]
+4406. [security] getrrsetbyname with a non absolute name could
+ trigger an infinite recursion bug in lwresd
+ and named with lwres configured if when combined
+ with a search list entry the resulting name is
+ too long. (CVE-2016-2775) [RT #42694]
+
+Backport commit 38cc2d14e218e536e0102fa70deef99461354232 from the
+v9.11.0_patch branch.
+
+CVE: CVE-2016-2775
+Upstream-Status: Backport
+
+Signed-off-by: zhengruoqin <zhengrq.fnst@cn.fujitsu.com>
+
+---
+ CHANGES | 6 ++++++
+ bin/named/lwdgrbn.c | 16 ++++++++++------
+ bin/tests/system/lwresd/lwtest.c | 9 ++++++++-
+ 3 files changed, 24 insertions(+), 7 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index d2e3360..d0a9d12 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1,3 +1,9 @@
++4406. [security] getrrsetbyname with a non absolute name could
++ trigger an infinite recursion bug in lwresd
++ and named with lwres configured if when combined
++ with a search list entry the resulting name is
++ too long. (CVE-2016-2775) [RT #42694]
++
+ 4322. [security] Duplicate EDNS COOKIE options in a response could
+ trigger an assertion failure. (CVE-2016-2088)
+ [RT #41809]
+diff --git a/bin/named/lwdgrbn.c b/bin/named/lwdgrbn.c
+index 3e7b15b..e1e9adc 100644
+--- a/bin/named/lwdgrbn.c
++++ b/bin/named/lwdgrbn.c
+@@ -403,14 +403,18 @@ start_lookup(ns_lwdclient_t *client) {
+ INSIST(client->lookup == NULL);
+
+ dns_fixedname_init(&absname);
+- result = ns_lwsearchctx_current(&client->searchctx,
+- dns_fixedname_name(&absname));
++
+ /*
+- * This will return failure if relative name + suffix is too long.
+- * In this case, just go on to the next entry in the search path.
++ * Perform search across all search domains until success
++ * is returned. Return in case of failure.
+ */
+- if (result != ISC_R_SUCCESS)
+- start_lookup(client);
++ while (ns_lwsearchctx_current(&client->searchctx,
++ dns_fixedname_name(&absname)) != ISC_R_SUCCESS) {
++ if (ns_lwsearchctx_next(&client->searchctx) != ISC_R_SUCCESS) {
++ ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);
++ return;
++ }
++ }
+
+ result = dns_lookup_create(cm->mctx,
+ dns_fixedname_name(&absname),
+diff --git a/bin/tests/system/lwresd/lwtest.c b/bin/tests/system/lwresd/lwtest.c
+index ad9b551..3eb4a66 100644
+--- a/bin/tests/system/lwresd/lwtest.c
++++ b/bin/tests/system/lwresd/lwtest.c
+@@ -768,7 +768,14 @@ main(void) {
+ test_getrrsetbyname("e.example1.", 1, 2, 1, 1, 1);
+ test_getrrsetbyname("e.example1.", 1, 46, 2, 0, 1);
+ test_getrrsetbyname("", 1, 1, 0, 0, 0);
+-
++ test_getrrsetbyname("123456789.123456789.123456789.123456789."
++ "123456789.123456789.123456789.123456789."
++ "123456789.123456789.123456789.123456789."
++ "123456789.123456789.123456789.123456789."
++ "123456789.123456789.123456789.123456789."
++ "123456789.123456789.123456789.123456789."
++ "123456789", 1, 1, 0, 0, 0);
++
+ if (fails == 0)
+ printf("I:ok\n");
+ return (fails);
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2776.patch b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2776.patch
new file mode 100644
index 000000000..738bf6005
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2776.patch
@@ -0,0 +1,123 @@
+From 1171111657081970585f9f0e03b476358c33a6c0 Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Wed, 12 Oct 2016 20:36:52 +0900
+Subject: [PATCH]
+4467. [security] It was possible to trigger an assertion when
+ rendering a message. (CVE-2016-2776) [RT #43139]
+
+Backport commit 2bd0922cf995b9ac205fc83baf7e220b95c6bf12 from the
+v9.11.0_patch branch.
+
+CVE: CVE-2016-2776
+Upstream-Status: Backport
+
+Signed-off-by: zhengruoqin <zhengrq.fnst@cn.fujitsu.com>
+
+---
+ CHANGES | 3 +++
+ lib/dns/message.c | 42 +++++++++++++++++++++++++++++++-----------
+ 2 files changed, 34 insertions(+), 11 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index d0a9d12..5c8c61a 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1,3 +1,6 @@
++4467. [security] It was possible to trigger an assertion when
++ rendering a message. (CVE-2016-2776) [RT #43139]
++
+ 4406. [security] getrrsetbyname with a non absolute name could
+ trigger an infinite recursion bug in lwresd
+ and named with lwres configured if when combined
+diff --git a/lib/dns/message.c b/lib/dns/message.c
+index 6b5b4bb..b74dc81 100644
+--- a/lib/dns/message.c
++++ b/lib/dns/message.c
+@@ -1754,7 +1754,7 @@ dns_message_renderbegin(dns_message_t *msg, dns_compress_t *cctx,
+ if (r.length < DNS_MESSAGE_HEADERLEN)
+ return (ISC_R_NOSPACE);
+
+- if (r.length < msg->reserved)
++ if (r.length - DNS_MESSAGE_HEADERLEN < msg->reserved)
+ return (ISC_R_NOSPACE);
+
+ /*
+@@ -1895,8 +1895,29 @@ norender_rdataset(const dns_rdataset_t *rdataset, unsigned int options,
+
+ return (ISC_TRUE);
+ }
+-
+ #endif
++
++static isc_result_t
++renderset(dns_rdataset_t *rdataset, dns_name_t *owner_name,
++ dns_compress_t *cctx, isc_buffer_t *target,
++ unsigned int reserved, unsigned int options, unsigned int *countp)
++{
++ isc_result_t result;
++
++ /*
++ * Shrink the space in the buffer by the reserved amount.
++ */
++ if (target->length - target->used < reserved)
++ return (ISC_R_NOSPACE);
++
++ target->length -= reserved;
++ result = dns_rdataset_towire(rdataset, owner_name,
++ cctx, target, options, countp);
++ target->length += reserved;
++
++ return (result);
++}
++
+ isc_result_t
+ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
+ unsigned int options)
+@@ -1939,6 +1960,8 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
+ /*
+ * Shrink the space in the buffer by the reserved amount.
+ */
++ if (msg->buffer->length - msg->buffer->used < msg->reserved)
++ return (ISC_R_NOSPACE);
+ msg->buffer->length -= msg->reserved;
+
+ total = 0;
+@@ -2214,9 +2237,8 @@ dns_message_renderend(dns_message_t *msg) {
+ * Render.
+ */
+ count = 0;
+- result = dns_rdataset_towire(msg->opt, dns_rootname,
+- msg->cctx, msg->buffer, 0,
+- &count);
++ result = renderset(msg->opt, dns_rootname, msg->cctx,
++ msg->buffer, msg->reserved, 0, &count);
+ msg->counts[DNS_SECTION_ADDITIONAL] += count;
+ if (result != ISC_R_SUCCESS)
+ return (result);
+@@ -2232,9 +2254,8 @@ dns_message_renderend(dns_message_t *msg) {
+ if (result != ISC_R_SUCCESS)
+ return (result);
+ count = 0;
+- result = dns_rdataset_towire(msg->tsig, msg->tsigname,
+- msg->cctx, msg->buffer, 0,
+- &count);
++ result = renderset(msg->tsig, msg->tsigname, msg->cctx,
++ msg->buffer, msg->reserved, 0, &count);
+ msg->counts[DNS_SECTION_ADDITIONAL] += count;
+ if (result != ISC_R_SUCCESS)
+ return (result);
+@@ -2255,9 +2276,8 @@ dns_message_renderend(dns_message_t *msg) {
+ * the owner name of a SIG(0) is irrelevant, and will not
+ * be set in a message being rendered.
+ */
+- result = dns_rdataset_towire(msg->sig0, dns_rootname,
+- msg->cctx, msg->buffer, 0,
+- &count);
++ result = renderset(msg->sig0, dns_rootname, msg->cctx,
++ msg->buffer, msg->reserved, 0, &count);
+ msg->counts[DNS_SECTION_ADDITIONAL] += count;
+ if (result != ISC_R_SUCCESS)
+ return (result);
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/dont-test-on-host.patch b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/dont-test-on-host.patch
index 6989d6d4b..b02ecb106 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/dont-test-on-host.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind/dont-test-on-host.patch
@@ -1,6 +1,6 @@
Upstream-Status: Pending
-Signed-off-by Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
Index: bind-9.9.5/bin/Makefile.in
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
index 1e3a20f9a..4e2e856b7 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
@@ -25,6 +25,8 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://CVE-2016-1286_1.patch \
file://CVE-2016-1286_2.patch \
file://CVE-2016-2088.patch \
+ file://CVE-2016-2775.patch \
+ file://CVE-2016-2776.patch \
"
SRC_URI[md5sum] = "bcf7e772b616f7259420a3edc5df350a"
@@ -56,7 +58,7 @@ SYSTEMD_SERVICE_${PN} = "named.service"
PARALLEL_MAKE = ""
-RDEPENDS_${PN} = "python-core"
+RDEPENDS_${PN} = "python3-core"
RDEPENDS_${PN}-dev = ""
PACKAGE_BEFORE_PN += "${PN}-utils"
@@ -81,7 +83,7 @@ do_install_append() {
install -d "${D}${sysconfdir}/init.d"
install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
- sed -i -e '1s,#!.*python,#! /usr/bin/env python,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
+ sed -i -e '1s,#!.*python,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
# Install systemd related files
install -d ${D}${sbindir}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
index a508229a3..ecefb7b59 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -18,6 +18,7 @@ PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
SRC_URI = "\
${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
+ file://out-of-tree.patch \
file://init \
file://run-ptest \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
@@ -25,7 +26,7 @@ SRC_URI = "\
"
S = "${WORKDIR}/bluez-${PV}"
-inherit autotools-brokensep pkgconfig systemd update-rc.d distro_features_check ptest
+inherit autotools pkgconfig systemd update-rc.d distro_features_check ptest
EXTRA_OECONF = "\
--enable-tools \
@@ -60,17 +61,25 @@ do_install_append() {
install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
fi
+ if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then
+ sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth
+ fi
+
# Install desired tools that upstream leaves in build area
for f in ${NOINST_TOOLS} ; do
install -m 755 ${B}/$f ${D}/${bindir}
done
+
+ # Patch python tools to use Python 3; they should be source compatible, but
+ # still refer to Python 2 in the shebang
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/bluez/test/*
}
ALLOW_EMPTY_libasound-module-bluez = "1"
PACKAGES =+ "libasound-module-bluez ${PN}-testtools ${PN}-obex ${PN}-noinst-tools"
FILES_libasound-module-bluez = "${libdir}/alsa-lib/lib*.so ${datadir}/alsa"
-FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${base_libdir}/udev/ ${nonarch_base_libdir}/udev/ ${systemd_unitdir}/ ${datadir}/dbus-1"
+FILES_${PN} += "${libdir}/bluetooth/plugins/*.so ${systemd_unitdir}/ ${datadir}/dbus-1"
FILES_${PN}-dev += "\
${libdir}/bluetooth/plugins/*.la \
${libdir}/alsa-lib/*.la \
@@ -94,7 +103,7 @@ def get_noinst_tools_paths (d, bb, tools):
FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
-RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
+RDEPENDS_${PN}-testtools += "python3 python3-dbus python3-pygobject"
SYSTEMD_SERVICE_${PN} = "bluetooth.service"
INITSCRIPT_PACKAGES = "${PN}"
@@ -108,5 +117,5 @@ do_compile_ptest() {
do_install_ptest() {
cp -r ${B}/unit/ ${D}${PTEST_PATH}
- rm ${D}${PTEST_PATH}/unit/*.c ${D}${PTEST_PATH}/unit/*.o
+ rm -f ${D}${PTEST_PATH}/unit/*.o
}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/init b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/init
index 1606a5c66..489e9b9eb 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/init
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/init
@@ -3,7 +3,7 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DESC=bluetooth
-DAEMON=/usr/lib/bluez5/bluetooth/bluetoothd
+DAEMON=@LIBEXECDIR@/bluetooth/bluetoothd
# If you want to be ignore error of "org.freedesktop.hostname1",
# please enable NOPLUGIN_OPTION.
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch
new file mode 100644
index 000000000..3ee79d704
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch
@@ -0,0 +1,26 @@
+From ed55b49a226ca3909f52416be2ae5ce1c5ca2cb2 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Fri, 22 Apr 2016 15:40:37 +0100
+Subject: [PATCH] Makefile.obexd: add missing mkdir in builtin.h generation
+
+In parallel out-of-tree builds it's possible that obexd/src/builtin.h is
+generated before the target directory has been implicitly created. Solve this by
+creating the directory before writing into it.
+
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ Makefile.obexd | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.obexd b/Makefile.obexd
+index 2e33cbc..c8286f0 100644
+--- a/Makefile.obexd
++++ b/Makefile.obexd
+@@ -105,2 +105,3 @@ obexd/src/plugin.$(OBJEXT): obexd/src/builtin.h
+ obexd/src/builtin.h: obexd/src/genbuiltin $(obexd_builtin_sources)
++ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_GEN)$(srcdir)/obexd/src/genbuiltin $(obexd_builtin_modules) > $@
+--
+2.8.0.rc3
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.37.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.37.bb
deleted file mode 100644
index db20f79ff..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.37.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-require bluez5.inc
-
-REQUIRED_DISTRO_FEATURES = "bluez5"
-
-SRC_URI[md5sum] = "33177e5743e24b2b3738f72be64e3ffb"
-SRC_URI[sha256sum] = "c14ba9ddcb0055522073477b8fd8bf1ddf5d219e75fdfd4699b7e0ce5350d6b0"
-
-# noinst programs in Makefile.tools that are conditional on READLINE
-# support
-NOINST_TOOLS_READLINE ?= " \
- attrib/gatttool \
- tools/obex-client-tool \
- tools/obex-server-tool \
- tools/bluetooth-player \
- tools/obexctl \
-"
-
-# noinst programs in Makefile.tools that are conditional on EXPERIMENTAL
-# support
-NOINST_TOOLS_EXPERIMENTAL ?= " \
- emulator/btvirt \
- emulator/b1ee \
- emulator/hfp \
- tools/3dsp \
- tools/mgmt-tester \
- tools/gap-tester \
- tools/l2cap-tester \
- tools/sco-tester \
- tools/smp-tester \
- tools/hci-tester \
- tools/rfcomm-tester \
- tools/bdaddr \
- tools/avinfo \
- tools/avtest \
- tools/scotest \
- tools/amptest \
- tools/hwdb \
- tools/hcieventmask \
- tools/hcisecfilter \
- tools/btmgmt \
- tools/btinfo \
- tools/btattach \
- tools/btsnoop \
- tools/btproxy \
- tools/btiotest \
- tools/mcaptest \
- tools/cltest \
- tools/oobtest \
- tools/seq2bseq \
- tools/ibeacon \
- tools/btgatt-client \
- tools/btgatt-server \
- tools/gatt-service \
- profiles/iap/iapd \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.41.bb b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.41.bb
new file mode 100644
index 000000000..522aab7d5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.41.bb
@@ -0,0 +1,55 @@
+require bluez5.inc
+
+REQUIRED_DISTRO_FEATURES = "bluez5"
+
+SRC_URI[md5sum] = "318341b2188698130adb73236ee69244"
+SRC_URI[sha256sum] = "df7dc4462494dad4e60a2943240d584f6e760235dca64f5f10eba46dbab7f5f0"
+
+# noinst programs in Makefile.tools that are conditional on READLINE
+# support
+NOINST_TOOLS_READLINE ?= " \
+ attrib/gatttool \
+ tools/obex-client-tool \
+ tools/obex-server-tool \
+ tools/bluetooth-player \
+ tools/obexctl \
+ tools/btmgmt \
+"
+
+# noinst programs in Makefile.tools that are conditional on EXPERIMENTAL
+# support
+NOINST_TOOLS_EXPERIMENTAL ?= " \
+ emulator/btvirt \
+ emulator/b1ee \
+ emulator/hfp \
+ tools/3dsp \
+ tools/mgmt-tester \
+ tools/gap-tester \
+ tools/l2cap-tester \
+ tools/sco-tester \
+ tools/smp-tester \
+ tools/hci-tester \
+ tools/rfcomm-tester \
+ tools/bdaddr \
+ tools/avinfo \
+ tools/avtest \
+ tools/scotest \
+ tools/amptest \
+ tools/hwdb \
+ tools/hcieventmask \
+ tools/hcisecfilter \
+ tools/btinfo \
+ tools/btattach \
+ tools/btsnoop \
+ tools/btproxy \
+ tools/btiotest \
+ tools/mcaptest \
+ tools/cltest \
+ tools/oobtest \
+ tools/seq2bseq \
+ tools/ibeacon \
+ tools/btgatt-client \
+ tools/btgatt-server \
+ tools/gatt-service \
+ profiles/iap/iapd \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman-gnome/0001-Port-to-Gtk3.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman-gnome/0001-Port-to-Gtk3.patch
new file mode 100644
index 000000000..c93e9b465
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman-gnome/0001-Port-to-Gtk3.patch
@@ -0,0 +1,277 @@
+From a59b0fac02e74a971ac3f08bf28c17ce361a9526 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 2 Mar 2016 15:47:49 +0200
+Subject: [PATCH] Port to Gtk3
+
+Some unused (or not useful) code was removed, functionality should stay
+the same.
+
+Code still contains quite a few uses of deprecated API.
+
+Upstream-Status: Submitted
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ applet/agent.c | 3 +--
+ applet/main.c | 43 -------------------------------------------
+ applet/status.c | 8 --------
+ configure.ac | 3 +--
+ properties/ethernet.c | 14 +++++++-------
+ properties/main.c | 2 +-
+ properties/wifi.c | 12 ++++++------
+ 7 files changed, 16 insertions(+), 69 deletions(-)
+
+diff --git a/applet/agent.c b/applet/agent.c
+index 65bed08..04fe86a 100644
+--- a/applet/agent.c
++++ b/applet/agent.c
+@@ -126,7 +126,6 @@ static void request_input_dialog(GHashTable *request,
+ gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
+ gtk_window_set_keep_above(GTK_WINDOW(dialog), TRUE);
+ gtk_window_set_urgency_hint(GTK_WINDOW(dialog), TRUE);
+- gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+ input->dialog = dialog;
+
+ gtk_dialog_add_button(GTK_DIALOG(dialog),
+@@ -139,7 +138,7 @@ static void request_input_dialog(GHashTable *request,
+ gtk_table_set_row_spacings(GTK_TABLE(table), 4);
+ gtk_table_set_col_spacings(GTK_TABLE(table), 20);
+ gtk_container_set_border_width(GTK_CONTAINER(table), 12);
+- gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table);
++ gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area (GTK_DIALOG(dialog))), table);
+
+ label = gtk_label_new(_("Please provide some network information:"));
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
+diff --git a/applet/main.c b/applet/main.c
+index f12d371..cd16285 100644
+--- a/applet/main.c
++++ b/applet/main.c
+@@ -157,46 +157,6 @@ static void name_owner_changed(DBusGProxy *proxy, const char *name,
+ }
+ }
+
+-static void open_uri(GtkWindow *parent, const char *uri)
+-{
+- GtkWidget *dialog;
+- GdkScreen *screen;
+- GError *error = NULL;
+- gchar *cmdline;
+-
+- screen = gtk_window_get_screen(parent);
+-
+- cmdline = g_strconcat("xdg-open ", uri, NULL);
+-
+- if (gdk_spawn_command_line_on_screen(screen,
+- cmdline, &error) == FALSE) {
+- dialog = gtk_message_dialog_new(parent,
+- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR,
+- GTK_BUTTONS_CLOSE, "%s", error->message);
+- gtk_dialog_run(GTK_DIALOG(dialog));
+- gtk_widget_destroy(dialog);
+- g_error_free(error);
+- }
+-
+- g_free(cmdline);
+-}
+-
+-static void about_url_hook(GtkAboutDialog *dialog,
+- const gchar *url, gpointer data)
+-{
+- open_uri(GTK_WINDOW(dialog), url);
+-}
+-
+-static void about_email_hook(GtkAboutDialog *dialog,
+- const gchar *email, gpointer data)
+-{
+- gchar *uri;
+-
+- uri = g_strconcat("mailto:", email, NULL);
+- open_uri(GTK_WINDOW(dialog), uri);
+- g_free(uri);
+-}
+-
+ static void about_callback(GtkWidget *item, gpointer user_data)
+ {
+ const gchar *authors[] = {
+@@ -204,9 +164,6 @@ static void about_callback(GtkWidget *item, gpointer user_data)
+ NULL
+ };
+
+- gtk_about_dialog_set_url_hook(about_url_hook, NULL, NULL);
+- gtk_about_dialog_set_email_hook(about_email_hook, NULL, NULL);
+-
+ gtk_show_about_dialog(NULL, "version", VERSION,
+ "copyright", "Copyright \xc2\xa9 2008 Intel Corporation",
+ "comments", _("A connection manager for the GNOME desktop"),
+diff --git a/applet/status.c b/applet/status.c
+index aed6f1e..015ff29 100644
+--- a/applet/status.c
++++ b/applet/status.c
+@@ -102,8 +102,6 @@ static void icon_animation_start(IconAnimation *animation,
+ {
+ available = TRUE;
+
+- gtk_status_icon_set_tooltip(statusicon, NULL);
+-
+ animation->start = start;
+ animation->end = (end == 0) ? animation->count - 1 : end;
+
+@@ -120,8 +118,6 @@ static void icon_animation_stop(IconAnimation *animation)
+ {
+ available = TRUE;
+
+- gtk_status_icon_set_tooltip(statusicon, NULL);
+-
+ if (animation->id > 0)
+ g_source_remove(animation->id);
+
+@@ -251,8 +247,6 @@ void status_unavailable(void)
+ available = FALSE;
+
+ gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_notifier);
+- gtk_status_icon_set_tooltip(statusicon,
+- "Connection Manager daemon is not running");
+
+ gtk_status_icon_set_visible(statusicon, TRUE);
+ }
+@@ -299,7 +293,6 @@ static void set_ready(gint signal)
+
+ if (signal < 0) {
+ gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_wired);
+- gtk_status_icon_set_tooltip(statusicon, NULL);
+ return;
+ }
+
+@@ -311,7 +304,6 @@ static void set_ready(gint signal)
+ index = 4;
+
+ gtk_status_icon_set_from_pixbuf(statusicon, pixbuf_signal[index]);
+- gtk_status_icon_set_tooltip(statusicon, NULL);
+ }
+
+ struct timeout_data {
+diff --git a/configure.ac b/configure.ac
+index b972e07..a4dad5d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,8 +55,7 @@ AC_SUBST(DBUS_LIBS)
+ DBUS_BINDING_TOOL="dbus-binding-tool"
+ AC_SUBST(DBUS_BINDING_TOOL)
+
+-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8, dummy=yes,
+- AC_MSG_ERROR(gtk+ >= 2.8 is required))
++PKG_CHECK_MODULES(GTK, gtk+-3.0)
+ AC_SUBST(GTK_CFLAGS)
+ AC_SUBST(GTK_LIBS)
+
+diff --git a/properties/ethernet.c b/properties/ethernet.c
+index 31db7a0..0b6b423 100644
+--- a/properties/ethernet.c
++++ b/properties/ethernet.c
+@@ -82,7 +82,7 @@ void add_ethernet_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
+ gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
+
+- table = gtk_table_new(1, 1, TRUE);
++ table = gtk_table_new(1, 1, FALSE);
+ gtk_table_set_row_spacings(GTK_TABLE(table), 10);
+ gtk_table_set_col_spacings(GTK_TABLE(table), 10);
+ gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
+@@ -136,7 +136,7 @@ void add_ethernet_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_d
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
+ gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
+
+- table = gtk_table_new(5, 5, TRUE);
++ table = gtk_table_new(5, 5, FALSE);
+ gtk_table_set_row_spacings(GTK_TABLE(table), 10);
+ gtk_table_set_col_spacings(GTK_TABLE(table), 10);
+ gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
+@@ -144,9 +144,9 @@ void add_ethernet_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_d
+ label = gtk_label_new(_("Configuration:"));
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 0, 1);
+
+- combo = gtk_combo_box_new_text();
+- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "DHCP");
+- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "MANUAL");
++ combo = gtk_combo_box_text_new();
++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "DHCP");
++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "MANUAL");
+ gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(combo),
+ separator_function, NULL, NULL);
+ gtk_table_attach_defaults(GTK_TABLE(table), combo, 2, 4, 0, 1);
+@@ -219,7 +219,7 @@ void update_ethernet_ipv4(struct config_data *data, guint policy)
+ case CONNMAN_POLICY_DHCP:
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
+ for (i = 0; i < 3; i++) {
+- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 0);
++ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 0);
+ gtk_widget_set_sensitive(entry[i], 0);
+ gtk_entry_set_text(GTK_ENTRY(entry[i]), _(""));
+ }
+@@ -227,7 +227,7 @@ void update_ethernet_ipv4(struct config_data *data, guint policy)
+ case CONNMAN_POLICY_MANUAL:
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 1);
+ for (i = 0; i < 3; i++) {
+- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 1);
++ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 1);
+ gtk_widget_set_sensitive(entry[i], 1);
+ }
+ break;
+diff --git a/properties/main.c b/properties/main.c
+index c05f443..6f76361 100644
+--- a/properties/main.c
++++ b/properties/main.c
+@@ -429,7 +429,7 @@ static GtkWidget *create_interfaces(GtkWidget *window)
+
+ scrolled = gtk_scrolled_window_new(NULL, NULL);
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
+- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
++ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled),
+ GTK_SHADOW_OUT);
+ gtk_box_pack_start(GTK_BOX(hbox), scrolled, FALSE, TRUE, 0);
+diff --git a/properties/wifi.c b/properties/wifi.c
+index bd325ef..a5827e0 100644
+--- a/properties/wifi.c
++++ b/properties/wifi.c
+@@ -125,7 +125,7 @@ void add_wifi_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
+ gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
+
+- table = gtk_table_new(1, 1, TRUE);
++ table = gtk_table_new(1, 1, FALSE);
+ gtk_table_set_row_spacings(GTK_TABLE(table), 10);
+ gtk_table_set_col_spacings(GTK_TABLE(table), 10);
+ gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
+@@ -185,9 +185,9 @@ static void wifi_ipconfig(GtkWidget *table, struct config_data *data, GtkTreeIte
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 3, 4);
+ data->ipv4.label[0] = label;
+
+- combo = gtk_combo_box_new_text();
+- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "DHCP");
+- gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "Manual");
++ combo = gtk_combo_box_text_new();
++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "DHCP");
++ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "Manual");
+
+ gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(combo),
+ separator_function, NULL, NULL);
+@@ -335,14 +335,14 @@ void update_wifi_ipv4(struct config_data *data, guint policy)
+ case CONNMAN_POLICY_DHCP:
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
+ for (i = 0; i < 3; i++) {
+- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 0);
++ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 0);
+ gtk_widget_set_sensitive(entry[i], 0);
+ }
+ break;
+ case CONNMAN_POLICY_MANUAL:
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 1);
+ for (i = 0; i < 3; i++) {
+- gtk_entry_set_editable(GTK_ENTRY(entry[i]), 1);
++ gtk_editable_set_editable(GTK_EDITABLE(entry[i]), 1);
+ gtk_widget_set_sensitive(entry[i], 1);
+ }
+ break;
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
index 7b875f00f..a56bd3751 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman-gnome_0.7.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
file://properties/main.c;beginline=1;endline=20;md5=50c77c81871308b033ab7a1504626afb \
file://common/connman-dbus.c;beginline=1;endline=20;md5=de6b485c0e717a0236402d220187717a"
-DEPENDS = "gtk+ dbus-glib intltool-native gettext-native"
+DEPENDS = "gtk+3 dbus-glib dbus-glib-native intltool-native gettext-native"
# 0.7 tag
SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143"
@@ -15,12 +15,13 @@ SRC_URI = "git://github.com/connectivity/connman-gnome.git \
file://null_check_for_ipv4_config.patch \
file://images/* \
file://connman-gnome-fix-dbus-interface-name.patch \
+ file://0001-Port-to-Gtk3.patch \
"
S = "${WORKDIR}/git"
inherit autotools-brokensep gtk-icon-cache pkgconfig distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
RDEPENDS_${PN} = "connman"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman.inc b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman.inc
index c3752514c..35a7eed0a 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman.inc
@@ -26,11 +26,9 @@ EXTRA_OECONF += "\
--enable-loopback \
--enable-ethernet \
--enable-tools \
- --enable-test \
--disable-polkit \
--enable-client \
"
-CFLAGS += "-D_GNU_SOURCE"
PACKAGECONFIG ??= "wispr \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd','systemd', '', d)} \
@@ -140,10 +138,7 @@ PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
FILES_${PN}-tools = "${bindir}/wispr"
RDEPENDS_${PN}-tools ="${PN}"
-FILES_${PN}-tests = "${bindir}/*-test ${libdir}/${BPN}/test/*"
-RDEPENDS_${PN}-tests = "python-dbus python-pygobject python-textutils python-subprocess python-fcntl python-netclient \
- ${PN} \
-"
+FILES_${PN}-tests = "${bindir}/*-test"
FILES_${PN}-client = "${bindir}/connmanctl"
RDEPENDS_${PN}-client ="${PN}"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-Detect-backtrace-API-availability-before-using-it.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-Detect-backtrace-API-availability-before-using-it.patch
deleted file mode 100644
index 5dc6fd634..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-Detect-backtrace-API-availability-before-using-it.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 00d4447395725abaa651e12ed40095081e04011e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 13 Sep 2015 13:22:01 -0700
-Subject: [PATCH 1/3] Detect backtrace() API availability before using it
-
-C libraries besides glibc do not have backtrace() implemented
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 2 ++
- src/log.c | 5 ++---
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 69c0eeb..90099f2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -171,6 +171,8 @@ fi
- AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
- AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
-
-+AC_CHECK_HEADERS([execinfo.h])
-+
- AC_CHECK_HEADERS(resolv.h, dummy=yes,
- AC_MSG_ERROR(resolver header files are required))
- AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
-diff --git a/src/log.c b/src/log.c
-index a693bd0..5b40c1f 100644
---- a/src/log.c
-+++ b/src/log.c
-@@ -30,7 +30,6 @@
- #include <stdlib.h>
- #include <string.h>
- #include <syslog.h>
--#include <execinfo.h>
- #include <dlfcn.h>
-
- #include "connman.h"
-@@ -215,9 +214,9 @@ static void print_backtrace(unsigned int offset)
- static void signal_handler(int signo)
- {
- connman_error("Aborting (signal %d) [%s]", signo, program_exec);
--
-+#ifdef HAVE_EXECINFO_H
- print_backtrace(2);
--
-+#endif /* HAVE_EXECINFO_H */
- exit(EXIT_FAILURE);
- }
-
---
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-iptables-Add-missing-function-item-of-xtables-to-mat.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-iptables-Add-missing-function-item-of-xtables-to-mat.patch
deleted file mode 100644
index 1b5a3e440..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0001-iptables-Add-missing-function-item-of-xtables-to-mat.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From acea08a0e4234a4c1a87bedc087c73ff36de0c7b Mon Sep 17 00:00:00 2001
-From: Wu Zheng <wu.zheng@intel.com>
-Date: Thu, 28 Jan 2016 18:04:17 +0800
-Subject: [PATCH] iptables: Add missing function item of xtables to match
- iptables 1.6
-
-The struct of xtables_globals has been modified in iptables 1.6.
-If connman runs with iptables 1.6, it can crash.
-
-Program received signal SIGSEGV, Segmentation fault.
-0x00000000 in ?? ()
-0xb7dea89c in xtables_find_target () from /usr/lib/libxtables.so.11
-0xb7deac1c in ?? () from /usr/lib/libxtables.so.11
-0xb7dea793 in xtables_find_target () from /usr/lib/libxtables.so.11
-
-The the missing function item of xtables is added to xtables_globals.
-
-Upstream-Status: Backport
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
-Signed-off-by: Wu Zheng <wu.zheng@intel.com>
----
- src/iptables.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/iptables.c b/src/iptables.c
-index bc0c763..5ef757a 100644
---- a/src/iptables.c
-+++ b/src/iptables.c
-@@ -1566,6 +1566,9 @@ struct xtables_globals iptables_globals = {
- .option_offset = 0,
- .opts = iptables_opts,
- .orig_opts = iptables_opts,
-+#if XTABLES_VERSION_CODE > 10
-+ .compat_rev = xtables_compatible_revision,
-+#endif
- };
-
- static struct xtables_target *prepare_target(struct connman_iptables *table,
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch
deleted file mode 100644
index eefc6834b..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 67645a01a2f3f52625d8dd77f2811a9e213e1b7d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 13 Sep 2015 13:28:20 -0700
-Subject: [PATCH] Fix header inclusions for musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gweb/gresolv.c | 1 +
- plugins/wifi.c | 3 +--
- src/tethering.c | 2 --
- tools/dhcp-test.c | 1 -
- tools/dnsproxy-test.c | 1 +
- 5 files changed, 3 insertions(+), 5 deletions(-)
-
-Index: connman-1.30/gweb/gresolv.c
-===================================================================
---- connman-1.30.orig/gweb/gresolv.c
-+++ connman-1.30/gweb/gresolv.c
-@@ -28,6 +28,7 @@
- #include <stdarg.h>
- #include <string.h>
- #include <stdlib.h>
-+#include <stdio.h>
- #include <resolv.h>
- #include <sys/types.h>
- #include <sys/socket.h>
-Index: connman-1.30/plugins/wifi.c
-===================================================================
---- connman-1.30.orig/plugins/wifi.c
-+++ connman-1.30/plugins/wifi.c
-@@ -30,9 +30,8 @@
- #include <string.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
--#include <linux/if_arp.h>
--#include <linux/wireless.h>
- #include <net/ethernet.h>
-+#include <linux/wireless.h>
-
- #ifndef IFF_LOWER_UP
- #define IFF_LOWER_UP 0x10000
-Index: connman-1.30/src/tethering.c
-===================================================================
---- connman-1.30.orig/src/tethering.c
-+++ connman-1.30/src/tethering.c
-@@ -31,10 +31,8 @@
- #include <stdio.h>
- #include <sys/ioctl.h>
- #include <net/if.h>
--#include <linux/sockios.h>
- #include <string.h>
- #include <fcntl.h>
--#include <linux/if_tun.h>
- #include <netinet/in.h>
- #include <linux/if_bridge.h>
-
-Index: connman-1.30/tools/dhcp-test.c
-===================================================================
---- connman-1.30.orig/tools/dhcp-test.c
-+++ connman-1.30/tools/dhcp-test.c
-@@ -33,7 +33,6 @@
- #include <arpa/inet.h>
- #include <net/route.h>
- #include <net/ethernet.h>
--#include <linux/if_arp.h>
-
- #include <gdhcp/gdhcp.h>
-
-Index: connman-1.30/tools/dnsproxy-test.c
-===================================================================
---- connman-1.30.orig/tools/dnsproxy-test.c
-+++ connman-1.30/tools/dnsproxy-test.c
-@@ -27,6 +27,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-+#include <stdio.h>
- #include <arpa/inet.h>
- #include <netinet/in.h>
- #include <sys/types.h>
-Index: connman-1.30/configure.ac
-===================================================================
---- connman-1.30.orig/configure.ac
-+++ connman-1.30/configure.ac
-@@ -173,6 +173,8 @@ AM_CONDITIONAL(PPTP_BUILTIN, test "${ena
-
- AC_CHECK_HEADERS([execinfo.h])
-
-+AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include <netinet/in.h>]])
-+
- AC_CHECK_HEADERS(resolv.h, dummy=yes,
- AC_MSG_ERROR(resolver header files are required))
- AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
-Index: connman-1.30/gdhcp/common.h
-===================================================================
---- connman-1.30.orig/gdhcp/common.h
-+++ connman-1.30/gdhcp/common.h
-@@ -19,6 +19,7 @@
- *
- */
-
-+#include <config.h>
- #include <netinet/udp.h>
- #include <netinet/ip.h>
-
-@@ -170,8 +171,8 @@ static const uint8_t dhcp_option_lengths
- [OPTION_U32] = 4,
- };
-
--/* already defined within netinet/in.h if using GNU compiler */
--#ifndef __USE_GNU
-+/* already defined within netinet/in.h if using GNU or musl libc */
-+#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
- struct in6_pktinfo {
- struct in6_addr ipi6_addr; /* src/dst IPv6 address */
- unsigned int ipi6_ifindex; /* send/recv interface index */
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/includes.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/includes.patch
new file mode 100644
index 000000000..55cb18793
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/includes.patch
@@ -0,0 +1,423 @@
+Fix various issues which cause problems under musl.
+
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 630516bcc0233b047f65665c003201ba6e77453d Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 9 Aug 2016 16:22:36 +0100
+Subject: [PATCH 1/3] Use AC_USE_SYSTEM_EXTENSIONS
+
+Instead of using #define _GNU_SOURCE in some source files which causes problems
+when building with musl as more files need the define, simply use
+AC_USE_SYSTEM_EXTENSIONS in configure.ac to get it defined globally.
+---
+ configure.ac | 1 +
+ gdhcp/client.c | 1 -
+ plugins/tist.c | 1 -
+ src/backtrace.c | 1 -
+ src/inet.c | 1 -
+ src/log.c | 1 -
+ src/ntp.c | 1 -
+ src/resolver.c | 1 -
+ src/rfkill.c | 1 -
+ src/stats.c | 1 -
+ src/timezone.c | 1 -
+ tools/stats-tool.c | 1 -
+ tools/tap-test.c | 1 -
+ tools/wispr.c | 1 -
+ vpn/plugins/vpn.c | 1 -
+ 15 files changed, 1 insertion(+), 14 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6e66ab3..bacf5ec 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,6 +20,7 @@ AC_SUBST(abs_top_srcdir)
+ AC_SUBST(abs_top_builddir)
+
+ AC_LANG_C
++AC_USE_SYSTEM_EXTENSIONS
+
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+diff --git a/gdhcp/client.c b/gdhcp/client.c
+index fbb40ab..3aeb089 100644
+--- a/gdhcp/client.c
++++ b/gdhcp/client.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+diff --git a/plugins/tist.c b/plugins/tist.c
+index ad5ef79..cc2800a 100644
+--- a/plugins/tist.c
++++ b/plugins/tist.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <stdbool.h>
+ #include <stdlib.h>
+diff --git a/src/backtrace.c b/src/backtrace.c
+index 6a66c0a..4dbdda8 100644
+--- a/src/backtrace.c
++++ b/src/backtrace.c
+@@ -24,7 +24,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+diff --git a/src/inet.c b/src/inet.c
+index 69ded19..81d92c2 100644
+--- a/src/inet.c
++++ b/src/inet.c
+@@ -25,7 +25,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+diff --git a/src/log.c b/src/log.c
+index 9bae4a3..f7e82e5 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+diff --git a/src/ntp.c b/src/ntp.c
+index dd246eb..db8ae96 100644
+--- a/src/ntp.c
++++ b/src/ntp.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+diff --git a/src/resolver.c b/src/resolver.c
+index fbe4be7..ef61f92 100644
+--- a/src/resolver.c
++++ b/src/resolver.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <fcntl.h>
+diff --git a/src/rfkill.c b/src/rfkill.c
+index 2bfb092..af49d12 100644
+--- a/src/rfkill.c
++++ b/src/rfkill.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <fcntl.h>
+diff --git a/src/stats.c b/src/stats.c
+index 26343b1..cfcdc94 100644
+--- a/src/stats.c
++++ b/src/stats.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <errno.h>
+ #include <sys/mman.h>
+ #include <sys/types.h>
+diff --git a/src/timezone.c b/src/timezone.c
+index e346b11..8e91267 100644
+--- a/src/timezone.c
++++ b/src/timezone.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <errno.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+diff --git a/tools/stats-tool.c b/tools/stats-tool.c
+index b076478..428d94b 100644
+--- a/tools/stats-tool.c
++++ b/tools/stats-tool.c
+@@ -22,7 +22,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <sys/mman.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+diff --git a/tools/tap-test.c b/tools/tap-test.c
+index fdc098a..57917f5 100644
+--- a/tools/tap-test.c
++++ b/tools/tap-test.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <errno.h>
+ #include <fcntl.h>
+diff --git a/tools/wispr.c b/tools/wispr.c
+index d5f9341..e56dfc1 100644
+--- a/tools/wispr.c
++++ b/tools/wispr.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c
+index 9a42385..479c3a7 100644
+--- a/vpn/plugins/vpn.c
++++ b/vpn/plugins/vpn.c
+@@ -23,7 +23,6 @@
+ #include <config.h>
+ #endif
+
+-#define _GNU_SOURCE
+ #include <string.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+--
+2.8.1
+
+
+From b8b7878e6cb2a1ed4fcfa256f7e232511a40e3d9 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 9 Aug 2016 15:37:50 +0100
+Subject: [PATCH 2/3] Check for in6_pktinfo.ipi6_addr explicitly
+
+Instead of assuming that just glibc has this structure, check for it at
+configure as musl also has it.
+
+Based on work by Khem Raj <raj.khem@gmail.com>.
+---
+ configure.ac | 2 ++
+ gdhcp/common.h | 5 +++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bacf5ec..ad00456 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -186,6 +186,8 @@ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
+ AC_CHECK_HEADERS([execinfo.h])
+ AM_CONDITIONAL([BACKTRACE], [test "${ac_cv_header_execinfo_h}" = "yes"])
+
++AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include <netinet/in.h>]])
++
+ AC_CHECK_FUNC(signalfd, dummy=yes,
+ AC_MSG_ERROR(signalfd support is required))
+
+diff --git a/gdhcp/common.h b/gdhcp/common.h
+index 75abc18..6899499 100644
+--- a/gdhcp/common.h
++++ b/gdhcp/common.h
+@@ -19,6 +19,7 @@
+ *
+ */
+
++#include <config.h>
+ #include <netinet/udp.h>
+ #include <netinet/ip.h>
+
+@@ -170,8 +171,8 @@ static const uint8_t dhcp_option_lengths[] = {
+ [OPTION_U32] = 4,
+ };
+
+-/* already defined within netinet/in.h if using GNU compiler */
+-#ifndef __USE_GNU
++/* already defined within netinet/in.h if using glibc or musl */
++#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
+ struct in6_pktinfo {
+ struct in6_addr ipi6_addr; /* src/dst IPv6 address */
+ unsigned int ipi6_ifindex; /* send/recv interface index */
+--
+2.8.1
+
+
+From c0726e432fa0274a2b9c70179b03df6720972816 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 9 Aug 2016 15:19:23 +0100
+Subject: [PATCH 3/3] Rationalise includes
+
+gweb/gresolv.c uses snprintf() and isspace() so it should include stdio.h and
+ctype.h.
+
+tools/dnsproxy-test uses functions from stdio.h.
+
+musl warns when sys/ headers are included when the non-sys form should be used,
+so switch sys/errno.h and so on to errno.h.
+
+musl also causes redefinition errors when pieces of the networking headers are
+included, so remove the redundant includes.
+
+Based on work by Khem Raj <raj.khem@gmail.com>.
+---
+ gweb/gresolv.c | 2 ++
+ plugins/wifi.c | 3 +--
+ src/ippool.c | 1 -
+ src/iptables.c | 2 +-
+ src/tethering.c | 2 --
+ tools/dhcp-test.c | 1 -
+ tools/dnsproxy-test.c | 1 +
+ tools/private-network-test.c | 2 +-
+ tools/tap-test.c | 2 +-
+ 9 files changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/gweb/gresolv.c b/gweb/gresolv.c
+index 8a51a9f..d55027c 100644
+--- a/gweb/gresolv.c
++++ b/gweb/gresolv.c
+@@ -23,11 +23,13 @@
+ #include <config.h>
+ #endif
+
++#include <ctype.h>
+ #include <errno.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <stdio.h>
+ #include <resolv.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+diff --git a/plugins/wifi.c b/plugins/wifi.c
+index 9d56671..148131d 100644
+--- a/plugins/wifi.c
++++ b/plugins/wifi.c
+@@ -30,9 +30,8 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+-#include <linux/if_arp.h>
+-#include <linux/wireless.h>
+ #include <net/ethernet.h>
++#include <linux/wireless.h>
+
+ #ifndef IFF_LOWER_UP
+ #define IFF_LOWER_UP 0x10000
+diff --git a/src/ippool.c b/src/ippool.c
+index cea1dcc..8a645da 100644
+--- a/src/ippool.c
++++ b/src/ippool.c
+@@ -28,7 +28,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <sys/errno.h>
+ #include <sys/socket.h>
+
+ #include "connman.h"
+diff --git a/src/iptables.c b/src/iptables.c
+index 5ef757a..82e3ac4 100644
+--- a/src/iptables.c
++++ b/src/iptables.c
+@@ -28,7 +28,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-#include <sys/errno.h>
++#include <errno.h>
+ #include <sys/socket.h>
+ #include <xtables.h>
+ #include <inttypes.h>
+diff --git a/src/tethering.c b/src/tethering.c
+index 3153349..ad062d5 100644
+--- a/src/tethering.c
++++ b/src/tethering.c
+@@ -31,10 +31,8 @@
+ #include <stdio.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+-#include <linux/sockios.h>
+ #include <string.h>
+ #include <fcntl.h>
+-#include <linux/if_tun.h>
+ #include <netinet/in.h>
+ #include <linux/if_bridge.h>
+
+diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
+index c34e10a..eae66fc 100644
+--- a/tools/dhcp-test.c
++++ b/tools/dhcp-test.c
+@@ -33,7 +33,6 @@
+ #include <arpa/inet.h>
+ #include <net/route.h>
+ #include <net/ethernet.h>
+-#include <linux/if_arp.h>
+
+ #include <gdhcp/gdhcp.h>
+
+diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c
+index 551cae9..371e2e2 100644
+--- a/tools/dnsproxy-test.c
++++ b/tools/dnsproxy-test.c
+@@ -24,6 +24,7 @@
+ #endif
+
+ #include <errno.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+diff --git a/tools/private-network-test.c b/tools/private-network-test.c
+index 3dd115b..2828bb3 100644
+--- a/tools/private-network-test.c
++++ b/tools/private-network-test.c
+@@ -32,7 +32,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/signalfd.h>
+ #include <unistd.h>
+
+diff --git a/tools/tap-test.c b/tools/tap-test.c
+index 57917f5..cb3ee62 100644
+--- a/tools/tap-test.c
++++ b/tools/tap-test.c
+@@ -28,7 +28,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <string.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/ioctl.h>
+
+ #include <netinet/in.h>
+--
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/no-version-scripts.patch b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/no-version-scripts.patch
new file mode 100644
index 000000000..e96e38bcf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman/no-version-scripts.patch
@@ -0,0 +1,27 @@
+With binutils 2.27 on at least MIPS, connmand will crash on startup. This
+appears to be due to the symbol visibilty scripts hiding symbols that stdio
+looks up at runtime, resulting in it segfaulting.
+
+This certainly appears to be a bug in binutils 2.27 although the problem has
+been known about for some time:
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=17908
+
+As the version scripts are only used to hide symbols from plugins we can safely
+remove the scripts to work around the problem until binutils is fixed.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index d70725c..76ae432 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -132,2 +132 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
+-src_connmand_LDFLAGS = -Wl,--export-dynamic \
+- -Wl,--version-script=$(srcdir)/src/connman.ver
++src_connmand_LDFLAGS = -Wl,--export-dynamic
+@@ -166,2 +165 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \
+-vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \
+- -Wl,--version-script=$(srcdir)/vpn/vpn.ver
++vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.31.bb b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.31.bb
deleted file mode 100644
index e71d2218a..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.31.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require connman.inc
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
- file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
- file://0001-Detect-backtrace-API-availability-before-using-it.patch \
- file://0002-resolve-musl-does-not-implement-res_ninit.patch \
- file://0003-Fix-header-inclusions-for-musl.patch \
- file://0001-iptables-Add-missing-function-item-of-xtables-to-mat.patch \
- file://connman \
- "
-SRC_URI[md5sum] = "cb1c413fcc4f49430294bbd7a92f5f3c"
-SRC_URI[sha256sum] = "88fcf0b6df334796b90e2fd2e434d6f5b36cd6f13b886a119b8c90276b72b8e2"
-
-RRECOMMENDS_${PN} = "connman-conf"
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.33.bb b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.33.bb
new file mode 100644
index 000000000..6ea1a08dc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/connman/connman_1.33.bb
@@ -0,0 +1,14 @@
+require connman.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+ file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
+ file://connman \
+ file://no-version-scripts.patch \
+ file://includes.patch \
+ "
+SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
+
+SRC_URI[md5sum] = "c51903fd3e7a6a371d12ac5d72a1fa01"
+SRC_URI[sha256sum] = "bc8946036fa70124d663136f9f6b6238d897ca482782df907b07a428b09df5a0"
+
+RRECOMMENDS_${PN} = "connman-conf"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp.inc b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp.inc
index 5e396f159..aafdd0a13 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -46,7 +46,8 @@ EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
--with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
--with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \
--with-libbind=${STAGING_LIBDIR}/ \
- --enable-paranoia \
+ --enable-paranoia \
+ --with-randomdev=/dev/random \
"
do_install_append () {
@@ -78,6 +79,7 @@ do_install_append () {
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
sed -i -e 's,@base_bindir@,${base_bindir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
sed -i -e 's,@localstatedir@,${localstatedir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
+ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service
}
PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
@@ -94,7 +96,6 @@ FILES_${PN}-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhc
FILES_${PN}-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
FILES_${PN}-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
-RDEPENDS_${PN}-client = "bash"
FILES_${PN}-omshell = "${bindir}/omshell"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch
index 434421230..47443a50e 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch
@@ -8,10 +8,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/includes/site.h b/includes/site.h
-index 73fa4e8..9c33de3 100644
+index 1dd1251..abb66e4 100644
--- a/includes/site.h
+++ b/includes/site.h
-@@ -280,7 +280,7 @@
+@@ -289,7 +289,7 @@
situations. We plan to revisit this feature and may
make non-backwards compatible changes including the
removal of this define. Use at your own risk. */
@@ -21,5 +21,5 @@ index 73fa4e8..9c33de3 100644
/* Include old error codes. This is provided in case you
are building an external program similar to omshell for
--
-1.9.1
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2015-8605.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2015-8605.patch
deleted file mode 100644
index 923d5d5c5..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2015-8605.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-Solves CVE-2015-8605 that caused DoS when an invalid lenght field in IPv4 UDP
-was recived by the server.
-
-Upstream-Status: Backport
-CVE: CVE-2015-8605
-
-Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
-
-=======================================================================
-diff --git a/common/packet.c b/common/packet.c
-index b530432..e600e37 100644
---- a/common/packet.c
-+++ b/common/packet.c
-@@ -220,7 +220,28 @@ ssize_t decode_hw_header (interface, buf, bufix, from)
- }
- }
-
--/* UDP header and IP header decoded together for convenience. */
-+/*!
-+ *
-+ * \brief UDP header and IP header decoded together for convenience.
-+ *
-+ * Attempt to decode the UDP and IP headers and, if necessary, checksum
-+ * the packet.
-+ *
-+ * \param inteface - the interface on which the packet was recevied
-+ * \param buf - a pointer to the buffer for the received packet
-+ * \param bufix - where to start processing the buffer, previous
-+ * routines may have processed parts of the buffer already
-+ * \param from - space to return the address of the packet sender
-+ * \param buflen - remaining length of the buffer, this will have been
-+ * decremented by bufix by the caller
-+ * \param rbuflen - space to return the length of the payload from the udp
-+ * header
-+ * \param csum_ready - indication if the checksum is valid for use
-+ * non-zero indicates the checksum should be validated
-+ *
-+ * \return - the index to the first byte of the udp payload (that is the
-+ * start of the DHCP packet
-+ */
-
- ssize_t
- decode_udp_ip_header(struct interface_info *interface,
-@@ -231,7 +252,7 @@ decode_udp_ip_header(struct interface_info *interface,
- unsigned char *data;
- struct ip ip;
- struct udphdr udp;
-- unsigned char *upp, *endbuf;
-+ unsigned char *upp;
- u_int32_t ip_len, ulen, pkt_len;
- static unsigned int ip_packets_seen = 0;
- static unsigned int ip_packets_bad_checksum = 0;
-@@ -241,11 +262,8 @@ decode_udp_ip_header(struct interface_info *interface,
- static unsigned int udp_packets_length_overflow = 0;
- unsigned len;
-
-- /* Designate the end of the input buffer for bounds checks. */
-- endbuf = buf + bufix + buflen;
--
- /* Assure there is at least an IP header there. */
-- if ((buf + bufix + sizeof(ip)) > endbuf)
-+ if (sizeof(ip) > buflen)
- return -1;
-
- /* Copy the IP header into a stack aligned structure for inspection.
-@@ -257,13 +275,17 @@ decode_udp_ip_header(struct interface_info *interface,
- ip_len = (*upp & 0x0f) << 2;
- upp += ip_len;
-
-- /* Check the IP packet length. */
-+ /* Check packet lengths are within the buffer:
-+ * first the ip header (ip_len)
-+ * then the packet length from the ip header (pkt_len)
-+ * then the udp header (ip_len + sizeof(udp)
-+ * We are liberal in what we accept, the udp payload should fit within
-+ * pkt_len, but we only check against the full buffer size.
-+ */
- pkt_len = ntohs(ip.ip_len);
-- if (pkt_len > buflen)
-- return -1;
--
-- /* Assure after ip_len bytes that there is enough room for a UDP header. */
-- if ((upp + sizeof(udp)) > endbuf)
-+ if ((ip_len > buflen) ||
-+ (pkt_len > buflen) ||
-+ ((ip_len + sizeof(udp)) > buflen))
- return -1;
-
- /* Copy the UDP header into a stack aligned structure for inspection. */
-@@ -284,7 +306,8 @@ decode_udp_ip_header(struct interface_info *interface,
- return -1;
-
- udp_packets_length_checked++;
-- if ((upp + ulen) > endbuf) {
-+ /* verify that the payload length from the udp packet fits in the buffer */
-+ if ((ip_len + ulen) > buflen) {
- udp_packets_length_overflow++;
- if (((udp_packets_length_checked > 4) &&
- (udp_packets_length_overflow != 0)) &&
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2016-2774.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2016-2774.patch
deleted file mode 100644
index 4836dbc2a..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2016-2774.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From b9f56d578ebfd649b5d829960540859ac6ca931c Mon Sep 17 00:00:00 2001
-From: Catalin Enache <catalin.enache@windriver.com>
-Date: Tue, 12 Apr 2016 18:23:31 +0300
-Subject: [PATCH] Add patch to limit the value of an fd we accept for a
- connection.
-
-By limiting the highest value we accept for an fd we limit the number
-of connections.
-
-Upstream-Status: Backport
-CVE: CVE-2016-2774
-
-Author: Shawn Routhier <sar@isc.org>
-Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
----
- includes/site.h | 6 ++++++
- omapip/listener.c | 9 +++++++--
- 3 files changed, 18 insertions(+), 2 deletions(-)
-
-diff --git a/includes/site.h b/includes/site.h
-index 9c33de3..df020c8 100644
---- a/includes/site.h
-+++ b/includes/site.h
-@@ -290,6 +290,12 @@
- this option will be removed at some time. */
- /* #define INCLUDE_OLD_DHCP_ISC_ERROR_CODES */
-
-+/* Limit the value of a file descriptor the serve will use
-+ when accepting a connecting request. This can be used to
-+ limit the number of TCP connections that the server will
-+ allow at one time. A value of 0 means there is no limit.*/
-+#define MAX_FD_VALUE 200
-+
- /* Include definitions for various options. In general these
- should be left as is, but if you have already defined one
- of these and prefer your definition you can comment the
-diff --git a/omapip/listener.c b/omapip/listener.c
-index 8bdcdbd..61473cf 100644
---- a/omapip/listener.c
-+++ b/omapip/listener.c
-@@ -3,7 +3,7 @@
- Subroutines that support the generic listener object. */
-
- /*
-- * Copyright (c) 2012,2014 by Internet Systems Consortium, Inc. ("ISC")
-+ * Copyright (c) 2012,2014,2016 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1999-2003 by Internet Software Consortium
- *
-@@ -233,7 +233,12 @@ isc_result_t omapi_accept (omapi_object_t *h)
- return ISC_R_NORESOURCES;
- return ISC_R_UNEXPECTED;
- }
--
-+
-+ if ((MAX_FD_VALUE != 0) && (socket > MAX_FD_VALUE)) {
-+ close(socket);
-+ return (ISC_R_NORESOURCES);
-+ }
-+
- #if defined (TRACING)
- /* If we're recording a trace, remember the connection. */
- if (trace_record ()) {
---
-2.7.4
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch
index 47ea5554b..96095a5e0 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch
@@ -66,5 +66,5 @@ diff --git a/client/scripts/linux b/client/scripts/linux
}
--
-1.8.1.2
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch
deleted file mode 100644
index 956c5d8b5..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-Upstream-Status: Pending
-
-11/30/2010
---with-libbind=PATH is available but not used by Makefile,
-this patch is to allow building with external bind
-
-Signed-off-by: Qing He <qing.he@intel.com>
-
-Rebase the patch to 4.3.3
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
-diff --git a/Makefile.am b/Makefile.am
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -25,7 +25,7 @@ EXTRA_DIST = RELNOTES LICENSE \
- bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
- common/tests/Atffile server/tests/Atffile
-
--SUBDIRS = bind includes tests common omapip client dhcpctl relay server
-+SUBDIRS = includes tests common omapip client dhcpctl relay server
-
- nobase_include_HEADERS = dhcpctl/dhcpctl.h
-
-diff --git a/client/Makefile.am b/client/Makefile.am
---- a/client/Makefile.am
-+++ b/client/Makefile.am
-@@ -10,8 +10,8 @@ dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
- scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
- scripts/netbsd scripts/nextstep scripts/openbsd \
- scripts/solaris scripts/openwrt
--dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../bind/lib/libirs.a \
-- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
-+dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(libbind)/libirs.a \
-+ $(libbind)/libdns.a $(libbind)/libisccfg.a $(libbind)/libisc.a
- man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
- EXTRA_DIST = $(man_MANS)
-
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -623,6 +623,7 @@ no)
- fi
- ;;
- esac
-+AC_SUBST([libbind])
-
- # OpenLDAP support.
- AC_ARG_WITH(ldap,
-diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
---- a/dhcpctl/Makefile.am
-+++ b/dhcpctl/Makefile.am
-@@ -6,12 +6,12 @@ EXTRA_DIST = $(man_MANS)
-
- omshell_SOURCES = omshell.c
- omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
-- ../bind/lib/libirs.a ../bind/lib/libdns.a \
-- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
-+ $(libbind)/libirs.a $(libbind)/libdns.a \
-+ $(libbind)/libisccfg.a $(libbind)/libisc.a
-
- libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
-
- cltest_SOURCES = cltest.c
- cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
-- ../bind/lib/libirs.a ../bind/lib/libdns.a \
-- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
-+ $(libbind)/libirs.a $(libbind)/libdns.a \
-+ $(libbind)/libisccfg.a $(libbind)/libisc.a
-diff --git a/omapip/Makefile.am b/omapip/Makefile.am
---- a/omapip/Makefile.am
-+++ b/omapip/Makefile.am
-@@ -10,6 +10,6 @@ man_MANS = omapi.3
- EXTRA_DIST = $(man_MANS)
-
- svtest_SOURCES = test.c
--svtest_LDADD = libomapi.a ../bind/lib/libirs.a ../bind/lib/libdns.a \
-- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
-+svtest_LDADD = libomapi.a $(libbind)/libirs.a $(libbind)/libdns.a \
-+ $(libbind)/libisccfg.a $(libbind)/libisc.a
-
-diff --git a/relay/Makefile.am b/relay/Makefile.am
---- a/relay/Makefile.am
-+++ b/relay/Makefile.am
-@@ -3,8 +3,8 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
- sbin_PROGRAMS = dhcrelay
- dhcrelay_SOURCES = dhcrelay.c
- dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
-- ../bind/lib/libirs.a ../bind/lib/libdns.a \
-- ../bind/lib/libisccfg.a ../bind/lib/libisc.a
-+ $(libbind)/libirs.a $(libbind)/libdns.a \
-+ $(libbind)/libisccfg.a $(libbind)/libisc.a
- man_MANS = dhcrelay.8
- EXTRA_DIST = $(man_MANS)
-
-diff --git a/server/Makefile.am b/server/Makefile.am
---- a/server/Makefile.am
-+++ b/server/Makefile.am
-@@ -14,10 +14,12 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
-
- dhcpd_CFLAGS = $(LDAP_CFLAGS)
- dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
-- ../dhcpctl/libdhcpctl.a ../bind/lib/libirs.a \
-- ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a \
-+ ../dhcpctl/libdhcpctl.a $(libbind)/libirs.a \
-+ $(libbind)/libdns.a $(libbind)/libisccfg.a $(libbind)/libisc.a \
- $(LDAP_LIBS)
-
-+ dhcpd_CFLAGS = $(LDAP_CFLAGS)
-+
- man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
- EXTRA_DIST = $(man_MANS)
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
index b3f8fdb0a..2f44147ad 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
@@ -4,80 +4,88 @@ Upstream-Status: Pending
RP 2013/03/21
-Rebase to 4.3.1
+Rebase to 4.3.4
+
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
+ client/Makefile.am | 4 ++--
+ common/Makefile.am | 3 ++-
+ dhcpctl/Makefile.am | 2 ++
+ omapip/Makefile.am | 1 +
+ relay/Makefile.am | 2 +-
+ server/Makefile.am | 2 +-
+ 6 files changed, 9 insertions(+), 5 deletions(-)
+
diff --git a/client/Makefile.am b/client/Makefile.am
-index 8411960..1740f72 100644
+index 2cb83d8..4730bb3 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
-@@ -4,6 +4,8 @@
- # production code. Sadly, we are not there yet.
- SUBDIRS = . tests
+@@ -7,11 +7,11 @@ SUBDIRS = . tests
+ BINDLIBDIR = @BINDDIR@/lib
+
+ AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
+- -DLOCALSTATEDIR='"$(localstatedir)"'
++ -DLOCALSTATEDIR='"$(localstatedir)"' -I$(top_srcdir)/includes
-+AM_CPPFLAGS = -I$(top_srcdir)/includes
-+
dist_sysconf_DATA = dhclient.conf.example
sbin_PROGRAMS = dhclient
- dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
-@@ -17,8 +19,8 @@ EXTRA_DIST = $(man_MANS)
-
- dhclient.o: dhclient.c
- $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
-- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
-+ -DLOCALSTATEDIR='"$(localstatedir)"' -c $(srcdir)/dhclient.c
-
- dhc6.o: dhc6.c
- $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
-- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
-+ -DLOCALSTATEDIR='"$(localstatedir)"' -c $(srcdir)/dhc6.c
+-dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
++dhclient_SOURCES = $(srcdir)/clparse.c $(srcdir)/dhclient.c $(srcdir)/dhc6.c \
+ scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
+ scripts/netbsd scripts/nextstep scripts/openbsd \
+ scripts/solaris scripts/openwrt
diff --git a/common/Makefile.am b/common/Makefile.am
-index eddef05..5ce045f 100644
+index 113aee8..0f24fbb 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
-@@ -1,4 +1,4 @@
--AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
+@@ -1,4 +1,5 @@
+-AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
++
AM_CFLAGS = $(LDAP_CFLAGS)
noinst_LIBRARIES = libdhcp.a
diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
-index 2987a53..cd72d75 100644
+index ceb0de1..ba8dd8b 100644
--- a/dhcpctl/Makefile.am
+++ b/dhcpctl/Makefile.am
-@@ -1,3 +1,5 @@
+@@ -1,5 +1,7 @@
+ BINDLIBDIR = @BINDDIR@/lib
+
+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
+
bin_PROGRAMS = omshell
lib_LIBRARIES = libdhcpctl.a
noinst_PROGRAMS = cltest
diff --git a/omapip/Makefile.am b/omapip/Makefile.am
-index 5074479..9c0fab3 100644
+index 446a594..dd1afa0 100644
--- a/omapip/Makefile.am
+++ b/omapip/Makefile.am
-@@ -1,3 +1,5 @@
+@@ -1,4 +1,5 @@
+ BINDLIBDIR = @BINDDIR@/lib
+AM_CPPFLAGS = -I$(top_srcdir)/includes
-+
+
lib_LIBRARIES = libomapi.a
noinst_PROGRAMS = svtest
-
diff --git a/relay/Makefile.am b/relay/Makefile.am
-index ec72a31..f842071 100644
+index 3060eca..6d652f6 100644
--- a/relay/Makefile.am
+++ b/relay/Makefile.am
-@@ -1,4 +1,4 @@
+@@ -1,6 +1,6 @@
+ BINDLIBDIR = @BINDDIR@/lib
+
-AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
+AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
sbin_PROGRAMS = dhcrelay
dhcrelay_SOURCES = dhcrelay.c
diff --git a/server/Makefile.am b/server/Makefile.am
-index a446f0b..d0b873a 100644
+index 54feedf..3990b9c 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
-@@ -4,7 +4,7 @@
- # production code. Sadly, we are not there yet.
- SUBDIRS = . tests
+@@ -6,7 +6,7 @@ SUBDIRS = . tests
+
+ BINDLIBDIR = @BINDDIR@/lib
-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
+AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
@@ -85,5 +93,5 @@ index a446f0b..d0b873a 100644
dist_sysconf_DATA = dhcpd.conf.example
sbin_PROGRAMS = dhcpd
--
-1.9.1
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/libxml2-configure-argument.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/libxml2-configure-argument.patch
new file mode 100644
index 000000000..14356621c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/libxml2-configure-argument.patch
@@ -0,0 +1,38 @@
+Add configure argument to make the libxml2 dependency explicit and
+determinisitic.
+
+Upstream-Status: Pending
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+Rebase to 4.3.4
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 726c88e..1684df1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -718,7 +718,16 @@ AC_SUBST(BINDSRCDIR)
+
+ # We need to find libxml2 if bind was built with support enabled
+ # otherwise we'll fail to build omapip/test.c
+-AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],)
++AC_ARG_WITH(libxml2,
++ AS_HELP_STRING([--with-libxml2], [link against libxml2. this is needed if bind was built with xml2 support enabled]),
++ with_libxml2="$withval", with_libxml2="no")
++
++if test x$with_libxml2 != xno; then
++ AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],
++ [if test x$with_libxml2 != xauto; then
++ AC_MSG_FAILURE([*** Cannot find xmlTextWriterStartElement with -lxml2 and libxml2 was requested])
++ fi])
++fi
+
+ # OpenLDAP support.
+ AC_ARG_WITH(ldap,
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch
index 57e10b029..0d0e0dd08 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch
@@ -5,14 +5,20 @@ From 4.2.0 final release, -lcrypto check was removed and we compile static libra
from bind that are linked to libcrypto. This is why i added a patch in order to add
-lcrypto to LIBS.
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Upstream-Status: Pending
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Index: dhcp-4.2.3-P2-r0/dhcp-4.2.3-P2/configure.ac
-===================================================================
---- dhcp-4.2.3-P2.orig/configure.ac 2012-02-02 18:04:20.843023196 +0200
-+++ dhcp-4.2.3-P2/configure.ac 2012-02-02 17:58:16.000000000 +0200
-@@ -456,6 +456,10 @@
+Rebase to 4.3.4
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 097b0c3..726c88e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -584,6 +584,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[void foo() __attribute__((noreturn));
# Look for optional headers.
AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
@@ -23,3 +29,6 @@ Index: dhcp-4.2.3-P2-r0/dhcp-4.2.3-P2/configure.ac
# Solaris needs some libraries for functions
AC_SEARCH_LIBS(socket, [socket])
AC_SEARCH_LIBS(inet_ntoa, [nsl])
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch
new file mode 100644
index 000000000..997b9f6ba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch
@@ -0,0 +1,55 @@
+From 8aed2a9ff09cb0d584ad0a7340fe3a596879d9b1 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Thu, 21 Jul 2016 19:07:02 -0700
+Subject: [PATCH] remove dhclient-script bash dependency
+
+Take the dash compatible IPv6 link-local address test from the Debian
+version of dhclient-script.
+
+Note that although "echo -e" in the OE version of dhclient-script is
+technically bash specific too, it is supported by Busybox echo when
+Busybox is configured with CONFIG_FEATURE_FANCY_ECHO enabled (which
+is the default in the OE Busybox defconfig) therefore leave as-is.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ client/scripts/linux | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/client/scripts/linux b/client/scripts/linux
+index 232a0aa..1383f46 100755
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # dhclient-script for Linux. Dan Halbert, March, 1997.
+ # Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
+ # No guarantees about this. I'm a novice at the details of Linux
+@@ -47,11 +47,11 @@ make_resolv_conf() {
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+ resolv_conf="search ${new_dhcp6_domain_search}\n"
+ fi
+- shopt -s nocasematch
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+- if [[ "$nameserver" =~ ^fe80:: ]]
++ if [ "${nameserver##fe80::}" != "$nameserver" ] ||
++ [ "${nameserver##FE80::}" != "$nameserver" ]
+ then
+ zone_id="%$interface"
+ else
+@@ -59,7 +59,6 @@ make_resolv_conf() {
+ fi
+ resolv_conf="${resolv_conf}nameserver ${nameserver}$zone_id\n"
+ done
+- shopt -u nocasematch
+
+ echo -e "${resolv_conf}" > /etc/resolv.conf
+ fi
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
index 61dd6a718..d84df5cd3 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
@@ -8,23 +8,32 @@ Upstream-Status: Pending
Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
---- dhcp-4.2.5-P1/client/scripts/linux.orig 2013-09-04 12:22:55.000000000 +0500
-+++ dhcp-4.2.5-P1/client/scripts/linux 2013-09-04 12:52:19.068761518 +0500
-@@ -103,17 +103,11 @@
+Rebase to 4.3.4
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/scripts/linux | 82 ++++++++++++++++++++++++++++------------------------
+ 1 file changed, 45 insertions(+), 37 deletions(-)
+
+diff --git a/client/scripts/linux b/client/scripts/linux
+index a02cfd9..232a0aa 100755
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -101,17 +101,11 @@ fi
if [ x$old_broadcast_address != x ]; then
old_broadcast_arg="broadcast $old_broadcast_address"
fi
-if [ x$new_subnet_mask != x ]; then
- new_subnet_arg="netmask $new_subnet_mask"
--fi
++if [ -n "$new_subnet_mask" ]; then
++ new_mask="/$new_subnet_mask"
+ fi
-if [ x$old_subnet_mask != x ]; then
- old_subnet_arg="netmask $old_subnet_mask"
-fi
-if [ x$alias_subnet_mask != x ]; then
- alias_subnet_arg="netmask $alias_subnet_mask"
-+if [ -n "$new_subnet_mask" ]; then
-+ new_mask="/$new_subnet_mask"
- fi
+-fi
-if [ x$new_interface_mtu != x ]; then
- mtu_arg="mtu $new_interface_mtu"
+if [ -n "$alias_subnet_mask" ]; then
@@ -32,7 +41,7 @@ Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
fi
if [ x$IF_METRIC != x ]; then
metric_arg="metric $IF_METRIC"
-@@ -127,9 +121,9 @@
+@@ -125,9 +119,9 @@ fi
if [ x$reason = xPREINIT ]; then
if [ x$alias_ip_address != x ]; then
# Bring down alias interface. Its routes will disappear too.
@@ -44,7 +53,7 @@ Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
# We need to give the kernel some time to get the interface up.
sleep 1
-@@ -156,25 +150,30 @@
+@@ -154,25 +148,30 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
[ x$alias_ip_address != x$old_ip_address ]; then
# Possible new alias. Remove old alias.
@@ -81,7 +90,7 @@ Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
done
else
# we haven't changed the address, have we changed other options
-@@ -182,21 +181,23 @@
+@@ -180,21 +179,23 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
if [ x$new_routers != x ] && [ x$new_routers != x$old_routers ] ; then
# if we've changed routers delete the old and add the new.
for router in $old_routers; do
@@ -112,7 +121,7 @@ Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
fi
make_resolv_conf
exit_with_hooks 0
-@@ -206,42 +207,49 @@
+@@ -204,42 +205,49 @@ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
|| [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
# Turn off alias interface.
@@ -174,3 +183,6 @@ Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
exit_with_hooks 1
fi
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/tweak-to-support-external-bind.patch b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/tweak-to-support-external-bind.patch
new file mode 100644
index 000000000..03c6abb79
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/tweak-to-support-external-bind.patch
@@ -0,0 +1,117 @@
+From ad7bb401f47714fc30c408853b796ce0f1c7e65f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 Jun 2016 22:51:44 -0400
+Subject: [PATCH] tweak to support external bind
+
+Tweak the external bind to oe-core's sysroot rather than
+external bind source build.
+
+Upstream-Status: Inappropriate <oe-core specific>
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/Makefile.am | 2 +-
+ client/tests/Makefile.am | 2 +-
+ common/tests/Makefile.am | 2 +-
+ dhcpctl/Makefile.am | 2 +-
+ omapip/Makefile.am | 2 +-
+ relay/Makefile.am | 2 +-
+ server/Makefile.am | 2 +-
+ server/tests/Makefile.am | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/client/Makefile.am b/client/Makefile.am
+index 4730bb3..84d8131 100644
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -4,7 +4,7 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
+
+-BINDLIBDIR = @BINDDIR@/lib
++BINDLIBDIR = @BINDDIR@
+
+ AM_CPPFLAGS = -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
+ -DLOCALSTATEDIR='"$(localstatedir)"' -I$(top_srcdir)/includes
+diff --git a/client/tests/Makefile.am b/client/tests/Makefile.am
+index da69ea9..fe35e57 100644
+--- a/client/tests/Makefile.am
++++ b/client/tests/Makefile.am
+@@ -1,6 +1,6 @@
+ SUBDIRS = .
+
+-BINDLIBDIR = @BINDDIR@/lib
++BINDLIBDIR = @BINDDIR@
+
+ AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
+ AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
+diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
+index f8d6b0e..05cd9c1 100644
+--- a/common/tests/Makefile.am
++++ b/common/tests/Makefile.am
+@@ -1,6 +1,6 @@
+ SUBDIRS = .
+
+-BINDLIBDIR = @BINDDIR@/lib
++BINDLIBDIR = @BINDDIR@
+
+ AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
+
+diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
+index ba8dd8b..9b2486e 100644
+--- a/dhcpctl/Makefile.am
++++ b/dhcpctl/Makefile.am
+@@ -1,4 +1,4 @@
+-BINDLIBDIR = @BINDDIR@/lib
++BINDLIBDIR = @BINDDIR@
+
+ AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
+
+diff --git a/omapip/Makefile.am b/omapip/Makefile.am
+index dd1afa0..e4a8599 100644
+--- a/omapip/Makefile.am
++++ b/omapip/Makefile.am
+@@ -1,4 +1,4 @@
+-BINDLIBDIR = @BINDDIR@/lib
++BINDLIBDIR = @BINDDIR@
+ AM_CPPFLAGS = -I$(top_srcdir)/includes
+
+ lib_LIBRARIES = libomapi.a
+diff --git a/relay/Makefile.am b/relay/Makefile.am
+index 6d652f6..b3bf578 100644
+--- a/relay/Makefile.am
++++ b/relay/Makefile.am
+@@ -1,4 +1,4 @@
+-BINDLIBDIR = @BINDDIR@/lib
++BINDLIBDIR = @BINDDIR@
+
+ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
+
+diff --git a/server/Makefile.am b/server/Makefile.am
+index 3990b9c..b5d8c2d 100644
+--- a/server/Makefile.am
++++ b/server/Makefile.am
+@@ -4,7 +4,7 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
+
+-BINDLIBDIR = @BINDDIR@/lib
++BINDLIBDIR = @BINDDIR@
+
+ AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
+
+diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
+index 65a9f74..2892309 100644
+--- a/server/tests/Makefile.am
++++ b/server/tests/Makefile.am
+@@ -1,6 +1,6 @@
+ SUBDIRS = .
+
+-BINDLIBDIR = @BINDDIR@/lib
++BINDLIBDIR = @BINDDIR@
+
+ AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
+ AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.3.bb b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.3.bb
deleted file mode 100644
index 4e8cd272b..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.3.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require dhcp.inc
-
-SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
- file://fix-external-bind.patch \
- file://link-with-lcrypto.patch \
- file://fixsepbuild.patch \
- file://dhclient-script-drop-resolv.conf.dhclient.patch \
- file://replace-ifconfig-route.patch \
- file://CVE-2015-8605.patch \
- file://0001-site.h-enable-gentle-shutdown.patch \
- file://CVE-2016-2774.patch \
- "
-
-SRC_URI[md5sum] = "c5577b09c9017cdd319a11ff6364268e"
-SRC_URI[sha256sum] = "553c4945b09b1c1b904c4780f34f72aaefa2fc8c6556715de0bc9d4e3d255ede"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
new file mode 100644
index 000000000..4151eb183
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
@@ -0,0 +1,18 @@
+require dhcp.inc
+
+SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
+ file://link-with-lcrypto.patch \
+ file://fixsepbuild.patch \
+ file://dhclient-script-drop-resolv.conf.dhclient.patch \
+ file://replace-ifconfig-route.patch \
+ file://0001-site.h-enable-gentle-shutdown.patch \
+ file://libxml2-configure-argument.patch \
+ file://tweak-to-support-external-bind.patch \
+ file://remove-dhclient-script-bash-dependency.patch \
+ "
+
+SRC_URI[md5sum] = "0138319fe2b788cf4bdf34fbeaf9ff54"
+SRC_URI[sha256sum] = "f5115aee3dd3e6925de4ba47b80ab732ba48b481c8364b6ebade2d43698d607e"
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/files/dhcrelay.service b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/files/dhcrelay.service
index a2d818917..15ff927d3 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/files/dhcrelay.service
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/dhcp/files/dhcrelay.service
@@ -3,7 +3,8 @@ Description=DHCP Relay Agent Daemon
After=network.target
[Service]
-ExecStart=@SBINDIR@/dhcrelay -d --no-pid
+EnvironmentFile=@SYSCONFDIR@/default/dhcp-relay
+ExecStart=@SBINDIR@/dhcrelay -d --no-pid -q $SERVERS
[Install]
WantedBy=multi-user.target
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
index 86e931063..63e7ca9e8 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
DEPENDS = "flex-native bison-native iptables elfutils"
-inherit update-alternatives
+inherit update-alternatives bash-completion
EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
index 1b415a511..8c078f69d 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
@@ -1,64 +1,35 @@
-From 48596709d8ab59727b79a5c6db33ebb251c36543 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Thu, 19 Nov 2015 17:44:25 +0100
Subject: [PATCH] Avoid in6_addr redefinition
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
Due to both <netinet/in.h> and <linux/in6.h> being included, the
in6_addr is being redefined: once from the C library headers and once
from the kernel headers. This causes some build failures with for
-example the musl C library:
-
-In file included from ../include/linux/xfrm.h:4:0,
- from xfrm.h:29,
- from ipxfrm.c:39:
-../include/linux/in6.h:32:8: error: redefinition of â€struct in6_addr’
- struct in6_addr {
- ^
-In file included from .../output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netdb.h:9:0,
- from ipxfrm.c:34:
-.../output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:24:8: note: originally defined here
- struct in6_addr
- ^
+example the musl C library.
In order to fix this, use just the C library header <netinet/in.h>.
-
Original patch taken from
http://git.alpinelinux.org/cgit/aports/tree/main/iproute2/musl-fixes.patch.
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
-Upstream-Status: Pending
+(Refreshed the patch for 4.6 release)
- include/libiptc/ipt_kernel_headers.h | 2 --
- include/linux/if_bridge.h | 1 -
- include/linux/netfilter.h | 2 --
- include/linux/xfrm.h | 1 -
- 4 files changed, 6 deletions(-)
+Upstream-Status: Pending
-diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h
-index 7e87828..9566be5 100644
---- a/include/libiptc/ipt_kernel_headers.h
-+++ b/include/libiptc/ipt_kernel_headers.h
-@@ -15,12 +15,10 @@
- #else /* libc5 */
- #include <sys/socket.h>
- #include <linux/ip.h>
--#include <linux/in.h>
- #include <linux/if.h>
- #include <linux/icmp.h>
- #include <linux/tcp.h>
- #include <linux/udp.h>
- #include <linux/types.h>
--#include <linux/in6.h>
- #endif
- #endif
-diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
-index ee197a3..f823aa4 100644
---- a/include/linux/if_bridge.h
-+++ b/include/linux/if_bridge.h
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+----
+diff -Naur iproute2-4.6.0-orig/include/libiptc/ipt_kernel_headers.h iproute2-4.6.0/include/libiptc/ipt_kernel_headers.h
+--- iproute2-4.6.0-orig/include/libiptc/ipt_kernel_headers.h 2016-05-23 12:03:23.821826910 +0300
++++ iproute2-4.6.0/include/libiptc/ipt_kernel_headers.h 2016-05-23 12:04:23.714078154 +0300
+@@ -6,7 +6,6 @@
+ #include <limits.h>
+
+ #include <netinet/ip.h>
+-#include <netinet/in.h>
+ #include <netinet/ip_icmp.h>
+ #include <netinet/tcp.h>
+ #include <netinet/udp.h>
+diff -Naur iproute2-4.6.0-orig/include/linux/if_bridge.h iproute2-4.6.0/include/linux/if_bridge.h
+--- iproute2-4.6.0-orig/include/linux/if_bridge.h 2016-05-23 12:03:23.821826910 +0300
++++ iproute2-4.6.0/include/linux/if_bridge.h 2016-05-23 12:04:23.716078129 +0300
@@ -15,7 +15,6 @@
#include <linux/types.h>
@@ -67,10 +38,9 @@ index ee197a3..f823aa4 100644
#define SYSFS_BRIDGE_ATTR "bridge"
#define SYSFS_BRIDGE_FDB "brforward"
-diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
-index b71b4c9..3e4e6ae 100644
---- a/include/linux/netfilter.h
-+++ b/include/linux/netfilter.h
+diff -Naur iproute2-4.6.0-orig/include/linux/netfilter.h iproute2-4.6.0/include/linux/netfilter.h
+--- iproute2-4.6.0-orig/include/linux/netfilter.h 2016-05-23 12:03:23.821826910 +0300
++++ iproute2-4.6.0/include/linux/netfilter.h 2016-05-23 12:04:23.717078117 +0300
@@ -4,8 +4,6 @@
#include <linux/types.h>
@@ -80,10 +50,20 @@ index b71b4c9..3e4e6ae 100644
/* Responses from hook functions. */
#define NF_DROP 0
-diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
-index b8f5451..a9761a5 100644
---- a/include/linux/xfrm.h
-+++ b/include/linux/xfrm.h
+diff -Naur iproute2-4.6.0-orig/include/linux/netfilter_ipv4/ip_tables.h iproute2-4.6.0/include/linux/netfilter_ipv4/ip_tables.h
+--- iproute2-4.6.0-orig/include/linux/netfilter_ipv4/ip_tables.h 2016-05-18 21:56:02.000000000 +0300
++++ iproute2-4.6.0/include/linux/netfilter_ipv4/ip_tables.h 2016-05-23 12:09:22.888337961 +0300
+@@ -17,7 +17,6 @@
+
+ #include <linux/types.h>
+
+-#include <linux/if.h>
+ #include <linux/netfilter_ipv4.h>
+
+ #include <linux/netfilter/x_tables.h>
+diff -Naur iproute2-4.6.0-orig/include/linux/xfrm.h iproute2-4.6.0/include/linux/xfrm.h
+--- iproute2-4.6.0-orig/include/linux/xfrm.h 2016-05-23 12:03:23.821826910 +0300
++++ iproute2-4.6.0/include/linux/xfrm.h 2016-05-23 12:04:23.718078104 +0300
@@ -1,7 +1,6 @@
#ifndef _LINUX_XFRM_H
#define _LINUX_XFRM_H
@@ -92,6 +72,14 @@ index b8f5451..a9761a5 100644
#include <linux/types.h>
/* All of the structures in this file may not change size as they are
---
-2.6.3
-
+diff -Naur iproute2-4.6.0-orig/include/utils.h iproute2-4.6.0/include/utils.h
+--- iproute2-4.6.0-orig/include/utils.h 2016-05-23 12:03:23.821826910 +0300
++++ iproute2-4.6.0/include/utils.h 2016-05-23 12:04:23.718078104 +0300
+@@ -1,6 +1,7 @@
+ #ifndef __UTILS_H__
+ #define __UTILS_H__ 1
+
++#include <sys/param.h> /* MAXPATHLEN */
+ #include <sys/types.h>
+ #include <asm/types.h>
+ #include <resolv.h>
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-fix-building-with-musl.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-fix-building-with-musl.patch
deleted file mode 100644
index c83a243b7..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-fix-building-with-musl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-iproute2: fix building with musl
-
-We need limits.h for PATH_MAX, fixes:
-
-rt_names.c:364:13: error: â€PATH_MAX’ undeclared (first use in this
-function)
-
-Upstream-Status: Backport
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff --git a/lib/rt_names.c b/lib/rt_names.c
-index f6d17c0..b665d3e 100644
---- a/lib/rt_names.c
-+++ b/lib/rt_names.c
-@@ -18,6 +18,7 @@
- #include <sys/time.h>
- #include <sys/socket.h>
- #include <dirent.h>
-+#include <limits.h>
-
- #include <asm/types.h>
- #include <linux/rtnetlink.h>
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.4.0.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.4.0.bb
deleted file mode 100644
index 7979e8beb..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.4.0.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require iproute2.inc
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
- file://configure-cross.patch \
- file://0001-iproute2-de-bash-scripts.patch \
- file://iproute2-4.3.0-musl.patch \
- file://iproute2-fix-building-with-musl.patch \
- "
-SRC_URI[md5sum] = "d762653ec3e1ab0d4a9689e169ca184f"
-SRC_URI[sha256sum] = "bc91c367288a19f78ef800cd6840363be1f22da8436fbae88e1a7250490d6514"
-
-# CFLAGS are computed in Makefile and reference CCOPTS
-#
-EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.7.0.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.7.0.bb
new file mode 100644
index 000000000..426f98916
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.7.0.bb
@@ -0,0 +1,13 @@
+require iproute2.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
+ file://configure-cross.patch \
+ file://0001-iproute2-de-bash-scripts.patch \
+ file://iproute2-4.3.0-musl.patch \
+ "
+SRC_URI[md5sum] = "d4b205830cdc2702f8a0cbd6232129cd"
+SRC_URI[sha256sum] = "8f60dbcfb33a79daae0638f53bdcaa4310c0aa59ae39af8a234020dc69bb7b92"
+
+# CFLAGS are computed in Makefile and reference CCOPTS
+#
+EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch
index 2e52c80c0..715b88d46 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch
@@ -7,27 +7,33 @@ Upstream-Status: Pending
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
-diff -Naur iw-4.3-origin/version.sh iw-4.3/version.sh
---- iw-4.3-origin/version.sh 2015-11-20 16:37:58.762077162 +0200
-+++ iw-4.3/version.sh 2015-11-20 16:52:05.526491150 +0200
-@@ -3,21 +3,7 @@
- VERSION="4.3"
- OUT="$1"
+diff -Naur iw-4.7-orig/version.sh iw-4.7/version.sh
+--- iw-4.7-orig/version.sh 2016-05-31 12:52:46.000000000 +0300
++++ iw-4.7/version.sh 2016-06-01 11:21:58.307409060 +0300
+@@ -15,27 +15,7 @@
+ SRC_DIR=$(cd ${SRC_DIR}; pwd)
+ cd "${SRC_DIR}"
+-v=""
-if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
-- git update-index --refresh --unmerged > /dev/null
-- descr=$(git describe --match=v*)
--
-- # on git builds check that the version number above
-- # is correct...
-- [ "${descr%%-*}" = "v$VERSION" ] || exit 2
+- git update-index --refresh --unmerged > /dev/null
+- descr=$(git describe --match=v* 2>/dev/null)
+- if [ $? -eq 0 ]; then
+- # on git builds check that the version number above
+- # is correct...
+- if [ "${descr%%-*}" = "v$VERSION" ]; then
+- v="${descr#v}"
+- if git diff-index --name-only HEAD | read dummy ; then
+- v="$v"-dirty
+- fi
+- fi
+- fi
+-fi
-
-- v="${descr#v}"
-- if git diff-index --name-only HEAD | read dummy ; then
-- v="$v"-dirty
-- fi
--else
-- v="$VERSION"
+-# set to the default version when failed to get the version
+-# information with git
+-if [ -z "${v}" ]; then
+- v="$VERSION"
-fi
+v="$VERSION"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.3.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.3.bb
deleted file mode 100644
index 6865e7ad6..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.3.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
-DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
-wireless devices. It supports almost all new drivers that have been added \
-to the kernel recently. "
-HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
-SECTION = "base"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
-
-DEPENDS = "libnl"
-
-SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
- file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
- file://separate-objdir.patch \
-"
-
-SRC_URI[md5sum] = "5ca622a270687d6862c9024fab266871"
-SRC_URI[sha256sum] = "2a853d95ffbd2b06c058b40ef4e6fa76a52c2709b05fb1976761fe13e9d9e39f"
-
-inherit pkgconfig
-
-EXTRA_OEMAKE = "\
- -f '${S}/Makefile' \
- \
- 'PREFIX=${prefix}' \
- 'SBINDIR=${sbindir}' \
- 'MANDIR=${mandir}' \
-"
-B = "${WORKDIR}/build"
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
-}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.7.bb b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.7.bb
new file mode 100644
index 000000000..e9f414129
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/iw/iw_4.7.bb
@@ -0,0 +1,33 @@
+SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
+DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
+wireless devices. It supports almost all new drivers that have been added \
+to the kernel recently. "
+HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
+SECTION = "base"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
+
+DEPENDS = "libnl"
+
+SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
+ file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
+ file://separate-objdir.patch \
+"
+
+SRC_URI[md5sum] = "19d1edd276b2ac0c6cccfc7ae8d2b732"
+SRC_URI[sha256sum] = "758092229f13d691968060a0ad41364ba8eb8da4503626c20233a5b1eb33b4d9"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "\
+ -f '${S}/Makefile' \
+ \
+ 'PREFIX=${prefix}' \
+ 'SBINDIR=${sbindir}' \
+ 'MANDIR=${mandir}' \
+"
+B = "${WORKDIR}/build"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/libpcap/libpcap.inc b/import-layers/yocto-poky/meta/recipes-connectivity/libpcap/libpcap.inc
index b7601b05c..7b29a52dc 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/libpcap/libpcap.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/libpcap/libpcap.inc
@@ -20,12 +20,15 @@ inherit autotools binconfig-disabled pkgconfig bluetooth
EXTRA_OECONF = "--with-pcap=linux"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
+"
PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"
# Add a dummy PACKAGECONFIG for bluez5 since it is not supported by libpcap.
PACKAGECONFIG[bluez5] = ",,"
PACKAGECONFIG[canusb] = "--enable-canusb,--enable-canusb=no,libusb"
PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
PACKAGECONFIG[libnl] = "--with-libnl,--without-libnl,libnl"
CPPFLAGS_prepend = "-I${S} "
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard_0.15.bb b/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard_0.15.bb
deleted file mode 100644
index 93bddb34c..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard_0.15.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "Linux NFC daemon"
-DESCRIPTION = "A daemon for the Linux Near Field Communication stack"
-HOMEPAGE = "http://01.org/linux-nfc"
-LICENSE = "GPLv2"
-
-DEPENDS = "dbus glib-2.0 libnl"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BP}.tar.xz \
- file://neard.in \
- file://Makefile.am-fix-parallel-issue.patch \
- file://Makefile.am-do-not-ship-version.h.patch \
- "
-SRC_URI[md5sum] = "b746ce62eeef88e8de90765e00a75a1c"
-SRC_URI[sha256sum] = "651f6513d32cdaf8a426255d03aff38a6620a89b0567ec2b36606c6330a93353"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
- file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
- "
-
-inherit autotools pkgconfig systemd update-rc.d bluetooth
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
-
-PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-systemduserunitdir=${systemd_unitdir}/user/,--disable-systemd"
-
-EXTRA_OECONF += "--enable-tools"
-
-# This would copy neard start-stop shell and test scripts
-do_install_append() {
- if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
- install -d ${D}${sysconfdir}/init.d/
- sed "s:@installpath@:${libexecdir}/nfc:" ${WORKDIR}/neard.in \
- > ${D}${sysconfdir}/init.d/neard
- chmod 0755 ${D}${sysconfdir}/init.d/neard
- fi
-
- # Install the tests for neard-tests
- install -d ${D}${libdir}/neard
- install -m 0755 ${S}/test/* ${D}${libdir}/${BPN}/
- install -m 0755 ${B}/tools/nfctool/nfctool ${D}${libdir}/${BPN}/
-}
-
-PACKAGES =+ "${PN}-tests"
-
-FILES_${PN}-tests = "${libdir}/${BPN}/*-test"
-
-RDEPENDS_${PN} = "dbus python python-dbus python-pygobject"
-
-# Bluez & Wifi are not mandatory except for handover
-RRECOMMENDS_${PN} = "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
- "
-
-RDEPENDS_${PN}-tests = "python python-dbus python-pygobject"
-
-INITSCRIPT_NAME = "neard"
-INITSCRIPT_PARAMS = "defaults 64"
-
-SYSTEMD_SERVICE_${PN} = "neard.service"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard_0.16.bb b/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard_0.16.bb
new file mode 100644
index 000000000..5433dc3c3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/neard/neard_0.16.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Linux NFC daemon"
+DESCRIPTION = "A daemon for the Linux Near Field Communication stack"
+HOMEPAGE = "http://01.org/linux-nfc"
+LICENSE = "GPLv2"
+
+DEPENDS = "dbus glib-2.0 libnl"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BP}.tar.xz \
+ file://neard.in \
+ file://Makefile.am-fix-parallel-issue.patch \
+ file://Makefile.am-do-not-ship-version.h.patch \
+ "
+SRC_URI[md5sum] = "5c691fb7872856dc0d909c298bc8cb41"
+SRC_URI[sha256sum] = "eae3b11c541a988ec11ca94b7deab01080cd5b58cfef3ced6ceac9b6e6e65b36"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+ file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \
+ "
+
+inherit autotools pkgconfig systemd update-rc.d bluetooth
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-systemduserunitdir=${systemd_unitdir}/user/,--disable-systemd"
+
+EXTRA_OECONF += "--enable-tools"
+
+# This would copy neard start-stop shell and test scripts
+do_install_append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/init.d/
+ sed "s:@installpath@:${libexecdir}/nfc:" ${WORKDIR}/neard.in \
+ > ${D}${sysconfdir}/init.d/neard
+ chmod 0755 ${D}${sysconfdir}/init.d/neard
+ fi
+}
+
+RDEPENDS_${PN} = "dbus"
+
+# Bluez & Wifi are not mandatory except for handover
+RRECOMMENDS_${PN} = "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
+ "
+
+INITSCRIPT_NAME = "neard"
+INITSCRIPT_PARAMS = "defaults 64"
+
+SYSTEMD_SERVICE_${PN} = "neard.service"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
index a6268f3d4..8540503df 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
@@ -64,10 +64,13 @@ EXTRA_OECONF = "--with-statduser=rpcuser \
--with-statdpath=/var/lib/nfs/statd \
"
-PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG ??= "tcp-wrappers \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
+"
PACKAGECONFIG_remove_libc-musl = "tcp-wrappers"
PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
PACKAGECONFIG[nfsidmap] = "--enable-nfsidmap,--disable-nfsidmap,keyutils"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
INHIBIT_AUTO_STAGE = "1"
@@ -88,7 +91,7 @@ FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
${sysconfdir}/init.d/nfscommon \
${systemd_unitdir}/system/nfs-statd.service"
FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat"
-RDEPENDS_${PN}-stats = "python"
+RDEPENDS_${PN}-stats = "python3-core"
FILES_${PN} += "${systemd_unitdir}"
@@ -140,4 +143,8 @@ do_install_append () {
rm -f ${D}${sbindir}/rpcdebug
rm -f ${D}${sbindir}/rpcgen
rm -f ${D}${sbindir}/locktest
+
+ # Make python tools use python 3
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat
+
}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc
index c415a3998..9c47c6fde 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono.inc
@@ -26,12 +26,17 @@ SYSTEMD_SERVICE_${PN} = "ofono.service"
do_install_append() {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
+
+ # Ofono still has one test tool that refers to Python 2 in the shebang
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/ofono/test/set-ddr
+
}
PACKAGES =+ "${PN}-tests"
RDEPENDS_${PN} += "dbus"
+RRECOMMENDS_${PN} += "kernel-module-tun mobile-broadband-provider-info"
-FILES_${PN} += "${base_libdir}/udev ${systemd_unitdir}"
+FILES_${PN} += "${systemd_unitdir}"
FILES_${PN}-tests = "${libdir}/${BPN}/test"
-RDEPENDS_${PN}-tests = "python python-pygobject python-dbus"
+RDEPENDS_${PN}-tests = "python3 python3-pygobject python3-dbus"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch
deleted file mode 100644
index 5f8ca7710..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch
+++ /dev/null
@@ -1,1270 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-From 572fc23f6efd65a2ef9e6c957b2506108738672b Mon Sep 17 00:00:00 2001
-From: Cristian Iorga <cristian.iorga@intel.com>
-Date: Mon, 25 Aug 2014 16:59:39 +0300
-Subject: [PATCH] Revert "test: Convert to Python 3"
-
-This reverts commit c027ab9fbc1a8e8c9e76bcd123df1ad7696307c2.
----
- test/activate-context | 2 +-
- test/answer-calls | 2 +-
- test/backtrace | 2 +-
- test/cancel-ussd | 2 +-
- test/cdma-connman-disable | 2 +-
- test/cdma-connman-enable | 2 +-
- test/cdma-dial-number | 2 +-
- test/cdma-hangup | 2 +-
- test/cdma-list-call | 2 +-
- test/cdma-set-credentials | 2 +-
- test/change-pin | 2 +-
- test/create-internet-context | 2 +-
- test/create-mms-context | 2 +-
- test/create-multiparty | 2 +-
- test/deactivate-all | 2 +-
- test/deactivate-context | 2 +-
- test/dial-number | 2 +-
- test/disable-call-forwarding | 2 +-
- test/disable-gprs | 2 +-
- test/disable-modem | 2 +-
- test/display-icon | 2 +-
- test/enable-cbs | 2 +-
- test/enable-gprs | 2 +-
- test/enable-modem | 2 +-
- test/enter-pin | 2 +-
- test/get-icon | 2 +-
- test/get-operators | 2 +-
- test/get-tech-preference | 2 +-
- test/hangup-active | 2 +-
- test/hangup-all | 2 +-
- test/hangup-call | 2 +-
- test/hangup-multiparty | 2 +-
- test/hold-and-answer | 2 +-
- test/initiate-ussd | 4 ++--
- test/list-calls | 2 +-
- test/list-contexts | 2 +-
- test/list-messages | 2 +-
- test/list-modems | 2 +-
- test/list-operators | 2 +-
- test/lock-pin | 2 +-
- test/lockdown-modem | 2 +-
- test/monitor-ofono | 4 ++--
- test/offline-modem | 2 +-
- test/online-modem | 2 +-
- test/private-chat | 2 +-
- test/process-context-settings | 2 +-
- test/receive-sms | 2 +-
- test/reject-calls | 2 +-
- test/release-and-answer | 2 +-
- test/release-and-swap | 2 +-
- test/remove-contexts | 2 +-
- test/reset-pin | 2 +-
- test/scan-for-operators | 2 +-
- test/send-sms | 2 +-
- test/send-ussd | 4 ++--
- test/send-vcal | 2 +-
- test/send-vcard | 2 +-
- test/set-call-forwarding | 2 +-
- test/set-cbs-topics | 2 +-
- test/set-context-property | 2 +-
- test/set-fast-dormancy | 2 +-
- test/set-gsm-band | 2 +-
- test/set-mic-volume | 2 +-
- test/set-mms-details | 2 +-
- test/set-msisdn | 2 +-
- test/set-roaming-allowed | 2 +-
- test/set-speaker-volume | 2 +-
- test/set-tech-preference | 2 +-
- test/set-tty | 2 +-
- test/set-umts-band | 2 +-
- test/set-use-sms-reports | 2 +-
- test/swap-calls | 2 +-
- test/test-advice-of-charge | 2 +-
- test/test-call-barring | 2 +-
- test/test-call-forwarding | 2 +-
- test/test-call-settings | 2 +-
- test/test-cbs | 4 ++--
- test/test-gnss | 4 ++--
- test/test-message-waiting | 2 +-
- test/test-modem | 2 +-
- test/test-network-registration | 2 +-
- test/test-phonebook | 2 +-
- test/test-push-notification | 2 +-
- test/test-smart-messaging | 2 +-
- test/test-sms | 18 +++++++++---------
- test/test-ss | 2 +-
- test/test-ss-control-cb | 2 +-
- test/test-ss-control-cf | 2 +-
- test/test-ss-control-cs | 2 +-
- test/test-stk-menu | 34 +++++++++++++++++-----------------
- test/unlock-pin | 2 +-
- 94 files changed, 124 insertions(+), 124 deletions(-)
-
-diff --git a/test/activate-context b/test/activate-context
-index e4fc702..4241396 100755
---- a/test/activate-context
-+++ b/test/activate-context
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/answer-calls b/test/answer-calls
-index daa794b..45ff08f 100755
---- a/test/answer-calls
-+++ b/test/answer-calls
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
-
-diff --git a/test/backtrace b/test/backtrace
-index 03c7632..c624709 100755
---- a/test/backtrace
-+++ b/test/backtrace
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import os
- import re
-diff --git a/test/cancel-ussd b/test/cancel-ussd
-index e7559ba..1797f26 100755
---- a/test/cancel-ussd
-+++ b/test/cancel-ussd
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/cdma-connman-disable b/test/cdma-connman-disable
-index 3adc14d..0ddc0cd 100755
---- a/test/cdma-connman-disable
-+++ b/test/cdma-connman-disable
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/cdma-connman-enable b/test/cdma-connman-enable
-index ac16a2d..a3cca01 100755
---- a/test/cdma-connman-enable
-+++ b/test/cdma-connman-enable
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/cdma-dial-number b/test/cdma-dial-number
-index 683431e..9cdfb24 100755
---- a/test/cdma-dial-number
-+++ b/test/cdma-dial-number
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/cdma-hangup b/test/cdma-hangup
-index 41ffa60..493ece4 100755
---- a/test/cdma-hangup
-+++ b/test/cdma-hangup
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/cdma-list-call b/test/cdma-list-call
-index b132353..5d36a69 100755
---- a/test/cdma-list-call
-+++ b/test/cdma-list-call
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
-
-diff --git a/test/cdma-set-credentials b/test/cdma-set-credentials
-index a60c86e..a286b0e 100755
---- a/test/cdma-set-credentials
-+++ b/test/cdma-set-credentials
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/change-pin b/test/change-pin
-index 301c6ce..000ce53 100755
---- a/test/change-pin
-+++ b/test/change-pin
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/create-internet-context b/test/create-internet-context
-index 1089053..efd0998 100755
---- a/test/create-internet-context
-+++ b/test/create-internet-context
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/create-mms-context b/test/create-mms-context
-index 598336f..e5be08d 100755
---- a/test/create-mms-context
-+++ b/test/create-mms-context
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/create-multiparty b/test/create-multiparty
-index 1b76010..97047c3 100755
---- a/test/create-multiparty
-+++ b/test/create-multiparty
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/deactivate-all b/test/deactivate-all
-index 5aa8587..427009e 100755
---- a/test/deactivate-all
-+++ b/test/deactivate-all
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/deactivate-context b/test/deactivate-context
-index 5c86a71..df47d2e 100755
---- a/test/deactivate-context
-+++ b/test/deactivate-context
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/dial-number b/test/dial-number
-index fe5adad..ee674d9 100755
---- a/test/dial-number
-+++ b/test/dial-number
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/disable-call-forwarding b/test/disable-call-forwarding
-index 811e4fa..3609816 100755
---- a/test/disable-call-forwarding
-+++ b/test/disable-call-forwarding
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- from gi.repository import GLib
-diff --git a/test/disable-gprs b/test/disable-gprs
-index 61ce216..c6c40a5 100755
---- a/test/disable-gprs
-+++ b/test/disable-gprs
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/disable-modem b/test/disable-modem
-index 6fba857..ca8c8d8 100755
---- a/test/disable-modem
-+++ b/test/disable-modem
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/display-icon b/test/display-icon
-index ac40818..753d14d 100755
---- a/test/display-icon
-+++ b/test/display-icon
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/enable-cbs b/test/enable-cbs
-index 4a8bf66..c08bf2b 100755
---- a/test/enable-cbs
-+++ b/test/enable-cbs
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/enable-gprs b/test/enable-gprs
-index 68d5ef0..8664891 100755
---- a/test/enable-gprs
-+++ b/test/enable-gprs
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/enable-modem b/test/enable-modem
-index fc5958a..dfaaaa8 100755
---- a/test/enable-modem
-+++ b/test/enable-modem
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/enter-pin b/test/enter-pin
-index 9556363..c6ee669 100755
---- a/test/enter-pin
-+++ b/test/enter-pin
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/get-icon b/test/get-icon
-index 5569a33..fdaaee7 100755
---- a/test/get-icon
-+++ b/test/get-icon
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/get-operators b/test/get-operators
-index 0f35c80..62354c5 100755
---- a/test/get-operators
-+++ b/test/get-operators
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/get-tech-preference b/test/get-tech-preference
-index 7ba6365..77d20d0 100755
---- a/test/get-tech-preference
-+++ b/test/get-tech-preference
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus, sys
-
-diff --git a/test/hangup-active b/test/hangup-active
-index 82e0eb0..5af62ab 100755
---- a/test/hangup-active
-+++ b/test/hangup-active
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/hangup-all b/test/hangup-all
-index 3a0138d..32933db 100755
---- a/test/hangup-all
-+++ b/test/hangup-all
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/hangup-call b/test/hangup-call
-index 5a2de20..447020c 100755
---- a/test/hangup-call
-+++ b/test/hangup-call
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/hangup-multiparty b/test/hangup-multiparty
-index 24751c3..48fe342 100755
---- a/test/hangup-multiparty
-+++ b/test/hangup-multiparty
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/hold-and-answer b/test/hold-and-answer
-index da3be57..2c47e27 100755
---- a/test/hold-and-answer
-+++ b/test/hold-and-answer
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/initiate-ussd b/test/initiate-ussd
-index faf50d0..d7022f1 100755
---- a/test/initiate-ussd
-+++ b/test/initiate-ussd
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-@@ -45,7 +45,7 @@ if state == "idle":
- print("State: %s" % (state))
-
- while state == "user-response":
-- response = input("Enter response: ")
-+ response = raw_input("Enter response: ")
-
- result = ussd.Respond(response, timeout=100)
-
-diff --git a/test/list-calls b/test/list-calls
-index f3ee991..08668c6 100755
---- a/test/list-calls
-+++ b/test/list-calls
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
-
-diff --git a/test/list-contexts b/test/list-contexts
-index 78278ca..f0d4094 100755
---- a/test/list-contexts
-+++ b/test/list-contexts
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
-
-diff --git a/test/list-messages b/test/list-messages
-index 9f5bce3..cfccbea 100755
---- a/test/list-messages
-+++ b/test/list-messages
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
-
-diff --git a/test/list-modems b/test/list-modems
-index b9f510a..ed66124 100755
---- a/test/list-modems
-+++ b/test/list-modems
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
-
-diff --git a/test/list-operators b/test/list-operators
-index 064c4e3..349bf41 100755
---- a/test/list-operators
-+++ b/test/list-operators
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/lock-pin b/test/lock-pin
-index 96ea9c2..5579735 100755
---- a/test/lock-pin
-+++ b/test/lock-pin
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/lockdown-modem b/test/lockdown-modem
-index 4e04205..781abb6 100755
---- a/test/lockdown-modem
-+++ b/test/lockdown-modem
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/monitor-ofono b/test/monitor-ofono
-index 8830757..bd31617 100755
---- a/test/monitor-ofono
-+++ b/test/monitor-ofono
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-@@ -6,7 +6,7 @@ import dbus
- import dbus.mainloop.glib
-
- _dbus2py = {
-- dbus.String : str,
-+ dbus.String : unicode,
- dbus.UInt32 : int,
- dbus.Int32 : int,
- dbus.Int16 : int,
-diff --git a/test/offline-modem b/test/offline-modem
-index e8c043a..ea1f522 100755
---- a/test/offline-modem
-+++ b/test/offline-modem
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus, sys
-
-diff --git a/test/online-modem b/test/online-modem
-index 029c4a5..310ed7d 100755
---- a/test/online-modem
-+++ b/test/online-modem
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus, sys
-
-diff --git a/test/private-chat b/test/private-chat
-index e7e5406..ef2ef6c 100755
---- a/test/private-chat
-+++ b/test/private-chat
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/process-context-settings b/test/process-context-settings
-index 8a3ecfa..0f058b2 100755
---- a/test/process-context-settings
-+++ b/test/process-context-settings
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import os
- import dbus
-diff --git a/test/receive-sms b/test/receive-sms
-index a0c6915..c23eb14 100755
---- a/test/receive-sms
-+++ b/test/receive-sms
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-diff --git a/test/reject-calls b/test/reject-calls
-index 71b243e..9edf1ff 100755
---- a/test/reject-calls
-+++ b/test/reject-calls
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
-
-diff --git a/test/release-and-answer b/test/release-and-answer
-index dec8e17..25fd818 100755
---- a/test/release-and-answer
-+++ b/test/release-and-answer
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/release-and-swap b/test/release-and-swap
-index cb8c84e..7b3569f 100755
---- a/test/release-and-swap
-+++ b/test/release-and-swap
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/remove-contexts b/test/remove-contexts
-index b54184e..c5082cb 100755
---- a/test/remove-contexts
-+++ b/test/remove-contexts
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
-
-diff --git a/test/reset-pin b/test/reset-pin
-index 3fbd126..b429254 100755
---- a/test/reset-pin
-+++ b/test/reset-pin
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/scan-for-operators b/test/scan-for-operators
-index b4fc05e..749c710 100755
---- a/test/scan-for-operators
-+++ b/test/scan-for-operators
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/send-sms b/test/send-sms
-index 98808aa..e06444d 100755
---- a/test/send-sms
-+++ b/test/send-sms
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/send-ussd b/test/send-ussd
-index a20e098..e585883 100755
---- a/test/send-ussd
-+++ b/test/send-ussd
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-@@ -46,7 +46,7 @@ if state == "idle":
- print("State: %s" % (state))
-
- while state == "user-response":
-- response = input("Enter response: ")
-+ response = raw_input("Enter response: ")
-
- print(ussd.Respond(response, timeout=100))
-
-diff --git a/test/send-vcal b/test/send-vcal
-index 566daef..7f8272b 100755
---- a/test/send-vcal
-+++ b/test/send-vcal
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/send-vcard b/test/send-vcard
-index 4dedf51..250b36f 100755
---- a/test/send-vcard
-+++ b/test/send-vcard
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/set-call-forwarding b/test/set-call-forwarding
-index 49d1ce0..9fd358b 100755
---- a/test/set-call-forwarding
-+++ b/test/set-call-forwarding
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- from gi.repository import GLib
-diff --git a/test/set-cbs-topics b/test/set-cbs-topics
-index db95e16..78d6d44 100755
---- a/test/set-cbs-topics
-+++ b/test/set-cbs-topics
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/set-context-property b/test/set-context-property
-index 5ff7a67..64a6fb8 100755
---- a/test/set-context-property
-+++ b/test/set-context-property
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/set-fast-dormancy b/test/set-fast-dormancy
-index ef77bcd..7bf7715 100755
---- a/test/set-fast-dormancy
-+++ b/test/set-fast-dormancy
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/set-gsm-band b/test/set-gsm-band
-index b37bcb5..3c17c10 100755
---- a/test/set-gsm-band
-+++ b/test/set-gsm-band
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/set-mic-volume b/test/set-mic-volume
-index cd6c73f..e0bff49 100755
---- a/test/set-mic-volume
-+++ b/test/set-mic-volume
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/set-mms-details b/test/set-mms-details
-index 6ee59fa..d2d0838 100755
---- a/test/set-mms-details
-+++ b/test/set-mms-details
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/set-msisdn b/test/set-msisdn
-index b5fe819..01f284d 100755
---- a/test/set-msisdn
-+++ b/test/set-msisdn
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/set-roaming-allowed b/test/set-roaming-allowed
-index 698c8b6..9e3e058 100755
---- a/test/set-roaming-allowed
-+++ b/test/set-roaming-allowed
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/set-speaker-volume b/test/set-speaker-volume
-index 6d4e301..7962f39 100755
---- a/test/set-speaker-volume
-+++ b/test/set-speaker-volume
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/set-tech-preference b/test/set-tech-preference
-index b549abc..2666cbd 100755
---- a/test/set-tech-preference
-+++ b/test/set-tech-preference
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/set-tty b/test/set-tty
-index eed1fba..53d6b99 100755
---- a/test/set-tty
-+++ b/test/set-tty
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/set-umts-band b/test/set-umts-band
-index 0bae5c4..c1e6448 100755
---- a/test/set-umts-band
-+++ b/test/set-umts-band
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/set-use-sms-reports b/test/set-use-sms-reports
-index 288d4e1..a4efe4f 100755
---- a/test/set-use-sms-reports
-+++ b/test/set-use-sms-reports
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
-diff --git a/test/swap-calls b/test/swap-calls
-index 018a8d3..eeb257b 100755
---- a/test/swap-calls
-+++ b/test/swap-calls
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/test-advice-of-charge b/test/test-advice-of-charge
-index 6e87e61..0f1f57f 100755
---- a/test/test-advice-of-charge
-+++ b/test/test-advice-of-charge
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
- import sys
-diff --git a/test/test-call-barring b/test/test-call-barring
-index eedb69f..be4ab57 100755
---- a/test/test-call-barring
-+++ b/test/test-call-barring
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
- import sys
-diff --git a/test/test-call-forwarding b/test/test-call-forwarding
-index 5db84d7..01a7294 100755
---- a/test/test-call-forwarding
-+++ b/test/test-call-forwarding
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-diff --git a/test/test-call-settings b/test/test-call-settings
-index 435594c..5d7ee49 100755
---- a/test/test-call-settings
-+++ b/test/test-call-settings
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-diff --git a/test/test-cbs b/test/test-cbs
-index a5cec06..13cdd80 100755
---- a/test/test-cbs
-+++ b/test/test-cbs
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import dbus.mainloop.glib
-@@ -78,7 +78,7 @@ def set_topics(cbs):
- invalidData = False;
- index = 0
-
-- topics = input('Enter the topic ID(s) you want to register to: ')
-+ topics = raw_input('Enter the topic ID(s) you want to register to: ')
-
- while index < len(topics):
- if topics[index] == ',' or topics[index] == '-':
-diff --git a/test/test-gnss b/test/test-gnss
-index 6ae64db..aa0b160 100755
---- a/test/test-gnss
-+++ b/test/test-gnss
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
- import sys
-@@ -40,7 +40,7 @@ def print_menu():
- def stdin_handler(channel, condition, gnss, path):
- in_key = os.read(channel.unix_get_fd(), 160).rstrip().decode('UTF-8')
- if in_key == '0':
-- xml = input('type the element and press enter: ')
-+ xml = raw_input('type the element and press enter: ')
- try:
- gnss.SendPositioningElement(dbus.String(xml))
- print("ok")
-diff --git a/test/test-message-waiting b/test/test-message-waiting
-index 432862e..b93fbf3 100755
---- a/test/test-message-waiting
-+++ b/test/test-message-waiting
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
- import sys
-diff --git a/test/test-modem b/test/test-modem
-index aa38b1f..29dbf14 100755
---- a/test/test-modem
-+++ b/test/test-modem
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-diff --git a/test/test-network-registration b/test/test-network-registration
-index 68b4347..c5ad586 100755
---- a/test/test-network-registration
-+++ b/test/test-network-registration
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
- import sys
-diff --git a/test/test-phonebook b/test/test-phonebook
-index 42646d3..116fd4f 100755
---- a/test/test-phonebook
-+++ b/test/test-phonebook
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus, sys
-
-diff --git a/test/test-push-notification b/test/test-push-notification
-index d972ad3..ecc6afb 100755
---- a/test/test-push-notification
-+++ b/test/test-push-notification
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-diff --git a/test/test-smart-messaging b/test/test-smart-messaging
-index f22efd2..188ac1e 100755
---- a/test/test-smart-messaging
-+++ b/test/test-smart-messaging
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-diff --git a/test/test-sms b/test/test-sms
-index 30ac651..49935e1 100755
---- a/test/test-sms
-+++ b/test/test-sms
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
- # -*- coding: utf-8 -*-
-
- from gi.repository import GLib
-@@ -132,7 +132,7 @@ def stdin_handler(channel, condition, sms, value, number):
- lock = "on"
- if in_key == '0':
- print_send_sms_menu()
-- sms_type = input('Select SMS type: ')
-+ sms_type = raw_input('Select SMS type: ')
-
- if sms_type == '1':
- message_send(sms, number, value)
-@@ -150,49 +150,49 @@ def stdin_handler(channel, condition, sms, value, number):
-
- elif in_key == '1':
- message_delivery_report(sms, 1)
-- send_msg = input('Send test message[y/n]?: ')
-+ send_msg = raw_input('Send test message[y/n]?: ')
- if send_msg == 'y':
- message_send(sms, number, ("(1)" + value +
- ": UseDeliveryReports[TRUE]"))
-
- elif in_key == '2':
- message_delivery_report(sms, 0)
-- send_msg = input('Send test message[y/n]?: ')
-+ send_msg = raw_input('Send test message[y/n]?: ')
- if send_msg == 'y':
- message_send(sms, number, ("(2) " + value +
- ": UseDeliveryReports[FALSE]"))
-
- elif in_key == '3':
- message_service_center_address(sms, SCA)
-- send_msg = input('Send test message[y/n]?: ')
-+ send_msg = raw_input('Send test message[y/n]?: ')
- if send_msg == 'y':
- message_send(sms, number, ("(3) " + value +
- ": ServiceCenterAddress"))
-
- elif in_key == '4':
- message_bearer(sms, "ps-only")
-- send_msg = input('Send test message[y/n]?: ')
-+ send_msg = raw_input('Send test message[y/n]?: ')
- if send_msg == 'y':
- message_send(sms, number, ("(4) " + value +
- ": Bearer[ps-only]"))
-
- elif in_key == '5':
- message_bearer(sms, "cs-only")
-- send_msg = input('Send test message[y/n]?: ')
-+ send_msg = raw_input('Send test message[y/n]?: ')
- if send_msg == 'y':
- message_send(sms, number, ("(5) " + value +
- ": Bearer[cs-only]"))
-
- elif in_key == '6':
- message_bearer(sms, "ps-preferred")
-- send_msg = input('Send test message[y/n]?: ')
-+ send_msg = raw_input('Send test message[y/n]?: ')
- if send_msg == 'y':
- message_send(sms, number, ("(6) " + value +
- ": Bearer[ps-preferred]"))
-
- elif in_key == '7':
- message_bearer(sms, "cs-preferred")
-- send_msg = input('Send test message[y/n]?: ')
-+ send_msg = raw_input('Send test message[y/n]?: ')
- if send_msg == 'y':
- message_send(sms,number, ("(7) " + value +
- ": Bearer[cs-preferred]"))
-diff --git a/test/test-ss b/test/test-ss
-index 4cd8732..2c80806 100755
---- a/test/test-ss
-+++ b/test/test-ss
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import sys
- import dbus
-diff --git a/test/test-ss-control-cb b/test/test-ss-control-cb
-index ddae6d3..86bac9b 100755
---- a/test/test-ss-control-cb
-+++ b/test/test-ss-control-cb
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-diff --git a/test/test-ss-control-cf b/test/test-ss-control-cf
-index 095eb5d..d30bf4f 100755
---- a/test/test-ss-control-cf
-+++ b/test/test-ss-control-cf
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-diff --git a/test/test-ss-control-cs b/test/test-ss-control-cs
-index 8180474..e0ed1d1 100755
---- a/test/test-ss-control-cs
-+++ b/test/test-ss-control-cs
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-diff --git a/test/test-stk-menu b/test/test-stk-menu
-index 0cf8fa2..ac0a5bd 100755
---- a/test/test-stk-menu
-+++ b/test/test-stk-menu
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- from gi.repository import GLib
-
-@@ -58,7 +58,7 @@ class StkAgent(dbus.service.Object):
- index += 1
-
- print("\nDefault: %d" % (default))
-- select = input("Enter Selection (t, b):")
-+ select = raw_input("Enter Selection (t, b):")
-
- if select == 'b':
- raise GoBack("User wishes to go back")
-@@ -75,7 +75,7 @@ class StkAgent(dbus.service.Object):
- print("DisplayText (%s)" % (title))
- print("Icon: (%d)" % (int(icon)))
- print("Urgent: (%d)" % (urgent))
-- key = input("Press return to clear ('t' terminates, "
-+ key = raw_input("Press return to clear ('t' terminates, "
- "'b' goes back, 'n' busy, "
- "'w' return and wait):")
-
-@@ -108,7 +108,7 @@ class StkAgent(dbus.service.Object):
- print("Hide typing: (%s)" % (hide_typing))
- print("Enter characters, min: %d, max: %d:" % (min_chars,
- max_chars))
-- userin = input("")
-+ userin = raw_input("")
-
- return userin
-
-@@ -122,7 +122,7 @@ class StkAgent(dbus.service.Object):
- print("Hide typing: (%s)" % (hide_typing))
- print("Enter digits, min: %d, max: %d:" % (min_chars,
- max_chars))
-- userin = input("'t' terminates, 'b' goes back:")
-+ userin = raw_input("'t' terminates, 'b' goes back:")
-
- if userin == 'b':
- raise GoBack("User wishes to go back")
-@@ -136,7 +136,7 @@ class StkAgent(dbus.service.Object):
- def RequestKey(self, title, icon):
- print("Title: (%s)" % (title))
- print("Icon: (%d)" % (int(icon)))
-- key = input("Enter Key (t, b):")
-+ key = raw_input("Enter Key (t, b):")
-
- if key == 'b':
- raise GoBack("User wishes to go back")
-@@ -150,7 +150,7 @@ class StkAgent(dbus.service.Object):
- def RequestDigit(self, title, icon):
- print("Title: (%s)" % (title))
- print("Icon: (%d)" % (int(icon)))
-- key = input("Enter Digit (t, b):")
-+ key = raw_input("Enter Digit (t, b):")
-
- if key == 'b':
- raise GoBack("User wishes to go back")
-@@ -164,7 +164,7 @@ class StkAgent(dbus.service.Object):
- def RequestQuickDigit(self, title, icon):
- print("Title: (%s)" % (title))
- print("Icon: (%d)" % (int(icon)))
-- key = input("Quick digit (0-9, *, #, t, b):")
-+ key = raw_input("Quick digit (0-9, *, #, t, b):")
-
- if key == 'b':
- raise GoBack("User wishes to go back")
-@@ -178,7 +178,7 @@ class StkAgent(dbus.service.Object):
- def RequestConfirmation(self, title, icon):
- print("Title: (%s)" % (title))
- print("Icon: (%d)" % (int(icon)))
-- key = input("Enter Confirmation (t, b, y, n):")
-+ key = raw_input("Enter Confirmation (t, b, y, n):")
-
- if key == 'b':
- raise GoBack("User wishes to go back")
-@@ -194,7 +194,7 @@ class StkAgent(dbus.service.Object):
- def ConfirmCallSetup(self, info, icon):
- print("Information: (%s)" % (info))
- print("Icon: (%d)" % (int(icon)))
-- key = input("Enter Confirmation (t, y, n):")
-+ key = raw_input("Enter Confirmation (t, y, n):")
-
- if key == 't':
- raise EndSession("User wishes to terminate session")
-@@ -209,7 +209,7 @@ class StkAgent(dbus.service.Object):
- print("Information: (%s)" % (info))
- print("Icon: (%d)" % (int(icon)))
- print("URL (%s)" % (url))
-- key = input("Enter Confirmation (y, n):")
-+ key = raw_input("Enter Confirmation (y, n):")
-
- if key == 'y':
- return True
-@@ -232,7 +232,7 @@ class StkAgent(dbus.service.Object):
- signal.alarm(5)
-
- try:
-- key = input("Press return to end before end of"
-+ key = raw_input("Press return to end before end of"
- " single tone (t):")
- signal.alarm(0)
-
-@@ -250,7 +250,7 @@ class StkAgent(dbus.service.Object):
- print("LoopTone: %s" % (tone))
- print("Text: %s" % (text))
- print("Icon: %d" % (int(icon)))
-- key = input("Press return to end before timeout "
-+ key = raw_input("Press return to end before timeout "
- "('t' terminates, 'w' return and wait):")
-
- if key == 'w':
-@@ -279,7 +279,7 @@ class StkAgent(dbus.service.Object):
- def DisplayAction(self, text, icon):
- print("Text: (%s)" % (text))
- print("Icon: (%d)" % (int(icon)))
-- key = input("Press 't' to terminate the session ")
-+ key = raw_input("Press 't' to terminate the session ")
-
- if key == 't':
- raise EndSession("User wishes to terminate session")
-@@ -289,7 +289,7 @@ class StkAgent(dbus.service.Object):
- def ConfirmOpenChannel(self, info, icon):
- print("Open channel confirmation: (%s)" % (info))
- print("Icon: (%d)" % (int(icon)))
-- key = input("Enter Confirmation (t, y, n):")
-+ key = raw_input("Enter Confirmation (t, y, n):")
-
- if key == 't':
- raise EndSession("User wishes to terminate session")
-@@ -299,7 +299,7 @@ class StkAgent(dbus.service.Object):
- return False
-
- _dbus2py = {
-- dbus.String : str,
-+ dbus.String : unicode,
- dbus.UInt32 : int,
- dbus.Int32 : int,
- dbus.Int16 : int,
-@@ -396,7 +396,7 @@ if __name__ == '__main__':
- except:
- pass
-
-- select = int(input("Enter Selection: "))
-+ select = int(raw_input("Enter Selection: "))
- stk.SelectItem(select, path)
- elif mode == 'agent':
- path = "/test/agent"
-diff --git a/test/unlock-pin b/test/unlock-pin
-index 61f4765..10b6626 100755
---- a/test/unlock-pin
-+++ b/test/unlock-pin
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/python
-
- import dbus
- import sys
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.17.bb b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.17.bb
deleted file mode 100644
index 947f9d714..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.17.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require ofono.inc
-
-SRC_URI = "\
- ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
- file://ofono \
- file://Revert-test-Convert-to-Python-3.patch \
-"
-SRC_URI[md5sum] = "d280b1d267ba5bf391d2a898fea7c748"
-SRC_URI[sha256sum] = "cbf20f07fd15253c682b23c1786d517f505c3688f7c4ea93da777e1523b89635"
-
-CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.18.bb b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.18.bb
new file mode 100644
index 000000000..b0707311a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.18.bb
@@ -0,0 +1,10 @@
+require ofono.inc
+
+SRC_URI = "\
+ ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+ file://ofono \
+"
+SRC_URI[md5sum] = "0a6b37c8ace891cb2a7ca5d121043a0a"
+SRC_URI[sha256sum] = "53cdbf342913f46bce4827241c60e24255a3d43a94945edf77482ae5b312d51f"
+
+CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_2.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_2.patch
deleted file mode 100644
index 9fac69c3d..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_2.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From f98a09cacff7baad8748c9aa217afd155a4d493f Mon Sep 17 00:00:00 2001
-From: "mmcc@openbsd.org" <mmcc@openbsd.org>
-Date: Tue, 20 Oct 2015 03:36:35 +0000
-Subject: [PATCH] upstream commit
-
-Replace a function-local allocation with stack memory.
-
-ok djm@
-
-Upstream-ID: c09fbbab637053a2ab9f33ca142b4e20a4c5a17e
-Upstream-Status: Backport
-CVE: CVE-2016-1907
-
-[YOCTO #8935]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- clientloop.c | 9 ++-------
- 1 file changed, 2 insertions(+), 7 deletions(-)
-
-diff --git a/clientloop.c b/clientloop.c
-index 87ceb3d..1e05cba 100644
---- a/clientloop.c
-+++ b/clientloop.c
-@@ -1,4 +1,4 @@
--/* $OpenBSD: clientloop.c,v 1.275 2015/07/10 06:21:53 markus Exp $ */
-+/* $OpenBSD: clientloop.c,v 1.276 2015/10/20 03:36:35 mmcc Exp $ */
- /*
- * Author: Tatu Ylonen <ylo@cs.hut.fi>
- * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
-@@ -311,11 +311,10 @@ client_x11_get_proto(const char *display, const char *xauth_path,
- static char proto[512], data[512];
- FILE *f;
- int got_data = 0, generated = 0, do_unlink = 0, i;
-- char *xauthdir, *xauthfile;
-+ char xauthdir[PATH_MAX] = "", xauthfile[PATH_MAX] = "";
- struct stat st;
- u_int now, x11_timeout_real;
-
-- xauthdir = xauthfile = NULL;
- *_proto = proto;
- *_data = data;
- proto[0] = data[0] = '\0';
-@@ -343,8 +342,6 @@ client_x11_get_proto(const char *display, const char *xauth_path,
- display = xdisplay;
- }
- if (trusted == 0) {
-- xauthdir = xmalloc(PATH_MAX);
-- xauthfile = xmalloc(PATH_MAX);
- mktemp_proto(xauthdir, PATH_MAX);
- /*
- * The authentication cookie should briefly outlive
-@@ -407,8 +404,6 @@ client_x11_get_proto(const char *display, const char *xauth_path,
- unlink(xauthfile);
- rmdir(xauthdir);
- }
-- free(xauthdir);
-- free(xauthfile);
-
- /*
- * If we didn't get authentication data, just make up some
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_3.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_3.patch
deleted file mode 100644
index 3dfc51af7..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_3.patch
+++ /dev/null
@@ -1,329 +0,0 @@
-From ed4ce82dbfa8a3a3c8ea6fa0db113c71e234416c Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Wed, 13 Jan 2016 23:04:47 +0000
-Subject: [PATCH] upstream commit
-
-eliminate fallback from untrusted X11 forwarding to trusted
- forwarding when the X server disables the SECURITY extension; Reported by
- Thomas Hoger; ok deraadt@
-
-Upstream-ID: f76195bd2064615a63ef9674a0e4096b0713f938
-Upstream-Status: Backport
-CVE: CVE-2016-1907
-
-[YOCTO #8935]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- clientloop.c | 114 ++++++++++++++++++++++++++++++++++++-----------------------
- clientloop.h | 4 +--
- mux.c | 22 ++++++------
- ssh.c | 23 +++++-------
- 4 files changed, 93 insertions(+), 70 deletions(-)
-
-Index: openssh-7.1p2/clientloop.c
-===================================================================
---- openssh-7.1p2.orig/clientloop.c
-+++ openssh-7.1p2/clientloop.c
-@@ -1,4 +1,4 @@
--/* $OpenBSD: clientloop.c,v 1.276 2015/10/20 03:36:35 mmcc Exp $ */
-+/* $OpenBSD: clientloop.c,v 1.279 2016/01/13 23:04:47 djm Exp $ */
- /*
- * Author: Tatu Ylonen <ylo@cs.hut.fi>
- * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
-@@ -288,6 +288,9 @@ client_x11_display_valid(const char *dis
- {
- size_t i, dlen;
-
-+ if (display == NULL)
-+ return 0;
-+
- dlen = strlen(display);
- for (i = 0; i < dlen; i++) {
- if (!isalnum((u_char)display[i]) &&
-@@ -301,34 +304,33 @@ client_x11_display_valid(const char *dis
-
- #define SSH_X11_PROTO "MIT-MAGIC-COOKIE-1"
- #define X11_TIMEOUT_SLACK 60
--void
-+int
- client_x11_get_proto(const char *display, const char *xauth_path,
- u_int trusted, u_int timeout, char **_proto, char **_data)
- {
-- char cmd[1024];
-- char line[512];
-- char xdisplay[512];
-+ char cmd[1024], line[512], xdisplay[512];
-+ char xauthfile[PATH_MAX], xauthdir[PATH_MAX];
- static char proto[512], data[512];
- FILE *f;
-- int got_data = 0, generated = 0, do_unlink = 0, i;
-- char xauthdir[PATH_MAX] = "", xauthfile[PATH_MAX] = "";
-+ int got_data = 0, generated = 0, do_unlink = 0, i, r;
- struct stat st;
- u_int now, x11_timeout_real;
-
- *_proto = proto;
- *_data = data;
-- proto[0] = data[0] = '\0';
-+ proto[0] = data[0] = xauthfile[0] = xauthdir[0] = '\0';
-
-- if (xauth_path == NULL ||(stat(xauth_path, &st) == -1)) {
-- debug("No xauth program.");
-- } else if (!client_x11_display_valid(display)) {
-- logit("DISPLAY '%s' invalid, falling back to fake xauth data",
-+ if (!client_x11_display_valid(display)) {
-+ logit("DISPLAY \"%s\" invalid; disabling X11 forwarding",
- display);
-- } else {
-- if (display == NULL) {
-- debug("x11_get_proto: DISPLAY not set");
-- return;
-- }
-+ return -1;
-+ }
-+ if (xauth_path != NULL && stat(xauth_path, &st) == -1) {
-+ debug("No xauth program.");
-+ xauth_path = NULL;
-+ }
-+
-+ if (xauth_path != NULL) {
- /*
- * Handle FamilyLocal case where $DISPLAY does
- * not match an authorization entry. For this we
-@@ -337,43 +339,60 @@ client_x11_get_proto(const char *display
- * is not perfect.
- */
- if (strncmp(display, "localhost:", 10) == 0) {
-- snprintf(xdisplay, sizeof(xdisplay), "unix:%s",
-- display + 10);
-+ if ((r = snprintf(xdisplay, sizeof(xdisplay), "unix:%s",
-+ display + 10)) < 0 ||
-+ (size_t)r >= sizeof(xdisplay)) {
-+ error("%s: display name too long", __func__);
-+ return -1;
-+ }
- display = xdisplay;
- }
- if (trusted == 0) {
-- mktemp_proto(xauthdir, PATH_MAX);
- /*
-+ * Generate an untrusted X11 auth cookie.
-+ *
- * The authentication cookie should briefly outlive
- * ssh's willingness to forward X11 connections to
- * avoid nasty fail-open behaviour in the X server.
- */
-+ mktemp_proto(xauthdir, sizeof(xauthdir));
-+ if (mkdtemp(xauthdir) == NULL) {
-+ error("%s: mkdtemp: %s",
-+ __func__, strerror(errno));
-+ return -1;
-+ }
-+ do_unlink = 1;
-+ if ((r = snprintf(xauthfile, sizeof(xauthfile),
-+ "%s/xauthfile", xauthdir)) < 0 ||
-+ (size_t)r >= sizeof(xauthfile)) {
-+ error("%s: xauthfile path too long", __func__);
-+ unlink(xauthfile);
-+ rmdir(xauthdir);
-+ return -1;
-+ }
-+
- if (timeout >= UINT_MAX - X11_TIMEOUT_SLACK)
- x11_timeout_real = UINT_MAX;
- else
- x11_timeout_real = timeout + X11_TIMEOUT_SLACK;
-- if (mkdtemp(xauthdir) != NULL) {
-- do_unlink = 1;
-- snprintf(xauthfile, PATH_MAX, "%s/xauthfile",
-- xauthdir);
-- snprintf(cmd, sizeof(cmd),
-- "%s -f %s generate %s " SSH_X11_PROTO
-- " untrusted timeout %u 2>" _PATH_DEVNULL,
-- xauth_path, xauthfile, display,
-- x11_timeout_real);
-- debug2("x11_get_proto: %s", cmd);
-- if (x11_refuse_time == 0) {
-- now = monotime() + 1;
-- if (UINT_MAX - timeout < now)
-- x11_refuse_time = UINT_MAX;
-- else
-- x11_refuse_time = now + timeout;
-- channel_set_x11_refuse_time(
-- x11_refuse_time);
-- }
-- if (system(cmd) == 0)
-- generated = 1;
-+ if ((r = snprintf(cmd, sizeof(cmd),
-+ "%s -f %s generate %s " SSH_X11_PROTO
-+ " untrusted timeout %u 2>" _PATH_DEVNULL,
-+ xauth_path, xauthfile, display,
-+ x11_timeout_real)) < 0 ||
-+ (size_t)r >= sizeof(cmd))
-+ fatal("%s: cmd too long", __func__);
-+ debug2("%s: %s", __func__, cmd);
-+ if (x11_refuse_time == 0) {
-+ now = monotime() + 1;
-+ if (UINT_MAX - timeout < now)
-+ x11_refuse_time = UINT_MAX;
-+ else
-+ x11_refuse_time = now + timeout;
-+ channel_set_x11_refuse_time(x11_refuse_time);
- }
-+ if (system(cmd) == 0)
-+ generated = 1;
- }
-
- /*
-@@ -395,9 +414,7 @@ client_x11_get_proto(const char *display
- got_data = 1;
- if (f)
- pclose(f);
-- } else
-- error("Warning: untrusted X11 forwarding setup failed: "
-- "xauth key data not generated");
-+ }
- }
-
- if (do_unlink) {
-@@ -405,6 +422,13 @@ client_x11_get_proto(const char *display
- rmdir(xauthdir);
- }
-
-+ /* Don't fall back to fake X11 data for untrusted forwarding */
-+ if (!trusted && !got_data) {
-+ error("Warning: untrusted X11 forwarding setup failed: "
-+ "xauth key data not generated");
-+ return -1;
-+ }
-+
- /*
- * If we didn't get authentication data, just make up some
- * data. The forwarding code will check the validity of the
-@@ -427,6 +451,8 @@ client_x11_get_proto(const char *display
- rnd >>= 8;
- }
- }
-+
-+ return 0;
- }
-
- /*
-Index: openssh-7.1p2/clientloop.h
-===================================================================
---- openssh-7.1p2.orig/clientloop.h
-+++ openssh-7.1p2/clientloop.h
-@@ -1,4 +1,4 @@
--/* $OpenBSD: clientloop.h,v 1.31 2013/06/02 23:36:29 dtucker Exp $ */
-+/* $OpenBSD: clientloop.h,v 1.32 2016/01/13 23:04:47 djm Exp $ */
-
- /*
- * Author: Tatu Ylonen <ylo@cs.hut.fi>
-@@ -39,7 +39,7 @@
-
- /* Client side main loop for the interactive session. */
- int client_loop(int, int, int);
--void client_x11_get_proto(const char *, const char *, u_int, u_int,
-+int client_x11_get_proto(const char *, const char *, u_int, u_int,
- char **, char **);
- void client_global_request_reply_fwd(int, u_int32_t, void *);
- void client_session2_setup(int, int, int, const char *, struct termios *,
-Index: openssh-7.1p2/mux.c
-===================================================================
---- openssh-7.1p2.orig/mux.c
-+++ openssh-7.1p2/mux.c
-@@ -1,4 +1,4 @@
--/* $OpenBSD: mux.c,v 1.54 2015/08/19 23:18:26 djm Exp $ */
-+/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */
- /*
- * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
- *
-@@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success,
- char *proto, *data;
-
- /* Get reasonable local authentication information. */
-- client_x11_get_proto(display, options.xauth_location,
-+ if (client_x11_get_proto(display, options.xauth_location,
- options.forward_x11_trusted, options.forward_x11_timeout,
-- &proto, &data);
-- /* Request forwarding with authentication spoofing. */
-- debug("Requesting X11 forwarding with authentication "
-- "spoofing.");
-- x11_request_forwarding_with_spoofing(id, display, proto,
-- data, 1);
-- client_expect_confirm(id, "X11 forwarding", CONFIRM_WARN);
-- /* XXX exit_on_forward_failure */
-+ &proto, &data) == 0) {
-+ /* Request forwarding with authentication spoofing. */
-+ debug("Requesting X11 forwarding with authentication "
-+ "spoofing.");
-+ x11_request_forwarding_with_spoofing(id, display, proto,
-+ data, 1);
-+ /* XXX exit_on_forward_failure */
-+ client_expect_confirm(id, "X11 forwarding",
-+ CONFIRM_WARN);
-+ }
- }
-
- if (cctx->want_agent_fwd && options.forward_agent) {
-Index: openssh-7.1p2/ssh.c
-===================================================================
---- openssh-7.1p2.orig/ssh.c
-+++ openssh-7.1p2/ssh.c
-@@ -1,4 +1,4 @@
--/* $OpenBSD: ssh.c,v 1.420 2015/07/30 00:01:34 djm Exp $ */
-+/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */
- /*
- * Author: Tatu Ylonen <ylo@cs.hut.fi>
- * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
-@@ -1604,6 +1604,7 @@ ssh_session(void)
- struct winsize ws;
- char *cp;
- const char *display;
-+ char *proto = NULL, *data = NULL;
-
- /* Enable compression if requested. */
- if (options.compression) {
-@@ -1674,13 +1675,9 @@ ssh_session(void)
- display = getenv("DISPLAY");
- if (display == NULL && options.forward_x11)
- debug("X11 forwarding requested but DISPLAY not set");
-- if (options.forward_x11 && display != NULL) {
-- char *proto, *data;
-- /* Get reasonable local authentication information. */
-- client_x11_get_proto(display, options.xauth_location,
-- options.forward_x11_trusted,
-- options.forward_x11_timeout,
-- &proto, &data);
-+ if (options.forward_x11 && client_x11_get_proto(display,
-+ options.xauth_location, options.forward_x11_trusted,
-+ options.forward_x11_timeout, &proto, &data) == 0) {
- /* Request forwarding with authentication spoofing. */
- debug("Requesting X11 forwarding with authentication "
- "spoofing.");
-@@ -1770,6 +1767,7 @@ ssh_session2_setup(int id, int success,
- extern char **environ;
- const char *display;
- int interactive = tty_flag;
-+ char *proto = NULL, *data = NULL;
-
- if (!success)
- return; /* No need for error message, channels code sens one */
-@@ -1777,12 +1775,9 @@ ssh_session2_setup(int id, int success,
- display = getenv("DISPLAY");
- if (display == NULL && options.forward_x11)
- debug("X11 forwarding requested but DISPLAY not set");
-- if (options.forward_x11 && display != NULL) {
-- char *proto, *data;
-- /* Get reasonable local authentication information. */
-- client_x11_get_proto(display, options.xauth_location,
-- options.forward_x11_trusted,
-- options.forward_x11_timeout, &proto, &data);
-+ if (options.forward_x11 && client_x11_get_proto(display,
-+ options.xauth_location, options.forward_x11_trusted,
-+ options.forward_x11_timeout, &proto, &data) == 0) {
- /* Request forwarding with authentication spoofing. */
- debug("Requesting X11 forwarding with authentication "
- "spoofing.");
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_upstream_commit.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_upstream_commit.patch
deleted file mode 100644
index f3d132e43..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_upstream_commit.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From d77148e3a3ef6c29b26ec74331455394581aa257 Mon Sep 17 00:00:00 2001
-From: "djm@openbsd.org" <djm@openbsd.org>
-Date: Sun, 8 Nov 2015 21:59:11 +0000
-Subject: [PATCH] upstream commit
-
-fix OOB read in packet code caused by missing return
- statement found by Ben Hawkes; ok markus@ deraadt@
-
-Upstream-ID: a3e3a85434ebfa0690d4879091959591f30efc62
-
-Upstream-Status: Backport
-CVE: CVE-2016-1907
-
-[YOCTO #8935]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- packet.c | 1 +
- 1 file changed, 1 insertion(+)
-
-Index: openssh-7.1p2/packet.c
-===================================================================
---- openssh-7.1p2.orig/packet.c
-+++ openssh-7.1p2/packet.c
-@@ -1855,6 +1855,7 @@ ssh_packet_process_incoming(struct ssh *
- if (len >= state->packet_discard) {
- if ((r = ssh_packet_stop_discard(ssh)) != 0)
- return r;
-+ return SSH_ERR_CONN_CORRUPT;
- }
- state->packet_discard -= len;
- return 0;
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
new file mode 100644
index 000000000..df64a140d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch
@@ -0,0 +1,99 @@
+From 3328e98bcbf2930cd7eea3e6c92ad5dcbdf4794f Mon Sep 17 00:00:00 2001
+From: Yuanjie Huang <yuanjie.huang@windriver.com>
+Date: Wed, 24 Aug 2016 03:15:43 +0000
+Subject: [PATCH] Fix potential signed overflow in pointer arithmatic
+
+Pointer arithmatic results in implementation defined signed integer
+type, so that 's - src' in strlcpy and others may trigger signed overflow.
+In case of compilation by gcc or clang with -ftrapv option, the overflow
+would lead to program abort.
+
+Upstream-status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608]
+
+Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
+---
+ openbsd-compat/strlcat.c | 8 ++++++--
+ openbsd-compat/strlcpy.c | 8 ++++++--
+ openbsd-compat/strnlen.c | 8 ++++++--
+ 3 files changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c
+index bcc1b61..e758ebf 100644
+--- a/openbsd-compat/strlcat.c
++++ b/openbsd-compat/strlcat.c
+@@ -23,6 +23,7 @@
+
+ #include <sys/types.h>
+ #include <string.h>
++#include <stdint.h>
+
+ /*
+ * Appends src to string dst of size siz (unlike strncat, siz is the
+@@ -55,8 +56,11 @@ strlcat(char *dst, const char *src, size_t siz)
+ s++;
+ }
+ *d = '\0';
+-
+- return(dlen + (s - src)); /* count does not include NUL */
++ /*
++ * Cast pointers to unsigned type before calculation, to avoid signed
++ * overflow when the string ends where the MSB has changed.
++ */
++ return (dlen + ((uintptr_t)s - (uintptr_t)src)); /* count does not include NUL */
+ }
+
+ #endif /* !HAVE_STRLCAT */
+diff --git a/openbsd-compat/strlcpy.c b/openbsd-compat/strlcpy.c
+index b4b1b60..b06f374 100644
+--- a/openbsd-compat/strlcpy.c
++++ b/openbsd-compat/strlcpy.c
+@@ -23,6 +23,7 @@
+
+ #include <sys/types.h>
+ #include <string.h>
++#include <stdint.h>
+
+ /*
+ * Copy src to string dst of size siz. At most siz-1 characters
+@@ -51,8 +52,11 @@ strlcpy(char *dst, const char *src, size_t siz)
+ while (*s++)
+ ;
+ }
+-
+- return(s - src - 1); /* count does not include NUL */
++ /*
++ * Cast pointers to unsigned type before calculation, to avoid signed
++ * overflow when the string ends where the MSB has changed.
++ */
++ return ((uintptr_t)s - (uintptr_t)src - 1); /* count does not include NUL */
+ }
+
+ #endif /* !HAVE_STRLCPY */
+diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c
+index 93d5155..9b8de5d 100644
+--- a/openbsd-compat/strnlen.c
++++ b/openbsd-compat/strnlen.c
+@@ -23,6 +23,7 @@
+ #include <sys/types.h>
+
+ #include <string.h>
++#include <stdint.h>
+
+ size_t
+ strnlen(const char *str, size_t maxlen)
+@@ -31,7 +32,10 @@ strnlen(const char *str, size_t maxlen)
+
+ for (cp = str; maxlen != 0 && *cp != '\0'; cp++, maxlen--)
+ ;
+-
+- return (size_t)(cp - str);
++ /*
++ * Cast pointers to unsigned type before calculation, to avoid signed
++ * overflow when the string ends where the MSB has changed.
++ */
++ return (size_t)((uintptr_t)cp - (uintptr_t)str);
+ }
+ #endif
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/init b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/init
index 70d4a3465..1f63725cc 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/init
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/init
@@ -41,7 +41,7 @@ check_privsep_dir() {
}
check_config() {
- /usr/sbin/sshd -t || exit 1
+ /usr/sbin/sshd -t $SSHD_OPTS || exit 1
}
check_keys() {
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch
new file mode 100644
index 000000000..2773c14e5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-cipher.patch
@@ -0,0 +1,118 @@
+From d7eb26785ad4f25fb09fae46726ab8ca3fe16921 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Mon, 22 Aug 2016 14:11:16 +0300
+Subject: [PATCH] Remove des in cipher.
+
+Upstream-Status: Pending
+
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ cipher.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/cipher.c b/cipher.c
+index 031bda9..6cd667a 100644
+--- a/cipher.c
++++ b/cipher.c
+@@ -53,8 +53,10 @@
+
+ #ifdef WITH_SSH1
+ extern const EVP_CIPHER *evp_ssh1_bf(void);
++#ifndef OPENSSL_NO_DES
+ extern const EVP_CIPHER *evp_ssh1_3des(void);
+ extern int ssh1_3des_iv(EVP_CIPHER_CTX *, int, u_char *, int);
++#endif /* OPENSSL_NO_DES */
+ #endif
+
+ struct sshcipher {
+@@ -79,15 +81,19 @@ struct sshcipher {
+
+ static const struct sshcipher ciphers[] = {
+ #ifdef WITH_SSH1
++#ifndef OPENSSL_NO_DES
+ { "des", SSH_CIPHER_DES, 8, 8, 0, 0, 0, 1, EVP_des_cbc },
+ { "3des", SSH_CIPHER_3DES, 8, 16, 0, 0, 0, 1, evp_ssh1_3des },
++#endif /* OPENSSL_NO_DES */
+ # ifndef OPENSSL_NO_BF
+ { "blowfish", SSH_CIPHER_BLOWFISH, 8, 32, 0, 0, 0, 1, evp_ssh1_bf },
+ # endif /* OPENSSL_NO_BF */
+ #endif /* WITH_SSH1 */
+ #ifdef WITH_OPENSSL
+ { "none", SSH_CIPHER_NONE, 8, 0, 0, 0, 0, 0, EVP_enc_null },
++#ifndef OPENSSL_NO_DES
+ { "3des-cbc", SSH_CIPHER_SSH2, 8, 24, 0, 0, 0, 1, EVP_des_ede3_cbc },
++#endif /* OPENSSL_NO_DES */
+ # ifndef OPENSSL_NO_BF
+ { "blowfish-cbc",
+ SSH_CIPHER_SSH2, 8, 16, 0, 0, 0, 1, EVP_bf_cbc },
+@@ -171,8 +177,10 @@ cipher_keylen(const struct sshcipher *c)
+ u_int
+ cipher_seclen(const struct sshcipher *c)
+ {
++#ifndef OPENSSL_NO_DES
+ if (strcmp("3des-cbc", c->name) == 0)
+ return 14;
++#endif /* OPENSSL_NO_DES */
+ return cipher_keylen(c);
+ }
+
+@@ -209,11 +217,13 @@ u_int
+ cipher_mask_ssh1(int client)
+ {
+ u_int mask = 0;
++#ifndef OPENSSL_NO_DES
+ mask |= 1 << SSH_CIPHER_3DES; /* Mandatory */
+ mask |= 1 << SSH_CIPHER_BLOWFISH;
+ if (client) {
+ mask |= 1 << SSH_CIPHER_DES;
+ }
++#endif /*OPENSSL_NO_DES*/
+ return mask;
+ }
+
+@@ -553,7 +563,9 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
+ switch (c->number) {
+ #ifdef WITH_OPENSSL
+ case SSH_CIPHER_SSH2:
++#ifndef OPENSSL_NO_DES
+ case SSH_CIPHER_DES:
++#endif /* OPENSSL_NO_DES */
+ case SSH_CIPHER_BLOWFISH:
+ evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
+ if (evplen == 0)
+@@ -576,8 +588,10 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
+ break;
+ #endif
+ #ifdef WITH_SSH1
++#ifndef OPENSSL_NO_DES
+ case SSH_CIPHER_3DES:
+ return ssh1_3des_iv(&cc->evp, 0, iv, 24);
++#endif /* OPENSSL_NO_DES */
+ #endif
+ default:
+ return SSH_ERR_INVALID_ARGUMENT;
+@@ -601,7 +615,9 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
+ switch (c->number) {
+ #ifdef WITH_OPENSSL
+ case SSH_CIPHER_SSH2:
++#ifndef OPENSSL_NO_DES
+ case SSH_CIPHER_DES:
++#endif /* OPENSSL_NO_DES */
+ case SSH_CIPHER_BLOWFISH:
+ evplen = EVP_CIPHER_CTX_iv_length(&cc->evp);
+ if (evplen <= 0)
+@@ -616,8 +632,10 @@ cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
+ break;
+ #endif
+ #ifdef WITH_SSH1
++#ifndef OPENSSL_NO_DES
+ case SSH_CIPHER_3DES:
+ return ssh1_3des_iv(&cc->evp, 1, (u_char *)iv, 24);
++#endif /* OPENSSL_NO_DES */
+ #endif
+ default:
+ return SSH_ERR_INVALID_ARGUMENT;
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch
new file mode 100644
index 000000000..815af422f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh/openssh-7.1p1-conditional-compile-des-in-pkcs11.patch
@@ -0,0 +1,70 @@
+From 04cfd84423f693d879dc3ffebb0f6fe2680c254f Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Fri, 18 Mar 2016 15:59:21 +0800
+Subject: [PATCH 3/3] remove des in pkcs11.
+
+Upstream-Status: Pending
+
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+
+---
+ pkcs11.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/pkcs11.h b/pkcs11.h
+index b01d58f..98b36e6 100644
+--- a/pkcs11.h
++++ b/pkcs11.h
+@@ -342,9 +342,11 @@ typedef unsigned long ck_key_type_t;
+ #define CKK_GENERIC_SECRET (0x10)
+ #define CKK_RC2 (0x11)
+ #define CKK_RC4 (0x12)
++#ifndef OPENSSL_NO_DES
+ #define CKK_DES (0x13)
+ #define CKK_DES2 (0x14)
+ #define CKK_DES3 (0x15)
++#endif /* OPENSSL_NO_DES */
+ #define CKK_CAST (0x16)
+ #define CKK_CAST3 (0x17)
+ #define CKK_CAST128 (0x18)
+@@ -512,6 +514,7 @@ typedef unsigned long ck_mechanism_type_t;
+ #define CKM_RC2_CBC_PAD (0x105)
+ #define CKM_RC4_KEY_GEN (0x110)
+ #define CKM_RC4 (0x111)
++#ifndef OPENSSL_NO_DES
+ #define CKM_DES_KEY_GEN (0x120)
+ #define CKM_DES_ECB (0x121)
+ #define CKM_DES_CBC (0x122)
+@@ -525,6 +528,7 @@ typedef unsigned long ck_mechanism_type_t;
+ #define CKM_DES3_MAC (0x134)
+ #define CKM_DES3_MAC_GENERAL (0x135)
+ #define CKM_DES3_CBC_PAD (0x136)
++#endif /* OPENSSL_NO_DES */
+ #define CKM_CDMF_KEY_GEN (0x140)
+ #define CKM_CDMF_ECB (0x141)
+ #define CKM_CDMF_CBC (0x142)
+@@ -610,8 +614,10 @@ typedef unsigned long ck_mechanism_type_t;
+ #define CKM_MD5_KEY_DERIVATION (0x390)
+ #define CKM_MD2_KEY_DERIVATION (0x391)
+ #define CKM_SHA1_KEY_DERIVATION (0x392)
++#ifndef OPENSSL_NO_DES
+ #define CKM_PBE_MD2_DES_CBC (0x3a0)
+ #define CKM_PBE_MD5_DES_CBC (0x3a1)
++#endif /* OPENSSL_NO_DES */
+ #define CKM_PBE_MD5_CAST_CBC (0x3a2)
+ #define CKM_PBE_MD5_CAST3_CBC (0x3a3)
+ #define CKM_PBE_MD5_CAST5_CBC (0x3a4)
+@@ -620,8 +626,10 @@ typedef unsigned long ck_mechanism_type_t;
+ #define CKM_PBE_SHA1_CAST128_CBC (0x3a5)
+ #define CKM_PBE_SHA1_RC4_128 (0x3a6)
+ #define CKM_PBE_SHA1_RC4_40 (0x3a7)
++#ifndef OPENSSL_NO_DES
+ #define CKM_PBE_SHA1_DES3_EDE_CBC (0x3a8)
+ #define CKM_PBE_SHA1_DES2_EDE_CBC (0x3a9)
++#endif /* OPENSSL_NO_DES */
+ #define CKM_PBE_SHA1_RC2_128_CBC (0x3aa)
+ #define CKM_PBE_SHA1_RC2_40_CBC (0x3ab)
+ #define CKM_PKCS5_PBKD2 (0x3b0)
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.1p2.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.1p2.bb
deleted file mode 100644
index 3b5e28a1d..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.1p2.bb
+++ /dev/null
@@ -1,161 +0,0 @@
-SUMMARY = "Secure rlogin/rsh/rcp/telnet replacement"
-DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
-Ssh (Secure Shell) is a program for logging into a remote machine \
-and for executing commands on a remote machine."
-HOMEPAGE = "http://openssh.org"
-SECTION = "console/network"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=e326045657e842541d3f35aada442507"
-
-DEPENDS = "zlib openssl"
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
- file://sshd_config \
- file://ssh_config \
- file://init \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://sshd.socket \
- file://sshd@.service \
- file://sshdgenkeys.service \
- file://volatiles.99_sshd \
- file://add-test-support-for-busybox.patch \
- file://run-ptest \
- file://CVE-2016-1907_upstream_commit.patch \
- file://CVE-2016-1907_2.patch \
- file://CVE-2016-1907_3.patch "
-
-PAM_SRC_URI = "file://sshd"
-
-SRC_URI[md5sum] = "4d8547670e2a220d5ef805ad9e47acf2"
-SRC_URI[sha256sum] = "dd75f024dcf21e06a0d6421d582690bf987a1f6323e32ad6619392f3bfde6bbd"
-
-inherit useradd update-rc.d update-alternatives systemd
-
-USERADD_PACKAGES = "${PN}-sshd"
-USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
-INITSCRIPT_PACKAGES = "${PN}-sshd"
-INITSCRIPT_NAME_${PN}-sshd = "sshd"
-INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
-
-SYSTEMD_PACKAGES = "${PN}-sshd"
-SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
-
-inherit autotools-brokensep ptest
-
-# LFS support:
-CFLAGS += "-D__FILE_OFFSET_BITS=64"
-
-# login path is hardcoded in sshd
-EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
- --without-zlib-version-check \
- --with-privsep-path=/var/run/sshd \
- --sysconfdir=${sysconfdir}/ssh \
- --with-xauth=/usr/bin/xauth \
- --disable-strip \
- "
-
-# Since we do not depend on libbsd, we do not want configure to use it
-# just because it finds libutil.h. But, specifying --disable-libutil
-# causes compile errors, so...
-CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
-
-# passwd path is hardcoded in sshd
-CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
-
-# We don't want to depend on libblockfile
-CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no"
-
-# This is a workaround for uclibc because including stdio.h
-# pulls in pthreads.h and causes conflicts in function prototypes.
-# This results in compilation failure, so unless this is fixed,
-# disable pam for uclibc.
-EXTRA_OECONF_append_libc-uclibc=" --without-pam"
-
-do_configure_prepend () {
- export LD="${CC}"
- install -m 0644 ${WORKDIR}/sshd_config ${B}/
- install -m 0644 ${WORKDIR}/ssh_config ${B}/
- if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
- cp aclocal.m4 acinclude.m4
- fi
-}
-
-do_compile_ptest() {
- # skip regress/unittests/ binaries: this will silently skip
- # unittests in run-ptests which is good because they are so slow.
- oe_runmake regress/modpipe regress/setuid-allowed regress/netcat
-}
-
-do_install_append () {
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
- install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
- sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
- fi
-
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
- sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
- fi
-
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
- rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
- rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
- install -d ${D}/${sysconfdir}/default/volatiles
- install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
- install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
-
- # Create config files for read-only rootfs
- install -d ${D}${sysconfdir}/ssh
- install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
- sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
- echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
-
- install -d ${D}${systemd_unitdir}/system
- install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
- install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
- install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SBINDIR@,${sbindir},g' \
- -e 's,@BINDIR@,${bindir},g' \
- ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
-}
-
-do_install_ptest () {
- sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
- cp -r regress ${D}${PTEST_PATH}
-}
-
-ALLOW_EMPTY_${PN} = "1"
-
-PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
-FILES_${PN}-scp = "${bindir}/scp.${BPN}"
-FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
-FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
-FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
-FILES_${PN}-sftp = "${bindir}/sftp"
-FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
-FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
-FILES_${PN}-keygen = "${bindir}/ssh-keygen"
-
-RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
-RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
-RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
-
-RPROVIDES_${PN}-ssh = "ssh"
-RPROVIDES_${PN}-sshd = "sshd"
-
-RCONFLICTS_${PN} = "dropbear"
-RCONFLICTS_${PN}-sshd = "dropbear"
-RCONFLICTS_${PN}-keygen = "ssh-keygen"
-
-CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
-CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
-
-ALTERNATIVE_PRIORITY = "90"
-ALTERNATIVE_${PN}-scp = "scp"
-ALTERNATIVE_${PN}-ssh = "ssh"
-
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.3p1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.3p1.bb
new file mode 100644
index 000000000..039b0ffdd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.3p1.bb
@@ -0,0 +1,164 @@
+SUMMARY = "A suite of security-related network utilities based on \
+the SSH protocol including the ssh client and sshd server"
+DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
+Ssh (Secure Shell) is a program for logging into a remote machine \
+and for executing commands on a remote machine."
+HOMEPAGE = "http://www.openssh.com/"
+SECTION = "console/network"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=e326045657e842541d3f35aada442507"
+
+DEPENDS = "zlib openssl"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
+ file://sshd_config \
+ file://ssh_config \
+ file://init \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://sshd.socket \
+ file://sshd@.service \
+ file://sshdgenkeys.service \
+ file://volatiles.99_sshd \
+ file://add-test-support-for-busybox.patch \
+ file://run-ptest \
+ file://openssh-7.1p1-conditional-compile-des-in-cipher.patch \
+ file://openssh-7.1p1-conditional-compile-des-in-pkcs11.patch \
+ file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
+ "
+
+PAM_SRC_URI = "file://sshd"
+
+SRC_URI[md5sum] = "dfadd9f035d38ce5d58a3bf130b86d08"
+SRC_URI[sha256sum] = "3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc"
+
+inherit useradd update-rc.d update-alternatives systemd
+
+USERADD_PACKAGES = "${PN}-sshd"
+USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
+INITSCRIPT_PACKAGES = "${PN}-sshd"
+INITSCRIPT_NAME_${PN}-sshd = "sshd"
+INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9"
+
+SYSTEMD_PACKAGES = "${PN}-sshd"
+SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
+
+inherit autotools-brokensep ptest
+
+# LFS support:
+CFLAGS += "-D__FILE_OFFSET_BITS=64"
+
+# login path is hardcoded in sshd
+EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+ --without-zlib-version-check \
+ --with-privsep-path=/var/run/sshd \
+ --sysconfdir=${sysconfdir}/ssh \
+ --with-xauth=/usr/bin/xauth \
+ --disable-strip \
+ "
+
+# Since we do not depend on libbsd, we do not want configure to use it
+# just because it finds libutil.h. But, specifying --disable-libutil
+# causes compile errors, so...
+CACHED_CONFIGUREVARS += "ac_cv_header_bsd_libutil_h=no ac_cv_header_libutil_h=no"
+
+# passwd path is hardcoded in sshd
+CACHED_CONFIGUREVARS += "ac_cv_path_PATH_PASSWD_PROG=${bindir}/passwd"
+
+# We don't want to depend on libblockfile
+CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no"
+
+# This is a workaround for uclibc because including stdio.h
+# pulls in pthreads.h and causes conflicts in function prototypes.
+# This results in compilation failure, so unless this is fixed,
+# disable pam for uclibc.
+EXTRA_OECONF_append_libc-uclibc=" --without-pam"
+
+do_configure_prepend () {
+ export LD="${CC}"
+ install -m 0644 ${WORKDIR}/sshd_config ${B}/
+ install -m 0644 ${WORKDIR}/ssh_config ${B}/
+ if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
+ cp aclocal.m4 acinclude.m4
+ fi
+}
+
+do_compile_ptest() {
+ # skip regress/unittests/ binaries: this will silently skip
+ # unittests in run-ptests which is good because they are so slow.
+ oe_runmake regress/modpipe regress/setuid-allowed regress/netcat
+}
+
+do_install_append () {
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
+ sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
+ fi
+
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
+ sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
+ fi
+
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
+ rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
+ rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir}
+ install -d ${D}/${sysconfdir}/default/volatiles
+ install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd
+ install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir}
+
+ # Create config files for read-only rootfs
+ install -d ${D}${sysconfdir}/ssh
+ install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly
+ sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_dsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+ echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly
+
+ install -d ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_unitdir}/system
+ install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@BINDIR@,${bindir},g' \
+ ${D}${systemd_unitdir}/system/sshd.socket ${D}${systemd_unitdir}/system/*.service
+}
+
+do_install_ptest () {
+ sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
+ cp -r regress ${D}${PTEST_PATH}
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
+FILES_${PN}-scp = "${bindir}/scp.${BPN}"
+FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
+FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_unitdir}/system"
+FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
+FILES_${PN}-sftp = "${bindir}/sftp"
+FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
+FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
+FILES_${PN}-keygen = "${bindir}/ssh-keygen"
+
+RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
+RDEPENDS_${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}"
+RDEPENDS_${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make"
+
+RPROVIDES_${PN}-ssh = "ssh"
+RPROVIDES_${PN}-sshd = "sshd"
+
+RCONFLICTS_${PN} = "dropbear"
+RCONFLICTS_${PN}-sshd = "dropbear"
+RCONFLICTS_${PN}-keygen = "ssh-keygen"
+
+CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
+CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
+
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE_${PN}-scp = "scp"
+ALTERNATIVE_${PN}-ssh = "ssh"
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl.inc b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl.inc
index a5ddf4d4b..f3a2c5abd 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl.inc
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl.inc
@@ -8,7 +8,7 @@ SECTION = "libs/network"
LICENSE = "openssl"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
-DEPENDS = "hostperl-runtime-native"
+DEPENDS = "makedepend-native hostperl-runtime-native"
DEPENDS_append_class-target = " openssl-native"
SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
@@ -36,15 +36,15 @@ PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"
FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
FILES_libssl = "${libdir}/libssl${SOLIBS}"
FILES_${PN} =+ " ${libdir}/ssl/*"
-FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash"
+FILES_${PN}-misc = "${libdir}/ssl/misc"
RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}"
# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
# package RRECOMMENDS on this package. This will enable the configuration
# file to be installed for both the base openssl package and the libcrypto
# package since the base openssl package depends on the libcrypto package.
-FILES_openssl-conf = "${libdir}/ssl/openssl.cnf"
-CONFFILES_openssl-conf = "${libdir}/ssl/openssl.cnf"
+FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
+CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
RRECOMMENDS_libcrypto += "openssl-conf"
RDEPENDS_${PN}-ptest += "${PN}-misc make perl perl-module-filehandle bc"
@@ -114,7 +114,10 @@ do_configure () {
target=debian-mipsel
;;
linux-*-mips64 | linux-mips64)
- target=linux-mips
+ target=debian-mips64
+ ;;
+ linux-*-mips64el | linux-mips64el)
+ target=debian-mips64el
;;
linux-microblaze*|linux-nios2*)
target=linux-generic32
@@ -149,10 +152,14 @@ do_compile_prepend_class-target () {
}
do_compile () {
+ oe_runmake depend
oe_runmake
}
do_compile_ptest () {
+ # build dependencies for test directory too
+ export DIRS="$DIRS test"
+ oe_runmake depend
oe_runmake buildtest
}
@@ -168,36 +175,60 @@ do_install () {
install -d ${D}${includedir}
cp --dereference -R include/openssl ${D}${includedir}
+ install -Dm 0755 ${WORKDIR}/openssl-c_rehash.sh ${D}${bindir}/c_rehash
+ sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash
+
oe_multilib_header openssl/opensslconf.h
if [ "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}" = "perl" ]; then
- install -m 0755 ${S}/tools/c_rehash ${D}${bindir}
- sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${bindir}/c_rehash
sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/CA.pl
sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${libdir}/ssl/misc/tsget
- # The c_rehash utility isn't installed by the normal installation process.
else
- rm -f ${D}${bindir}/c_rehash
rm -f ${D}${libdir}/ssl/misc/CA.pl ${D}${libdir}/ssl/misc/tsget
fi
+
+ # Create SSL structure
+ install -d ${D}${sysconfdir}/ssl/
+ mv ${D}${libdir}/ssl/openssl.cnf \
+ ${D}${libdir}/ssl/certs \
+ ${D}${libdir}/ssl/private \
+ \
+ ${D}${sysconfdir}/ssl/
+ ln -sf ${sysconfdir}/ssl/certs ${D}${libdir}/ssl/certs
+ ln -sf ${sysconfdir}/ssl/private ${D}${libdir}/ssl/private
+ ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${libdir}/ssl/openssl.cnf
}
do_install_ptest () {
cp -r -L Makefile.org Makefile test ${D}${PTEST_PATH}
cp Configure config e_os.h ${D}${PTEST_PATH}
cp -r -L include ${D}${PTEST_PATH}
- ln -sf ${base_libdir}/libcrypto.a ${D}${PTEST_PATH}
+ ln -sf ${libdir}/libcrypto.a ${D}${PTEST_PATH}
ln -sf ${libdir}/libssl.a ${D}${PTEST_PATH}
mkdir -p ${D}${PTEST_PATH}/crypto
cp crypto/constant_time_locl.h ${D}${PTEST_PATH}/crypto
cp -r certs ${D}${PTEST_PATH}
mkdir -p ${D}${PTEST_PATH}/apps
ln -sf ${libdir}/ssl/misc/CA.sh ${D}${PTEST_PATH}/apps
- ln -sf ${libdir}/ssl/openssl.cnf ${D}${PTEST_PATH}/apps
+ ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${PTEST_PATH}/apps
ln -sf ${bindir}/openssl ${D}${PTEST_PATH}/apps
+ cp apps/server.pem ${D}${PTEST_PATH}/apps
cp apps/server2.pem ${D}${PTEST_PATH}/apps
mkdir -p ${D}${PTEST_PATH}/util
install util/opensslwrap.sh ${D}${PTEST_PATH}/util
install util/shlib_wrap.sh ${D}${PTEST_PATH}/util
+ # Time stamps are relevant for "make alltests", otherwise
+ # make may try to recompile binaries. Not only must the
+ # binary files be newer than the sources, they also must
+ # be more recent than the header files in /usr/include.
+ #
+ # Using "cp -a" is not sufficient, because do_install
+ # does not preserve the original time stamps.
+ #
+ # So instead of using the original file stamps, we set
+ # the current time for all files. Binaries will get
+ # modified again later when stripping them, but that's okay.
+ touch ${D}${PTEST_PATH}
+ find ${D}${PTEST_PATH} -type f -print0 | xargs --verbose -0 touch -r ${D}${PTEST_PATH}
}
do_install_append_class-native() {
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch
deleted file mode 100644
index af3989f62..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Backport
-
-When building on x32 systems where the default type is 32bit, make sure
-we can transparently represent 64bit integers. Otherwise we end up with
-build errors like:
-/usr/bin/perl asm/ghash-x86_64.pl elf > ghash-x86_64.s
-Integer overflow in hexadecimal number at asm/../../perlasm/x86_64-xlate.pl line 201, <> line 890.
-...
-ghash-x86_64.s: Assembler messages:
-ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression
-
-We don't enable this globally as there are some cases where we'd get
-32bit values interpreted as unsigned when we need them as signed.
-
-Reported-by: Bertrand Jacquin <bertrand@jacquin.bzh>
-URL: https://bugs.gentoo.org/542618
-
-Signed-off-By: Armin Kuster <akuster@mvista.com>
-
-Index: openssl-1.0.2a/crypto/perlasm/x86_64-xlate.pl
-===================================================================
---- openssl-1.0.2a.orig/crypto/perlasm/x86_64-xlate.pl
-+++ openssl-1.0.2a/crypto/perlasm/x86_64-xlate.pl
-@@ -194,7 +194,10 @@ my %globals;
- }
- sub out {
- my $self = shift;
--
-+ # When building on x32 ABIs, the expanded hex value might be too
-+ # big to fit into 32bits. Enable transparent 64bit support here
-+ # so we can safely print it out.
-+ use bigint;
- if ($gas) {
- # Solaris /usr/ccs/bin/as can't handle multiplications
- # in $self->{value}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian/ca.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian/ca.patch
index aba4d4298..fb745e439 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian/ca.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian/ca.patch
@@ -7,7 +7,7 @@ Index: openssl-0.9.8m/apps/CA.pl.in
@@ -65,6 +65,7 @@
foreach (@ARGV) {
if ( /^(-\?|-h|-help)$/ ) {
- print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
+ print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-signcert|-verify\n";
+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
exit 0;
} elsif (/^-newcert$/) {
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch
index 06d1ea69d..2a318a458 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/fix-cipher-des-ede3-cfb1.patch
@@ -4,7 +4,7 @@ This patch adds the fix for one of the ciphers used in openssl, namely
the cipher des-ede3-cfb1. Complete bug log and patch is present here:
http://rt.openssl.org/Ticket/Display.html?id=2867
-Signed-Off-By: Muhammad Shakeel <muhammad_shakeel@mentor.com>
+Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Index: openssl-1.0.2/crypto/evp/e_des3.c
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
index cebc8cf0d..f736e5c09 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
@@ -8,16 +8,16 @@ http://www.mail-archive.com/openssl-dev@openssl.org/msg32860.html
Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
---
-Index: openssl-1.0.2/crypto/evp/digest.c
+Index: openssl-1.0.2h/crypto/evp/digest.c
===================================================================
---- openssl-1.0.2.orig/crypto/evp/digest.c
-+++ openssl-1.0.2/crypto/evp/digest.c
-@@ -208,7 +208,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, c
- return 0;
+--- openssl-1.0.2h.orig/crypto/evp/digest.c
++++ openssl-1.0.2h/crypto/evp/digest.c
+@@ -211,7 +211,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, c
+ type = ctx->digest;
}
#endif
- if (ctx->digest != type) {
+ if (type && (ctx->digest != type)) {
- if (ctx->digest && ctx->digest->ctx_size)
+ if (ctx->digest && ctx->digest->ctx_size) {
OPENSSL_free(ctx->md_data);
- ctx->digest = type;
+ ctx->md_data = NULL;
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh
new file mode 100644
index 000000000..f67f41554
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh
@@ -0,0 +1,210 @@
+#!/bin/sh
+#
+# Ben Secrest <blsecres@gmail.com>
+#
+# sh c_rehash script, scan all files in a directory
+# and add symbolic links to their hash values.
+#
+# based on the c_rehash perl script distributed with openssl
+#
+# LICENSE: See OpenSSL license
+# ^^acceptable?^^
+#
+
+# default certificate location
+DIR=/etc/openssl
+
+# for filetype bitfield
+IS_CERT=$(( 1 << 0 ))
+IS_CRL=$(( 1 << 1 ))
+
+
+# check to see if a file is a certificate file or a CRL file
+# arguments:
+# 1. the filename to be scanned
+# returns:
+# bitfield of file type; uses ${IS_CERT} and ${IS_CRL}
+#
+check_file()
+{
+ local IS_TYPE=0
+
+ # make IFS a newline so we can process grep output line by line
+ local OLDIFS=${IFS}
+ IFS=$( printf "\n" )
+
+ # XXX: could be more efficient to have two 'grep -m' but is -m portable?
+ for LINE in $( grep '^-----BEGIN .*-----' ${1} )
+ do
+ if echo ${LINE} \
+ | grep -q -E '^-----BEGIN (X509 |TRUSTED )?CERTIFICATE-----'
+ then
+ IS_TYPE=$(( ${IS_TYPE} | ${IS_CERT} ))
+
+ if [ $(( ${IS_TYPE} & ${IS_CRL} )) -ne 0 ]
+ then
+ break
+ fi
+ elif echo ${LINE} | grep -q '^-----BEGIN X509 CRL-----'
+ then
+ IS_TYPE=$(( ${IS_TYPE} | ${IS_CRL} ))
+
+ if [ $(( ${IS_TYPE} & ${IS_CERT} )) -ne 0 ]
+ then
+ break
+ fi
+ fi
+ done
+
+ # restore IFS
+ IFS=${OLDIFS}
+
+ return ${IS_TYPE}
+}
+
+
+#
+# use openssl to fingerprint a file
+# arguments:
+# 1. the filename to fingerprint
+# 2. the method to use (x509, crl)
+# returns:
+# none
+# assumptions:
+# user will capture output from last stage of pipeline
+#
+fingerprint()
+{
+ ${SSL_CMD} ${2} -fingerprint -noout -in ${1} | sed 's/^.*=//' | tr -d ':'
+}
+
+
+#
+# link_hash - create links to certificate files
+# arguments:
+# 1. the filename to create a link for
+# 2. the type of certificate being linked (x509, crl)
+# returns:
+# 0 on success, 1 otherwise
+#
+link_hash()
+{
+ local FINGERPRINT=$( fingerprint ${1} ${2} )
+ local HASH=$( ${SSL_CMD} ${2} -hash -noout -in ${1} )
+ local SUFFIX=0
+ local LINKFILE=''
+ local TAG=''
+
+ if [ ${2} = "crl" ]
+ then
+ TAG='r'
+ fi
+
+ LINKFILE=${HASH}.${TAG}${SUFFIX}
+
+ while [ -f ${LINKFILE} ]
+ do
+ if [ ${FINGERPRINT} = $( fingerprint ${LINKFILE} ${2} ) ]
+ then
+ echo "NOTE: Skipping duplicate file ${1}" >&2
+ return 1
+ fi
+
+ SUFFIX=$(( ${SUFFIX} + 1 ))
+ LINKFILE=${HASH}.${TAG}${SUFFIX}
+ done
+
+ echo "${1} => ${LINKFILE}"
+
+ # assume any system with a POSIX shell will either support symlinks or
+ # do something to handle this gracefully
+ ln -s ${1} ${LINKFILE}
+
+ return 0
+}
+
+
+# hash_dir create hash links in a given directory
+hash_dir()
+{
+ echo "Doing ${1}"
+
+ cd ${1}
+
+ ls -1 * 2>/dev/null | while read FILE
+ do
+ if echo ${FILE} | grep -q -E '^[[:xdigit:]]{8}\.r?[[:digit:]]+$' \
+ && [ -h "${FILE}" ]
+ then
+ rm ${FILE}
+ fi
+ done
+
+ ls -1 *.pem *.cer *.crt *.crl 2>/dev/null | while read FILE
+ do
+ check_file ${FILE}
+ local FILE_TYPE=${?}
+ local TYPE_STR=''
+
+ if [ $(( ${FILE_TYPE} & ${IS_CERT} )) -ne 0 ]
+ then
+ TYPE_STR='x509'
+ elif [ $(( ${FILE_TYPE} & ${IS_CRL} )) -ne 0 ]
+ then
+ TYPE_STR='crl'
+ else
+ echo "NOTE: ${FILE} does not contain a certificate or CRL: skipping" >&2
+ continue
+ fi
+
+ link_hash ${FILE} ${TYPE_STR}
+ done
+}
+
+
+# choose the name of an ssl application
+if [ -n "${OPENSSL}" ]
+then
+ SSL_CMD=$(which ${OPENSSL} 2>/dev/null)
+else
+ SSL_CMD=/usr/bin/openssl
+ OPENSSL=${SSL_CMD}
+ export OPENSSL
+fi
+
+# fix paths
+PATH=${PATH}:${DIR}/bin
+export PATH
+
+# confirm existance/executability of ssl command
+if ! [ -x ${SSL_CMD} ]
+then
+ echo "${0}: rehashing skipped ('openssl' program not available)" >&2
+ exit 0
+fi
+
+# determine which directories to process
+old_IFS=$IFS
+if [ ${#} -gt 0 ]
+then
+ IFS=':'
+ DIRLIST=${*}
+elif [ -n "${SSL_CERT_DIR}" ]
+then
+ DIRLIST=$SSL_CERT_DIR
+else
+ DIRLIST=${DIR}/certs
+fi
+
+IFS=':'
+
+# process directories
+for CERT_DIR in ${DIRLIST}
+do
+ if [ -d ${CERT_DIR} -a -w ${CERT_DIR} ]
+ then
+ IFS=$old_IFS
+ hash_dir ${CERT_DIR}
+ IFS=':'
+ fi
+done
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch
new file mode 100644
index 000000000..065b9b122
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl-util-perlpath.pl-cwd.patch
@@ -0,0 +1,34 @@
+From e427748f3bb5d37e78dc8d70a558c373aa8ababb Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 19 Sep 2016 22:06:28 -0700
+Subject: [PATCH] util/perlpath.pl: make it work when cwd is not in @INC
+
+Fixed when building on Debian-testing:
+| Can't locate find.pl in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.2 /usr/local/share/perl/5.22.2 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at perlpath.pl line 7.
+
+The find.pl is added by oe-core, so once openssl/find.pl is removed,
+then this patch can be dropped.
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ util/perlpath.pl | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/util/perlpath.pl b/util/perlpath.pl
+index a1f236b..5599892 100755
+--- a/util/perlpath.pl
++++ b/util/perlpath.pl
+@@ -4,6 +4,8 @@
+ # line in all scripts that rely on perl.
+ #
+
++BEGIN { unshift @INC, "."; }
++
+ require "find.pl";
+
+ $#ARGV == 0 || print STDERR "usage: perlpath newpath (eg /usr/bin)\n";
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch
index cbce32c89..0f08a642f 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/openssl_fix_for_x32.patch
@@ -2,10 +2,10 @@ Upstream-Status: Pending
Received from H J Liu @ Intel
Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/07/13
ported the patch to the 1.0.0e version
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/01
Index: openssl-1.0.2/crypto/bn/bn.h
===================================================================
--- openssl-1.0.2.orig/crypto/bn/bn.h
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/parallel.patch b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/parallel.patch
index b6c2c148b..f3f4c9988 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/parallel.patch
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl/parallel.patch
@@ -6,6 +6,9 @@ https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
+Refreshed for 1.0.2i
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+
--- openssl-1.0.2g/crypto/Makefile
+++ openssl-1.0.2g/crypto/Makefile
@@ -85,11 +85,11 @@
@@ -133,7 +136,7 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
fi; \
--- openssl-1.0.2g/test/Makefile
+++ openssl-1.0.2g/test/Makefile
-@@ -139,7 +139,7 @@
+@@ -144,7 +144,7 @@
tags:
ctags $(SRC)
@@ -142,7 +145,7 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
apps:
@(cd ..; $(MAKE) DIRS=apps all)
-@@ -421,130 +421,130 @@
+@@ -438,136 +438,136 @@
link_app.$${shlib_target}
$(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
@@ -309,13 +312,21 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
- @target=$(CLIENTHELLOTEST) $(BUILD_CMD)
+ +@target=$(CLIENTHELLOTEST) $(BUILD_CMD)
+ $(BADDTLSTEST)$(EXE_EXT): $(BADDTLSTEST).o
+- @target=$(BADDTLSTEST) $(BUILD_CMD)
++ +@target=$(BADDTLSTEST) $(BUILD_CMD)
+
$(SSLV2CONFTEST)$(EXE_EXT): $(SSLV2CONFTEST).o
- @target=$(SSLV2CONFTEST) $(BUILD_CMD)
+ +@target=$(SSLV2CONFTEST) $(BUILD_CMD)
+ $(DTLSTEST)$(EXE_EXT): $(DTLSTEST).o ssltestlib.o $(DLIBSSL) $(DLIBCRYPTO)
+- @target=$(DTLSTEST); exobj=ssltestlib.o; $(BUILD_CMD)
++ +@target=$(DTLSTEST); exobj=ssltestlib.o; $(BUILD_CMD)
+
#$(AESTEST).o: $(AESTEST).c
# $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
-@@ -557,7 +557,7 @@
+@@ -580,6 +580,6 @@
# fi
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2g.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2g.bb
deleted file mode 100644
index 290f129fc..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2g.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-require openssl.inc
-
-# For target side versions of openssl enable support for OCF Linux driver
-# if they are available.
-DEPENDS += "cryptodev-linux"
-
-CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=27ffa5d74bb5a337056c14b2ef93fbf6"
-
-export DIRS = "crypto ssl apps engines"
-export OE_LDFLAGS="${LDFLAGS}"
-
-SRC_URI += "file://find.pl;subdir=${BP}/util/ \
- file://run-ptest \
- file://configure-targets.patch \
- file://shared-libs.patch \
- file://oe-ldflags.patch \
- file://engines-install-in-libdir-ssl.patch \
- file://debian1.0.2/block_diginotar.patch \
- file://debian1.0.2/block_digicert_malaysia.patch \
- file://debian/ca.patch \
- file://debian/c_rehash-compat.patch \
- file://debian/debian-targets.patch \
- file://debian/man-dir.patch \
- file://debian/man-section.patch \
- file://debian/no-rpath.patch \
- file://debian/no-symbolic.patch \
- file://debian/pic.patch \
- file://debian1.0.2/version-script.patch \
- file://openssl_fix_for_x32.patch \
- file://fix-cipher-des-ede3-cfb1.patch \
- file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \
- file://openssl-fix-des.pod-error.patch \
- file://Makefiles-ptest.patch \
- file://ptest-deps.patch \
- file://crypto_use_bigint_in_x86-64_perl.patch \
- file://openssl-1.0.2a-x32-asm.patch \
- file://ptest_makefile_deps.patch \
- file://configure-musl-target.patch \
- file://parallel.patch \
- "
-
-SRC_URI[md5sum] = "f3c710c045cdee5fd114feb69feba7aa"
-SRC_URI[sha256sum] = "b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33"
-
-PACKAGES =+ "${PN}-engines"
-FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines"
-
-# The crypto_use_bigint patch means that perl's bignum module needs to be
-# installed, but some distributions (for example Fedora 23) don't ship it by
-# default. As the resulting error is very misleading check for bignum before
-# building.
-do_configure_prepend() {
- if ! perl -Mbigint -e true; then
- bbfatal "The perl module 'bignum' was not found but this is required to build openssl. Please install this module (often packaged as perl-bignum) and re-run bitbake."
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2j.bb b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2j.bb
new file mode 100644
index 000000000..257e3cfc4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2j.bb
@@ -0,0 +1,58 @@
+require openssl.inc
+
+# For target side versions of openssl enable support for OCF Linux driver
+# if they are available.
+DEPENDS += "cryptodev-linux"
+
+CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=27ffa5d74bb5a337056c14b2ef93fbf6"
+
+export DIRS = "crypto ssl apps engines"
+export OE_LDFLAGS="${LDFLAGS}"
+
+SRC_URI += "file://find.pl;subdir=${BP}/util/ \
+ file://run-ptest \
+ file://openssl-c_rehash.sh \
+ file://configure-targets.patch \
+ file://shared-libs.patch \
+ file://oe-ldflags.patch \
+ file://engines-install-in-libdir-ssl.patch \
+ file://debian1.0.2/block_diginotar.patch \
+ file://debian1.0.2/block_digicert_malaysia.patch \
+ file://debian/ca.patch \
+ file://debian/c_rehash-compat.patch \
+ file://debian/debian-targets.patch \
+ file://debian/man-dir.patch \
+ file://debian/man-section.patch \
+ file://debian/no-rpath.patch \
+ file://debian/no-symbolic.patch \
+ file://debian/pic.patch \
+ file://debian1.0.2/version-script.patch \
+ file://openssl_fix_for_x32.patch \
+ file://fix-cipher-des-ede3-cfb1.patch \
+ file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \
+ file://openssl-fix-des.pod-error.patch \
+ file://Makefiles-ptest.patch \
+ file://ptest-deps.patch \
+ file://openssl-1.0.2a-x32-asm.patch \
+ file://ptest_makefile_deps.patch \
+ file://configure-musl-target.patch \
+ file://parallel.patch \
+ file://openssl-util-perlpath.pl-cwd.patch \
+ "
+SRC_URI[md5sum] = "96322138f0b69e61b7212bc53d5e912b"
+SRC_URI[sha256sum] = "e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431"
+
+PACKAGES =+ "${PN}-engines"
+FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines"
+
+# The crypto_use_bigint patch means that perl's bignum module needs to be
+# installed, but some distributions (for example Fedora 23) don't ship it by
+# default. As the resulting error is very misleading check for bignum before
+# building.
+do_configure_prepend() {
+ if ! perl -Mbigint -e true; then
+ bbfatal "The perl module 'bignum' was not found but this is required to build openssl. Please install this module (often packaged as perl-bignum) and re-run bitbake."
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
new file mode 100644
index 000000000..f77b0defc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
@@ -0,0 +1,44 @@
+From 3da19af53e2eee2e77b456cfbb9d633b06656d38 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 13 Oct 2016 13:41:43 +0800
+Subject: [PATCH] ppp: fix building with linux-4.8
+
+Fix a build error when using the linux-4.8 headers that results in:
+
+In file included from pppoe.h:87:0,
+ from plugin.c:29:
+../usr/include/netinet/in.h:211:8: note: originally defined here
+ struct in6_addr
+ ^~~~~~~~
+In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
+ from ../usr/include/linux/if_pppox.h:26,
+ from plugin.c:52:
+../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
+ struct sockaddr_in6 {
+ ^~~~~~~~~~~~
+
+Upstream-Status: Submitted [1]
+
+[1] https://github.com/paulusmack/ppp/pull/69
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ pppd/plugins/rp-pppoe/pppoe.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..96d2794 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -84,7 +84,7 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+
+-#include <netinet/in.h>
++#include <linux/in.h>
+
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+--
+2.8.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index 4437b5c51..56dbd98d2 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -30,6 +30,7 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
file://ppp@.service \
file://fix-CVE-2015-3310.patch \
+ file://ppp-fix-building-with-linux-4.8.patch \
"
SRC_URI_append_libc-musl = "\
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.78.bb b/import-layers/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.78.bb
deleted file mode 100644
index f4c58514a..000000000
--- a/import-layers/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.78.bb
+++ /dev/null
@@ -1,67 +0,0 @@
-SUMMARY = "name server information handler"
-DESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
-information about currently available nameservers. It sets \
-itself up as the intermediary between programs that supply \
-nameserver information and programs that need nameserver \
-information."
-SECTION = "console/network"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
-AUTHOR = "Thomas Hood"
-HOMEPAGE = "http://packages.debian.org/resolvconf"
-RDEPENDS_${PN} = "bash"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20150828T220730Z/pool/main/r/${BPN}/${BPN}_1.78.tar.xz \
- file://fix-path-for-busybox.patch \
- file://99_resolvconf \
- "
-
-SRC_URI[md5sum] = "373a9f9544c84aa477a7425ae773b8b5"
-SRC_URI[sha256sum] = "961b22e8fcf0c7de7e90a050323e6fa221bc8b25a5348c160be3506f7e73a7a3"
-
-# the package is taken from snapshots.debian.org; that source is static and goes stale
-# so we check the latest upstream from a directory that does get updated
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/"
-
-inherit allarch
-
-do_compile () {
- :
-}
-
-do_install () {
- install -d ${D}${sysconfdir}/default/volatiles
- install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
- if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
- install -d ${D}${sysconfdir}/tmpfiles.d
- echo "d /run/${BPN}/interface - - - -" \
- > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
- fi
- install -d ${D}${base_libdir}/${BPN}
- install -d ${D}${sysconfdir}/${BPN}
- ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
- install -d ${D}${sysconfdir} ${D}${base_sbindir}
- install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
- cp -pPR etc/* ${D}${sysconfdir}/
- chown -R root:root ${D}${sysconfdir}/
- install -m 0755 bin/resolvconf ${D}${base_sbindir}/
- install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
- install -d ${D}/${sysconfdir}/network/if-up.d
- install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
- install -d ${D}/${sysconfdir}/network/if-down.d
- install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
- install -m 0644 README ${D}${docdir}/${P}/
- install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
-}
-
-pkg_postinst_${PN} () {
- if [ -z "$D" ]; then
- if command -v systemd-tmpfiles >/dev/null; then
- systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf
- elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
- ${sysconfdir}/init.d/populate-volatile.sh update
- fi
- fi
-}
-
-FILES_${PN} += "${base_libdir}/${BPN}"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb b/import-layers/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb
new file mode 100644
index 000000000..855017728
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.79.bb
@@ -0,0 +1,67 @@
+SUMMARY = "name server information handler"
+DESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
+information about currently available nameservers. It sets \
+itself up as the intermediary between programs that supply \
+nameserver information and programs that need nameserver \
+information."
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
+AUTHOR = "Thomas Hood"
+HOMEPAGE = "http://packages.debian.org/resolvconf"
+RDEPENDS_${PN} = "bash"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160520T044340Z/pool/main/r/${BPN}/${BPN}_1.79.tar.xz \
+ file://fix-path-for-busybox.patch \
+ file://99_resolvconf \
+ "
+
+SRC_URI[md5sum] = "aab2382020fc518f06a06e924c56d300"
+SRC_URI[sha256sum] = "8e2843cd4162b706f0481b3c281657728cbc2822e50a64fff79b79bd8aa870a0"
+
+# the package is taken from snapshots.debian.org; that source is static and goes stale
+# so we check the latest upstream from a directory that does get updated
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/"
+
+inherit allarch
+
+do_compile () {
+ :
+}
+
+do_install () {
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /run/${BPN}/interface - - - -" \
+ > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
+ fi
+ install -d ${D}${base_libdir}/${BPN}
+ install -d ${D}${sysconfdir}/${BPN}
+ ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
+ install -d ${D}${sysconfdir} ${D}${base_sbindir}
+ install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
+ cp -pPR etc/* ${D}${sysconfdir}/
+ chown -R root:root ${D}${sysconfdir}/
+ install -m 0755 bin/resolvconf ${D}${base_sbindir}/
+ install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
+ install -d ${D}/${sysconfdir}/network/if-up.d
+ install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
+ install -d ${D}/${sysconfdir}/network/if-down.d
+ install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
+ install -m 0644 README ${D}${docdir}/${P}/
+ install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
+}
+
+pkg_postinst_${PN} () {
+ if [ -z "$D" ]; then
+ if command -v systemd-tmpfiles >/dev/null; then
+ systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf
+ elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
+ fi
+}
+
+FILES_${PN} += "${base_libdir}/${BPN}"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.1.bb b/import-layers/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
index 6da9a17b3..4da6d3970 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
@@ -25,9 +25,7 @@ inherit autotools
EXTRA_AUTORECONF += "--exclude=autoheader"
-EXTRA_OECONF += "ac_cv_have_z_modifier=yes sc_cv_sys_crdly_shift=9 \
- sc_cv_sys_tabdly_shift=11 sc_cv_sys_csize_shift=4 \
- ac_cv_ispeed_offset=13 \
+EXTRA_OECONF += "ac_cv_have_z_modifier=yes \
ac_cv_header_bsd_libutil_h=no \
"
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch
new file mode 100644
index 000000000..dd7d5f726
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch
@@ -0,0 +1,55 @@
+From 73e4abb24a936014727924d8b0b2965edfc117dd Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <jouni@qca.qualcomm.com>
+Date: Fri, 4 Mar 2016 18:46:41 +0200
+Subject: [PATCH 1/3] Reject psk parameter set with invalid passphrase
+ character
+
+WPA/WPA2-Personal passphrase is not allowed to include control
+characters. Reject a passphrase configuration attempt if that passphrase
+includes an invalid passphrase.
+
+This fixes an issue where wpa_supplicant could have updated the
+configuration file psk parameter with arbitrary data from the control
+interface or D-Bus interface. While those interfaces are supposed to be
+accessible only for trusted users/applications, it may be possible that
+an untrusted user has access to a management software component that
+does not validate the passphrase value before passing it to
+wpa_supplicant.
+
+This could allow such an untrusted user to inject up to 63 characters of
+almost arbitrary data into the configuration file. Such configuration
+file could result in wpa_supplicant trying to load a library (e.g.,
+opensc_engine_path, pkcs11_engine_path, pkcs11_module_path,
+load_dynamic_eap) from user controlled location when starting again.
+This would allow code from that library to be executed under the
+wpa_supplicant process privileges.
+
+Upstream-Status: Backport
+
+CVE: CVE-2016-4477
+
+Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
+Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com>
+---
+ wpa_supplicant/config.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index b1c7870..fdd9643 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -478,6 +478,12 @@ static int wpa_config_parse_psk(const struct parse_data *data,
+ }
+ wpa_hexdump_ascii_key(MSG_MSGDUMP, "PSK (ASCII passphrase)",
+ (u8 *) value, len);
++ if (has_ctrl_char((u8 *) value, len)) {
++ wpa_printf(MSG_ERROR,
++ "Line %d: Invalid passphrase character",
++ line);
++ return -1;
++ }
+ if (ssid->passphrase && os_strlen(ssid->passphrase) == len &&
+ os_memcmp(ssid->passphrase, value, len) == 0) {
+ /* No change to the previously configured value */
+--
+1.9.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch
new file mode 100644
index 000000000..db222e41d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch
@@ -0,0 +1,86 @@
+From ecbb0b3dc122b0d290987cf9c84010bbe53e1022 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <jouni@qca.qualcomm.com>
+Date: Fri, 4 Mar 2016 17:20:18 +0200
+Subject: [PATCH 1/2] WPS: Reject a Credential with invalid passphrase
+
+WPA/WPA2-Personal passphrase is not allowed to include control
+characters. Reject a Credential received from a WPS Registrar both as
+STA (Credential) and AP (AP Settings) if the credential is for WPAPSK or
+WPA2PSK authentication type and includes an invalid passphrase.
+
+This fixes an issue where hostapd or wpa_supplicant could have updated
+the configuration file PSK/passphrase parameter with arbitrary data from
+an external device (Registrar) that may not be fully trusted. Should
+such data include a newline character, the resulting configuration file
+could become invalid and fail to be parsed.
+
+Upstream-Status: Backport
+
+CVE: CVE-2016-4476
+
+Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
+Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com>
+---
+ src/utils/common.c | 12 ++++++++++++
+ src/utils/common.h | 1 +
+ src/wps/wps_attr_process.c | 10 ++++++++++
+ 3 files changed, 23 insertions(+)
+
+diff --git a/src/utils/common.c b/src/utils/common.c
+index 450e2c6..27b7c02 100644
+--- a/src/utils/common.c
++++ b/src/utils/common.c
+@@ -697,6 +697,18 @@ int is_hex(const u8 *data, size_t len)
+ }
+
+
++int has_ctrl_char(const u8 *data, size_t len)
++{
++ size_t i;
++
++ for (i = 0; i < len; i++) {
++ if (data[i] < 32 || data[i] == 127)
++ return 1;
++ }
++ return 0;
++}
++
++
+ size_t merge_byte_arrays(u8 *res, size_t res_len,
+ const u8 *src1, size_t src1_len,
+ const u8 *src2, size_t src2_len)
+diff --git a/src/utils/common.h b/src/utils/common.h
+index 701dbb2..a972240 100644
+--- a/src/utils/common.h
++++ b/src/utils/common.h
+@@ -488,6 +488,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len);
+
+ char * wpa_config_parse_string(const char *value, size_t *len);
+ int is_hex(const u8 *data, size_t len);
++int has_ctrl_char(const u8 *data, size_t len);
+ size_t merge_byte_arrays(u8 *res, size_t res_len,
+ const u8 *src1, size_t src1_len,
+ const u8 *src2, size_t src2_len);
+diff --git a/src/wps/wps_attr_process.c b/src/wps/wps_attr_process.c
+index eadb22f..e8c4579 100644
+--- a/src/wps/wps_attr_process.c
++++ b/src/wps/wps_attr_process.c
+@@ -229,6 +229,16 @@ static int wps_workaround_cred_key(struct wps_credential *cred)
+ cred->key_len--;
+ #endif /* CONFIG_WPS_STRICT */
+ }
++
++
++ if (cred->auth_type & (WPS_AUTH_WPAPSK | WPS_AUTH_WPA2PSK) &&
++ (cred->key_len < 8 || has_ctrl_char(cred->key, cred->key_len))) {
++ wpa_printf(MSG_INFO, "WPS: Reject credential with invalid WPA/WPA2-Personal passphrase");
++ wpa_hexdump_ascii_key(MSG_INFO, "WPS: Network Key",
++ cred->key, cred->key_len);
++ return -1;
++ }
++
+ return 0;
+ }
+
+--
+1.9.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch
new file mode 100644
index 000000000..cad7425c3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch
@@ -0,0 +1,66 @@
+From b166cd84a77a6717be9600bf95378a0055d6f5a5 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <jouni@qca.qualcomm.com>
+Date: Tue, 5 Apr 2016 23:33:10 +0300
+Subject: [PATCH 2/3] Reject SET_CRED commands with newline characters in the
+ string values
+
+Most of the cred block parameters are written as strings without
+filtering and if there is an embedded newline character in the value,
+unexpected configuration file data might be written.
+
+This fixes an issue where wpa_supplicant could have updated the
+configuration file cred parameter with arbitrary data from the control
+interface or D-Bus interface. While those interfaces are supposed to be
+accessible only for trusted users/applications, it may be possible that
+an untrusted user has access to a management software component that
+does not validate the credential value before passing it to
+wpa_supplicant.
+
+This could allow such an untrusted user to inject almost arbitrary data
+into the configuration file. Such configuration file could result in
+wpa_supplicant trying to load a library (e.g., opensc_engine_path,
+pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user
+controlled location when starting again. This would allow code from that
+library to be executed under the wpa_supplicant process privileges.
+
+Upstream-Status: Backport
+
+CVE: CVE-2016-4477
+
+Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
+Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com>
+---
+ wpa_supplicant/config.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index eb97cd5..69152ef 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -2896,6 +2896,8 @@ int wpa_config_set_cred(struct wpa_cred *cred, const char *var,
+
+ if (os_strcmp(var, "password") == 0 &&
+ os_strncmp(value, "ext:", 4) == 0) {
++ if (has_newline(value))
++ return -1;
+ str_clear_free(cred->password);
+ cred->password = os_strdup(value);
+ cred->ext_password = 1;
+@@ -2946,9 +2948,14 @@ int wpa_config_set_cred(struct wpa_cred *cred, const char *var,
+ }
+
+ val = wpa_config_parse_string(value, &len);
+- if (val == NULL) {
++ if (val == NULL ||
++ (os_strcmp(var, "excluded_ssid") != 0 &&
++ os_strcmp(var, "roaming_consortium") != 0 &&
++ os_strcmp(var, "required_roaming_consortium") != 0 &&
++ has_newline(val))) {
+ wpa_printf(MSG_ERROR, "Line %d: invalid field '%s' string "
+ "value '%s'.", line, var, value);
++ os_free(val);
+ return -1;
+ }
+
+--
+1.9.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch
new file mode 100644
index 000000000..cc7b01ad5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch
@@ -0,0 +1,86 @@
+From 0fe5a234240a108b294a87174ad197f6b5cb38e9 Mon Sep 17 00:00:00 2001
+From: Paul Stewart <pstew@google.com>
+Date: Thu, 3 Mar 2016 15:40:19 -0800
+Subject: [PATCH 2/2] Remove newlines from wpa_supplicant config network
+ output
+
+Spurious newlines output while writing the config file can corrupt the
+wpa_supplicant configuration. Avoid writing these for the network block
+parameters. This is a generic filter that cover cases that may not have
+been explicitly addressed with a more specific commit to avoid control
+characters in the psk parameter.
+
+Upstream-Status: Backport
+
+CVE: CVE-2016-4476
+
+Signed-off-by: Paul Stewart <pstew@google.com>
+Signed-off-by: Zhixiong Chi <Zhixiong.Chi.wrs.com>
+---
+ src/utils/common.c | 11 +++++++++++
+ src/utils/common.h | 1 +
+ wpa_supplicant/config.c | 15 +++++++++++++--
+ 3 files changed, 25 insertions(+), 2 deletions(-)
+
+diff --git a/src/utils/common.c b/src/utils/common.c
+index 27b7c02..9856463 100644
+--- a/src/utils/common.c
++++ b/src/utils/common.c
+@@ -709,6 +709,17 @@ int has_ctrl_char(const u8 *data, size_t len)
+ }
+
+
++int has_newline(const char *str)
++{
++ while (*str) {
++ if (*str == '\n' || *str == '\r')
++ return 1;
++ str++;
++ }
++ return 0;
++}
++
++
+ size_t merge_byte_arrays(u8 *res, size_t res_len,
+ const u8 *src1, size_t src1_len,
+ const u8 *src2, size_t src2_len)
+diff --git a/src/utils/common.h b/src/utils/common.h
+index a972240..d19927b 100644
+--- a/src/utils/common.h
++++ b/src/utils/common.h
+@@ -489,6 +489,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len);
+ char * wpa_config_parse_string(const char *value, size_t *len);
+ int is_hex(const u8 *data, size_t len);
+ int has_ctrl_char(const u8 *data, size_t len);
++int has_newline(const char *str);
+ size_t merge_byte_arrays(u8 *res, size_t res_len,
+ const u8 *src1, size_t src1_len,
+ const u8 *src2, size_t src2_len);
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index fdd9643..eb97cd5 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -2699,8 +2699,19 @@ char * wpa_config_get(struct wpa_ssid *ssid, const char *var)
+
+ for (i = 0; i < NUM_SSID_FIELDS; i++) {
+ const struct parse_data *field = &ssid_fields[i];
+- if (os_strcmp(var, field->name) == 0)
+- return field->writer(field, ssid);
++ if (os_strcmp(var, field->name) == 0) {
++ char *ret = field->writer(field, ssid);
++
++ if (ret && has_newline(ret)) {
++ wpa_printf(MSG_ERROR,
++ "Found newline in value for %s; not returning it",
++ var);
++ os_free(ret);
++ ret = NULL;
++ }
++
++ return ret;
++ }
+ }
+
+ return NULL;
+--
+1.9.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-Reject-SET-commands-with-newline-characters-in-the-s.patch b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-Reject-SET-commands-with-newline-characters-in-the-s.patch
new file mode 100644
index 000000000..5375db74b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-Reject-SET-commands-with-newline-characters-in-the-s.patch
@@ -0,0 +1,54 @@
+From 2a3f56502b52375c3bf113cf92adfa99bad6b488 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <jouni@qca.qualcomm.com>
+Date: Tue, 5 Apr 2016 23:55:48 +0300
+Subject: [PATCH 3/3] Reject SET commands with newline characters in the
+ string values
+
+Many of the global configuration parameters are written as strings
+without filtering and if there is an embedded newline character in the
+value, unexpected configuration file data might be written.
+
+This fixes an issue where wpa_supplicant could have updated the
+configuration file global parameter with arbitrary data from the control
+interface or D-Bus interface. While those interfaces are supposed to be
+accessible only for trusted users/applications, it may be possible that
+an untrusted user has access to a management software component that
+does not validate the value of a parameter before passing it to
+wpa_supplicant.
+
+This could allow such an untrusted user to inject almost arbitrary data
+into the configuration file. Such configuration file could result in
+wpa_supplicant trying to load a library (e.g., opensc_engine_path,
+pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user
+controlled location when starting again. This would allow code from that
+library to be executed under the wpa_supplicant process privileges.
+
+Upstream-Status: Backport
+
+CVE: CVE-2016-4477
+
+Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
+Signed-off-by: Zhixiong Chi <Zhixiong.Chi@windriver.com>
+---
+ wpa_supplicant/config.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index 69152ef..d9a1603 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -3764,6 +3764,12 @@ static int wpa_global_config_parse_str(const struct global_parse_data *data,
+ return -1;
+ }
+
++ if (has_newline(pos)) {
++ wpa_printf(MSG_ERROR, "Line %d: invalid %s value with newline",
++ line, data->name);
++ return -1;
++ }
++
+ tmp = os_strdup(pos);
+ if (tmp == NULL)
+ return -1;
+--
+1.9.1
diff --git a/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb
index 935c8afc9..a4160e1c5 100644
--- a/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb
@@ -24,6 +24,11 @@ SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \
file://wpa_supplicant.conf \
file://wpa_supplicant.conf-sane \
file://99_wpa_supplicant \
+ file://0001-WPS-Reject-a-Credential-with-invalid-passphrase.patch \
+ file://0002-Remove-newlines-from-wpa_supplicant-config-network-o.patch \
+ file://0001-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch \
+ file://0002-Reject-SET_CRED-commands-with-newline-characters-in-.patch \
+ file://0003-Reject-SET-commands-with-newline-characters-in-the-s.patch \
"
SRC_URI[md5sum] = "96ff75c3a514f1f324560a2376f13110"
SRC_URI[sha256sum] = "cce55bae483b364eae55c35ba567c279be442ed8bab5b80a3c7fb0d057b9b316"
diff --git a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile
index 53c268040..7367fd1e2 100644
--- a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile
+++ b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files/profile
@@ -5,12 +5,6 @@ PATH="/usr/local/bin:/usr/bin:/bin"
EDITOR="vi" # needed for packages like cron, git-commit
test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
-if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
- TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
- # for an explanation of how to set this to your local timezone.
- export TZ
-fi
-
if [ "$HOME" = "ROOTHOME" ]; then
PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
fi
@@ -20,17 +14,22 @@ if [ "$PS1" ]; then
fi
if [ -d /etc/profile.d ]; then
- for i in /etc/profile.d/* ; do
- . $i
+ for i in /etc/profile.d/*.sh ; do
+ if [ -f $i -a -r $i ]; then
+ . $i
+ fi
done
unset i
fi
-if [ -x /usr/bin/resize ];then
- /usr/bin/resize >/dev/null
+if [ -x /usr/bin/resize ] && termpath="`tty`"; then
+ # Make sure we are on a serial console (i.e. the device used starts with /dev/tty),
+ # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
+ case "$termpath" in
+ /dev/tty*) resize >/dev/null
+ esac
fi
export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
umask 022
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb
index d39170737..533311061 100644
--- a/import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -165,9 +165,7 @@ do_install_append_linuxstdbase() {
done
}
-sysroot_stage_all_append () {
- sysroot_stage_dir ${D}${sysconfdir}/skel ${SYSROOT_DESTDIR}${sysconfdir}/skel
-}
+SYSROOT_DIRS += "${sysconfdir}/skel"
PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg"
FILES_${PN} = "/"
@@ -177,4 +175,3 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} ${sysconfdir}/shells"
CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile"
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb b/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb
index 8f43d431d..c9945d45e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb
@@ -1,7 +1,7 @@
# Copyright (C) 2016 Khem Raj <raj.khem@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "bsd compatible headers"
+SUMMARY = "BSD compatible headers"
LICENSE = "BSD-3-Clause & BSD-2-Clause"
LIC_FILES_CHKSUM = "file://sys-queue.h;beginline=1;endline=32;md5=c6352b0f03bb448600456547d334b56f"
SECTION = "devel"
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
index 5e91a263d..b2f196022 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox.inc
@@ -19,7 +19,7 @@ export EXTRA_CFLAGS = "${CFLAGS}"
export EXTRA_LDFLAGS = "${LDFLAGS}"
# We don't want '-e MAKEFLAGS=' in EXTRA_OEMAKE
-EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
+EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'"
PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
@@ -286,8 +286,8 @@ do_install () {
for i in $tmp
do
j=`echo ${i} | sed s/\;/\ /g`
- label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
- echo "tty$label::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+ id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'`
+ echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
done
fi
fi
@@ -423,7 +423,7 @@ pkg_prerm_${PN}-syslog () {
# remove syslog
if test "x$D" = "x"; then
if test "$1" = "upgrade" -o "$1" = "remove"; then
- ${sysconfdir}/init.d/syslog stop
+ ${sysconfdir}/init.d/syslog stop || :
fi
fi
}
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
new file mode 100644
index 000000000..8bcbd73de
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch
@@ -0,0 +1,73 @@
+From 198f18addf1d814c2fefcb492f3b9fbd221669bb Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Wed, 20 Apr 2016 18:24:45 +0300
+Subject: [PATCH] flock: update the behaviour of -c parameter to match upstream
+
+In upstream, -c 'PROG ARGS' means "run sh -c 'PROG ARGS'"
+
+function old new delta
+flock_main 286 377 +91
+.rodata 155849 155890 +41
+
+Upstream-Status: Submitted
+[ http://lists.busybox.net/pipermail/busybox/2016-April/084142.html ]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ util-linux/flock.c | 20 ++++++++++++++------
+ 1 file changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/util-linux/flock.c b/util-linux/flock.c
+index 05a747f..c85a25d 100644
+--- a/util-linux/flock.c
++++ b/util-linux/flock.c
+@@ -20,6 +20,7 @@ int flock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+ int flock_main(int argc UNUSED_PARAM, char **argv)
+ {
+ int mode, opt, fd;
++ char *cmd_args[4];
+ enum {
+ OPT_s = (1 << 0),
+ OPT_x = (1 << 1),
+@@ -57,7 +58,6 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
+ /* If it is "flock FILE -c PROG", then -c isn't caught by getopt32:
+ * we use "+" in order to support "flock -opt FILE PROG -with-opts",
+ * we need to remove -c by hand.
+- * TODO: in upstream, -c 'PROG ARGS' means "run sh -c 'PROG ARGS'"
+ */
+ if (argv[0]
+ && argv[0][0] == '-'
+@@ -65,7 +65,10 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
+ || (ENABLE_LONG_OPTS && strcmp(argv[0] + 1, "-command") == 0)
+ )
+ ) {
+- argv++;
++ if (argc != optind + 3)
++ bb_error_msg_and_die("-c requires exactly one command argument");
++ else
++ argv++;
+ }
+
+ if (OPT_s == LOCK_SH && OPT_x == LOCK_EX && OPT_n == LOCK_NB && OPT_u == LOCK_UN) {
+@@ -89,9 +92,14 @@ int flock_main(int argc UNUSED_PARAM, char **argv)
+ return EXIT_FAILURE;
+ bb_perror_nomsg_and_die();
+ }
+-
+- if (argv[0])
+- return spawn_and_wait(argv);
+-
++ if (argv[0]) {
++ cmd_args[0] = getenv("SHELL");
++ if (!cmd_args[0])
++ cmd_args[0] = (char*)DEFAULT_SHELL;
++ cmd_args[1] = (char*)"-c";
++ cmd_args[2] = argv[0];
++ cmd_args[3] = NULL;
++ return spawn_and_wait(cmd_args);
++ }
+ return EXIT_SUCCESS;
+ }
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
new file mode 100644
index 000000000..4f539848c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch
@@ -0,0 +1,72 @@
+From 903542f7331c58007a3ef938d41e1c55fc329648 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 31 Aug 2016 23:40:43 -0400
+Subject: [PATCH] sed: fix "sed n (flushes pattern space, terminates early)"
+ testcase failure
+
+This patch fix "sed n (flushes pattern space, terminates early)"
+testcase failure. We can see it at:
+
+ https://git.busybox.net/busybox/commit/?id=76d72376e0244a5cafd4880cdc623e37d86a75e4
+
+Upstream-Status: Backport
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ editors/sed.c | 19 ++++++++++---------
+ testsuite/sed.tests | 6 +-----
+ 2 files changed, 11 insertions(+), 14 deletions(-)
+
+diff --git a/editors/sed.c b/editors/sed.c
+index 7bbf820..259c39c 100644
+--- a/editors/sed.c
++++ b/editors/sed.c
+@@ -1274,16 +1274,17 @@ static void process_files(void)
+ case 'n':
+ if (!G.be_quiet)
+ sed_puts(pattern_space, last_gets_char);
+- if (next_line) {
+- free(pattern_space);
+- pattern_space = next_line;
+- last_gets_char = next_gets_char;
+- next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
+- substituted = 0;
+- linenum++;
+- break;
++ if (next_line == NULL) {
++ /* If no next line, jump to end of script and exit. */
++ goto discard_line;
+ }
+- /* fall through */
++ free(pattern_space);
++ pattern_space = next_line;
++ last_gets_char = next_gets_char;
++ next_line = get_next_line(&next_gets_char, &last_puts_char, last_gets_char);
++ substituted = 0;
++ linenum++;
++ break;
+
+ /* Quit. End of script, end of input. */
+ case 'q':
+diff --git a/testsuite/sed.tests b/testsuite/sed.tests
+index 34479e5..96ff7a5 100755
+--- a/testsuite/sed.tests
++++ b/testsuite/sed.tests
+@@ -73,13 +73,9 @@ testing "sed t (test/branch clears test bit)" "sed -e 's/a/b/;:loop;t loop'" \
+ testing "sed T (!test/branch)" "sed -e 's/a/1/;T notone;p;: notone;p'" \
+ "1\n1\n1\nb\nb\nc\nc\n" "" "a\nb\nc\n"
+
+-test x"$SKIP_KNOWN_BUGS" = x"" && {
+-# Normal sed end-of-script doesn't print "c" because n flushed the pattern
+-# space. If n hits EOF, pattern space is empty when script ends.
+-# Query: how does this interact with no newline at EOF?
+ testing "sed n (flushes pattern space, terminates early)" "sed -e 'n;p'" \
+ "a\nb\nb\nc\n" "" "a\nb\nc\n"
+-}
++
+ # non-GNU sed: N does _not_ flush pattern space, therefore c is eaten @ script end
+ # GNU sed: N flushes pattern space, therefore c is printed too @ script end
+ testing "sed N (flushes pattern space (GNU behavior))" "sed -e 'N;p'" \
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
new file mode 100644
index 000000000..84cae6aa2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147.patch
@@ -0,0 +1,57 @@
+From d474ffc68290e0a83651c4432eeabfa62cd51e87 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Thu, 10 Mar 2016 11:47:58 +0100
+Subject: [PATCH] udhcp: fix a SEGV on malformed RFC1035-encoded domain name
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+
+Upstream-Status: Backport
+CVE: CVE-2016-2147
+
+https://git.busybox.net/busybox/commit/?id=d474ffc
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ networking/udhcp/domain_codec.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+Index: busybox-1.23.2/networking/udhcp/domain_codec.c
+===================================================================
+--- busybox-1.23.2.orig/networking/udhcp/domain_codec.c
++++ busybox-1.23.2/networking/udhcp/domain_codec.c
+@@ -63,11 +63,10 @@ char* FAST_FUNC dname_dec(const uint8_t
+ if (crtpos + *c + 1 > clen) /* label too long? abort */
+ return NULL;
+ if (dst)
+- memcpy(dst + len, c + 1, *c);
++ /* \3com ---> "com." */
++ ((char*)mempcpy(dst + len, c + 1, *c))[0] = '.';
+ len += *c + 1;
+ crtpos += *c + 1;
+- if (dst)
+- dst[len - 1] = '.';
+ } else {
+ /* NUL: end of current domain name */
+ if (retpos == 0) {
+@@ -78,7 +77,10 @@ char* FAST_FUNC dname_dec(const uint8_t
+ crtpos = retpos;
+ retpos = depth = 0;
+ }
+- if (dst)
++ if (dst && len != 0)
++ /* \4host\3com\0\4host and we are at \0:
++ * \3com was converted to "com.", change dot to space.
++ */
+ dst[len - 1] = ' ';
+ }
+
+@@ -228,6 +230,9 @@ int main(int argc, char **argv)
+ int len;
+ uint8_t *encoded;
+
++ uint8_t str[6] = { 0x00, 0x00, 0x02, 0x65, 0x65, 0x00 };
++ printf("NUL:'%s'\n", dname_dec(str, 6, ""));
++
+ #define DNAME_DEC(encoded,pre) dname_dec((uint8_t*)(encoded), sizeof(encoded), (pre))
+ printf("'%s'\n", DNAME_DEC("\4host\3com\0", "test1:"));
+ printf("test2:'%s'\n", DNAME_DEC("\4host\3com\0\4host\3com\0", ""));
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
new file mode 100644
index 000000000..1473d4603
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2147_2.patch
@@ -0,0 +1,32 @@
+From 1b7c17391de66502dd7a97c866e0a33681edbb1f Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Fri, 11 Mar 2016 00:26:58 +0100
+Subject: [PATCH] udhcpc: fix a warning in debug code
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+Upsteam-Status: Backport
+CVE: CVE-2016-2147 regression fix
+
+https://git.busybox.net/busybox/commit/?id=1b7c17
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ networking/udhcp/domain_codec.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c
+index cee31f1..5a923cc 100644
+--- a/networking/udhcp/domain_codec.c
++++ b/networking/udhcp/domain_codec.c
+@@ -7,6 +7,7 @@
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
+ */
+ #ifdef DNS_COMPR_TESTING
++# define _GNU_SOURCE
+ # define FAST_FUNC /* nothing */
+ # define xmalloc malloc
+ # include <stdlib.h>
+--
+2.3.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
new file mode 100644
index 000000000..af04a7f5b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/CVE-2016-2148.patch
@@ -0,0 +1,74 @@
+From 352f79acbd759c14399e39baef21fc4ffe180ac2 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Fri, 26 Feb 2016 15:54:56 +0100
+Subject: [PATCH] udhcpc: fix OPTION_6RD parsing (could overflow its malloced
+ buffer)
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+
+Upstream-Status: Backport
+CVE: CVE-2016-2148
+https://git.busybox.net/busybox/commit/?id=352f79
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ networking/udhcp/common.c | 15 +++++++++++++--
+ networking/udhcp/dhcpc.c | 4 ++--
+ 2 files changed, 15 insertions(+), 4 deletions(-)
+
+Index: busybox-1.23.2/networking/udhcp/common.c
+===================================================================
+--- busybox-1.23.2.orig/networking/udhcp/common.c
++++ busybox-1.23.2/networking/udhcp/common.c
+@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1
+ * udhcp_str2optset: to determine how many bytes to allocate.
+ * xmalloc_optname_optval: to estimate string length
+ * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type])
+- * is the number of elements, multiply in by one element's string width
++ * is the number of elements, multiply it by one element's string width
+ * (len_of_option_as_string[opt_type]) and you know how wide string you need.
+ */
+ const uint8_t dhcp_option_lengths[] ALIGN1 = {
+@@ -162,7 +162,18 @@ const uint8_t dhcp_option_lengths[] ALIG
+ [OPTION_S32] = 4,
+ /* Just like OPTION_STRING, we use minimum length here */
+ [OPTION_STATIC_ROUTES] = 5,
+- [OPTION_6RD] = 22, /* ignored by udhcp_str2optset */
++ [OPTION_6RD] = 12, /* ignored by udhcp_str2optset */
++ /* The above value was chosen as follows:
++ * len_of_option_as_string[] for this option is >60: it's a string of the form
++ * "32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 ".
++ * Each additional ipv4 address takes 4 bytes in binary option and appends
++ * another "255.255.255.255 " 16-byte string. We can set [OPTION_6RD] = 4
++ * but this severely overestimates string length: instead of 16 bytes,
++ * it adds >60 for every 4 bytes in binary option.
++ * We cheat and declare here that option is in units of 12 bytes.
++ * This adds more than 60 bytes for every three ipv4 addresses - more than enough.
++ * (Even 16 instead of 12 should work, but let's be paranoid).
++ */
+ };
+
+
+Index: busybox-1.23.2/networking/udhcp/dhcpc.c
+===================================================================
+--- busybox-1.23.2.orig/networking/udhcp/dhcpc.c
++++ busybox-1.23.2/networking/udhcp/dhcpc.c
+@@ -103,7 +103,7 @@ static const uint8_t len_of_option_as_st
+ [OPTION_IP ] = sizeof("255.255.255.255 "),
+ [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
+ [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
+- [OPTION_6RD ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
++ [OPTION_6RD ] = sizeof("132 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
+ [OPTION_STRING ] = 1,
+ [OPTION_STRING_HOST ] = 1,
+ #if ENABLE_FEATURE_UDHCP_RFC3397
+@@ -214,7 +214,7 @@ static NOINLINE char *xmalloc_optname_op
+ type = optflag->flags & OPTION_TYPE_MASK;
+ optlen = dhcp_option_lengths[type];
+ upper_length = len_of_option_as_string[type]
+- * ((unsigned)(len + optlen - 1) / (unsigned)optlen);
++ * ((unsigned)(len + optlen) / (unsigned)optlen);
+
+ dest = ret = xmalloc(upper_length + strlen(opt_name) + 2);
+ dest += sprintf(ret, "%s=", opt_name);
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
new file mode 100644
index 000000000..38302e0b6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/busybox-kbuild-race-fix-commit-d8e61bb.patch
@@ -0,0 +1,53 @@
+Upstream-Status: Backport
+
+Patch addressing a parallel make race in Busybox
+
+ http://git.busybox.net/busybox/commit/?id=d8e61bbf13d0cf38d477255cfd5dc71c5d51d575
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+From d8e61bbf13d0cf38d477255cfd5dc71c5d51d575 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Sun, 21 Aug 2016 22:00:20 +0200
+Subject: build system: different fix for
+ include/applet_tables.h/include/NUM_APPLETS.h
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+
+diff --git a/applets/Kbuild.src b/applets/Kbuild.src
+index 5cc1827..3aedbbf 100644
+--- a/applets/Kbuild.src
++++ b/applets/Kbuild.src
+@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
+
+ applets/applet_tables: .config include/applets.h
+ applets/usage: .config include/applets.h
+-applets/usage_pod: .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
++applets/usage_pod: .config include/applets.h include/applet_tables.h
+
+ quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
+ cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
+@@ -37,8 +37,21 @@ quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
+ include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compressed
+ $(call cmd,gen_usage_compressed)
+
+-quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
++quiet_cmd_gen_applet_tables = GEN include/applet_tables.h include/NUM_APPLETS.h
+ cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
+
+-include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
++include/NUM_APPLETS.h: applets/applet_tables
++ $(call cmd,gen_applet_tables)
++
++# In fact, include/applet_tables.h depends only on applets/applet_tables,
++# and is generated by it. But specifying only it can run
++# applets/applet_tables twice, possibly in parallel.
++# We say that it also needs NUM_APPLETS.h
++#
++# Unfortunately, we need to list the same command,
++# and it can be executed twice (sequentially).
++# The alternative is to not list any command,
++# and then if include/applet_tables.h is deleted, it won't be rebuilt.
++#
++include/applet_tables.h: include/NUM_APPLETS.h applets/applet_tables
+ $(call cmd,gen_applet_tables)
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
new file mode 100644
index 000000000..7f80a1d91
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/commit-applet_tables-fix-commit-0dddbc1.patch
@@ -0,0 +1,61 @@
+Upstream-Status: Backport
+
+Patch addressing a parallel make race in Busybox
+
+ http://git.busybox.net/busybox/commit/?id=0dddbc1a59795a77679d8c5ef48a2795cb470563
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+From 0dddbc1a59795a77679d8c5ef48a2795cb470563 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Tue, 23 Aug 2016 20:21:36 +0200
+Subject: build system: always rewrite NUM_APPLETS.h
+
+Conditional rewrite can keep NUM_APPLETS.h mtime old,
+this causes make to try to regenerate it at every invocation.
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+
+diff --git a/applets/applet_tables.c b/applets/applet_tables.c
+index 8401a15..ef911a4 100644
+--- a/applets/applet_tables.c
++++ b/applets/applet_tables.c
+@@ -192,27 +192,28 @@ int main(int argc, char **argv)
+ printf("};\n");
+ #endif
+ //printf("#endif /* SKIP_definitions */\n");
++
+ // printf("\n");
+ // printf("#define MAX_APPLET_NAME_LEN %u\n", MAX_APPLET_NAME_LEN);
+
+ if (argv[2]) {
+- char line_old[80];
+- char line_new[80];
+ FILE *fp;
++ char line_new[80];
++// char line_old[80];
+
+- line_old[0] = 0;
+- fp = fopen(argv[2], "r");
+- if (fp) {
+- fgets(line_old, sizeof(line_old), fp);
+- fclose(fp);
+- }
+ sprintf(line_new, "#define NUM_APPLETS %u\n", NUM_APPLETS);
+- if (strcmp(line_old, line_new) != 0) {
++// line_old[0] = 0;
++// fp = fopen(argv[2], "r");
++// if (fp) {
++// fgets(line_old, sizeof(line_old), fp);
++// fclose(fp);
++// }
++// if (strcmp(line_old, line_new) != 0) {
+ fp = fopen(argv[2], "w");
+ if (!fp)
+ return 1;
+ fputs(line_new, fp);
+- }
++// }
+ }
+
+ return 0;
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
index ffea6be87..c0459d596 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
@@ -135,7 +135,7 @@ CONFIG_FEATURE_SEAMLESS_LZMA=y
CONFIG_FEATURE_SEAMLESS_BZ2=y
CONFIG_FEATURE_SEAMLESS_GZ=y
CONFIG_FEATURE_SEAMLESS_Z=y
-CONFIG_AR=y
+# CONFIG_AR is not set
# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
# CONFIG_FEATURE_AR_CREATE is not set
# CONFIG_UNCOMPRESS is not set
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
new file mode 100644
index 000000000..41c565658
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch
@@ -0,0 +1,90 @@
+From 4ab372d49a6e82b0bf097dedb96d26330c5f2d5f Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sun, 24 Apr 2016 17:39:02 +0200
+Subject: [PATCH] ip: fix problem on mips64 n64 big endian musl systems
+
+Use designated initializers for struct msghdr.
+The struct layout is non-portable and musl libc does not match what busybox expects.
+
+Signed-off-by: Szabolcs Nagy <nsz@port70.net>
+Tested-by: Waldemar Brodkorb <wbx@openadk.org>
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+
+Upstream-Status: Backport
+
+https://git.busybox.net/busybox/commit/?id=4ab372d49a6e82b0bf097dedb96d26330c5f2d5f
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ networking/libiproute/libnetlink.c | 37 ++++++++++++++++++++++++-------------
+ 1 file changed, 24 insertions(+), 13 deletions(-)
+
+diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
+index c7533a4..cbb5daf 100644
+--- a/networking/libiproute/libnetlink.c
++++ b/networking/libiproute/libnetlink.c
+@@ -71,11 +71,15 @@ int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, in
+ struct nlmsghdr nlh;
+ struct sockaddr_nl nladdr;
+ struct iovec iov[2] = { { &nlh, sizeof(nlh) }, { req, len } };
++ /* Use designated initializers, struct layout is non-portable */
+ struct msghdr msg = {
+- (void*)&nladdr, sizeof(nladdr),
+- iov, 2,
+- NULL, 0,
+- 0
++ .msg_name = (void*)&nladdr,
++ .msg_namelen = sizeof(nladdr),
++ .msg_iov = iov,
++ .msg_iovlen = 2,
++ .msg_control = NULL,
++ .msg_controllen = 0,
++ .msg_flags = 0
+ };
+
+ memset(&nladdr, 0, sizeof(nladdr));
+@@ -104,12 +108,15 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
+ while (1) {
+ int status;
+ struct nlmsghdr *h;
+-
++ /* Use designated initializers, struct layout is non-portable */
+ struct msghdr msg = {
+- (void*)&nladdr, sizeof(nladdr),
+- &iov, 1,
+- NULL, 0,
+- 0
++ .msg_name = (void*)&nladdr,
++ .msg_namelen = sizeof(nladdr),
++ .msg_iov = &iov,
++ .msg_iovlen = 1,
++ .msg_control = NULL,
++ .msg_controllen = 0,
++ .msg_flags = 0
+ };
+
+ status = recvmsg(rth->fd, &msg, 0);
+@@ -211,11 +218,15 @@ int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
+ struct sockaddr_nl nladdr;
+ struct iovec iov = { (void*)n, n->nlmsg_len };
+ char *buf = xmalloc(8*1024); /* avoid big stack buffer */
++ /* Use designated initializers, struct layout is non-portable */
+ struct msghdr msg = {
+- (void*)&nladdr, sizeof(nladdr),
+- &iov, 1,
+- NULL, 0,
+- 0
++ .msg_name = (void*)&nladdr,
++ .msg_namelen = sizeof(nladdr),
++ .msg_iov = &iov,
++ .msg_iovlen = 1,
++ .msg_control = NULL,
++ .msg_controllen = 0,
++ .msg_flags = 0
+ };
+
+ memset(&nladdr, 0, sizeof(nladdr));
+--
+2.3.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
new file mode 100644
index 000000000..2e9842e5e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-fix-backport.patch
@@ -0,0 +1,40 @@
+From 9e5820a86277818c2f83c11c2aa76d7f0a38283e Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Sun, 14 Aug 2016 02:54:27 +0200
+Subject: build system: fix include/NUM_APPLETS.h generation
+
+TBH, it's more like "work around my bad makefile-fu" than "fix"...
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+---
+ applets/Kbuild.src | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+Upstream-Status: Backport
+
+diff --git a/applets/Kbuild.src b/applets/Kbuild.src
+index b612399..5cc1827 100644
+--- a/applets/Kbuild.src
++++ b/applets/Kbuild.src
+@@ -29,7 +29,7 @@ applets/applets.o: include/usage_compressed.h include/applet_tables.h
+
+ applets/applet_tables: .config include/applets.h
+ applets/usage: .config include/applets.h
+-applets/usage_pod: .config include/applet_tables.h include/applets.h
++applets/usage_pod: .config include/applets.h include/applet_tables.h include/NUM_APPLETS.h
+
+ quiet_cmd_gen_usage_compressed = GEN include/usage_compressed.h
+ cmd_gen_usage_compressed = $(srctree_slash)applets/usage_compressed include/usage_compressed.h applets
+@@ -40,8 +40,5 @@ include/usage_compressed.h: applets/usage $(srctree_slash)applets/usage_compress
+ quiet_cmd_gen_applet_tables = GEN include/applet_tables.h
+ cmd_gen_applet_tables = applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
+
+-include/applet_tables.h: applets/applet_tables
+- $(call cmd,gen_applet_tables)
+-
+-include/NUM_APPLETS.h: applets/applet_tables
++include/applet_tables.h include/NUM_APPLETS.h: applets/applet_tables
+ $(call cmd,gen_applet_tables)
+--
+cgit v0.12
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-libbb-race.patch b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-libbb-race.patch
new file mode 100644
index 000000000..97278ab97
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox/makefile-libbb-race.patch
@@ -0,0 +1,34 @@
+There is a potential race when building libbb, as some header files
+needed by libbb are not generated yet (or are being modified) at the time
+libbb is compiled.
+This patch avoids this scenario by building libbb as the last directory.
+
+Upstream-Status: Submitted
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+Index: busybox-1.24.1/Makefile
+===================================================================
+diff --git a/Makefile b/Makefile
+index 5cfc763..69f3831 100644
+--- a/Makefile
++++ b/Makefile
+@@ -738,9 +738,18 @@ $(sort $(busybox-all)): $(busybox-dirs) ;
+ # Error messages still appears in the original language
+
+ PHONY += $(busybox-dirs)
+-$(busybox-dirs): prepare scripts
++
++libbb-dir = $(filter libbb,$(busybox-dirs))
++busybox-dirs1 = $(filter-out libbb,$(busybox-dirs))
++
++$(busybox-dirs1): prepare scripts
+ $(Q)$(MAKE) $(build)=$@
+
++ifneq ($(libbb-dir),)
++$(libbb-dir): | $(busybox-dirs1)
++ $(Q)$(MAKE) $(build)=$@
++endif
++
+ # Build the kernel release string
+ # The KERNELRELEASE is stored in a file named .kernelrelease
+ # to be used when executing for example make install or make modules_install
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
index bdaa5a564..df0e13126 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -32,6 +32,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://busybox-1.24.1-unzip.patch \
file://busybox-1.24.1-unzip-regression.patch \
file://busybox-1.24.1-truncate-open-mode.patch \
+ file://0001-flock-update-the-behaviour-of-c-parameter-to-match-u.patch \
file://mount-via-label.cfg \
file://sha1sum.cfg \
file://sha256sum.cfg \
@@ -43,6 +44,15 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://rcS \
file://rcK \
file://runlevel \
+ file://CVE-2016-2148.patch \
+ file://CVE-2016-2147.patch \
+ file://CVE-2016-2147_2.patch \
+ file://ip_fix_problem_on_mips64_n64_big_endian_musl_systems.patch \
+ file://makefile-fix-backport.patch \
+ file://0001-sed-fix-sed-n-flushes-pattern-space-terminates-early.patch \
+ file://busybox-kbuild-race-fix-commit-d8e61bb.patch \
+ file://commit-applet_tables-fix-commit-0dddbc1.patch \
+ file://makefile-libbb-race.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/files/busybox-syslog.default b/import-layers/yocto-poky/meta/recipes-core/busybox/files/busybox-syslog.default
index e516caf51..2dced8023 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/files/busybox-syslog.default
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/files/busybox-syslog.default
@@ -1,4 +1,4 @@
-OPTIONS="-C"
+#OPTIONS="-C"
# The above option means syslogd will log to 16K shm circular buffer.
# You could use `logread' to read it.
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/files/inittab b/import-layers/yocto-poky/meta/recipes-core/busybox/files/inittab
index bfec4a774..2bc831c7c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/files/inittab
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/files/inittab
@@ -1,13 +1,13 @@
# This is run first except when booting in single-user mode.
# Startup the system
-null::sysinit:/bin/mount -t proc proc /proc
-null::sysinit:/bin/mount -t sysfs sysfs /sys
-null::sysinit:/bin/mount -t devtmpfs devtmpfs /dev
-null::sysinit:/bin/mount -o remount,rw /
-null::sysinit:/bin/mkdir -p /dev/pts
-null::sysinit:/bin/mount -t devpts devpts /dev/pts
-null::sysinit:/bin/mount -a
+::sysinit:/bin/mount -t proc proc /proc
+::sysinit:/bin/mount -t sysfs sysfs /sys
+::sysinit:/bin/mount -t devtmpfs devtmpfs /dev
+::sysinit:/bin/mount -o remount,rw /
+::sysinit:/bin/mkdir -p /dev/pts
+::sysinit:/bin/mount -t devpts devpts /dev/pts
+::sysinit:/bin/mount -a
::sysinit:/etc/init.d/rcS
diff --git a/import-layers/yocto-poky/meta/recipes-core/busybox/files/mdev b/import-layers/yocto-poky/meta/recipes-core/busybox/files/mdev
index 96252477e..8c9c06e96 100755
--- a/import-layers/yocto-poky/meta/recipes-core/busybox/files/mdev
+++ b/import-layers/yocto-poky/meta/recipes-core/busybox/files/mdev
@@ -1,10 +1,12 @@
#!/bin/sh
-
+mount -t proc proc /proc
+mount -t sysfs sysfs /sys
mount -t tmpfs tmpfs /dev -o size=64k,mode=0755
mkdir /dev/pts /dev/shm
chmod 777 /dev/shm
mount -t devpts devpts /dev/pts
touch /dev/mdev.seq
+#sysctl -w kernel.hotplug=/sbin/mdev
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
mdev -s
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch
index 02730dbbb..64e5f12ba 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/coreutils_fix_for_automake-1.12.patch
@@ -11,7 +11,7 @@ this patch avoids these kinds of errors:
| configure.ac:40: the top level
| autom4te: m4 failed with exit status: 1
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: coreutils-6.9/m4/jm-macros.m4
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch
index 5ca590bcc..508810623 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/futimens.patch
@@ -3,7 +3,7 @@ Upstream-Status: Inappropriate [legacy version]
# coreutils uses gnulib which conflicts with newer libc header on futimens
# this patch simply renames coreutils futimes to avoid confliction
#
-# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
+# Signed-off-by: Kevin Tian <kevin.tian@intel.com>, 2010-08-18
# (this patch is licensed under GPLv2)
diff --git a/lib/utimens.c b/lib/utimens.c
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch
index 8f355520b..8a8ffa726 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/gnulib_m4.patch
@@ -3,7 +3,7 @@ Upstream-Status: Inappropriate [legacy version]
# remove the line to cause recursive inclusion error from autoreconf, sicne
# newer autoconf has included this definition. Simply rename it here.
#
-# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
+# Signed-off-by: Kevin Tian <kevin.tian@intel.com>, 2010-08-18
# (this patch is licensed under GPLv2)
diff --git a/extensions.m4 b/extensions.m4
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch
index c42cb9c05..59a4fe005 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/man-touch.patch
@@ -6,7 +6,7 @@ Upstream-Status: Inappropriate [legacy version]
# is with target format which can't be invoked on build system, disable building
# 'touch' man page here.
#
-# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18
+# Signed-off-by: Kevin Tian <kevin.tian@intel.com>, 2010-08-18
# (this patch is licensed under GPLv2)
diff --git a/man/Makefile.am b/man/Makefile.am
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch
index c5f449f4f..3c43e1d5d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch
@@ -1,4 +1,4 @@
-Upstream-Status: Rejected
+Upstream-Status: Denied
Subject: uname: report processor and hardware correctly
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/disable-ls-output-quoting.patch b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/disable-ls-output-quoting.patch
new file mode 100644
index 000000000..e68c21355
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/disable-ls-output-quoting.patch
@@ -0,0 +1,49 @@
+Subject: revert inconsistent ls quoting
+
+This is a revert of upstream commit 109b9220cead6e979d22d16327c4d9f8350431cc.
+
+Bug-Debian: https://bugs.debian.org/813164
+
+Upstream-Status: Submitted
+
+Originally-by: Adam Borowski <kilobyte@angband.pl>
+[PG: patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164#78 ]
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+
+---
+
+--- coreutils-8.25.orig/NEWS
++++ coreutils-8.25/NEWS
+@@ -71,9 +71,6 @@ GNU coreutils NEWS
+ df now prefers sources towards the root of a device when
+ eliding duplicate bind mounted entries.
+
+- ls now quotes file names unambiguously and appropriate for use in a shell,
+- when outputting to a terminal.
+-
+ join, sort, uniq with --zero-terminated, now treat '\n' as a field delimiter.
+
+ ** Improvements
+--- coreutils-8.25.orig/doc/coreutils.texi
++++ coreutils-8.25/doc/coreutils.texi
+@@ -7750,8 +7750,8 @@ this"} in the default C locale. This lo
+
+ You can specify the default value of the @option{--quoting-style} option
+ with the environment variable @env{QUOTING_STYLE}@. If that environment
+-variable is not set, the default value is @samp{shell-escape} when the
+-output is a terminal, and @samp{literal} otherwise.
++variable is not set, the default value is @samp{literal}, but this
++default may change to @samp{shell} in a future version of this package.
+
+ @item --show-control-chars
+ @opindex --show-control-chars
+--- coreutils-8.25.orig/src/ls.c
++++ coreutils-8.25/src/ls.c
+@@ -1581,7 +1581,6 @@ decode_switches (int argc, char **argv)
+ if (isatty (STDOUT_FILENO))
+ {
+ format = many_per_line;
+- set_quoting_style (NULL, shell_escape_quoting_style);
+ /* See description of qmark_funny_chars, above. */
+ qmark_funny_chars = true;
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_6.9.bb b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_6.9.bb
index 9ce717d1a..35700a32f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_6.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_6.9.bb
@@ -88,6 +88,10 @@ ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs}"
+ALTERNATIVE_${PN}-doc = "su.1 hostname.1"
+ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1"
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+
ALTERNATIVE_PRIORITY[uptime] = "10"
ALTERNATIVE_PRIORITY[hostname] = "10"
diff --git a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.25.bb b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.25.bb
index 419a69337..df6ad380f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.25.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/coreutils/coreutils_8.25.bb
@@ -19,6 +19,7 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
file://fix-selinux-flask.patch \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://0001-uname-report-processor-and-hardware-correctly.patch \
+ file://disable-ls-output-quoting.patch \
"
SRC_URI[tarball.md5sum] = "070e43ba7f618d747414ef56ab248a48"
@@ -37,7 +38,8 @@ PACKAGECONFIG_class-target ??= "\
${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
"
-PACKAGECONFIG_class-native ??= ""
+# The lib/oe/path.py requires xattr
+PACKAGECONFIG_class-native ??= "xattr"
# with, without, depends, rdepends
#
@@ -69,6 +71,15 @@ do_compile_prepend () {
mkdir -p ${B}/src
}
+do_install_class-native() {
+ autotools_do_install
+ # remove groups to fix conflict with shadow-native
+ rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
+ # The return is a must since native doesn't need the
+ # do_install_append() in the below.
+ return
+}
+
do_install_append() {
for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
@@ -91,16 +102,13 @@ do_install_append() {
cp -a ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
}
-do_install_append_class-native(){
- # remove groups to fix conflict with shadow-native
- rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
-}
-
inherit update-alternatives
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
-ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1"
+ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
+
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc
index 4661e3af5..55f710f85 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc
@@ -15,7 +15,7 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz
file://test-install-makefile.patch \
"
-inherit autotools pkgconfig gettext bash-completion
+inherit autotools pkgconfig gettext bash-completion gtk-doc
#default disable regression tests, some unit test code in non testing code
#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.10.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.10.bb
new file mode 100644
index 000000000..650b7ab02
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.10.bb
@@ -0,0 +1,58 @@
+SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+ file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+
+DEPENDS = "dbus glib-2.0"
+
+RDEPENDS_${PN} += "make"
+RDEPENDS_${PN}-dev = ""
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+ file://tmpdir.patch \
+ file://run-ptest \
+ file://python-config.patch \
+ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+ "
+
+SRC_URI[md5sum] = "495676d240eb982921b3ad1343526849"
+SRC_URI[sha256sum] = "9d8f1d069ab4d1a0255d7b400ea3bcef4430c42e729b1012abb2890e3f739a43"
+
+S="${WORKDIR}/dbus-${PV}"
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
+
+inherit autotools pkgconfig gettext ptest upstream-version-is-even
+
+EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
+EXTRA_OECONF_X_class-native = "--without-x"
+
+EXTRA_OECONF = "--enable-tests \
+ --enable-modular-tests \
+ --enable-installed-tests \
+ --enable-checks \
+ --enable-asserts \
+ --enable-verbose-mode \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-libaudit \
+ --disable-systemd \
+ --without-systemdsystemunitdir \
+ --with-dbus-test-dir=${PTEST_PATH} \
+ ${EXTRA_OECONF_X}"
+
+do_install() {
+ :
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay"
+ for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
+ l="bus bus-system bus-launch-helper"
+ for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
+ install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
+ cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+}
+RDEPENDS_${PN}-ptest += "bash"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb
deleted file mode 100644
index a768a09c4..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
- file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-
-DEPENDS = "python-pygobject dbus"
-
-RDEPENDS_${PN} += "make"
-RDEPENDS_${PN}-dev = ""
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
- file://tmpdir.patch \
- file://dbus-1.init \
- file://run-ptest \
- file://python-config.patch \
- file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
- "
-
-SRC_URI[md5sum] = "26d0cf3a1c9782cb0e342101f0450440"
-SRC_URI[sha256sum] = "b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f"
-
-S="${WORKDIR}/dbus-${PV}"
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
-
-inherit autotools pkgconfig gettext ptest upstream-version-is-even
-
-EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
-EXTRA_OECONF_X_class-native = "--without-x"
-
-EXTRA_OECONF = "--enable-tests \
- --enable-modular-tests \
- --enable-installed-tests \
- --enable-checks \
- --enable-asserts \
- --enable-verbose-mode \
- --disable-xml-docs \
- --disable-doxygen-docs \
- --disable-libaudit \
- --disable-systemd \
- --without-systemdsystemunitdir \
- --with-dbus-test-dir=${PTEST_PATH} \
- ${EXTRA_OECONF_X}"
-
-do_install() {
- :
-}
-
-do_install_ptest() {
- install -d ${D}${PTEST_PATH}/test
- case1="shell printf refs syslog"
- for i in ${case1}; do install ${B}/test/test-$i ${D}${PTEST_PATH}/test; done
- case2="marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay"
- for i in ${case2}; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
- case3="bus bus-system bus-launch-helper"
- for i in ${case3}; do install ${B}/bus/test-$i ${D}${PTEST_PATH}/test; done
- install ${B}/dbus/test-dbus ${D}${PTEST_PATH}/test
- cp -r ${B}/test/data ${D}${PTEST_PATH}/test
-}
-RDEPENDS_${PN}-ptest += "bash"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
new file mode 100644
index 000000000..85acb7b1c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-explicitely-check-stdint.h.patch
@@ -0,0 +1,38 @@
+From 1bfde222926be624a30a6e4b2cdc2c5064a36298 Mon Sep 17 00:00:00 2001
+From: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
+Date: Fri, 29 Jul 2016 01:19:37 +0300
+Subject: [PATCH] configure.ac: explicitely check stdint.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Otherwise HAVE_STDINT_H will not be defined or the var will not be
+picked up from cache so builds could fail with errors like:
+| ../../dbus-1.10.8/dbus/dbus-internals.h:239:8: error: â€uintptr_t’ undeclared (first use in this function)
+
+Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
+[smcv: fix Autoconf underquoting]
+Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
+
+Upstream-Status: Backport [from dbus-1.10]
+
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index cf5c5b9..a228d63 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -699,6 +699,8 @@ AC_CHECK_HEADERS(byteswap.h)
+
+ AC_CHECK_HEADERS(unistd.h)
+
++AC_CHECK_HEADERS([stdint.h])
++
+ AC_CHECK_HEADERS(ws2tcpip.h)
+
+ AC_CHECK_HEADERS(alloca.h)
+--
+2.9.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch
deleted file mode 100644
index c6eac2b7d..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From e18bd3a571be716d90bedc835a014472470ae7bd Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 30 Dec 2015 10:58:39 +0800
-Subject: [PATCH] configure.ac: support large-file for stat64
-
-While starting dbus-daemon on a 32-bit linux host and it invokes
-fstat to load /etc/dbus-1/system.conf through NFS. If system.conf
-was created with a large indoe number on 64-bit host. The above
-fstat invoking failed. Here is the log of strace:
-............
-$ ls -i /etc/dbus-1/system.conf
-53778558109 /etc/dbus-1/system.conf
-
-$ strace /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
-|open("/etc/dbus-1/system.conf", O_RDONLY) = 4
-|fstat64(4, {st_mode=S_IFREG|0644, st_size=3340, ...}) = 0
-|close(4) = 0
-|close(3) = 0
-|write(2, "Failed to start message bus: Fai"..., 109Failed to start message bus:
-Failed to stat "/etc/dbus-1/system.conf": Value too large for defined data type
-|) = 109
-|exit_group(1) = ?
-|+++ exited with 1 +++
-............
-
-In this situation, we should support large-file for stat64. Add marco
-AC_SYS_LARGEFILE to do the detection at configure time. It can be disabled
-by configuring with the `--disable-largefile' option.
-
-Upstream-Status: Backport
-
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545
-https://bugs.freedesktop.org/attachment.cgi?id=120747
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- configure.ac | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/configure.ac b/configure.ac
-index 82806ba..cb5a60b 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -64,6 +64,7 @@ AC_SUBST(DBUS_VERSION)
- AC_PROG_CC
- AM_PROG_CC_C_O
- AC_PROG_CXX
- AC_USE_SYSTEM_EXTENSIONS
-+AC_SYS_LARGEFILE
- AC_ISC_POSIX
- AC_HEADER_STDC
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.10.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.10.bb
new file mode 100644
index 000000000..4db0b9b0b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.10.bb
@@ -0,0 +1,181 @@
+SUMMARY = "D-Bus message bus"
+DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+ file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+DEPENDS = "expat virtual/libintl"
+RDEPENDS_dbus_class-native = ""
+RDEPENDS_dbus_class-nativesdk = ""
+PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
+ALLOW_EMPTY_dbus-ptest = "1"
+RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+ file://tmpdir.patch \
+ file://dbus-1.init \
+ file://os-test.patch \
+ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+ file://0001-configure.ac-explicitely-check-stdint.h.patch \
+"
+
+SRC_URI[md5sum] = "495676d240eb982921b3ad1343526849"
+SRC_URI[sha256sum] = "9d8f1d069ab4d1a0255d7b400ea3bcef4430c42e729b1012abb2890e3f739a43"
+
+inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
+
+INITSCRIPT_NAME = "dbus-1"
+INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
+
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r netdev"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
+ --no-create-home --shell /bin/false \
+ --user-group messagebus"
+
+CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
+
+DEBIANNAME_${PN} = "dbus-1"
+
+PACKAGES =+ "${PN}-lib"
+
+OLDPKGNAME = "dbus-x11"
+OLDPKGNAME_class-nativesdk = ""
+
+# for compatibility
+RPROVIDES_${PN} = "${OLDPKGNAME}"
+RREPLACES_${PN} += "${OLDPKGNAME}"
+
+FILES_${PN} = "${bindir}/dbus-daemon* \
+ ${bindir}/dbus-uuidgen \
+ ${bindir}/dbus-cleanup-sockets \
+ ${bindir}/dbus-send \
+ ${bindir}/dbus-monitor \
+ ${bindir}/dbus-launch \
+ ${bindir}/dbus-run-session \
+ ${bindir}/dbus-update-activation-environment \
+ ${libexecdir}/dbus* \
+ ${sysconfdir} \
+ ${localstatedir} \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/dbus-1/session.d \
+ ${datadir}/dbus-1/session.conf \
+ ${datadir}/dbus-1/system.d \
+ ${datadir}/dbus-1/system.conf \
+ ${systemd_system_unitdir} \
+ ${systemd_user_unitdir} \
+"
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+RRECOMMENDS_${PN}-lib = "${PN}"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool"
+
+pkg_postinst_dbus() {
+ # If both systemd and sysvinit are enabled, mask the dbus-1 init script
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask dbus-1.service
+ fi
+
+ if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
+ /etc/init.d/populate-volatile.sh update
+ fi
+}
+
+EXTRA_OECONF = "--disable-tests \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-libaudit \
+ "
+
+EXTRA_OECONF_append_class-native = " --disable-selinux"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
+do_install() {
+ autotools_do_install
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
+ install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
+ install -d ${D}${systemd_system_unitdir}/$i; done
+ install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
+ cd ${D}${systemd_system_unitdir}/dbus.target.wants/
+ ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
+ ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
+ ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
+ fi
+
+ install -d ${D}${sysconfdir}/default/volatiles
+ echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
+ > ${D}${sysconfdir}/default/volatiles/99_dbus
+
+
+ mkdir -p ${D}${localstatedir}/lib/dbus
+
+ chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
+
+ chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
+ chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
+
+ # Remove Red Hat initscript
+ rm -rf ${D}${sysconfdir}/rc.d
+
+ # Remove empty testexec directory as we don't build tests
+ rm -rf ${D}${libdir}/dbus-1.0/test
+
+ # Remove /var/run as it is created on startup
+ rm -rf ${D}${localstatedir}/run
+}
+
+do_install_class-native() {
+ autotools_do_install
+
+ # for dbus-glib-native introspection generation
+ install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
+ # N.B. is below install actually required?
+ install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
+
+ # dbus-glib-native and dbus-glib need this xml file
+ ./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
+
+ # dbus-launch has no X support so lets not install it in case the host
+ # has a more featured and useful version
+ rm -f ${D}${bindir}/dbus-launch
+}
+
+do_install_class-nativesdk() {
+ autotools_do_install
+
+ # dbus-launch has no X support so lets not install it in case the host
+ # has a more featured and useful version
+ rm -f ${D}${bindir}/dbus-launch
+
+ # Remove /var/run to avoid QA error
+ rm -rf ${D}${localstatedir}/run
+}
+BBCLASSEXTEND = "native nativesdk"
+
+INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb
deleted file mode 100644
index 245798a00..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb
+++ /dev/null
@@ -1,181 +0,0 @@
-SUMMARY = "D-Bus message bus"
-DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
- file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-DEPENDS = "expat virtual/libintl"
-RDEPENDS_dbus_class-native = ""
-RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
-ALLOW_EMPTY_dbus-ptest = "1"
-RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
- file://tmpdir.patch \
- file://dbus-1.init \
- file://os-test.patch \
- file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
- file://0001-configure.ac-support-large-file-for-stat64.patch \
-"
-
-SRC_URI[md5sum] = "26d0cf3a1c9782cb0e342101f0450440"
-SRC_URI[sha256sum] = "b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f"
-
-inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
-
-INITSCRIPT_NAME = "dbus-1"
-INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
-
-python __anonymous() {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "-r netdev"
-USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
- --no-create-home --shell /bin/false \
- --user-group messagebus"
-
-CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
-
-DEBIANNAME_${PN} = "dbus-1"
-
-PACKAGES =+ "${PN}-lib"
-
-OLDPKGNAME = "dbus-x11"
-OLDPKGNAME_class-nativesdk = ""
-
-# for compatibility
-RPROVIDES_${PN} = "${OLDPKGNAME}"
-RREPLACES_${PN} += "${OLDPKGNAME}"
-
-FILES_${PN} = "${bindir}/dbus-daemon* \
- ${bindir}/dbus-uuidgen \
- ${bindir}/dbus-cleanup-sockets \
- ${bindir}/dbus-send \
- ${bindir}/dbus-monitor \
- ${bindir}/dbus-launch \
- ${bindir}/dbus-run-session \
- ${bindir}/dbus-update-activation-environment \
- ${libexecdir}/dbus* \
- ${sysconfdir} \
- ${localstatedir} \
- ${datadir}/dbus-1/services \
- ${datadir}/dbus-1/system-services \
- ${datadir}/dbus-1/session.d \
- ${datadir}/dbus-1/session.conf \
- ${datadir}/dbus-1/system.d \
- ${datadir}/dbus-1/system.conf \
- ${systemd_system_unitdir} \
- ${systemd_user_unitdir} \
-"
-FILES_${PN}-lib = "${libdir}/lib*.so.*"
-RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool"
-
-pkg_postinst_dbus() {
- # If both systemd and sysvinit are enabled, mask the dbus-1 init script
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
- if [ -n "$D" ]; then
- OPTS="--root=$D"
- fi
- systemctl $OPTS mask dbus-1.service
- fi
-
- if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
- /etc/init.d/populate-volatile.sh update
- fi
-}
-
-EXTRA_OECONF = "--disable-tests \
- --disable-xml-docs \
- --disable-doxygen-docs \
- --disable-libaudit \
- "
-
-EXTRA_OECONF_append_class-native = " --disable-selinux"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG_class-native = ""
-PACKAGECONFIG_class-nativesdk = ""
-
-PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
-PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
-PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
-PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
-
-do_install() {
- autotools_do_install
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
- install -d ${D}${sysconfdir}/init.d
- sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
- install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
- fi
-
- if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
- for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
- install -d ${D}${systemd_system_unitdir}/$i; done
- install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
- cd ${D}${systemd_system_unitdir}/dbus.target.wants/
- ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
- ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
- ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
- fi
-
- install -d ${D}${sysconfdir}/default/volatiles
- echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
- > ${D}${sysconfdir}/default/volatiles/99_dbus
-
-
- mkdir -p ${D}${localstatedir}/lib/dbus
-
- chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
-
- chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
- chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
-
- # Remove Red Hat initscript
- rm -rf ${D}${sysconfdir}/rc.d
-
- # Remove empty testexec directory as we don't build tests
- rm -rf ${D}${libdir}/dbus-1.0/test
-
- # Remove /var/run as it is created on startup
- rm -rf ${D}${localstatedir}/run
-}
-
-do_install_class-native() {
- autotools_do_install
-
- # for dbus-glib-native introspection generation
- install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
- # N.B. is below install actually required?
- install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
-
- # dbus-glib-native and dbus-glib need this xml file
- ./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
-
- # dbus-launch has no X support so lets not install it in case the host
- # has a more featured and useful version
- rm -f ${D}${bindir}/dbus-launch
-}
-
-do_install_class-nativesdk() {
- autotools_do_install
-
- # dbus-launch has no X support so lets not install it in case the host
- # has a more featured and useful version
- rm -f ${D}${bindir}/dbus-launch
-
- # Remove /var/run to avoid QA error
- rm -rf ${D}${localstatedir}/run
-}
-BBCLASSEXTEND = "native nativesdk"
-
-INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear.inc b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear.inc
index 1dce2a5ff..bda7eb847 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear.inc
@@ -17,6 +17,7 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
file://0003-configure.patch \
file://0004-fix-2kb-keys.patch \
file://0007-dropbear-fix-for-x32-abi.patch \
+ file://fix-libtomcrypt-libtommath-ordering.patch \
file://init \
file://dropbearkey.service \
file://dropbear@.service \
@@ -44,9 +45,12 @@ SYSTEMD_SERVICE_${PN} = "dropbear.socket"
SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
BINCOMMANDS = "dbclient ssh scp"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
+
EXTRA_OECONF += "\
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
-CFLAGS += "-DSFTPSERVER_PATH=\\"${libdir}/openssh/sftp-server\\""
do_install() {
install -d ${D}${sysconfdir} \
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch
index b4501211c..60b302b5c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/0007-dropbear-fix-for-x32-abi.patch
@@ -10,7 +10,7 @@ undesired size, when compiled with the x32 abi toolchain.
2013/05/23
Received this fix from H J Lu.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
# HG changeset patch
# User H.J. Lu <hjl.tools@gmail.com>
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
new file mode 100644
index 000000000..de930f29d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/fix-libtomcrypt-libtommath-ordering.patch
@@ -0,0 +1,48 @@
+From 2fd8d2aedad0c50cdf1e43edd2387874b720ad4c Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Fri, 16 Sep 2016 12:18:23 -0700
+Subject: [PATCH] fix libtomcrypt/libtommath ordering
+
+To prevent build failures when using system libtom libraries and
+linking with --as-needed, LIBTOM_LIBS should be in the order
+-ltomcrypt -ltommath, not the other way around, ie libs should be
+prepended to LIBTOM_LIBS as they are found, not appended.
+
+Note that LIBTOM_LIBS is not used when linking with the bundled
+libtom libs.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b6abe4c..85bb8bc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -390,16 +390,16 @@ AC_ARG_ENABLE(bundled-libtom,
+ AC_MSG_NOTICE(Forcing bundled libtom*)
+ else
+ BUNDLED_LIBTOM=0
+- AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath",
++ AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS",
+ [AC_MSG_ERROR([Missing system libtommath and --disable-bundled-libtom was specified])] )
+- AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt",
++ AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS",
+ [AC_MSG_ERROR([Missing system libtomcrypt and --disable-bundled-libtom was specified])] )
+ fi
+ ],
+ [
+ BUNDLED_LIBTOM=0
+- AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="$LIBTOM_LIBS -ltommath", BUNDLED_LIBTOM=1)
+- AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="$LIBTOM_LIBS -ltomcrypt", BUNDLED_LIBTOM=1)
++ AC_CHECK_LIB(tommath, mp_exptmod, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS", BUNDLED_LIBTOM=1)
++ AC_CHECK_LIB(tomcrypt, register_cipher, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS", BUNDLED_LIBTOM=1)
+ ]
+ )
+
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/init b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/init
index e8fed3f94..434bd6b97 100755
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/init
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/init
@@ -62,13 +62,13 @@ for t in $DROPBEAR_KEYTYPES; do
if [ -f "$DROPBEAR_RSAKEY" -a ! -s "$DROPBEAR_RSAKEY" ]; then
rm $DROPBEAR_RSAKEY || true
fi
- test -f $DROPBEAR_RSAKEY || dropbearkey -t rsa -f $DROPBEAR_RSAKEY
+ test -f $DROPBEAR_RSAKEY || dropbearkey -t rsa -f $DROPBEAR_RSAKEY $DROPBEAR_RSAKEY_ARGS
;;
dsa)
if [ -f "$DROPBEAR_DSSKEY" -a ! -s "$DROPBEAR_DSSKEY" ]; then
rm $DROPBEAR_DSSKEY || true
fi
- test -f $DROPBEAR_DSSKEY || dropbearkey -t dss -f $DROPBEAR_DSSKEY
+ test -f $DROPBEAR_DSSKEY || dropbearkey -t dss -f $DROPBEAR_DSSKEY $DROPBEAR_DSSKEY_ARGS
;;
esac
done
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch
new file mode 100644
index 000000000..df6efb453
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear/support-out-of-tree-builds.patch
@@ -0,0 +1,43 @@
+From: =?UTF-8?q?Henrik=20Nordstr=C3=B6m?= <henrik@knc.nu>
+Date: Wed, 11 May 2016 12:35:06 +0200
+Subject: [PATCH] Support out-of-tree builds usign bundled libtom
+
+When building out-of-tree we need both source and generated
+folders in include paths to find both distributed and generated
+headers.
+
+
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Backport
+---
+ libtomcrypt/Makefile.in | 2 +-
+ libtommath/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libtomcrypt/Makefile.in b/libtomcrypt/Makefile.in
+index 3056ef0..7970700 100644
+--- a/libtomcrypt/Makefile.in
++++ b/libtomcrypt/Makefile.in
+@@ -19,7 +19,7 @@ srcdir=@srcdir@
+
+ # Compilation flags. Note the += does not write over the user's CFLAGS!
+ # The rest of the flags come from the parent Dropbear makefile
+-CFLAGS += -c -I$(srcdir)/src/headers/ -I$(srcdir)/../ -DLTC_SOURCE -I$(srcdir)/../libtommath/
++CFLAGS += -c -Isrc/headers/ -I$(srcdir)/src/headers/ -I../ -I$(srcdir)/../ -DLTC_SOURCE -I../libtommath/ -I$(srcdir)/../libtommath/
+
+ # additional warnings (newer GCC 3.4 and higher)
+ ifdef GCC_34
+diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in
+index 06aba68..019c50b 100644
+--- a/libtommath/Makefile.in
++++ b/libtommath/Makefile.in
+@@ -9,7 +9,7 @@ VPATH=@srcdir@
+ srcdir=@srcdir@
+
+ # So that libtommath can include Dropbear headers for options and m_burn()
+-CFLAGS += -I$(srcdir)/../libtomcrypt/src/headers/ -I$(srcdir)/../
++CFLAGS += -I. -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../
+
+ ifndef IGNORE_SPEED
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb
deleted file mode 100644
index 6332579e7..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require dropbear.inc
-
-SRC_URI[md5sum] = "2ccc0a2f3e37ca221db12c5af6a88137"
-SRC_URI[sha256sum] = "376214169c0e187ee9f48ae1a99b3f835016ad5b98ede4bfd1cf581deba783af"
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb
new file mode 100644
index 000000000..a7020978a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dropbear/dropbear_2016.74.bb
@@ -0,0 +1,7 @@
+require dropbear.inc
+
+SRC_URI += "file://support-out-of-tree-builds.patch"
+
+SRC_URI[md5sum] = "9ad0172731e0f16623937804643b5bd8"
+SRC_URI[sha256sum] = "2720ea54ed009af812701bcc290a2a601d5c107d12993e5d92c0f5f81f718891"
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat-2.1.0/autotools.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat-2.1.0/autotools.patch
deleted file mode 100644
index 0e599697a..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat-2.1.0/autotools.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Avoid using expat's m4 files
-
-Upstream-Status: Inappropriate [Other]
-Workaround specific to our build system.
-
-Signed-off-by: Kevin Tian <kevin.tian@intel.com>
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Updated to apply over expat 2.1.0
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-
-diff -Nurd expat-2.1.0/configure.in expat-2.1.0/configure.in
---- expat-2.1.0/configure.in 2012-03-04 01:45:53.000000000 +0200
-+++ expat-2.1.0/configure.in 2012-05-10 21:04:44.000000000 +0300
-@@ -51,8 +51,6 @@
-
- AC_CONFIG_HEADER(expat_config.h)
-
--sinclude(conftools/ac_c_bigendian_cross.m4)
--
- AC_LIBTOOL_WIN32_DLL
- AC_PROG_LIBTOOL
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat-2.1.0/expat-CVE-2015-1283.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat-2.1.0/expat-CVE-2015-1283.patch
deleted file mode 100644
index 1d0acb6b9..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat-2.1.0/expat-CVE-2015-1283.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Multiple integer overflows in the XML_GetBuffer function in Expat
-through 2.1.0, allow remote attackers to cause a denial of service
-(heap-based buffer overflow) or possibly have unspecified other
-impact via crafted XML data.
-
-CVSSv2: (AV:N/AC:M/Au:N/C:P/I:P/A:P)
-
-CVE: CVE-2015-1283
-Upstream-Status: Backport
-
-Signed-off-by: Eric Rahm <erahm@mozilla.com>
-Signed-off-by: Zhixiong Chi <zhixiong.chi@windirver.com>
-
-Index: expat-2.1.0/lib/xmlparse.c
-===================================================================
---- expat-2.1.0.orig/lib/xmlparse.c 2012-03-11 13:13:12.000000000 +0800
-+++ expat-2.1.0/lib/xmlparse.c 2015-12-23 10:29:07.347361329 +0800
-@@ -1678,6 +1678,12 @@
- void * XMLCALL
- XML_GetBuffer(XML_Parser parser, int len)
- {
-+/* BEGIN MOZILLA CHANGE (sanity check len) */
-+ if (len < 0) {
-+ errorCode = XML_ERROR_NO_MEMORY;
-+ return NULL;
-+ }
-+/* END MOZILLA CHANGE */
- switch (ps_parsing) {
- case XML_SUSPENDED:
- errorCode = XML_ERROR_SUSPENDED;
-@@ -1689,8 +1695,13 @@
- }
-
- if (len > bufferLim - bufferEnd) {
-- /* FIXME avoid integer overflow */
- int neededSize = len + (int)(bufferEnd - bufferPtr);
-+/* BEGIN MOZILLA CHANGE (sanity check neededSize) */
-+ if (neededSize < 0) {
-+ errorCode = XML_ERROR_NO_MEMORY;
-+ return NULL;
-+ }
-+/* END MOZILLA CHANGE */
- #ifdef XML_CONTEXT_BYTES
- int keep = (int)(bufferPtr - buffer);
-
-@@ -1719,7 +1730,15 @@
- bufferSize = INIT_BUFFER_SIZE;
- do {
- bufferSize *= 2;
-- } while (bufferSize < neededSize);
-+/* BEGIN MOZILLA CHANGE (prevent infinite loop on overflow) */
-+ } while (bufferSize < neededSize && bufferSize > 0);
-+/* END MOZILLA CHANGE */
-+/* BEGIN MOZILLA CHANGE (sanity check bufferSize) */
-+ if (bufferSize <= 0) {
-+ errorCode = XML_ERROR_NO_MEMORY;
-+ return NULL;
-+ }
-+/* END MOZILLA CHANGE */
- newBuf = (char *)MALLOC(bufferSize);
- if (newBuf == 0) {
- errorCode = XML_ERROR_NO_MEMORY;
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc b/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
index 4bd60a2a6..fe9d7e74f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat.inc
@@ -4,9 +4,8 @@ HOMEPAGE = "http://expat.sourceforge.net/"
SECTION = "libs"
LICENSE = "MIT"
-SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
file://autotools.patch \
- file://expat-CVE-2015-1283.patch \
"
inherit autotools lib_package gzipnative
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch b/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
new file mode 100644
index 000000000..3d3c5bad9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat/autotools.patch
@@ -0,0 +1,24 @@
+Avoid using expat's m4 files
+
+Upstream-Status: Inappropriate [Other]
+Workaround specific to our build system.
+
+Signed-off-by: Kevin Tian <kevin.tian@intel.com>
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+Updated to apply over expat 2.1.0
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+
+diff -Nurd expat-2.1.0/configure.in expat-2.1.0/configure.in
+--- expat-2.1.0/configure.ac 2012-03-04 01:45:53.000000000 +0200
++++ expat-2.1.0/configure.ac 2012-05-10 21:04:44.000000000 +0300
+@@ -51,8 +51,6 @@
+
+ AC_CONFIG_HEADER(expat_config.h)
+
+-sinclude(conftools/ac_c_bigendian_cross.m4)
+-
+ AC_LIBTOOL_WIN32_DLL
+ AC_PROG_LIBTOOL
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.1.0.bb b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.1.0.bb
deleted file mode 100644
index b958742ed..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.1.0.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require expat.inc
-LIC_FILES_CHKSUM = "file://COPYING;md5=1b71f681713d1256e1c23b0890920874"
-
-SRC_URI[md5sum] = "dd7dab7a5fea97d2a6a43f511449b7cd"
-SRC_URI[sha256sum] = "823705472f816df21c8f6aa026dd162b280806838bb55b3432b0fb1fcca7eb86"
diff --git a/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.0.bb b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.0.bb
new file mode 100644
index 000000000..ef21a111a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/expat/expat_2.2.0.bb
@@ -0,0 +1,5 @@
+require expat.inc
+LIC_FILES_CHKSUM = "file://COPYING;md5=9c3ee559c6f9dcee1043ead112139f4f"
+
+SRC_URI[md5sum] = "2f47841c829facb346eb6e3fab5212e2"
+SRC_URI[sha256sum] = "d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff"
diff --git a/import-layers/yocto-poky/meta/recipes-core/fts/fts.bb b/import-layers/yocto-poky/meta/recipes-core/fts/fts.bb
index c30172076..9d8230fa3 100644
--- a/import-layers/yocto-poky/meta/recipes-core/fts/fts.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/fts/fts.bb
@@ -1,7 +1,7 @@
# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "keith bostic's POSIX file tree stream operations library"
+SUMMARY = "POSIX file tree stream operations library"
HOMEPAGE = "https://sites.google.com/a/bostic.com/keithbostic"
LICENSE = "BSD-4-Clause"
LIC_FILES_CHKSUM = "file://fts.h;beginline=1;endline=36;md5=2532eddb3d1a21905723a4011ec4e085"
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch
index 7293f5b08..49a10f5b1 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_aclocal_version.patch
@@ -5,7 +5,7 @@ when we update aclocal
Upstream-Status: Inappropriate [configuration]
-Signed-off-by Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
Index: gettext-0.16.1/autoconf-lib-link/m4/lib-link.m4
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch
index 06861492c..fd5feebc8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.16.1/fix_gnu_source_circular.patch
@@ -6,7 +6,7 @@ Thanks to Mark Hatle for the timely pointers and fixes.
Upstream-Status: Inappropriate [licensing]
-Signed-off-by Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
diff -ru gettext-0.16.1/gettext-runtime/gnulib-m4/extensions.m4 gettext.patched/gettext-runtime/gnulib-m4/extensions.m4
--- gettext-0.16.1/gettext-runtime/gnulib-m4/extensions.m4 2006-11-27 09:14:38.000000000 -0800
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch
index 35a131067..35a131067 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/add-with-bisonlocaledir.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/parallel.patch b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
index c8e2c94af..c8e2c94af 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/parallel.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-0.19.8.1/parallel.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING
deleted file mode 100644
index 8d11d1d8e..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING
+++ /dev/null
@@ -1,4 +0,0 @@
-dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in
deleted file mode 100644
index 8906ba0ff..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in
+++ /dev/null
@@ -1,465 +0,0 @@
-# Makefile for PO directory in any package using GNU gettext.
-# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-#
-# This file can be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU General Public
-# License but which still want to provide support for the GNU gettext
-# functionality.
-# Please note that the actual code of GNU gettext is covered by the GNU
-# General Public License and is *not* in the public domain.
-#
-# Origin: gettext-0.19
-GETTEXT_MACRO_VERSION = 0.19
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-
-SED = @SED@
-SHELL = /bin/sh
-@SET_MAKE@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datarootdir = @datarootdir@
-datadir = @datadir@
-localedir = @localedir@
-gettextsrcdir = $(datadir)/gettext/po
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-
-MKDIR_P = @MKDIR_P@
-
-GMSGFMT_ = @GMSGFMT@
-GMSGFMT_no = @GMSGFMT@
-GMSGFMT_yes = @GMSGFMT_015@
-GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
-MSGFMT_ = @MSGFMT@
-MSGFMT_no = @MSGFMT@
-MSGFMT_yes = @MSGFMT_015@
-MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
-XGETTEXT_ = @XGETTEXT@
-XGETTEXT_no = @XGETTEXT@
-XGETTEXT_yes = @XGETTEXT_015@
-XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
-MSGMERGE = msgmerge
-MSGMERGE_UPDATE = @MSGMERGE@ --update
-MSGINIT = msginit
-MSGCONV = msgconv
-MSGFILTER = msgfilter
-
-POFILES = @POFILES@
-GMOFILES = @GMOFILES@
-UPDATEPOFILES = @UPDATEPOFILES@
-DUMMYPOFILES = @DUMMYPOFILES@
-DISTFILES.common = Makefile.in.in remove-potcdate.sin \
-$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
-DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
-$(POFILES) $(GMOFILES) \
-$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
-
-POTFILES = \
-
-CATALOGS = @CATALOGS@
-
-POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
-POFILESDEPS_yes = $(POFILESDEPS_)
-POFILESDEPS_no =
-POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
-
-DISTFILESDEPS_ = update-po
-DISTFILESDEPS_yes = $(DISTFILESDEPS_)
-DISTFILESDEPS_no =
-DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
-
-# Makevars gets inserted here. (Don't remove this line!)
-
-.SUFFIXES:
-.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
-
-.po.mo:
- @echo "$(MSGFMT) -c -o $@ $<"; \
- $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
-
-.po.gmo:
- @lang=`echo $* | sed -e 's,.*/,,'`; \
- test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
- cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
-
-.sin.sed:
- sed -e '/^#/d' $< > t-$@
- mv t-$@ $@
-
-
-all: all-@USE_NLS@
-
-all-yes: stamp-po
-all-no:
-
-# Ensure that the gettext macros and this Makefile.in.in are in sync.
-CHECK_MACRO_VERSION = \
- test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
- || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
- exit 1; \
- }
-
-# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
-# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
-# we don't want to bother translators with empty POT files). We assume that
-# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
-# In this case, stamp-po is a nop (i.e. a phony target).
-
-# stamp-po is a timestamp denoting the last time at which the CATALOGS have
-# been loosely updated. Its purpose is that when a developer or translator
-# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
-# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
-# invocations of "make" will do nothing. This timestamp would not be necessary
-# if updating the $(CATALOGS) would always touch them; however, the rule for
-# $(POFILES) has been designed to not touch files that don't need to be
-# changed.
-stamp-po: $(srcdir)/$(DOMAIN).pot
- @$(CHECK_MACRO_VERSION)
- test ! -f $(srcdir)/$(DOMAIN).pot || \
- test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
- @test ! -f $(srcdir)/$(DOMAIN).pot || { \
- echo "touch stamp-po" && \
- echo timestamp > stamp-poT && \
- mv stamp-poT stamp-po; \
- }
-
-# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
-# otherwise packages like GCC can not be built if only parts of the source
-# have been downloaded.
-
-# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
-# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
-# The determination of whether the package xyz is a GNU one is based on the
-# heuristic whether some file in the top level directory mentions "GNU xyz".
-# If GNU 'find' is available, we avoid grepping through monster files.
-$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
- package_gnu="$(PACKAGE_GNU)"; \
- test -n "$$package_gnu" || { \
- if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
- LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
- -size -10000000c -exec grep 'GNU @PACKAGE@' \
- /dev/null '{}' ';' 2>/dev/null; \
- else \
- LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
- fi; \
- } | grep -v 'libtool:' >/dev/null; then \
- package_gnu=yes; \
- else \
- package_gnu=no; \
- fi; \
- }; \
- if test "$$package_gnu" = "yes"; then \
- package_prefix='GNU '; \
- else \
- package_prefix=''; \
- fi; \
- if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
- msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
- else \
- msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
- fi; \
- case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
- '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
- $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
- --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
- --files-from=$(srcdir)/POTFILES.in \
- --copyright-holder='$(COPYRIGHT_HOLDER)' \
- --msgid-bugs-address="$$msgid_bugs_address" \
- ;; \
- *) \
- $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
- --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
- --files-from=$(srcdir)/POTFILES.in \
- --copyright-holder='$(COPYRIGHT_HOLDER)' \
- --package-name="$${package_prefix}@PACKAGE@" \
- --package-version='@VERSION@' \
- --msgid-bugs-address="$$msgid_bugs_address" \
- ;; \
- esac
- test ! -f $(DOMAIN).po || { \
- if test -f $(srcdir)/$(DOMAIN).pot; then \
- sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
- sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
- if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
- rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
- else \
- rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
- mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
- fi; \
- else \
- mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
- fi; \
- }
-
-# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
-# every "make" invocation, only create it when it is missing.
-# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
-$(srcdir)/$(DOMAIN).pot:
- $(MAKE) $(DOMAIN).pot-update
-
-# This target rebuilds a PO file if $(DOMAIN).pot has changed.
-# Note that a PO file is not touched if it doesn't need to be changed.
-$(POFILES): $(POFILESDEPS)
- @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
- if test -f "$(srcdir)/$${lang}.po"; then \
- test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
- test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
- cd $(srcdir) \
- && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
- '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
- $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
- *) \
- $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
- esac; \
- }; \
- else \
- $(MAKE) $${lang}.po-create; \
- fi
-
-
-install: install-exec install-data
-install-exec:
-install-data: install-data-@USE_NLS@
- if test "$(PACKAGE)" = "gettext-tools"; then \
- $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \
- for file in $(DISTFILES.common) Makevars.template; do \
- $(INSTALL_DATA) $(srcdir)/$$file \
- $(DESTDIR)$(gettextsrcdir)/$$file; \
- done; \
- for file in Makevars; do \
- rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
- done; \
- else \
- : ; \
- fi
-install-data-no: all
-install-data-yes: all
- @catalogs='$(CATALOGS)'; \
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
- dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(MKDIR_P) $(DESTDIR)$$dir; \
- if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
- $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
- echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
- for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
- if test -n "$$lc"; then \
- if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
- link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
- mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
- mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
- (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
- for file in *; do \
- if test -f $$file; then \
- ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
- fi; \
- done); \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
- else \
- if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
- :; \
- else \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
- mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
- fi; \
- fi; \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
- ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
- ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
- cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
- echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
- fi; \
- done; \
- done
-
-install-strip: install
-
-installdirs: installdirs-exec installdirs-data
-installdirs-exec:
-installdirs-data: installdirs-data-@USE_NLS@
- if test "$(PACKAGE)" = "gettext-tools"; then \
- $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \
- else \
- : ; \
- fi
-installdirs-data-no:
-installdirs-data-yes:
- @catalogs='$(CATALOGS)'; \
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
- dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(MKDIR_P) $(DESTDIR)$$dir; \
- for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
- if test -n "$$lc"; then \
- if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
- link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
- mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
- mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
- (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
- for file in *; do \
- if test -f $$file; then \
- ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
- fi; \
- done); \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
- else \
- if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
- :; \
- else \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
- mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
- fi; \
- fi; \
- fi; \
- done; \
- done
-
-# Define this as empty until I found a useful application.
-installcheck:
-
-uninstall: uninstall-exec uninstall-data
-uninstall-exec:
-uninstall-data: uninstall-data-@USE_NLS@
- if test "$(PACKAGE)" = "gettext-tools"; then \
- for file in $(DISTFILES.common) Makevars.template; do \
- rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
- done; \
- else \
- : ; \
- fi
-uninstall-data-no:
-uninstall-data-yes:
- catalogs='$(CATALOGS)'; \
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
- for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
- rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
- done; \
- done
-
-check: all
-
-info dvi ps pdf html tags TAGS ctags CTAGS ID:
-
-mostlyclean:
- rm -f remove-potcdate.sed
- rm -f stamp-poT
- rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
- rm -fr *.o
-
-clean: mostlyclean
-
-distclean: clean
- rm -f Makefile Makefile.in POTFILES *.mo
-
-maintainer-clean: distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- rm -f stamp-po $(GMOFILES)
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir:
- test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
- @$(MAKE) dist2
-# This is a separate target because 'update-po' must be executed before.
-dist2: stamp-po $(DISTFILES)
- dists="$(DISTFILES)"; \
- if test "$(PACKAGE)" = "gettext-tools"; then \
- dists="$$dists Makevars.template"; \
- fi; \
- if test -f $(srcdir)/$(DOMAIN).pot; then \
- dists="$$dists $(DOMAIN).pot stamp-po"; \
- fi; \
- if test -f $(srcdir)/ChangeLog; then \
- dists="$$dists ChangeLog"; \
- fi; \
- for i in 0 1 2 3 4 5 6 7 8 9; do \
- if test -f $(srcdir)/ChangeLog.$$i; then \
- dists="$$dists ChangeLog.$$i"; \
- fi; \
- done; \
- if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
- for file in $$dists; do \
- if test -f $$file; then \
- cp -p $$file $(distdir) || exit 1; \
- else \
- cp -p $(srcdir)/$$file $(distdir) || exit 1; \
- fi; \
- done
-
-update-po: Makefile
- $(MAKE) $(DOMAIN).pot-update
- test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
- $(MAKE) update-gmo
-
-# General rule for creating PO files.
-
-.nop.po-create:
- @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
- echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
- exit 1
-
-# General rule for updating PO files.
-
-.nop.po-update:
- @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
- if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
- tmpdir=`pwd`; \
- echo "$$lang:"; \
- test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
- cd $(srcdir); \
- if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
- '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
- $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
- *) \
- $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
- esac; \
- }; then \
- if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
- rm -f $$tmpdir/$$lang.new.po; \
- else \
- if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
- :; \
- else \
- echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
- exit 1; \
- fi; \
- fi; \
- else \
- echo "msgmerge for $$lang.po failed!" 1>&2; \
- rm -f $$tmpdir/$$lang.new.po; \
- fi
-
-$(DUMMYPOFILES):
-
-update-gmo: Makefile $(GMOFILES)
- @:
-
-# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
-# because execution permission bits may not work on the current file system.
-# Use @SHELL@, which is the shell determined by autoconf for the use by its
-# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
-Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
- cd $(top_builddir) \
- && @SHELL@ ./config.status $(subdir)/$@.in po-directories
-
-force:
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz
deleted file mode 100644
index b04ba5503..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz
+++ /dev/null
Binary files differ
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath
deleted file mode 100755
index b625621fa..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath
+++ /dev/null
@@ -1,684 +0,0 @@
-#! /bin/sh
-# Output a system dependent set of variables, describing how to set the
-# run time search path of shared libraries in an executable.
-#
-# Copyright 1996-2014 Free Software Foundation, Inc.
-# Taken from GNU libtool, 2001
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# The first argument passed to this file is the canonical host specification,
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
-# should be set by the caller.
-#
-# The set of defined variables is at the end of this script.
-
-# Known limitations:
-# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
-# than 256 bytes, otherwise the compiler driver will dump core. The only
-# known workaround is to choose shorter directory names for the build
-# directory and/or the installation directory.
-
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-shrext=.so
-
-host="$1"
-host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-# Code taken from libtool.m4's _LT_CC_BASENAME.
-
-for cc_temp in $CC""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
-
-# Code taken from libtool.m4's _LT_COMPILER_PIC.
-
-wl=
-if test "$GCC" = yes; then
- wl='-Wl,'
-else
- case "$host_os" in
- aix*)
- wl='-Wl,'
- ;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- ;;
- hpux9* | hpux10* | hpux11*)
- wl='-Wl,'
- ;;
- irix5* | irix6* | nonstopux*)
- wl='-Wl,'
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- ecc*)
- wl='-Wl,'
- ;;
- icc* | ifort*)
- wl='-Wl,'
- ;;
- lf95*)
- wl='-Wl,'
- ;;
- nagfor*)
- wl='-Wl,-Wl,,'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
- wl='-Wl,'
- ;;
- ccc*)
- wl='-Wl,'
- ;;
- xl* | bgxl* | bgf* | mpixl*)
- wl='-Wl,'
- ;;
- como)
- wl='-lopt='
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ F* | *Sun*Fortran*)
- wl=
- ;;
- *Sun\ C*)
- wl='-Wl,'
- ;;
- esac
- ;;
- esac
- ;;
- newsos6)
- ;;
- *nto* | *qnx*)
- ;;
- osf3* | osf4* | osf5*)
- wl='-Wl,'
- ;;
- rdos*)
- ;;
- solaris*)
- case $cc_basename in
- f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
- wl='-Qoption ld '
- ;;
- *)
- wl='-Wl,'
- ;;
- esac
- ;;
- sunos4*)
- wl='-Qoption ld '
- ;;
- sysv4 | sysv4.2uw2* | sysv4.3*)
- wl='-Wl,'
- ;;
- sysv4*MP*)
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- wl='-Wl,'
- ;;
- unicos*)
- wl='-Wl,'
- ;;
- uts4*)
- ;;
- esac
-fi
-
-# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
-
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-
-case "$host_os" in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- # Unlike libtool, we use -rpath here, not --rpath, since the documented
- # option of GNU ld is called -rpath, not --rpath.
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- case "$host_os" in
- aix[3-9]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs=no
- fi
- ;;
- amigaos*)
- case "$host_cpu" in
- powerpc)
- ;;
- m68k)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
- beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- cygwin* | mingw* | pw32* | cegcc*)
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- haiku*)
- ;;
- interix[3-9]*)
- hardcode_direct=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- netbsd*)
- ;;
- solaris*)
- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- ;;
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
- else
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
- sunos4*)
- hardcode_direct=yes
- ;;
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- esac
- if test "$ld_shlibs" = no; then
- hardcode_libdir_flag_spec=
- fi
-else
- case "$host_os" in
- aix3*)
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
- aix[4-9]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- else
- aix_use_runtimelinking=no
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
- fi
- hardcode_direct=yes
- hardcode_libdir_separator=':'
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct=unsupported
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- ;;
- esac
- fi
- # Begin _LT_AC_SYS_LIBPATH_AIX.
- echo 'int main () { return 0; }' > conftest.c
- ${CC} ${LDFLAGS} conftest.c -o conftest
- aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
- if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
- fi
- if test -z "$aix_libpath"; then
- aix_libpath="/usr/lib:/lib"
- fi
- rm -f conftest.c conftest
- # End _LT_AC_SYS_LIBPATH_AIX.
- if test "$aix_use_runtimelinking" = yes; then
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- else
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- fi
- fi
- ;;
- amigaos*)
- case "$host_cpu" in
- powerpc)
- ;;
- m68k)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
- bsdi[45]*)
- ;;
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- libext=lib
- ;;
- darwin* | rhapsody*)
- hardcode_direct=no
- if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- dgux*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
- freebsd2.[01]*)
- hardcode_direct=yes
- hardcode_minus_L=yes
- ;;
- freebsd* | dragonfly*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- hpux9*)
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- hpux10*)
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- fi
- ;;
- hpux11*)
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct=no
- ;;
- *)
- hardcode_direct=yes
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- esac
- fi
- ;;
- irix5* | irix6* | nonstopux*)
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
- netbsd*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- newsos6)
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
- *nto* | *qnx*)
- ;;
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct=yes
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- else
- case "$host_os" in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- ld_shlibs=no
- fi
- ;;
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- osf3*)
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
- osf4* | osf5*)
- if test "$GCC" = yes; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- # Both cc and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- ;;
- solaris*)
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- sunos4*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- ;;
- sysv4)
- case $host_vendor in
- sni)
- hardcode_direct=yes # is this really true???
- ;;
- siemens)
- hardcode_direct=no
- ;;
- motorola)
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- ;;
- sysv4.3*)
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- ld_shlibs=yes
- fi
- ;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- ;;
- sysv5* | sco3.2v5* | sco5v6*)
- hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
- hardcode_libdir_separator=':'
- ;;
- uts4*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
- *)
- ld_shlibs=no
- ;;
- esac
-fi
-
-# Check dynamic linker characteristics
-# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
-# Unlike libtool.m4, here we don't care about _all_ names of the library, but
-# only about the one the linker finds when passed -lNAME. This is the last
-# element of library_names_spec in libtool.m4, or possibly two of them if the
-# linker has special search rules.
-library_names_spec= # the last element of library_names_spec in libtool.m4
-libname_spec='lib$name'
-case "$host_os" in
- aix3*)
- library_names_spec='$libname.a'
- ;;
- aix[4-9]*)
- library_names_spec='$libname$shrext'
- ;;
- amigaos*)
- case "$host_cpu" in
- powerpc*)
- library_names_spec='$libname$shrext' ;;
- m68k)
- library_names_spec='$libname.a' ;;
- esac
- ;;
- beos*)
- library_names_spec='$libname$shrext'
- ;;
- bsdi[45]*)
- library_names_spec='$libname$shrext'
- ;;
- cygwin* | mingw* | pw32* | cegcc*)
- shrext=.dll
- library_names_spec='$libname.dll.a $libname.lib'
- ;;
- darwin* | rhapsody*)
- shrext=.dylib
- library_names_spec='$libname$shrext'
- ;;
- dgux*)
- library_names_spec='$libname$shrext'
- ;;
- freebsd[23].*)
- library_names_spec='$libname$shrext$versuffix'
- ;;
- freebsd* | dragonfly*)
- library_names_spec='$libname$shrext'
- ;;
- gnu*)
- library_names_spec='$libname$shrext'
- ;;
- haiku*)
- library_names_spec='$libname$shrext'
- ;;
- hpux9* | hpux10* | hpux11*)
- case $host_cpu in
- ia64*)
- shrext=.so
- ;;
- hppa*64*)
- shrext=.sl
- ;;
- *)
- shrext=.sl
- ;;
- esac
- library_names_spec='$libname$shrext'
- ;;
- interix[3-9]*)
- library_names_spec='$libname$shrext'
- ;;
- irix5* | irix6* | nonstopux*)
- library_names_spec='$libname$shrext'
- case "$host_os" in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
- *) libsuff= shlibsuff= ;;
- esac
- ;;
- esac
- ;;
- linux*oldld* | linux*aout* | linux*coff*)
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- library_names_spec='$libname$shrext'
- ;;
- knetbsd*-gnu)
- library_names_spec='$libname$shrext'
- ;;
- netbsd*)
- library_names_spec='$libname$shrext'
- ;;
- newsos6)
- library_names_spec='$libname$shrext'
- ;;
- *nto* | *qnx*)
- library_names_spec='$libname$shrext'
- ;;
- openbsd*)
- library_names_spec='$libname$shrext$versuffix'
- ;;
- os2*)
- libname_spec='$name'
- shrext=.dll
- library_names_spec='$libname.a'
- ;;
- osf3* | osf4* | osf5*)
- library_names_spec='$libname$shrext'
- ;;
- rdos*)
- ;;
- solaris*)
- library_names_spec='$libname$shrext'
- ;;
- sunos4*)
- library_names_spec='$libname$shrext$versuffix'
- ;;
- sysv4 | sysv4.3*)
- library_names_spec='$libname$shrext'
- ;;
- sysv4*MP*)
- library_names_spec='$libname$shrext'
- ;;
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- library_names_spec='$libname$shrext'
- ;;
- tpf*)
- library_names_spec='$libname$shrext'
- ;;
- uts4*)
- library_names_spec='$libname$shrext'
- ;;
-esac
-
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
-shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
-escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-
-LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
-
-# How to pass a linker flag through the compiler.
-wl="$escaped_wl"
-
-# Static library suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally "so").
-shlibext="$shlibext"
-
-# Format of library name prefix.
-libname_spec="$escaped_libname_spec"
-
-# Library names that the linker finds when passed -lNAME.
-library_names_spec="$escaped_library_names_spec"
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct="$hardcode_direct"
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L="$hardcode_minus_L"
-
-EOF
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch
index 29ef2a5a6..29ef2a5a6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/0001-PATCH-Disable-the-test-to-convert-euc-jp.patch
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/COPYING b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/COPYING
new file mode 100644
index 000000000..3671ab698
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/COPYING
@@ -0,0 +1,4 @@
+dnl Copyright (C) 1995-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/Makefile.in.in b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/Makefile.in.in
new file mode 100644
index 000000000..38c293d2e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/Makefile.in.in
@@ -0,0 +1,483 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+#
+# Origin: gettext-0.19.8
+GETTEXT_MACRO_VERSION = 0.19
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+SED = @SED@
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+# When building gettext-tools, we prefer to use the built programs
+# rather than installed programs. However, we can't do that when we
+# are cross compiling.
+CROSS_COMPILING = @CROSS_COMPILING@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
+POFILESDEPS_yes = $(POFILESDEPS_)
+POFILESDEPS_no =
+POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
+
+DISTFILESDEPS_ = update-po
+DISTFILESDEPS_yes = $(DISTFILESDEPS_)
+DISTFILESDEPS_no =
+DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
+
+.po.mo:
+ @echo "$(MSGFMT) -c -o $@ $<"; \
+ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+all: all-@USE_NLS@
+
+all-yes: stamp-po
+all-no:
+
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
+CHECK_MACRO_VERSION = \
+ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+ exit 1; \
+ }
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+ @$(CHECK_MACRO_VERSION)
+ test ! -f $(srcdir)/$(DOMAIN).pot || \
+ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+ @test ! -f $(srcdir)/$(DOMAIN).pot || { \
+ echo "touch stamp-po" && \
+ echo timestamp > stamp-poT && \
+ mv stamp-poT stamp-po; \
+ }
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+# The determination of whether the package xyz is a GNU one is based on the
+# heuristic whether some file in the top level directory mentions "GNU xyz".
+# If GNU 'find' is available, we avoid grepping through monster files.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ package_gnu="$(PACKAGE_GNU)"; \
+ test -n "$$package_gnu" || { \
+ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
+ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
+ -size -10000000c -exec grep 'GNU @PACKAGE@' \
+ /dev/null '{}' ';' 2>/dev/null; \
+ else \
+ LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
+ fi; \
+ } | grep -v 'libtool:' >/dev/null; then \
+ package_gnu=yes; \
+ else \
+ package_gnu=no; \
+ fi; \
+ }; \
+ if test "$$package_gnu" = "yes"; then \
+ package_prefix='GNU '; \
+ else \
+ package_prefix=''; \
+ fi; \
+ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+ else \
+ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+ fi; \
+ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ ;; \
+ *) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --package-name="$${package_prefix}@PACKAGE@" \
+ --package-version='@VERSION@' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ ;; \
+ esac
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot-header; then \
+ sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
+ cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
+ rm -f $(DOMAIN).1po; \
+ fi; \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+ $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(POFILESDEPS)
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ if test -f "$(srcdir)/$${lang}.po"; then \
+ test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) \
+ && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
+ esac; \
+ }; \
+ else \
+ $(MAKE) $${lang}.po-create; \
+ fi
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ for file in Makevars; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+install-data-no: all
+install-data-yes: all
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+ fi; \
+ done; \
+ done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+installdirs-data-no:
+installdirs-data-yes:
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+uninstall-data-no:
+uninstall-data-yes:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ done; \
+ done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+ rm -f remove-potcdate.sed
+ rm -f stamp-poT
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+ test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
+ @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ dists="$$dists Makevars.template"; \
+ fi; \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ dists="$$dists $(DOMAIN).pot stamp-po"; \
+ fi; \
+ if test -f $(srcdir)/ChangeLog; then \
+ dists="$$dists ChangeLog"; \
+ fi; \
+ for i in 0 1 2 3 4 5 6 7 8 9; do \
+ if test -f $(srcdir)/ChangeLog.$$i; then \
+ dists="$$dists ChangeLog.$$i"; \
+ fi; \
+ done; \
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+ for file in $$dists; do \
+ if test -f $$file; then \
+ cp -p $$file $(distdir) || exit 1; \
+ else \
+ cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+ fi; \
+ done
+
+update-po: Makefile
+ $(MAKE) $(DOMAIN).pot-update
+ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+ $(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+ @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+ exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ cd $(srcdir); \
+ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ esac; \
+ }; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+ @:
+
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
+# because execution permission bits may not work on the current file system.
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
+ cd $(top_builddir) \
+ && @SHELL@ ./config.status $(subdir)/$@.in po-directories
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/aclocal.tgz b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/aclocal.tgz
new file mode 100644
index 000000000..9b2d1f561
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/aclocal.tgz
Binary files differ
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/config.rpath b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/config.rpath
new file mode 100755
index 000000000..98183ff2f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/config.rpath
@@ -0,0 +1,684 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2016 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ ecc*)
+ wl='-Wl,'
+ ;;
+ icc* | ifort*)
+ wl='-Wl,'
+ ;;
+ lf95*)
+ wl='-Wl,'
+ ;;
+ nagfor*)
+ wl='-Wl,-Wl,,'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ F* | *Sun*Fortran*)
+ wl=
+ ;;
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ newsos6)
+ ;;
+ *nto* | *qnx*)
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ wl='-Qoption ld '
+ ;;
+ *)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ case "$host_cpu" in
+ powerpc)
+ ;;
+ m68k)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ haiku*)
+ ;;
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ case "$host_cpu" in
+ powerpc)
+ ;;
+ m68k)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd2.[01]*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ *nto* | *qnx*)
+ ;;
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ library_names_spec='$libname.a'
+ ;;
+ aix[4-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ amigaos*)
+ case "$host_cpu" in
+ powerpc*)
+ library_names_spec='$libname$shrext' ;;
+ m68k)
+ library_names_spec='$libname.a' ;;
+ esac
+ ;;
+ beos*)
+ library_names_spec='$libname$shrext'
+ ;;
+ bsdi[45]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ library_names_spec='$libname$shrext'
+ ;;
+ dgux*)
+ library_names_spec='$libname$shrext'
+ ;;
+ freebsd[23].*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ freebsd* | dragonfly*)
+ library_names_spec='$libname$shrext'
+ ;;
+ gnu*)
+ library_names_spec='$libname$shrext'
+ ;;
+ haiku*)
+ library_names_spec='$libname$shrext'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ library_names_spec='$libname$shrext'
+ ;;
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ netbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ newsos6)
+ library_names_spec='$libname$shrext'
+ ;;
+ *nto* | *qnx*)
+ library_names_spec='$libname$shrext'
+ ;;
+ openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ library_names_spec='$libname.a'
+ ;;
+ osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv4*MP*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
+ ;;
+ tpf*)
+ library_names_spec='$libname$shrext'
+ ;;
+ uts4*)
+ library_names_spec='$libname$shrext'
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/remove-potcdate.sin
index 2436c49e7..2436c49e7 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-0.19.8.1/remove-potcdate.sin
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb
deleted file mode 100644
index 1d4a443b7..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Minimal gettext for supporting native autoconf/automake"
-DESCRIPTION = "Contains the m4 macros sufficient to support building \
-autoconf/automake. This provides a significant build time speedup by \
-the removal of gettext-native from most dependency chains (now only \
-needed for gettext for the target)."
-SRC_URI = "file://aclocal.tgz \
- file://config.rpath \
- file://Makefile.in.in \
- file://remove-potcdate.sin \
- file://COPYING \
- file://0001-PATCH-Disable-the-test-to-convert-euc-jp.patch \
-"
-
-INHIBIT_DEFAULT_DEPS = "1"
-INHIBIT_AUTOTOOLS_DEPS = "1"
-
-LICENSE = "FSF-Unlimited"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1b20675cd5158442f6007d022f46b35b"
-
-inherit native
-
-
-S = "${WORKDIR}"
-
-do_install () {
- install -d ${D}${datadir}/aclocal/
- cp ${WORKDIR}/*.m4 ${D}${datadir}/aclocal/
- install -d ${D}${datadir}/gettext/po/
- cp ${WORKDIR}/config.rpath ${D}${datadir}/gettext/
- cp ${WORKDIR}/Makefile.in.in ${D}${datadir}/gettext/po/
- cp ${WORKDIR}/remove-potcdate.sin ${D}${datadir}/gettext/po/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-native_0.19.8.1.bb b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-native_0.19.8.1.bb
new file mode 100644
index 000000000..26ff19975
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext-minimal-native_0.19.8.1.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Minimal gettext for supporting native autoconf/automake"
+DESCRIPTION = "Contains the m4 macros sufficient to support building \
+autoconf/automake. This provides a significant build time speedup by \
+the removal of gettext-native from most dependency chains (now only \
+needed for gettext for the target)."
+SRC_URI = "file://aclocal.tgz \
+ file://config.rpath \
+ file://Makefile.in.in \
+ file://remove-potcdate.sin \
+ file://COPYING \
+ file://0001-PATCH-Disable-the-test-to-convert-euc-jp.patch \
+"
+
+INHIBIT_DEFAULT_DEPS = "1"
+INHIBIT_AUTOTOOLS_DEPS = "1"
+
+LICENSE = "FSF-Unlimited"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4bd090a20bfcd1a18f1f79837b5e3e91"
+
+inherit native
+
+S = "${WORKDIR}"
+
+do_install () {
+ install -d ${D}${datadir}/aclocal/
+ cp ${WORKDIR}/*.m4 ${D}${datadir}/aclocal/
+ install -d ${D}${datadir}/gettext/po/
+ cp ${WORKDIR}/config.rpath ${D}${datadir}/gettext/
+ cp ${WORKDIR}/Makefile.in.in ${D}${datadir}/gettext/po/
+ cp ${WORKDIR}/remove-potcdate.sin ${D}${datadir}/gettext/po/
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.16.1.bb b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.16.1.bb
index cd0b759d5..e79f4dacf 100644
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.16.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.16.1.bb
@@ -9,7 +9,7 @@ PR = "r6"
DEPENDS = "virtual/libiconv"
DEPENDS_class-native = ""
PROVIDES = "virtual/libintl virtual/gettext"
-PROVIDES_class-native = ""
+PROVIDES_class-native = "virtual/gettext-native"
SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
file://gettext-vpath.patch \
@@ -21,16 +21,28 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
file://hardcode_macro_version.patch \
"
-LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
-
SRC_URI[md5sum] = "3d9ad24301c6d6b17ec30704a13fe127"
SRC_URI[sha256sum] = "0bf850d1a079fb5a61f0a47b1a9efd35eb44032255375e1cedb0253bc27b376d"
PARALLEL_MAKE = ""
+LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
+
inherit autotools texinfo
-EXTRA_OECONF += "--without-lisp --disable-csharp --disable-openmp --without-emacs"
+EXTRA_OECONF += "--without-lispdir \
+ --disable-csharp \
+ --disable-libasprintf \
+ --disable-java \
+ --disable-native-java \
+ --disable-openmp \
+ --without-emacs \
+ "
+EXTRA_OECONF_append_libc-musl = "\
+ gt_cv_func_gnugettext1_libc=yes \
+ gt_cv_func_gnugettext2_libc=yes \
+ "
+
acpaths = '-I ${S}/autoconf-lib-link/m4/ \
-I ${S}/gettext-runtime/m4 \
-I ${S}/gettext-tools/m4'
@@ -41,7 +53,6 @@ do_configure_prepend() {
do_install_append_libc-musl () {
rm -f ${D}${libdir}/charset.alias
- rm -f ${D}${includedir}/libintl.h
}
# these lack the .x behind the .so, but shouldn't be in the -dev package
@@ -93,20 +104,21 @@ FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
${infodir}/autosprintf.info \
"
-
do_install_append() {
- rm -f ${D}${libdir}/preloadable_libintl.so
+ rm -f ${D}${libdir}/preloadable_libintl.so
+}
+
+do_install_append_class-native () {
+ rm ${D}${datadir}/aclocal/*
+ rm ${D}${datadir}/gettext/config.rpath
+ rm ${D}${datadir}/gettext/po/Makefile.in.in
+ rm ${D}${datadir}/gettext/po/remove-potcdate.sin
}
# Anyone inheriting gettext will have both gettext-native and gettext
# available, and we don't want to use older macros from the target gettext in
# a non-gplv3 build, so kill them and let dependent recipes rely on
# gettext-native.
-
-SYSROOT_PREPROCESS_FUNCS += "remove_sysroot_m4_macros"
-
-remove_sysroot_m4_macros () {
- rm -r "${SYSROOT_DESTDIR}${datadir}/aclocal"
-}
+SYSROOT_DIRS_BLACKLIST += "${datadir}/aclocal"
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.6.bb b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.6.bb
deleted file mode 100644
index 592e4fc76..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.6.bb
+++ /dev/null
@@ -1,115 +0,0 @@
-SUMMARY = "Utilities and libraries for producing multi-lingual messages"
-DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable and already translated strings."
-HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
-SECTION = "libs"
-LICENSE = "GPLv3+ & LGPL-2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "gettext-native virtual/libiconv expat"
-DEPENDS_class-native = "gettext-minimal-native"
-PROVIDES = "virtual/libintl virtual/gettext"
-PROVIDES_class-native = "virtual/gettext-native"
-RCONFLICTS_${PN} = "proxy-libintl"
-SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
- file://parallel.patch \
- file://add-with-bisonlocaledir.patch \
-"
-
-SRC_URI[md5sum] = "6d1447f8c5c45c329371ef4bfe7d79a5"
-SRC_URI[sha256sum] = "ed4b4c19bd3a3034eb6769500a3592ff616759ef43cf30586dbb7a17c9dd695d"
-
-PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
-
-LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
-
-inherit autotools texinfo
-
-EXTRA_OECONF += "--without-lispdir \
- --disable-csharp \
- --disable-libasprintf \
- --disable-java \
- --disable-native-java \
- --disable-openmp \
- --disable-acl \
- --with-included-glib \
- --without-emacs \
- --without-cvs \
- --without-git \
- --with-included-libxml \
- --with-included-libcroco \
- --with-included-libunistring \
- "
-EXTRA_OECONF_append_class-target = " \
- --with-bisonlocaledir=${datadir}/locale \
-"
-
-acpaths = '-I ${S}/gettext-runtime/m4 \
- -I ${S}/gettext-tools/m4'
-
-do_install_append_libc-musl () {
- rm -f ${D}${libdir}/charset.alias
- rm -f ${D}${includedir}/libintl.h
- rm -f ${D}${libdir}/libintl.la
-}
-
-# these lack the .x behind the .so, but shouldn't be in the -dev package
-# Otherwise you get the following results:
-# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
-# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
-# because gettext depends on gettext-dev, which pulls in more -dev packages:
-# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
-# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
-# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
-# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
-
-PACKAGES =+ "libgettextlib libgettextsrc"
-FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
-FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
-
-PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc"
-
-FILES_${PN} += "${libdir}/${BPN}/*"
-
-FILES_gettext-runtime = "${bindir}/gettext \
- ${bindir}/ngettext \
- ${bindir}/envsubst \
- ${bindir}/gettext.sh \
- ${libdir}/libasprintf.so* \
- ${libdir}/GNU.Gettext.dll \
- "
-FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
- ${libdir}/charset.alias \
- "
-FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \
- ${includedir}/autosprintf.h \
- "
-FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
- ${includedir}/libintl.h \
- "
-FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
- ${mandir}/man1/ngettext.* \
- ${mandir}/man1/envsubst.* \
- ${mandir}/man1/.* \
- ${mandir}/man3/* \
- ${docdir}/gettext/gettext.* \
- ${docdir}/gettext/ngettext.* \
- ${docdir}/gettext/envsubst.* \
- ${docdir}/gettext/*.3.html \
- ${datadir}/gettext/ABOUT-NLS \
- ${docdir}/gettext/csharpdoc/* \
- ${docdir}/libasprintf/autosprintf.html \
- ${infodir}/autosprintf.info \
- "
-
-do_install_append() {
- rm -f ${D}${libdir}/preloadable_libintl.so
-}
-
-do_install_append_class-native () {
- rm ${D}${datadir}/aclocal/*
- rm ${D}${datadir}/gettext/config.rpath
- rm ${D}${datadir}/gettext/po/Makefile.in.in
- rm ${D}${datadir}/gettext/po/remove-potcdate.sin
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
new file mode 100644
index 000000000..7b8c1e8eb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
@@ -0,0 +1,120 @@
+SUMMARY = "Utilities and libraries for producing multi-lingual messages"
+DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable and already translated strings."
+HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
+SECTION = "libs"
+LICENSE = "GPLv3+ & LGPL-2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "gettext-native virtual/libiconv expat"
+DEPENDS_class-native = "gettext-minimal-native"
+PROVIDES = "virtual/libintl virtual/gettext"
+PROVIDES_class-native = "virtual/gettext-native"
+RCONFLICTS_${PN} = "proxy-libintl"
+SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
+ file://parallel.patch \
+ file://add-with-bisonlocaledir.patch \
+"
+
+SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"
+SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43"
+
+PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
+
+LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
+
+inherit autotools texinfo
+
+EXTRA_OECONF += "--without-lispdir \
+ --disable-csharp \
+ --disable-libasprintf \
+ --disable-java \
+ --disable-native-java \
+ --disable-openmp \
+ --disable-acl \
+ --with-included-glib \
+ --without-emacs \
+ --without-cvs \
+ --without-git \
+ --with-included-libxml \
+ --with-included-libcroco \
+ --with-included-libunistring \
+ "
+EXTRA_OECONF_append_class-target = " \
+ --with-bisonlocaledir=${datadir}/locale \
+"
+
+acpaths = '-I ${S}/gettext-runtime/m4 \
+ -I ${S}/gettext-tools/m4'
+
+do_install_append_libc-musl () {
+ rm -f ${D}${libdir}/charset.alias
+ rm -f ${D}${includedir}/libintl.h
+ rm -f ${D}${libdir}/libintl.la
+}
+
+# these lack the .x behind the .so, but shouldn't be in the -dev package
+# Otherwise you get the following results:
+# 7.4M glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
+# 25M uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
+# because gettext depends on gettext-dev, which pulls in more -dev packages:
+# 15228 KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
+# 1300 KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
+# 140 KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
+# 4 KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
+
+PACKAGES =+ "libgettextlib libgettextsrc"
+FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
+FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
+
+PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc"
+
+FILES_${PN} += "${libdir}/${BPN}/*"
+
+# The its/Makefile.am has defined:
+# itsdir = $(pkgdatadir)$(PACKAGE_SUFFIX)/its
+# not itsdir = $(pkgdatadir), so use wildcard to match the version.
+FILES_${PN} += "${datadir}/${BPN}-*/*"
+
+FILES_gettext-runtime = "${bindir}/gettext \
+ ${bindir}/ngettext \
+ ${bindir}/envsubst \
+ ${bindir}/gettext.sh \
+ ${libdir}/libasprintf.so* \
+ ${libdir}/GNU.Gettext.dll \
+ "
+FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
+ ${libdir}/charset.alias \
+ "
+FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \
+ ${includedir}/autosprintf.h \
+ "
+FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
+ ${includedir}/libintl.h \
+ "
+FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
+ ${mandir}/man1/ngettext.* \
+ ${mandir}/man1/envsubst.* \
+ ${mandir}/man1/.* \
+ ${mandir}/man3/* \
+ ${docdir}/gettext/gettext.* \
+ ${docdir}/gettext/ngettext.* \
+ ${docdir}/gettext/envsubst.* \
+ ${docdir}/gettext/*.3.html \
+ ${datadir}/gettext/ABOUT-NLS \
+ ${docdir}/gettext/csharpdoc/* \
+ ${docdir}/libasprintf/autosprintf.html \
+ ${infodir}/autosprintf.info \
+ "
+
+do_install_append() {
+ rm -f ${D}${libdir}/preloadable_libintl.so
+}
+
+do_install_append_class-native () {
+ rm ${D}${datadir}/aclocal/*
+ rm ${D}${datadir}/gettext/config.rpath
+ rm ${D}${datadir}/gettext/po/Makefile.in.in
+ rm ${D}${datadir}/gettext/po/remove-potcdate.sin
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
new file mode 100644
index 000000000..aee96aaa6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
@@ -0,0 +1,42 @@
+From d6501b107940e9f548c89236d773c6d33c15a5c9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 16 Apr 2016 13:28:59 -0700
+Subject: [PATCH 1/2] Do not ignore return value of write()
+
+gcc warns about ignoring return value when compiling
+with fortify turned on.
+
+assert when write() fails
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ glib/tests/unix.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/glib/tests/unix.c b/glib/tests/unix.c
+index 3543458..4e7ed85 100644
+--- a/glib/tests/unix.c
++++ b/glib/tests/unix.c
+@@ -32,14 +32,15 @@ test_pipe (void)
+ GError *error = NULL;
+ int pipefd[2];
+ char buf[1024];
+- ssize_t bytes_read;
++ ssize_t bytes_read, bytes_written;
+ gboolean res;
+
+ res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
+ g_assert (res);
+ g_assert_no_error (error);
+
+- write (pipefd[1], "hello", sizeof ("hello"));
++ bytes_written = write (pipefd[1], "hello", sizeof ("hello"));
++ g_assert (bytes_written != -1 && "write() failed");
+ memset (buf, 0, sizeof (buf));
+ bytes_read = read (pipefd[0], buf, sizeof(buf) - 1);
+ g_assert_cmpint (bytes_read, >, 0);
+--
+2.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
deleted file mode 100644
index 0be36316b..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit 9b38d507ec37b3d7d4df6095fa7ed16b47d399f7
-Author: Drew Moseley <drew_moseley@mentor.com>
-Date: Sat Mar 29 21:10:43 2014 -0400
-
- configure.ac: Do not use readlink when cross compiling.
-
- Do not use readlink to set ABS_GLIB_RUNTIME_LIBDIR when cross
- compiling. Doing so causes host paths to potentially pollute
- the target.
-
- Note that in this case the path is not converted to absolute if
- it contains any ".." references so it's not completely correct.
-
- Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=727575]
- Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
-
-diff -rub glib-2.38.2.orig/configure.ac glib-2.38.2/configure.ac
---- glib-2.38.2.orig/configure.ac 2014-04-03 20:17:13.035567143 -0400
-+++ glib-2.38.2/configure.ac 2014-04-03 20:19:07.071566057 -0400
-@@ -275,7 +275,11 @@
- [],
- [with_runtime_libdir=""])
- GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
-+AS_IF([ test $cross_compiling = yes ], [
-+ABS_GLIB_RUNTIME_LIBDIR="$libdir/$with_runtime_libdir"
-+], [
- ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`"
-+])
- AC_SUBST(GLIB_RUNTIME_LIBDIR)
- AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
- AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
new file mode 100644
index 000000000..f61fa0ae6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
@@ -0,0 +1,42 @@
+From b06b22fecc7deda8c65e28670562ca2371e4e725 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 16 Apr 2016 13:43:54 -0700
+Subject: [PATCH 2/2] tests: Ignore y2k warnings
+
+silences
+| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c: In function 'test_strftime':
+| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c:1338:3: error: '%c' yields only last 2 digits of year in some locales [-Werror=format-y2k]
+| "a%a A%A b%b B%B c%c C%C d%d e%e F%F g%g G%G h%h H%H I%I j%j m%m M%M "
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ glib/tests/gdatetime.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
+index 16a163c..e6062fc 100644
+--- a/glib/tests/gdatetime.c
++++ b/glib/tests/gdatetime.c
+@@ -1326,6 +1326,9 @@ test_z (void)
+ g_time_zone_unref (tz);
+ }
+
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat-y2k"
++
+ static void
+ test_strftime (void)
+ {
+@@ -1351,6 +1354,7 @@ test_strftime (void)
+ }
+ #endif
+ }
++#pragma GCC diagnostic pop
+
+ static void
+ test_find_interval (void)
+--
+2.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
index f1e688cac..9b4ded14d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -46,7 +46,7 @@ index 868873f..533e454 100644
@@ -545,7 +548,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
- CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
+ CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
-endif # !CROSS_COMPILING
BUILT_SOURCES += giotypefuncs.c
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch
deleted file mode 100644
index 9759d11e3..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-configure.ac: change readlink -f to -m
-
-Change "readlink -f" to "readlink -m" since $libdir/$with_runtime_libdir
-may not exist.
-
-This patch should go to the upstream, I will send it sooner.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -271,7 +271,7 @@ AC_ARG_WITH(runtime-libdir,
- [],
- [with_runtime_libdir=""])
- GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
--ABS_GLIB_RUNTIME_LIBDIR="`readlink -f $libdir/$with_runtime_libdir`"
-+ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`"
- AC_SUBST(GLIB_RUNTIME_LIBDIR)
- AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
- AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
---
-1.8.1.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
index f9e3f3dba..65d5b43f9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
@@ -6,44 +6,42 @@ This solves relocation problems with GIOModule for native builds of glib.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
+Port patch to 2.48
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ gio/giomodule.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
diff --git a/gio/giomodule.c b/gio/giomodule.c
-index 56c498c..a2e32b7 100644
+index da7c167..cc0bc7c 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
-@@ -47,6 +47,27 @@
- #include "gdesktopappinfo.h"
+@@ -40,6 +40,8 @@
+ #include "gnetworkmonitor.h"
+ #ifdef G_OS_WIN32
+ #include "gregistrysettingsbackend.h"
++#else
++#include <dlfcn.h>
#endif
+ #include <glib/gstdio.h>
-+#include <dlfcn.h>
-+
-+/*
-+ * Generate a GIO module directory based on where glib is installed
-+ */
-+static const char *
-+_get_gio_module_dir (void)
-+{
-+ Dl_info info;
-+
-+ if (dladdr (g_io_module_new, &info)) {
-+ char *libdir = g_path_get_dirname (info.dli_fname);
-+ char *dir = g_build_filename (libdir, "gio", "modules", NULL);
-+ g_free (libdir);
-+ return dir;
-+ } else {
-+ return GIO_MODULE_DIR;
-+ }
-+}
-+
+@@ -1036,7 +1038,15 @@ get_gio_module_dir (void)
+ #endif
+ g_free (install_dir);
+ #else
+- module_dir = g_strdup (GIO_MODULE_DIR);
++ Dl_info info;
+
- /**
- * SECTION:giomodule
- * @short_description: Loadable GIO Modules
-@@ -1057,7 +1078,7 @@ _g_io_modules_ensure_loaded (void)
- /* Then load the compiled in path */
- module_dir = g_getenv ("GIO_MODULE_DIR");
- if (module_dir == NULL)
-- module_dir = GIO_MODULE_DIR;
-+ module_dir = _get_gio_module_dir ();
-
- g_io_modules_scan_all_in_directory_with_scope (module_dir, scope);
++ if (dladdr (g_io_module_new, &info)) {
++ char *libdir = g_path_get_dirname (info.dli_fname);
++ module_dir = g_build_filename (libdir, "gio", "modules", NULL);
++ g_free (libdir);
++ } else {
++ module_dir = g_strdup (GIO_MODULE_DIR);
++ }
+ #endif
+ }
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb
deleted file mode 100644
index 8e445b415..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require glib.inc
-
-PE = "1"
-
-SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
- file://configure-libtool.patch \
- file://fix-conflicting-rand.patch \
- file://glib-2.0-configure-readlink.patch \
- file://run-ptest \
- file://ptest-paths.patch \
- file://uclibc_musl_translation.patch \
- file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
- file://allow-run-media-sdX-drive-mount-if-username-root.patch \
- file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
- file://Enable-more-tests-while-cross-compiling.patch \
- file://gi-exclude.patch \
- file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
- "
-
-SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
- file://relocate-modules.patch"
-
-SRC_URI[md5sum] = "7f815d6e46df68e070cb421ed7f1139e"
-SRC_URI[sha256sum] = "5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb
new file mode 100644
index 000000000..a45f64444
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.48.2.bb
@@ -0,0 +1,26 @@
+require glib.inc
+
+PE = "1"
+
+SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
+ file://configure-libtool.patch \
+ file://fix-conflicting-rand.patch \
+ file://run-ptest \
+ file://ptest-paths.patch \
+ file://uclibc_musl_translation.patch \
+ file://allow-run-media-sdX-drive-mount-if-username-root.patch \
+ file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
+ file://Enable-more-tests-while-cross-compiling.patch \
+ file://gi-exclude.patch \
+ file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
+ file://0001-Do-not-ignore-return-value-of-write.patch \
+ file://0002-tests-Ignore-y2k-warnings.patch \
+ "
+
+SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
+ file://relocate-modules.patch"
+
+SRC_URI[md5sum] = "f4ac1aa2efd4f5798c37625ea697ac57"
+SRC_URI[sha256sum] = "f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
index e764fad13..906e0d4d5 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
@@ -26,7 +26,7 @@ PACKAGES += "${PN}-codegen ${PN}-utils"
LEAD_SONAME = "libglib-2.0.*"
-inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache python3native
S = "${WORKDIR}/glib-${PV}"
@@ -44,7 +44,7 @@ EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu"
do_configure_prepend() {
- sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
+ sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
}
FILES_${PN} = "${libdir}/lib*${SOLIBS} \
@@ -59,7 +59,8 @@ FILES_${PN}-dev += "${libdir}/glib-2.0/include \
${bindir}/glib-mkenums \
${bindir}/glib-compile-resources \
${datadir}/glib-2.0/gettext/po/Makefile.in.in \
- ${datadir}/glib-2.0/schemas/gschema.dtd"
+ ${datadir}/glib-2.0/schemas/gschema.dtd \
+ ${datadir}/gettext/its"
FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
${bindir}/gdbus-codegen"
@@ -67,15 +68,19 @@ FILES_${PN}-utils = "${bindir}/*"
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
+# Valgrind runtime detection works using hand-written assembly, which
+# doesn't support mips16e
+CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1"
USE_NLS = "yes"
do_install_append () {
if [ -f ${D}${bindir}/gtester-report ]; then
- sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
+ sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|'
fi
# Remove some unpackaged files
+ rm -rf ${D}${datadir}/glib-2.0/codegen/__pycache__
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo
@@ -108,8 +113,6 @@ RDEPENDS_${PN}-ptest += "\
tzdata-asia \
tzdata-europe \
tzdata-posix \
- python-pygobject \
- python-dbus \
shared-mime-info \
"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.46.1.bb b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.46.1.bb
deleted file mode 100644
index 749ac988a..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.46.1.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "GLib networking extensions"
-DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
-HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SECTION = "libs"
-DEPENDS = "glib-2.0 intltool-native"
-
-SRC_URI[archive.md5sum] = "c000e0b579f5d8fd48efebc7ac4d95dc"
-SRC_URI[archive.sha256sum] = "d5034214217f705891b6c9e719cc2c583c870bfcfdc454ebbb5e5e8940ac90b1"
-
-PACKAGECONFIG ??= "ca-certificates gnutls"
-
-# No explicit dependency as it works without ca-certificates installed
-PACKAGECONFIG[ca-certificates] = "--with-ca-certificates=${sysconfdir}/ssl/certs/ca-certificates.crt,--without-ca-certificates"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
-PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
-
-EXTRA_OECONF = "--without-gnome-proxy"
-
-inherit gnomebase gettext upstream-version-is-even gio-module-cache
-
-FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
-FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
-FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.48.2.bb b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.48.2.bb
new file mode 100644
index 000000000..50d9983fe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.48.2.bb
@@ -0,0 +1,29 @@
+SUMMARY = "GLib networking extensions"
+DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
+HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+SECTION = "libs"
+DEPENDS = "glib-2.0 intltool-native"
+
+SRC_URI[archive.md5sum] = "d7cf81d52c856b0c66f7821021f40e08"
+SRC_URI[archive.sha256sum] = "925c0c49d6b2b8b5695f2e33cd952d1dbb7d18d3f2f796413577719315bb3a84"
+
+PACKAGECONFIG ??= "ca-certificates gnutls"
+
+# No explicit dependency as it works without ca-certificates installed
+PACKAGECONFIG[ca-certificates] = "--with-ca-certificates=${sysconfdir}/ssl/certs/ca-certificates.crt,--without-ca-certificates"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
+PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
+
+EXTRA_OECONF = "--without-gnome-proxy"
+
+inherit gnomebase gettext upstream-version-is-even gio-module-cache
+
+FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
+FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
+FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch
deleted file mode 100644
index 186a48045..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native/fix_for_centos_5.8.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Inappropriate [other]
-
-This is a hack to fix building the locale bits on an older
-CentOs 5.X machine
-
-Index: git/locale/programs/config.h
-===================================================================
---- git/locale/programs/config.h
-+++ git.orig/locale/programs/config.h
-@@ -19,6 +19,8 @@
- #ifndef _LD_CONFIG_H
- #define _LD_CONFIG_H 1
-
-+#define DUMMY_LOCALE_T
-+
- /* Use the internal textdomain used for libc messages. */
- #define PACKAGE _libc_intl_domainname
- #ifndef VERSION
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.23.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.23.bb
deleted file mode 100644
index fa930fd48..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.23.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "Cross locale generation tool for glibc"
-HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
-SECTION = "libs"
-LICENSE = "LGPL-2.1"
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
- file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-
-inherit native
-inherit autotools
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
-
-SRCBRANCH ?= "release/${PV}/master"
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
- git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
- file://fix_for_centos_5.8.patch \
- ${EGLIBCPATCHES} \
-"
-EGLIBCPATCHES = "\
- file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
- file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
- file://0018-eglibc-Cross-building-and-testing-instructions.patch \
- file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
- file://0020-eglibc-cherry-picked-from.patch \
- file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
- file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
- file://0023-eglibc-Install-PIC-archives.patch \
- file://0025-eglibc-Forward-port-cross-locale-generation-support.patch \
-"
-
-SRCREV_glibc ?= "e742928c1592b43db6809db4f39e67be151cdd27"
-SRCREV_localedef ?= "5a81ff9f06a7a808d4c3d37bbf34077a4c5902ed"
-
-# Makes for a rather long rev (22 characters), but...
-#
-SRCREV_FORMAT = "glibc_localedef"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF = "--with-glibc=${S}"
-CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
-
-do_configure () {
- ${S}/localedef/configure ${EXTRA_OECONF}
-}
-
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.24.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.24.bb
new file mode 100644
index 000000000..d4cccedb4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.24.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Cross locale generation tool for glibc"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+SECTION = "libs"
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+# Tell autotools that we're working in the localedef directory
+#
+AUTOTOOLS_SCRIPT_PATH = "${S}/localedef"
+
+inherit native
+inherit autotools
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
+
+SRCBRANCH ?= "release/${PV}/master"
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+
+SRCREV_glibc ?= "ea23815a795f72035262953dad5beb03e09c17dd"
+SRCREV_localedef ?= "29869b6dc11427c5bab839bdb155c85a7c644c71"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+ git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
+ file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
+ file://0018-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0020-eglibc-cherry-picked-from.patch \
+ file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+ file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0023-eglibc-Install-PIC-archives.patch \
+ file://0024-eglibc-Forward-port-cross-locale-generation-support.patch \
+ file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+"
+# Makes for a rather long rev (22 characters), but...
+#
+SRCREV_FORMAT = "glibc_localedef"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-glibc=${S}"
+CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial.inc
index 5975fd26c..2e3bc8104 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial.inc
@@ -5,13 +5,13 @@ PACKAGES = ""
PACKAGES_DYNAMIC = ""
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
do_configure () {
(cd ${S} && gnu-configize) || die "failure in running gnu-configize"
find ${S} -name "configure" | xargs touch
- cfgscript=`python -c "import os; print os.path.relpath('${S}', '.')"`/configure
+ cfgscript=`python3 -c "import os; print(os.path.relpath('${S}', '.'))"`/configure
$cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \
--prefix=/usr \
--without-cvs --disable-sanity-checks \
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.23.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.24.bb
index e86770e12..e86770e12 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.23.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.24.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-ld.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-ld.inc
index c5f4db229..b982368d8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-ld.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-ld.inc
@@ -14,10 +14,14 @@ def glibc_dl_info(d):
"mips64el-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
"mips64el": ["ld.so.1", "FLAG_ELF_LIBC6"],
"mips-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
+ "mipsisa32r6": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
+ "mipsisa32r6el": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
"mips64-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
"mips64-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
"mips64el-nf-n32": ["ld.so.1", "FLAG_ELF_LIBC6"],
"mips64el-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
+ "mipsisa64r6": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
+ "mipsisa64r6el": ["ld-linux-mipsn8.so.1", "FLAG_ELF_LIBC6"],
"powerpc": ["ld.so.1", "FLAG_ELF_LIBC6"],
"powerpc-nf": ["ld.so.1", "FLAG_ELF_LIBC6"],
"powerpc64": ["ld64.so.1", "FLAG_ELF_LIBC6"],
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc
index e868e38a9..0a7adfcc8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc
@@ -19,7 +19,7 @@ do_package[depends] += "${BINUTILSDEP}"
# default to disabled
ENABLE_BINARY_LOCALE_GENERATION ?= "0"
-ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "0"
+ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "1"
#enable locale generation on these arches
# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.23.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.24.bb
index f7702e035..f7702e035 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.23.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.24.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.23.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.24.bb
index 0b69bad46..0b69bad46 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.23.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.24.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts.inc
index 3a06773d6..bce0a4210 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts.inc
@@ -14,3 +14,7 @@ do_install() {
install -m 0755 ${SRC}/$i ${D}${bindir}/
done
}
+
+# sotruss script requires sotruss-lib.so (given by libsotruss package),
+# to produce trace of the library calls.
+RDEPENDS_${PN} += "libsotruss"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.23.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.24.bb
index 5a89bd802..5a89bd802 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.23.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.24.bb
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
index bf1dccdeb..e85c7044a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc.inc
@@ -3,7 +3,7 @@ require glibc-ld.inc
require glibc-testing.inc
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch
new file mode 100644
index 000000000..d5fce7371
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-locale-fix-hard-coded-reference-to-gcc-E.patch
@@ -0,0 +1,39 @@
+From 2c0ab83eb54c0e0fccbf261726dc03803b236079 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr>
+Date: Mon, 22 Aug 2016 16:09:25 +0200
+Subject: [PATCH] locale: fix hard-coded reference to gcc -E
+
+When new version of compilers are published, they may not be compatible with
+older versions of software. This is particularly common when software is built
+with -Werror.
+
+Autotools provides a way for a user to specify the name of his compiler using a
+set of variables ($CC $CXX $CPP etc.). Those variables are used correctly when
+compiling glibc but the script used to generate transliterations in the locale/
+subdirectory directly calls the gcc binary to get the output of the
+preprocessor instead of using the $CPP variable provided by the build
+environment.
+
+This patch replaces the hard-coded reference to the gcc binary with the proper
+environment variable, thus allowing a user to override it.
+
+Upstream-Status : Submitted [https://sourceware.org/ml/libc-alpha/2016-08/msg00746.html]
+
+---
+ locale/gen-translit.pl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/locale/gen-translit.pl b/locale/gen-translit.pl
+index 30d3f2f..7b287fa 100644
+--- a/locale/gen-translit.pl
++++ b/locale/gen-translit.pl
+@@ -1,5 +1,5 @@
+ #!/usr/bin/perl -w
+-open F, "cat C-translit.h.in | gcc -E - |" || die "Cannot preprocess input file";
++open F, 'cat C-translit.h.in | ${CPP:-gcc -E} - |' || die "Cannot preprocess input file";
+
+
+ sub cstrlen {
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
index 97c280059..ca3375805 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
@@ -1,7 +1,7 @@
-From 66d04e2cd8badb0984050e4e9f2732f47151fbbf Mon Sep 17 00:00:00 2001
+From 7e11aafc3a7cb873b3f648740c8acd379597e4d1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:48:24 +0000
-Subject: [PATCH 01/24] nativesdk-glibc: Look for host system ld.so.cache as
+Subject: [PATCH 01/25] nativesdk-glibc: Look for host system ld.so.cache as
well
Upstream-Status: Inappropriate [embedded specific]
@@ -31,7 +31,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 6fb615e..ee3d1e6 100644
+index c0d6249..2c73105 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -2094,6 +2094,14 @@ _dl_map_object (struct link_map *loader, const char *name,
@@ -65,5 +65,5 @@ index 6fb615e..ee3d1e6 100644
if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
_dl_debug_printf ("\n");
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
index 473b89449..5428468c5 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
@@ -1,7 +1,7 @@
-From 179dc5f1e13c3ff96d5f21a2a78c089cf120ceb8 Mon Sep 17 00:00:00 2001
+From 5fd884dc28d5d84001fae8ffdd8be698bb84143e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:50:00 +0000
-Subject: [PATCH 02/24] nativesdk-glibc: Fix buffer overrun with a relocated
+Subject: [PATCH 02/25] nativesdk-glibc: Fix buffer overrun with a relocated
SDK
When ld-linux-*.so.2 is relocated to a path that is longer than the
@@ -22,7 +22,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 12 insertions(+)
diff --git a/elf/dl-load.c b/elf/dl-load.c
-index ee3d1e6..c4a42e9 100644
+index 2c73105..c7b8797 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1793,7 +1793,19 @@ open_path (const char *name, size_t namelen, int mode,
@@ -46,5 +46,5 @@ index ee3d1e6..c4a42e9 100644
{
struct r_search_path_elem *this_dir = *dirs;
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
index 60f9f17b8..7cba6cc36 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
@@ -1,7 +1,7 @@
-From e76048898ae9aa49dc70d6f9b1bbc22082e61fe3 Mon Sep 17 00:00:00 2001
+From c99892f2018cd7fa0f37b53e6cebec99fa036472 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:51:38 +0000
-Subject: [PATCH 03/24] nativesdk-glibc: Raise the size of arrays containing dl
+Subject: [PATCH 03/25] nativesdk-glibc: Raise the size of arrays containing dl
paths
This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
@@ -24,10 +24,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
sysdeps/generic/dl-cache.h | 4 ----
6 files changed, 13 insertions(+), 9 deletions(-)
-diff --git a/elf/dl-cache.c b/elf/dl-cache.c
-index dec49bc..862f1d8 100644
---- a/elf/dl-cache.c
-+++ b/elf/dl-cache.c
+Index: git/elf/dl-cache.c
+===================================================================
+--- git.orig/elf/dl-cache.c
++++ git/elf/dl-cache.c
@@ -132,6 +132,10 @@ do \
while (0)
@@ -39,11 +39,11 @@ index dec49bc..862f1d8 100644
int
internal_function
_dl_cache_libcmp (const char *p1, const char *p2)
-diff --git a/elf/dl-load.c b/elf/dl-load.c
-index c4a42e9..acf6c03 100644
---- a/elf/dl-load.c
-+++ b/elf/dl-load.c
-@@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_relro;
+Index: git/elf/dl-load.c
+===================================================================
+--- git.orig/elf/dl-load.c
++++ git/elf/dl-load.c
+@@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_re
/* Get the generated information about the trusted directories. */
#include "trusted-dirs.h"
@@ -54,10 +54,10 @@ index c4a42e9..acf6c03 100644
{
SYSTEM_DIRS_LEN
};
-diff --git a/elf/interp.c b/elf/interp.c
-index 422ea95e..6d61a36 100644
---- a/elf/interp.c
-+++ b/elf/interp.c
+Index: git/elf/interp.c
+===================================================================
+--- git.orig/elf/interp.c
++++ git/elf/interp.c
@@ -18,5 +18,5 @@
#include <runtime-linker.h>
@@ -65,11 +65,11 @@ index 422ea95e..6d61a36 100644
-const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;
-diff --git a/elf/ldconfig.c b/elf/ldconfig.c
-index f54ec22..0e78a83 100644
---- a/elf/ldconfig.c
-+++ b/elf/ldconfig.c
-@@ -167,6 +167,9 @@ static struct argp argp =
+Index: git/elf/ldconfig.c
+===================================================================
+--- git.orig/elf/ldconfig.c
++++ git/elf/ldconfig.c
+@@ -168,6 +168,9 @@ static struct argp argp =
options, parse_opt, NULL, doc, NULL, more_help, NULL
};
@@ -79,10 +79,10 @@ index f54ec22..0e78a83 100644
/* Check if string corresponds to an important hardware capability or
a platform. */
static int
-diff --git a/elf/rtld.c b/elf/rtld.c
-index 52160df..80f0582 100644
---- a/elf/rtld.c
-+++ b/elf/rtld.c
+Index: git/elf/rtld.c
+===================================================================
+--- git.orig/elf/rtld.c
++++ git/elf/rtld.c
@@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local
strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
#endif
@@ -91,7 +91,7 @@ index 52160df..80f0582 100644
/* List of auditing DSOs. */
static struct audit_list
-@@ -873,12 +874,12 @@ of this helper program; chances are you did not intend to run this program.\n\
+@@ -873,12 +874,12 @@ of this helper program; chances are you
--list list all dependencies and how they are resolved\n\
--verify verify that given object really is a dynamically linked\n\
object we can handle\n\
@@ -106,10 +106,10 @@ index 52160df..80f0582 100644
++_dl_skip_args;
--_dl_argc;
-diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
-index 70d4aeb..5c726d0 100644
---- a/sysdeps/generic/dl-cache.h
-+++ b/sysdeps/generic/dl-cache.h
+Index: git/sysdeps/generic/dl-cache.h
+===================================================================
+--- git.orig/sysdeps/generic/dl-cache.h
++++ git/sysdeps/generic/dl-cache.h
@@ -27,10 +27,6 @@
((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
#endif
@@ -134,3 +134,38 @@ Index: git/iconv/gconv_conf.c
/* The path elements, as determined by the __gconv_get_path function.
All path elements end in a slash. */
+Index: git/locale/findlocale.c
+===================================================================
+--- git.orig/locale/findlocale.c
++++ git/locale/findlocale.c
+@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attr
+ which are somehow addressed. */
+ struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST];
+
+-const char _nl_default_locale_path[] attribute_hidden = COMPLOCALEDIR;
++char _nl_default_locale_path[4096] __attribute__ ((section (".gccrelocprefix"))) attribute_hidden = COMPLOCALEDIR;
+
+ /* Checks if the name is actually present, that is, not NULL and not
+ empty. */
+@@ -168,7 +168,7 @@ _nl_find_locale (const char *locale_path
+
+ /* Nothing in the archive. Set the default path to search below. */
+ locale_path = _nl_default_locale_path;
+- locale_path_len = sizeof _nl_default_locale_path;
++ locale_path_len = strlen(_nl_default_locale_path) + 1;
+ }
+ else
+ /* We really have to load some data. First see whether the name is
+Index: git/locale/localeinfo.h
+===================================================================
+--- git.orig/locale/localeinfo.h
++++ git/locale/localeinfo.h
+@@ -322,7 +322,7 @@ _nl_lookup_word (locale_t l, int categor
+ }
+
+ /* Default search path if no LOCPATH environment variable. */
+-extern const char _nl_default_locale_path[] attribute_hidden;
++extern char _nl_default_locale_path[] attribute_hidden;
+
+ /* Load the locale data for CATEGORY from the file specified by *NAME.
+ If *NAME is "", use environment variables as specified by POSIX, and
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
index 21f04a132..3127de68e 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
@@ -1,7 +1,7 @@
-From 2e1638115f0f924ee8235eee9265047054c15cfd Mon Sep 17 00:00:00 2001
+From a56e7aa2fd10b178b9498f88a7a2ca8aad671a53 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:35:35 -0800
-Subject: [PATCH 04/24] nativesdk-glibc: Allow 64 bit atomics for x86
+Subject: [PATCH 04/25] nativesdk-glibc: Allow 64 bit atomics for x86
The fix consist of allowing 64bit atomic ops for x86.
This should be safe for i586 and newer CPUs.
@@ -11,11 +11,13 @@ Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
sysdeps/i386/atomic-machine.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/i386/atomic-machine.h b/sysdeps/i386/atomic-machine.h
-index 59f3d34..6f6b7ff 100644
+index ce62b33..4fe44ea 100644
--- a/sysdeps/i386/atomic-machine.h
+++ b/sysdeps/i386/atomic-machine.h
@@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t;
@@ -28,5 +30,5 @@ index 59f3d34..6f6b7ff 100644
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
index ba8c92e11..dc0dfad9a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
@@ -1,7 +1,7 @@
-From 7ff57edfe24b4243373fcb896ee0b613938c1ec9 Mon Sep 17 00:00:00 2001
+From 450473ce27b47cebec2c5c5b611a8c8bed41e6e8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:01:50 +0000
-Subject: [PATCH 05/24] fsl e500/e5500/e6500/603e fsqrt implementation
+Subject: [PATCH 05/25] fsl e500/e5500/e6500/603e fsqrt implementation
Upstream-Status: Pending
Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
@@ -1580,5 +1580,5 @@ index 0000000..04ff8cc
@@ -0,0 +1 @@
+powerpc/powerpc64/e6500/fpu
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
index 086a73dd2..f267f66cd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
@@ -1,7 +1,7 @@
-From 61129ef3ee735b300604f75d50e01cb29f4387f4 Mon Sep 17 00:00:00 2001
+From bb065b78e9e0d3301e64a26e37550a657c885ebc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:11:22 +0000
-Subject: [PATCH 06/24] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
+Subject: [PATCH 06/25] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
names
This bolts in a hook for OE to pass its own version of interpreter
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/elf/readlib.c b/elf/readlib.c
-index 7fd5b8a..2f5da9f 100644
+index 8a66ffe..08d56fc 100644
--- a/elf/readlib.c
+++ b/elf/readlib.c
@@ -51,6 +51,7 @@ static struct known_names interpreters[] =
@@ -29,5 +29,5 @@ index 7fd5b8a..2f5da9f 100644
static struct known_names known_libs[] =
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
index 952784b1c..612e892e8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
@@ -1,7 +1,7 @@
-From f936548decac99501f9a4c522a3211d16542fa49 Mon Sep 17 00:00:00 2001
+From 4a91bbdb11a15f93094695bba4e0849c421fad48 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:15:07 +0000
-Subject: [PATCH 07/24] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
+Subject: [PATCH 07/25] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
on ppc fixes the errors like below
| ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
@@ -204,5 +204,5 @@ index 26fa067..9d17512 100644
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 8d513ab42..9e222b7b4 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From d02704895fdce917e337619a4414042f63edd88b Mon Sep 17 00:00:00 2001
+From ce2746a1560b4430d89d114e1b65c7be225b4c2a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:16:38 +0000
-Subject: [PATCH 08/24] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 08/25] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -383,5 +383,5 @@ index 9d17512..10de1f0 100644
+
strong_alias (__ieee754_sqrtf, __sqrtf_finite)
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
index 12f24fb68..7aa74df23 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
@@ -1,7 +1,7 @@
-From 502f061d846e58aac7aca67e4e0d6ba9e0763b17 Mon Sep 17 00:00:00 2001
+From 1b61649e545de76dd79a5e2c39bb16d0c4623160 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:20:09 +0000
-Subject: [PATCH 09/24] Quote from bug 1443 which explains what the patch does
+Subject: [PATCH 09/25] Quote from bug 1443 which explains what the patch does
:
We build some random program and link it with -lust. When we run it,
@@ -45,7 +45,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
-index 6fb20bd..8805537 100644
+index 60eee00..7d54d5e 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -499,7 +499,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
@@ -58,5 +58,5 @@ index 6fb20bd..8805537 100644
case R_ARM_TLS_TPOFF32:
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
index 77bd7d132..14963a357 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -1,7 +1,7 @@
-From 69a3e30b49d28a7386d18725528652931510cbfc Mon Sep 17 00:00:00 2001
+From 91af416408b8718b004c83d93a6daa1f34cba48d Mon Sep 17 00:00:00 2001
From: Ting Liu <b28495@freescale.com>
Date: Wed, 19 Dec 2012 04:39:57 -0600
-Subject: [PATCH 10/24] eglibc: run libm-err-tab.pl with specific dirs in ${S}
+Subject: [PATCH 10/25] eglibc: run libm-err-tab.pl with specific dirs in ${S}
libm-err-tab.pl will parse all the files named "libm-test-ulps"
in the given dir recursively. To avoid parsing the one in
@@ -10,7 +10,7 @@ ${S}/.pc/aarch64-0001-glibc-fsf-v1-eaf6f205.patch/ports/sysdeps/
aarch64/libm-test-ulps), run libm-err-tab.pl with specific dirs
in ${S}.
-Upstream-Status: Inappropriate [OE specific]
+Upstream-Status: inappropriate [OE specific]
Signed-off-by: Ting Liu <b28495@freescale.com>
---
@@ -18,7 +18,7 @@ Signed-off-by: Ting Liu <b28495@freescale.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/manual/Makefile b/manual/Makefile
-index cdb6763..0b32a0a 100644
+index f2f694f..e062833 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
@@ -32,5 +32,5 @@ index cdb6763..0b32a0a 100644
touch $@
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 251e5f5af..e92d04c62 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From 4cf52971a841304aec30b2e975f81d7ad9d42ef0 Mon Sep 17 00:00:00 2001
+From 6a71f688471fe0c85f8ad9afc4ee0723a20aae1d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:24:46 +0000
-Subject: [PATCH 11/24] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 11/25] __ieee754_sqrt{,f} are now inline functions and call
out __slow versions
Upstream-Status: Pending
@@ -57,5 +57,5 @@ index 8126535..10de1f0 100644
#endif
{
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
index 3208a0c89..4cba03f23 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
@@ -1,7 +1,7 @@
-From b356816d6e005ecda7adbed9627a4315ad39de39 Mon Sep 17 00:00:00 2001
+From f9d024edb158659e403b51cc9d93da9bca6e5d7b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:25:45 +0000
-Subject: [PATCH 12/24] Make ld --version output matching grok gold's output
+Subject: [PATCH 12/25] Make ld --version output matching grok gold's output
adapted from from upstream branch roland/gold-vs-libc
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
-index aa05d49..6dabd11 100755
+index 8fe5937..7888a3f 100755
--- a/configure
+++ b/configure
-@@ -4486,7 +4486,7 @@ else
+@@ -4482,7 +4482,7 @@ else
# Found it, now check the version.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5
$as_echo_n "checking version of $LD... " >&6; }
@@ -27,10 +27,10 @@ index aa05d49..6dabd11 100755
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
diff --git a/configure.ac b/configure.ac
-index ee7a3f1..b4b95b9 100644
+index 3c766b7..6908a99 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -948,7 +948,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
+@@ -944,7 +944,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
[2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
AS=: critic_missing="$critic_missing as")
AC_CHECK_PROG_VER(LD, $LD, --version,
@@ -40,5 +40,5 @@ index ee7a3f1..b4b95b9 100644
LD=: critic_missing="$critic_missing ld")
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
index 82fa10044..6a82f8d93 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
@@ -1,7 +1,7 @@
-From 10003d48f83f7a4f7fa562ed89af904a544b6323 Mon Sep 17 00:00:00 2001
+From 2ece12093c8ba4cf688d235f35d36f1feb02324c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:27:10 +0000
-Subject: [PATCH 13/24] sysdeps/gnu/configure.ac: handle correctly
+Subject: [PATCH 13/25] sysdeps/gnu/configure.ac: handle correctly
$libc_cv_rootsbindir
Upstream-Status:Pending
@@ -38,5 +38,5 @@ index 634fe4d..3db1697 100644
;;
esac
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
index ea3e1670f..d14a6d4cd 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
@@ -1,7 +1,7 @@
-From cafa8a7ef830e02cdbf928471e06d11054946940 Mon Sep 17 00:00:00 2001
+From 9fec083dc99d2b524090e1d098e03709eed64a72 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:28:41 +0000
-Subject: [PATCH 14/24] Add unused attribute
+Subject: [PATCH 14/25] Add unused attribute
Helps in avoiding gcc warning when header is is included in
a source file which does not use both functions
@@ -17,7 +17,7 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h
-index 80290bc..7890a8e 100644
+index 95cbce7..191a0dd 100644
--- a/iconv/gconv_charset.h
+++ b/iconv/gconv_charset.h
@@ -21,7 +21,7 @@
@@ -30,5 +30,5 @@ index 80290bc..7890a8e 100644
{
int slash_count = 0;
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
index 90e12b883..8ceccec41 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
@@ -1,7 +1,7 @@
-From 4d6bead19874e519752ceeb2a15897ff2ffbe5e8 Mon Sep 17 00:00:00 2001
+From 1794a97cba0b09b726eebc565c783c7b7c22dfba Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:31:06 +0000
-Subject: [PATCH 15/24] 'yes' within the path sets wrong config variables
+Subject: [PATCH 15/25] 'yes' within the path sets wrong config variables
It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
but being such a short word to grep it is likely to produce
@@ -165,7 +165,7 @@ index f05f438..dc86399 100644
], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)])
if test $libc_cv_nios2_be = yes; then
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
-index dee56aa..f2049ed 100644
+index a5513fa..283b293 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -414,11 +414,11 @@ else
@@ -183,7 +183,7 @@ index dee56aa..f2049ed 100644
else
libc_cv_mips_nan2008=no
diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac
-index 45147c5..4224af1 100644
+index 9147aa4..7898e24 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.ac
+++ b/sysdeps/unix/sysv/linux/mips/configure.ac
@@ -105,9 +105,9 @@ AC_COMPILE_IFELSE(
@@ -259,5 +259,5 @@ index 0822915..9a32fdd 100644
], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
if test $libc_cv_ppc64_def_call_elf = no; then
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
index e51b611f3..e5b508330 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
@@ -1,7 +1,7 @@
-From 3e8586eb3509e2f0d6dfb74be8f89a30b06b56e9 Mon Sep 17 00:00:00 2001
+From fdb5c9c88e3d1bc5ae6ef9ebcfcf560d3c42f0a6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:33:03 +0000
-Subject: [PATCH 16/24] timezone: re-written tzselect as posix sh
+Subject: [PATCH 16/25] timezone: re-written tzselect as posix sh
To avoid the bash dependency.
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/timezone/Makefile b/timezone/Makefile
-index 99566cb..b6e757e 100644
+index dee7568..66a50be 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
-@@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT%
+@@ -120,7 +120,7 @@ $(testdata)/XT%: testdata/XT%
cp $< $@
$(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
@@ -28,7 +28,7 @@ index 99566cb..b6e757e 100644
-e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
-e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
-index 9d70691..25f45a8 100755
+index 2c3b2f4..0c04a61 100755
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org
@@ -38,8 +38,8 @@ index 9d70691..25f45a8 100755
-: ${TZDIR=`pwd`}
+: ${TZDIR=$(pwd)}
- # Check for awk Posix compliance.
- ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
+ # Output one argument as-is to standard output.
+ # Safer than 'echo', which can mishandle '\' or leading '-'.
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
index 0c9ae6c13..c8da05dc6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
@@ -1,7 +1,7 @@
-From cd9d9fe7316f4ce4ca9d8e67e22f5718879535e4 Mon Sep 17 00:00:00 2001
+From 88ad88d014a5ee68b0e044d2def5ab13743c8ae0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:33:02 -0800
-Subject: [PATCH 17/24] Remove bash dependency for nscd init script
+Subject: [PATCH 17/25] Remove bash dependency for nscd init script
The nscd init script uses #! /bin/bash but only really uses one bashism
(translated strings), so remove them and switch the shell to #!/bin/sh.
@@ -9,6 +9,8 @@ The nscd init script uses #! /bin/bash but only really uses one bashism
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
+Upstream-Status: Pending
+
nscd/nscd.init | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
@@ -69,5 +71,5 @@ index a882da7..b02986e 100644
;;
esac
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
index e282e60eb..175076524 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
@@ -1,7 +1,7 @@
-From 8f554f4a1beb39182aad9cd9b5e1da69464dff7e Mon Sep 17 00:00:00 2001
+From 49c0ad7dc2e02e808ed150296a109b586c34115a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:42:58 +0000
-Subject: [PATCH 18/24] eglibc: Cross building and testing instructions
+Subject: [PATCH 18/25] eglibc: Cross building and testing instructions
Ported from eglibc
Upstream-Status: Pending
@@ -615,5 +615,5 @@ index 0000000..b67b468
+ simply place copies of these libraries in the top GLIBC build
+ directory.
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
index c04e0a11d..f983d86a9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
@@ -1,7 +1,7 @@
-From c2d49eab20db4ab02b6de62092fedc623d757146 Mon Sep 17 00:00:00 2001
+From e881face7a10354612bf634b44e09e3bc6462c67 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:49:28 +0000
-Subject: [PATCH 19/24] eglibc: Help bootstrap cross toolchain
+Subject: [PATCH 19/25] eglibc: Help bootstrap cross toolchain
Taken from EGLIBC, r1484 + r1525
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
create mode 100644 include/stubs-bootstrap.h
diff --git a/Makefile b/Makefile
-index 9a01c93..a6ae003 100644
+index 32748b3..6d055ba 100644
--- a/Makefile
+++ b/Makefile
@@ -69,9 +69,18 @@ subdir-dirs = include
@@ -96,5 +96,5 @@ index 0000000..1d2b669
+ EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
+ an empty stubs.h like this will do fine for GCC. */
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
index 4362efae7..30c4c6987 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
@@ -1,7 +1,7 @@
-From 588d936b9aa65e7cc8b1eb2cad1d209087db43a9 Mon Sep 17 00:00:00 2001
+From 723a31d3e2627211b39fbcc08f75b3c23c4096c5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 15:10:33 -0800
-Subject: [PATCH 20/24] eglibc: cherry-picked from
+Subject: [PATCH 20/25] eglibc: cherry-picked from
http://www.eglibc.org/archives/patches/msg00772.html
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/resolv/res_libc.c b/resolv/res_libc.c
-index a8394e0..981ac7c 100644
+index a4b376f..3256e12 100644
--- a/resolv/res_libc.c
+++ b/resolv/res_libc.c
-@@ -18,6 +18,7 @@
+@@ -21,11 +21,13 @@
#include <atomic.h>
#include <limits.h>
#include <sys/types.h>
@@ -26,15 +26,13 @@ index a8394e0..981ac7c 100644
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
-@@ -28,6 +29,7 @@
- out) since res_init() should go into libc.so but the rest of that
- file should not. */
+ #include <libc-lock.h>
+__libc_lock_define_initialized (static, lock);
extern unsigned long long int __res_initstamp attribute_hidden;
/* We have atomic increment operations on 64-bit platforms. */
#if __WORDSIZE == 64
-@@ -35,7 +37,6 @@ extern unsigned long long int __res_initstamp attribute_hidden;
+@@ -33,7 +35,6 @@ extern unsigned long long int __res_initstamp attribute_hidden;
# define atomicincunlock(lock) (void) 0
# define atomicinc(var) catomic_increment (&(var))
#else
@@ -42,7 +40,7 @@ index a8394e0..981ac7c 100644
# define atomicinclock(lock) __libc_lock_lock (lock)
# define atomicincunlock(lock) __libc_lock_unlock (lock)
# define atomicinc(var) ++var
-@@ -94,7 +95,18 @@ res_init(void) {
+@@ -92,7 +93,18 @@ res_init(void) {
int
__res_maybe_init (res_state resp, int preinit)
{
@@ -62,5 +60,5 @@ index a8394e0..981ac7c 100644
if (resp->nscount > 0)
__res_iclose (resp, true);
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch
index 225f22f01..8931c9e25 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch
@@ -1,7 +1,7 @@
-From b74e34e6f53816ad57b13ba6fd70a97db1bc1eae Mon Sep 17 00:00:00 2001
+From 9699873820d0347c2f377f0d86bce615d87a5e47 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 15:15:09 -0800
-Subject: [PATCH 21/24] eglibc: Clear cache lines on ppc8xx
+Subject: [PATCH 21/25] eglibc: Clear cache lines on ppc8xx
2007-06-13 Nathan Sidwell <nathan@codesourcery.com>
Mark Shinwell <shinwell@codesourcery.com>
@@ -21,7 +21,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-index c2504ff..d50f1cb 100644
+index 98ec2b3..b384ae0 100644
--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
@@ -48,7 +48,7 @@ index c2504ff..d50f1cb 100644
break;
diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-index 209a16d..5d8572d 100644
+index 0efd297..8cc0ef8 100644
--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv,
@@ -79,5 +79,5 @@ index 209a16d..5d8572d 100644
break;
#ifndef SHARED
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
index 88b20f67a..f53f5ff87 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
@@ -1,7 +1,7 @@
-From 8f483cb1f21ab6431ff99e8d30d56b91607ae918 Mon Sep 17 00:00:00 2001
+From 8904f4249c930d187e19c7e9d3e73c835d11e18f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:55:53 +0000
-Subject: [PATCH 22/24] eglibc: Resolve __fpscr_values on SH4
+Subject: [PATCH 22/25] eglibc: Resolve __fpscr_values on SH4
2010-09-29 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Andrew Stubbs <ams@codesourcery.com>
@@ -33,7 +33,7 @@ index e0938c4..ca1d7da 100644
# a*
alphasort64;
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
-index a02b7e2..b9be326 100644
+index 0024d79..d1db7e4 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
@@ -52,5 +52,5 @@ index a02b7e2..b9be326 100644
+weak_alias (___fpscr_values, __fpscr_values)
+
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
index d95ea3ba3..f985f3ca1 100644
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
@@ -1,7 +1,7 @@
-From 58d424884eed7efde6c90af0cd7c6c37cf9b444a Mon Sep 17 00:00:00 2001
+From 1947f211fab4001e84bb52868cddbd401e597889 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:57:01 +0000
-Subject: [PATCH 23/24] eglibc: Install PIC archives
+Subject: [PATCH 23/25] eglibc: Install PIC archives
Forward port from eglibc
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/Makerules b/Makerules
-index fa24030..1ff4634 100644
+index 53eabfa..1cd2a53 100644
--- a/Makerules
+++ b/Makerules
@@ -694,6 +694,9 @@ ifeq ($(build-shared),yes)
@@ -119,5 +119,5 @@ index fa24030..1ff4634 100644
install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
install-rootsbin-nosubdir install-sbin-nosubdir \
--
-2.6.4
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch
new file mode 100644
index 000000000..c45b557ab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -0,0 +1,566 @@
+From 11d7633178301add26a24657e2f1596a2f7dddce Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 01:33:49 +0000
+Subject: [PATCH 24/25] eglibc: Forward port cross locale generation support
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/Makefile | 3 ++-
+ locale/catnames.c | 48 +++++++++++++++++++++++++++++++++++
+ locale/localeinfo.h | 2 +-
+ locale/programs/charmap-dir.c | 6 +++++
+ locale/programs/ld-collate.c | 17 ++++++-------
+ locale/programs/ld-ctype.c | 27 ++++++++++----------
+ locale/programs/ld-time.c | 31 +++++++++++++++--------
+ locale/programs/linereader.c | 2 +-
+ locale/programs/localedef.c | 8 ++++++
+ locale/programs/locfile.c | 5 +++-
+ locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++++++++++--
+ locale/setlocale.c | 30 ----------------------
+ 12 files changed, 169 insertions(+), 69 deletions(-)
+ create mode 100644 locale/catnames.c
+
+diff --git a/locale/Makefile b/locale/Makefile
+index c5379e6..c98c675 100644
+--- a/locale/Makefile
++++ b/locale/Makefile
+@@ -25,7 +25,8 @@ include ../Makeconfig
+ headers = locale.h bits/locale.h langinfo.h xlocale.h
+ routines = setlocale findlocale loadlocale loadarchive \
+ localeconv nl_langinfo nl_langinfo_l mb_cur_max \
+- newlocale duplocale freelocale uselocale
++ newlocale duplocale freelocale uselocale \
++ catnames
+ tests = tst-C-locale tst-locname tst-duplocale
+ categories = ctype messages monetary numeric time paper name \
+ address telephone measurement identification collate
+diff --git a/locale/catnames.c b/locale/catnames.c
+new file mode 100644
+index 0000000..9fad357
+--- /dev/null
++++ b/locale/catnames.c
+@@ -0,0 +1,48 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include "localeinfo.h"
++
++/* Define an array of category names (also the environment variable names). */
++const union catnamestr_t _nl_category_names attribute_hidden =
++ {
++ {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ category_name,
++#include "categories.def"
++#undef DEFINE_CATEGORY
++ }
++ };
++
++const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
++ {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
++#include "categories.def"
++#undef DEFINE_CATEGORY
++ };
++
++/* An array of their lengths, for convenience. */
++const uint8_t _nl_category_name_sizes[] attribute_hidden =
++ {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++ [category] = sizeof (category_name) - 1,
++#include "categories.def"
++#undef DEFINE_CATEGORY
++ [LC_ALL] = sizeof ("LC_ALL") - 1
++ };
+diff --git a/locale/localeinfo.h b/locale/localeinfo.h
+index 94627f3..d0db77b 100644
+--- a/locale/localeinfo.h
++++ b/locale/localeinfo.h
+@@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE)
+ unused. We can manage this playing some tricks with weak references.
+ But with thread-local locale settings, it becomes quite ungainly unless
+ we can use __thread variables. So only in that case do we attempt this. */
+-#ifndef SHARED
++#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF
+ # include <tls.h>
+ # define NL_CURRENT_INDIRECT 1
+ #endif
+diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
+index 99fcd35..5e528dc 100644
+--- a/locale/programs/charmap-dir.c
++++ b/locale/programs/charmap-dir.c
+@@ -19,7 +19,9 @@
+ #include <error.h>
+ #include <fcntl.h>
+ #include <libintl.h>
++#ifndef NO_UNCOMPRESS
+ #include <spawn.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
+ return closedir (dir);
+ }
+
++#ifndef NO_UNCOMPRESS
+ /* Creates a subprocess decompressing the given pathname, and returns
+ a stream reading its output (the decompressed data). */
+ static
+@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
+ }
+ return NULL;
+ }
++#endif
+
+ /* Opens a charmap for reading, given its name (not an alias name). */
+ FILE *
+@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name)
+ if (stream != NULL)
+ return stream;
+
++#ifndef NO_UNCOMPRESS
+ memcpy (p, ".gz", 4);
+ stream = fopen_uncompressed (pathname, "gzip");
+ if (stream != NULL)
+@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name)
+ stream = fopen_uncompressed (pathname, "bzip2");
+ if (stream != NULL)
+ return stream;
++#endif
+
+ return NULL;
+ }
+diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
+index 1e125f6..3b2867f 100644
+--- a/locale/programs/ld-collate.c
++++ b/locale/programs/ld-collate.c
+@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
+ }
+ if (wcs != NULL)
+ {
+- size_t nwcs = wcslen ((wchar_t *) wcs);
++ size_t nwcs = wcslen_uint32 (wcs);
+ uint32_t zero = 0;
+ /* Handle <U0000> as a single character. */
+ if (nwcs == 0)
+@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
+
+ if ((*eptr)->nwcs == runp->nwcs)
+ {
+- int c = wmemcmp ((wchar_t *) (*eptr)->wcs,
+- (wchar_t *) runp->wcs, runp->nwcs);
++ int c = wmemcmp_uint32 ((*eptr)->wcs, runp->wcs, runp->nwcs);
+
+ if (c == 0)
+ {
+@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+ one consecutive entry. */
+ if (runp->wcnext != NULL
+ && runp->nwcs == runp->wcnext->nwcs
+- && wmemcmp ((wchar_t *) runp->wcs,
+- (wchar_t *)runp->wcnext->wcs,
+- runp->nwcs - 1) == 0
++ && wmemcmp_uint32 (runp->wcs,
++ runp->wcnext->wcs,
++ runp->nwcs - 1) == 0
+ && (runp->wcs[runp->nwcs - 1]
+ == runp->wcnext->wcs[runp->nwcs - 1] + 1))
+ {
+@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+ runp = runp->wcnext;
+ while (runp->wcnext != NULL
+ && runp->nwcs == runp->wcnext->nwcs
+- && wmemcmp ((wchar_t *) runp->wcs,
+- (wchar_t *)runp->wcnext->wcs,
+- runp->nwcs - 1) == 0
++ && wmemcmp_uint32 (runp->wcs,
++ runp->wcnext->wcs,
++ runp->nwcs - 1) == 0
+ && (runp->wcs[runp->nwcs - 1]
+ == runp->wcnext->wcs[runp->nwcs - 1] + 1));
+
+diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
+index 0fd141c..68136e6 100644
+--- a/locale/programs/ld-ctype.c
++++ b/locale/programs/ld-ctype.c
+@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
+ allocate_arrays (ctype, charmap, ctype->repertoire);
+
+ default_missing_len = (ctype->default_missing
+- ? wcslen ((wchar_t *) ctype->default_missing)
++ ? wcslen_uint32 (ctype->default_missing)
+ : 0);
+
+ init_locale_data (&file, nelems);
+@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
+ ignore = 1;
+ else
+ /* This value is usable. */
+- obstack_grow (ob, to_wstr, wcslen ((wchar_t *) to_wstr) * 4);
++ obstack_grow (ob, to_wstr, wcslen_uint32 (to_wstr) * 4);
+
+ first = 0;
+ }
+@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'"));
+ }
+
+ handle_tok_digit:
+- class_bit = _ISwdigit;
+- class256_bit = _ISdigit;
++ class_bit = BITw (tok_digit);
++ class256_bit = BIT (tok_digit);
+ handle_digits = 1;
+ goto read_charclass;
+
+@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+
+ while (idx < number)
+ {
+- int res = wcscmp ((const wchar_t *) sorted[idx]->from,
+- (const wchar_t *) runp->from);
++ int res = wcscmp_uint32 (sorted[idx]->from, runp->from);
+ if (res == 0)
+ {
+ replace = 1;
+@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+ for (size_t cnt = 0; cnt < number; ++cnt)
+ {
+ struct translit_to_t *srunp;
+- from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
++ from_len += wcslen_uint32 (sorted[cnt]->from) + 1;
+ srunp = sorted[cnt]->to;
+ while (srunp != NULL)
+ {
+- to_len += wcslen ((const wchar_t *) srunp->str) + 1;
++ to_len += wcslen_uint32 (srunp->str) + 1;
+ srunp = srunp->next;
+ }
+ /* Plus one for the extra NUL character marking the end of
+@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+ ctype->translit_from_idx[cnt] = from_len;
+ ctype->translit_to_idx[cnt] = to_len;
+
+- len = wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
+- wmemcpy ((wchar_t *) &ctype->translit_from_tbl[from_len],
+- (const wchar_t *) sorted[cnt]->from, len);
++ len = wcslen_uint32 (sorted[cnt]->from) + 1;
++ wmemcpy_uint32 (&ctype->translit_from_tbl[from_len],
++ sorted[cnt]->from, len);
+ from_len += len;
+
+ ctype->translit_to_idx[cnt] = to_len;
+ srunp = sorted[cnt]->to;
+ while (srunp != NULL)
+ {
+- len = wcslen ((const wchar_t *) srunp->str) + 1;
+- wmemcpy ((wchar_t *) &ctype->translit_to_tbl[to_len],
+- (const wchar_t *) srunp->str, len);
++ len = wcslen_uint32 (srunp->str) + 1;
++ wmemcpy_uint32 (&ctype->translit_to_tbl[to_len],
++ srunp->str, len);
+ to_len += len;
+ srunp = srunp->next;
+ }
+diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
+index 87531bc..5f2c266 100644
+--- a/locale/programs/ld-time.c
++++ b/locale/programs/ld-time.c
+@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME"));
+ }
+ else
+ {
++ static const uint32_t wt_fmt_ampm[]
++ = { '%','I',':','%','M',':','%','S',' ','%','p',0 };
+ time->t_fmt_ampm = "%I:%M:%S %p";
+- time->wt_fmt_ampm = (const uint32_t *) L"%I:%M:%S %p";
++ time->wt_fmt_ampm = wt_fmt_ampm;
+ }
+ }
+
+@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME"));
+ const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
+ 31, 31, 30, 31 ,30, 31 };
+ size_t idx;
+- wchar_t *wstr;
++ uint32_t *wstr;
+
+ time->era_entries =
+ (struct era_data *) xmalloc (time->num_era
+@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME"));
+ }
+
+ /* Now generate the wide character name and format. */
+- wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */
+- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end offset */
+- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */
+- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */
++ wstr = wcschr_uint32 (time->wera[idx], L':'); /* end direction */
++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end offset */
++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end start */
++ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end end */
+ if (wstr != NULL)
+ {
+- time->era_entries[idx].wname = (uint32_t *) wstr + 1;
+- wstr = wcschr (wstr + 1, L':'); /* end name */
++ time->era_entries[idx].wname = wstr + 1;
++ wstr = wcschr_uint32 (wstr + 1, L':'); /* end name */
+ if (wstr != NULL)
+ {
+ *wstr = L'\0';
+- time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
++ time->era_entries[idx].wformat = wstr + 1;
+ }
+ else
+ time->era_entries[idx].wname =
+@@ -534,7 +536,16 @@ No definition for %s category found"), "LC_TIME"));
+ if (time->date_fmt == NULL)
+ time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
+ if (time->wdate_fmt == NULL)
+- time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
++ {
++ static const uint32_t wdate_fmt[] =
++ { '%','a',' ',
++ '%','b',' ',
++ '%','e',' ',
++ '%','H',':','%','M',':','%','S',' ',
++ '%','Z',' ',
++ '%','Y',0 };
++ time->wdate_fmt = wdate_fmt;
++ }
+ }
+
+
+diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
+index b885f65..0afb631 100644
+--- a/locale/programs/linereader.c
++++ b/locale/programs/linereader.c
+@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
+ {
+ int return_widestr = lr->return_widestr;
+ char *buf;
+- wchar_t *buf2 = NULL;
++ uint32_t *buf2 = NULL;
+ size_t bufact;
+ size_t bufmax = 56;
+
+diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
+index 6becd9a..8ddd080 100644
+--- a/locale/programs/localedef.c
++++ b/locale/programs/localedef.c
+@@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
+ #define OPT_LIST_ARCHIVE 309
+ #define OPT_LITTLE_ENDIAN 400
+ #define OPT_BIG_ENDIAN 401
++#define OPT_UINT32_ALIGN 402
+
+ /* Definitions of arguments for argp functions. */
+ static const struct argp_option options[] =
+@@ -150,6 +151,8 @@ static const struct argp_option options[] =
+ N_("Generate little-endian output") },
+ { "big-endian", OPT_BIG_ENDIAN, NULL, 0,
+ N_("Generate big-endian output") },
++ { "uint32-align", OPT_UINT32_ALIGN, "ALIGNMENT", 0,
++ N_("Set the target's uint32_t alignment in bytes (default 4)") },
+ { NULL, 0, NULL, 0, NULL }
+ };
+
+@@ -239,12 +242,14 @@ main (int argc, char *argv[])
+ ctype locale. (P1003.2 4.35.5.2) */
+ setlocale (LC_CTYPE, "POSIX");
+
++#ifndef NO_SYSCONF
+ /* Look whether the system really allows locale definitions. POSIX
+ defines error code 3 for this situation so I think it must be
+ a fatal error (see P1003.2 4.35.8). */
+ if (sysconf (_SC_2_LOCALEDEF) < 0)
+ WITH_CUR_LOCALE (error (3, 0, _("\
+ FATAL: system does not define `_POSIX2_LOCALEDEF'")));
++#endif
+
+ /* Process charmap file. */
+ charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
+@@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
+ case OPT_BIG_ENDIAN:
+ set_big_endian (true);
+ break;
++ case OPT_UINT32_ALIGN:
++ uint32_align_mask = strtol (arg, NULL, 0) - 1;
++ break;
+ case 'c':
+ force_output = 1;
+ break;
+diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
+index 32f5cd2..02967b0 100644
+--- a/locale/programs/locfile.c
++++ b/locale/programs/locfile.c
+@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
+ machine running localedef. */
+ bool swap_endianness_p;
+
++/* The target's value of __align__(uint32_t) - 1. */
++unsigned int uint32_align_mask = 3;
++
+ /* When called outside a start_locale_structure/end_locale_structure
+ or start_locale_prelude/end_locale_prelude block, record that the
+ next byte in FILE's obstack will be the first byte of a new element.
+@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string)
+ void
+ add_locale_wstring (struct locale_file *file, const uint32_t *string)
+ {
+- add_locale_uint32_array (file, string, wcslen ((const wchar_t *) string) + 1);
++ add_locale_uint32_array (file, string, wcslen_uint32 (string) + 1);
+ }
+
+ /* Record that FILE's next element is the 32-bit integer VALUE. */
+diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
+index a3dd904..2c7763a 100644
+--- a/locale/programs/locfile.h
++++ b/locale/programs/locfile.h
+@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
+
+ extern bool swap_endianness_p;
+
++extern unsigned int uint32_align_mask;
++
+ /* Change the output to be big-endian if BIG_ENDIAN is true and
+ little-endian otherwise. */
+ static inline void
+@@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value)
+ }
+
+ /* Likewise, but munge an array of N uint32_ts starting at ARRAY. */
+-static inline void
++static void
++__attribute__ ((unused))
+ maybe_swap_uint32_array (uint32_t *array, size_t n)
+ {
+ if (swap_endianness_p)
+@@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n)
+
+ /* Like maybe_swap_uint32_array, but the array of N elements is at
+ the end of OBSTACK's current object. */
+-static inline void
++static void
++__attribute__ ((unused))
+ maybe_swap_uint32_obstack (struct obstack *obstack, size_t n)
+ {
+ maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n);
+@@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale,
+ const struct charmap_t *charmap,
+ const char *output_path);
+
++static size_t wcslen_uint32 (const uint32_t *str) __attribute__ ((unused));
++static uint32_t * wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
++static uint32_t * wcschr_uint32 (const uint32_t *s, uint32_t ch) __attribute__ ((unused));
++static int wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) __attribute__ ((unused));
++static int wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
++
++static size_t
++wcslen_uint32 (const uint32_t *str)
++{
++ size_t len = 0;
++ while (str[len] != 0)
++ len++;
++ return len;
++}
++
++static int
++wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n)
++{
++ while (n-- != 0)
++ {
++ int diff = *s1++ - *s2++;
++ if (diff != 0)
++ return diff;
++ }
++ return 0;
++}
++
++static int
++wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2)
++{
++ while (*s1 != 0 && *s1 == *s2)
++ s1++, s2++;
++ return *s1 - *s2;
++}
++
++static uint32_t *
++wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n)
++{
++ return memcpy (s1, s2, n * sizeof (uint32_t));
++}
++
++static uint32_t *
++wcschr_uint32 (const uint32_t *s, uint32_t ch)
++{
++ do
++ if (*s == ch)
++ return (uint32_t *) s;
++ while (*s++ != 0);
++ return 0;
++}
++
+ #endif /* locfile.h */
+diff --git a/locale/setlocale.c b/locale/setlocale.c
+index 69b3141..1cef0be 100644
+--- a/locale/setlocale.c
++++ b/locale/setlocale.c
+@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
+ #endif
+
+
+-/* Define an array of category names (also the environment variable names). */
+-const union catnamestr_t _nl_category_names attribute_hidden =
+- {
+- {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+- category_name,
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+- }
+- };
+-
+-const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
+- {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+- [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+- };
+-
+-/* An array of their lengths, for convenience. */
+-const uint8_t _nl_category_name_sizes[] attribute_hidden =
+- {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+- [category] = sizeof (category_name) - 1,
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+- [LC_ALL] = sizeof ("LC_ALL") - 1
+- };
+-
+-
+ #ifdef NL_CURRENT_INDIRECT
+ # define WEAK_POSTLOAD(postload) weak_extern (postload)
+ #else
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch
new file mode 100644
index 000000000..9d60d0282
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-Define-DUMMY_LOCALE_T-if-not-defined.patch
@@ -0,0 +1,32 @@
+From 89ec25290d34413ce5c8ba6c378e31dbae3a37c0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 20 Apr 2016 21:11:00 -0700
+Subject: [PATCH 25/25] Define DUMMY_LOCALE_T if not defined
+
+This is a hack to fix building the locale bits on an older
+CentOs 5.X machine
+
+Upstream-Status: Inappropriate [other]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/programs/config.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/locale/programs/config.h b/locale/programs/config.h
+index f606365..0e5f8c3 100644
+--- a/locale/programs/config.h
++++ b/locale/programs/config.h
+@@ -19,6 +19,9 @@
+ #ifndef _LD_CONFIG_H
+ #define _LD_CONFIG_H 1
+
++#ifndef DUMMY_LOCALE_T
++#define DUMMY_LOCALE_T
++#endif
+ /* Use the internal textdomain used for libc messages. */
+ #define PACKAGE _libc_intl_domainname
+ #ifndef VERSION
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Forward-port-cross-locale-generation-support.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Forward-port-cross-locale-generation-support.patch
deleted file mode 100644
index 68d11192a..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Forward-port-cross-locale-generation-support.patch
+++ /dev/null
@@ -1,566 +0,0 @@
-From a5695930aec68b3f501e475d8705cddbb63f695e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 01:33:49 +0000
-Subject: [PATCH 25/25] eglibc: Forward port cross locale generation support
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- locale/Makefile | 3 ++-
- locale/catnames.c | 48 +++++++++++++++++++++++++++++++++++
- locale/localeinfo.h | 2 +-
- locale/programs/charmap-dir.c | 6 +++++
- locale/programs/ld-collate.c | 17 ++++++-------
- locale/programs/ld-ctype.c | 27 ++++++++++----------
- locale/programs/ld-time.c | 31 +++++++++++++++--------
- locale/programs/linereader.c | 2 +-
- locale/programs/localedef.c | 8 ++++++
- locale/programs/locfile.c | 5 +++-
- locale/programs/locfile.h | 59 +++++++++++++++++++++++++++++++++++++++++--
- locale/setlocale.c | 30 ----------------------
- 12 files changed, 169 insertions(+), 69 deletions(-)
- create mode 100644 locale/catnames.c
-
-diff --git a/locale/Makefile b/locale/Makefile
-index 75afbe1..d32523b 100644
---- a/locale/Makefile
-+++ b/locale/Makefile
-@@ -25,7 +25,8 @@ include ../Makeconfig
- headers = locale.h bits/locale.h langinfo.h xlocale.h
- routines = setlocale findlocale loadlocale loadarchive \
- localeconv nl_langinfo nl_langinfo_l mb_cur_max \
-- newlocale duplocale freelocale uselocale
-+ newlocale duplocale freelocale uselocale \
-+ catnames
- tests = tst-C-locale tst-locname tst-duplocale
- categories = ctype messages monetary numeric time paper name \
- address telephone measurement identification collate
-diff --git a/locale/catnames.c b/locale/catnames.c
-new file mode 100644
-index 0000000..9fad357
---- /dev/null
-+++ b/locale/catnames.c
-@@ -0,0 +1,48 @@
-+/* Copyright (C) 2006 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include "localeinfo.h"
-+
-+/* Define an array of category names (also the environment variable names). */
-+const union catnamestr_t _nl_category_names attribute_hidden =
-+ {
-+ {
-+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+ category_name,
-+#include "categories.def"
-+#undef DEFINE_CATEGORY
-+ }
-+ };
-+
-+const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
-+ {
-+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+ [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
-+#include "categories.def"
-+#undef DEFINE_CATEGORY
-+ };
-+
-+/* An array of their lengths, for convenience. */
-+const uint8_t _nl_category_name_sizes[] attribute_hidden =
-+ {
-+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+ [category] = sizeof (category_name) - 1,
-+#include "categories.def"
-+#undef DEFINE_CATEGORY
-+ [LC_ALL] = sizeof ("LC_ALL") - 1
-+ };
-diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index 789da44..4ac9249 100644
---- a/locale/localeinfo.h
-+++ b/locale/localeinfo.h
-@@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE)
- unused. We can manage this playing some tricks with weak references.
- But with thread-local locale settings, it becomes quite ungainly unless
- we can use __thread variables. So only in that case do we attempt this. */
--#ifndef SHARED
-+#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF
- # include <tls.h>
- # define NL_CURRENT_INDIRECT 1
- #endif
-diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
-index cf7adea..ef3b811 100644
---- a/locale/programs/charmap-dir.c
-+++ b/locale/programs/charmap-dir.c
-@@ -19,7 +19,9 @@
- #include <error.h>
- #include <fcntl.h>
- #include <libintl.h>
-+#ifndef NO_UNCOMPRESS
- #include <spawn.h>
-+#endif
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
- return closedir (dir);
- }
-
-+#ifndef NO_UNCOMPRESS
- /* Creates a subprocess decompressing the given pathname, and returns
- a stream reading its output (the decompressed data). */
- static
-@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
- }
- return NULL;
- }
-+#endif
-
- /* Opens a charmap for reading, given its name (not an alias name). */
- FILE *
-@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name)
- if (stream != NULL)
- return stream;
-
-+#ifndef NO_UNCOMPRESS
- memcpy (p, ".gz", 4);
- stream = fopen_uncompressed (pathname, "gzip");
- if (stream != NULL)
-@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name)
- stream = fopen_uncompressed (pathname, "bzip2");
- if (stream != NULL)
- return stream;
-+#endif
-
- return NULL;
- }
-diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index dc0fe30..3c88c6d 100644
---- a/locale/programs/ld-collate.c
-+++ b/locale/programs/ld-collate.c
-@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
- }
- if (wcs != NULL)
- {
-- size_t nwcs = wcslen ((wchar_t *) wcs);
-+ size_t nwcs = wcslen_uint32 (wcs);
- uint32_t zero = 0;
- /* Handle <U0000> as a single character. */
- if (nwcs == 0)
-@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
-
- if ((*eptr)->nwcs == runp->nwcs)
- {
-- int c = wmemcmp ((wchar_t *) (*eptr)->wcs,
-- (wchar_t *) runp->wcs, runp->nwcs);
-+ int c = wmemcmp_uint32 ((*eptr)->wcs, runp->wcs, runp->nwcs);
-
- if (c == 0)
- {
-@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
- one consecutive entry. */
- if (runp->wcnext != NULL
- && runp->nwcs == runp->wcnext->nwcs
-- && wmemcmp ((wchar_t *) runp->wcs,
-- (wchar_t *)runp->wcnext->wcs,
-- runp->nwcs - 1) == 0
-+ && wmemcmp_uint32 (runp->wcs,
-+ runp->wcnext->wcs,
-+ runp->nwcs - 1) == 0
- && (runp->wcs[runp->nwcs - 1]
- == runp->wcnext->wcs[runp->nwcs - 1] + 1))
- {
-@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
- runp = runp->wcnext;
- while (runp->wcnext != NULL
- && runp->nwcs == runp->wcnext->nwcs
-- && wmemcmp ((wchar_t *) runp->wcs,
-- (wchar_t *)runp->wcnext->wcs,
-- runp->nwcs - 1) == 0
-+ && wmemcmp_uint32 (runp->wcs,
-+ runp->wcnext->wcs,
-+ runp->nwcs - 1) == 0
- && (runp->wcs[runp->nwcs - 1]
- == runp->wcnext->wcs[runp->nwcs - 1] + 1));
-
-diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
-index 3f464ef..b7b6b51 100644
---- a/locale/programs/ld-ctype.c
-+++ b/locale/programs/ld-ctype.c
-@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
- allocate_arrays (ctype, charmap, ctype->repertoire);
-
- default_missing_len = (ctype->default_missing
-- ? wcslen ((wchar_t *) ctype->default_missing)
-+ ? wcslen_uint32 (ctype->default_missing)
- : 0);
-
- init_locale_data (&file, nelems);
-@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
- ignore = 1;
- else
- /* This value is usable. */
-- obstack_grow (ob, to_wstr, wcslen ((wchar_t *) to_wstr) * 4);
-+ obstack_grow (ob, to_wstr, wcslen_uint32 (to_wstr) * 4);
-
- first = 0;
- }
-@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'"));
- }
-
- handle_tok_digit:
-- class_bit = _ISwdigit;
-- class256_bit = _ISdigit;
-+ class_bit = BITw (tok_digit);
-+ class256_bit = BIT (tok_digit);
- handle_digits = 1;
- goto read_charclass;
-
-@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
-
- while (idx < number)
- {
-- int res = wcscmp ((const wchar_t *) sorted[idx]->from,
-- (const wchar_t *) runp->from);
-+ int res = wcscmp_uint32 (sorted[idx]->from, runp->from);
- if (res == 0)
- {
- replace = 1;
-@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
- for (size_t cnt = 0; cnt < number; ++cnt)
- {
- struct translit_to_t *srunp;
-- from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
-+ from_len += wcslen_uint32 (sorted[cnt]->from) + 1;
- srunp = sorted[cnt]->to;
- while (srunp != NULL)
- {
-- to_len += wcslen ((const wchar_t *) srunp->str) + 1;
-+ to_len += wcslen_uint32 (srunp->str) + 1;
- srunp = srunp->next;
- }
- /* Plus one for the extra NUL character marking the end of
-@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
- ctype->translit_from_idx[cnt] = from_len;
- ctype->translit_to_idx[cnt] = to_len;
-
-- len = wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
-- wmemcpy ((wchar_t *) &ctype->translit_from_tbl[from_len],
-- (const wchar_t *) sorted[cnt]->from, len);
-+ len = wcslen_uint32 (sorted[cnt]->from) + 1;
-+ wmemcpy_uint32 (&ctype->translit_from_tbl[from_len],
-+ sorted[cnt]->from, len);
- from_len += len;
-
- ctype->translit_to_idx[cnt] = to_len;
- srunp = sorted[cnt]->to;
- while (srunp != NULL)
- {
-- len = wcslen ((const wchar_t *) srunp->str) + 1;
-- wmemcpy ((wchar_t *) &ctype->translit_to_tbl[to_len],
-- (const wchar_t *) srunp->str, len);
-+ len = wcslen_uint32 (srunp->str) + 1;
-+ wmemcpy_uint32 (&ctype->translit_to_tbl[to_len],
-+ srunp->str, len);
- to_len += len;
- srunp = srunp->next;
- }
-diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
-index db490c6..75dc505 100644
---- a/locale/programs/ld-time.c
-+++ b/locale/programs/ld-time.c
-@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME"));
- }
- else
- {
-+ static const uint32_t wt_fmt_ampm[]
-+ = { '%','I',':','%','M',':','%','S',' ','%','p',0 };
- time->t_fmt_ampm = "%I:%M:%S %p";
-- time->wt_fmt_ampm = (const uint32_t *) L"%I:%M:%S %p";
-+ time->wt_fmt_ampm = wt_fmt_ampm;
- }
- }
-
-@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME"));
- const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
- 31, 31, 30, 31 ,30, 31 };
- size_t idx;
-- wchar_t *wstr;
-+ uint32_t *wstr;
-
- time->era_entries =
- (struct era_data *) xmalloc (time->num_era
-@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME"));
- }
-
- /* Now generate the wide character name and format. */
-- wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */
-- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end offset */
-- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */
-- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */
-+ wstr = wcschr_uint32 (time->wera[idx], L':'); /* end direction */
-+ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end offset */
-+ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end start */
-+ wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end end */
- if (wstr != NULL)
- {
-- time->era_entries[idx].wname = (uint32_t *) wstr + 1;
-- wstr = wcschr (wstr + 1, L':'); /* end name */
-+ time->era_entries[idx].wname = wstr + 1;
-+ wstr = wcschr_uint32 (wstr + 1, L':'); /* end name */
- if (wstr != NULL)
- {
- *wstr = L'\0';
-- time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
-+ time->era_entries[idx].wformat = wstr + 1;
- }
- else
- time->era_entries[idx].wname =
-@@ -530,7 +532,16 @@ No definition for %s category found"), "LC_TIME"));
- if (time->date_fmt == NULL)
- time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
- if (time->wdate_fmt == NULL)
-- time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
-+ {
-+ static const uint32_t wdate_fmt[] =
-+ { '%','a',' ',
-+ '%','b',' ',
-+ '%','e',' ',
-+ '%','H',':','%','M',':','%','S',' ',
-+ '%','Z',' ',
-+ '%','Y',0 };
-+ time->wdate_fmt = wdate_fmt;
-+ }
- }
-
-
-diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
-index 2e05130..653b68c 100644
---- a/locale/programs/linereader.c
-+++ b/locale/programs/linereader.c
-@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
- {
- int return_widestr = lr->return_widestr;
- char *buf;
-- wchar_t *buf2 = NULL;
-+ uint32_t *buf2 = NULL;
- size_t bufact;
- size_t bufmax = 56;
-
-diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index fd6ca51..328d36c 100644
---- a/locale/programs/localedef.c
-+++ b/locale/programs/localedef.c
-@@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
- #define OPT_LIST_ARCHIVE 309
- #define OPT_LITTLE_ENDIAN 400
- #define OPT_BIG_ENDIAN 401
-+#define OPT_UINT32_ALIGN 402
-
- /* Definitions of arguments for argp functions. */
- static const struct argp_option options[] =
-@@ -150,6 +151,8 @@ static const struct argp_option options[] =
- N_("Generate little-endian output") },
- { "big-endian", OPT_BIG_ENDIAN, NULL, 0,
- N_("Generate big-endian output") },
-+ { "uint32-align", OPT_UINT32_ALIGN, "ALIGNMENT", 0,
-+ N_("Set the target's uint32_t alignment in bytes (default 4)") },
- { NULL, 0, NULL, 0, NULL }
- };
-
-@@ -239,12 +242,14 @@ main (int argc, char *argv[])
- ctype locale. (P1003.2 4.35.5.2) */
- setlocale (LC_CTYPE, "POSIX");
-
-+#ifndef NO_SYSCONF
- /* Look whether the system really allows locale definitions. POSIX
- defines error code 3 for this situation so I think it must be
- a fatal error (see P1003.2 4.35.8). */
- if (sysconf (_SC_2_LOCALEDEF) < 0)
- WITH_CUR_LOCALE (error (3, 0, _("\
- FATAL: system does not define `_POSIX2_LOCALEDEF'")));
-+#endif
-
- /* Process charmap file. */
- charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
-@@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
- case OPT_BIG_ENDIAN:
- set_big_endian (true);
- break;
-+ case OPT_UINT32_ALIGN:
-+ uint32_align_mask = strtol (arg, NULL, 0) - 1;
-+ break;
- case 'c':
- force_output = 1;
- break;
-diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
-index 33da52e..f790c4c 100644
---- a/locale/programs/locfile.c
-+++ b/locale/programs/locfile.c
-@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
- machine running localedef. */
- bool swap_endianness_p;
-
-+/* The target's value of __align__(uint32_t) - 1. */
-+unsigned int uint32_align_mask = 3;
-+
- /* When called outside a start_locale_structure/end_locale_structure
- or start_locale_prelude/end_locale_prelude block, record that the
- next byte in FILE's obstack will be the first byte of a new element.
-@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string)
- void
- add_locale_wstring (struct locale_file *file, const uint32_t *string)
- {
-- add_locale_uint32_array (file, string, wcslen ((const wchar_t *) string) + 1);
-+ add_locale_uint32_array (file, string, wcslen_uint32 (string) + 1);
- }
-
- /* Record that FILE's next element is the 32-bit integer VALUE. */
-diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
-index 6fc441b..118b171 100644
---- a/locale/programs/locfile.h
-+++ b/locale/programs/locfile.h
-@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
-
- extern bool swap_endianness_p;
-
-+extern unsigned int uint32_align_mask;
-+
- /* Change the output to be big-endian if BIG_ENDIAN is true and
- little-endian otherwise. */
- static inline void
-@@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value)
- }
-
- /* Likewise, but munge an array of N uint32_ts starting at ARRAY. */
--static inline void
-+static void
-+__attribute__ ((unused))
- maybe_swap_uint32_array (uint32_t *array, size_t n)
- {
- if (swap_endianness_p)
-@@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n)
-
- /* Like maybe_swap_uint32_array, but the array of N elements is at
- the end of OBSTACK's current object. */
--static inline void
-+static void
-+__attribute__ ((unused))
- maybe_swap_uint32_obstack (struct obstack *obstack, size_t n)
- {
- maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n);
-@@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale,
- const struct charmap_t *charmap,
- const char *output_path);
-
-+static size_t wcslen_uint32 (const uint32_t *str) __attribute__ ((unused));
-+static uint32_t * wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
-+static uint32_t * wcschr_uint32 (const uint32_t *s, uint32_t ch) __attribute__ ((unused));
-+static int wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) __attribute__ ((unused));
-+static int wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
-+
-+static size_t
-+wcslen_uint32 (const uint32_t *str)
-+{
-+ size_t len = 0;
-+ while (str[len] != 0)
-+ len++;
-+ return len;
-+}
-+
-+static int
-+wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n)
-+{
-+ while (n-- != 0)
-+ {
-+ int diff = *s1++ - *s2++;
-+ if (diff != 0)
-+ return diff;
-+ }
-+ return 0;
-+}
-+
-+static int
-+wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2)
-+{
-+ while (*s1 != 0 && *s1 == *s2)
-+ s1++, s2++;
-+ return *s1 - *s2;
-+}
-+
-+static uint32_t *
-+wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n)
-+{
-+ return memcpy (s1, s2, n * sizeof (uint32_t));
-+}
-+
-+static uint32_t *
-+wcschr_uint32 (const uint32_t *s, uint32_t ch)
-+{
-+ do
-+ if (*s == ch)
-+ return (uint32_t *) s;
-+ while (*s++ != 0);
-+ return 0;
-+}
-+
- #endif /* locfile.h */
-diff --git a/locale/setlocale.c b/locale/setlocale.c
-index ead030d..b551332 100644
---- a/locale/setlocale.c
-+++ b/locale/setlocale.c
-@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
- #endif
-
-
--/* Define an array of category names (also the environment variable names). */
--const union catnamestr_t _nl_category_names attribute_hidden =
-- {
-- {
--#define DEFINE_CATEGORY(category, category_name, items, a) \
-- category_name,
--#include "categories.def"
--#undef DEFINE_CATEGORY
-- }
-- };
--
--const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
-- {
--#define DEFINE_CATEGORY(category, category_name, items, a) \
-- [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
--#include "categories.def"
--#undef DEFINE_CATEGORY
-- };
--
--/* An array of their lengths, for convenience. */
--const uint8_t _nl_category_name_sizes[] attribute_hidden =
-- {
--#define DEFINE_CATEGORY(category, category_name, items, a) \
-- [category] = sizeof (category_name) - 1,
--#include "categories.def"
--#undef DEFINE_CATEGORY
-- [LC_ALL] = sizeof ("LC_ALL") - 1
-- };
--
--
- #ifdef NL_CURRENT_INDIRECT
- # define WEAK_POSTLOAD(postload) weak_extern (postload)
- #else
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch
deleted file mode 100644
index 2b889a94c..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 97fe7f1b23ea1f17533884b8fa7f7eb40087d558 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 5 Jan 2016 17:50:00 -0800
-Subject: [PATCH] When disabling SSE, make sure -fpmath is not set to use SSE
- either
-
-This fixes errors when we inject sse options through CFLAGS and now
-that we have -Werror turned on by default this warning turns to become
-error on x86
-
-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
--mno-sse -mno-mmx
-
-generates warning
-/dev/null:1:0: warning: SSE instruction set disabled, using 387
-arithmetics
-
-where as
-
-gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
--mno-sse -mno-mmx -mfpmath=387
-
-Generates no warnings
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- ChangeLog | 5 +++++
- sysdeps/i386/Makefile | 2 +-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
-index 168512f..70153b3 100644
---- a/sysdeps/i386/Makefile
-+++ b/sysdeps/i386/Makefile
-@@ -89,7 +89,7 @@ ifeq ($(subdir),elf)
- # the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
- # which must be preserved.
- CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-- -mno-sse -mno-mmx)
-+ -mno-sse -mno-mmx -mfpmath=387)
-
- tests-special += $(objpfx)tst-ld-sse-use.out
- $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-build_local_scope.patch b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-build_local_scope.patch
new file mode 100644
index 000000000..8e0cb8319
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc/0026-build_local_scope.patch
@@ -0,0 +1,56 @@
+From 6e4ec5a3c5fe63b6458036f18d43124de4a7e724 Mon Sep 17 00:00:00 2001
+From: Mark Hatle <mark.hatle@windriver.com>
+Date: Thu, 18 Aug 2016 14:07:58 -0500
+Subject: [PATCH] elf/dl-deps.c: Make _dl_build_local_scope breadth first
+
+According to the ELF specification:
+
+When resolving symbolic references, the dynamic linker examines the symbol
+tables with a breadth-first search.
+
+This function was using a depth first search. By doing so the conflict
+resolution reported to the prelinker (when LD_TRACE_PRELINKING=1 is set)
+was incorrect. This caused problems when their were various circular
+dependencies between libraries. The problem usually manifested itself by
+the wrong IFUNC being executed.
+
+[BZ# 20488]
+
+Upstream-Status: Submitted [libc-alpha]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ elf/dl-deps.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/elf/dl-deps.c b/elf/dl-deps.c
+index 6a82987..fc37c87 100644
+--- a/elf/dl-deps.c
++++ b/elf/dl-deps.c
+@@ -73,13 +73,19 @@ _dl_build_local_scope (struct link_map **list, struct link_map *map)
+ {
+ struct link_map **p = list;
+ struct link_map **q;
++ struct link_map **r;
+
+ *p++ = map;
+ map->l_reserved = 1;
+- if (map->l_initfini)
+- for (q = map->l_initfini + 1; *q; ++q)
+- if (! (*q)->l_reserved)
+- p += _dl_build_local_scope (p, *q);
++
++ for (r = list; r < p; ++r)
++ if ((*r)->l_initfini)
++ for (q = (*r)->l_initfini + 1; *q; ++q)
++ if (! (*q)->l_reserved)
++ {
++ *p++ = *q;
++ (*q)->l_reserved = 1;
++ }
+ return p - list;
+ }
+
+--
+2.5.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.23.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.23.bb
deleted file mode 100644
index 18f40660e..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.23.bb
+++ /dev/null
@@ -1,133 +0,0 @@
-require glibc.inc
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
- file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS += "gperf-native"
-
-SRCREV ?= "e742928c1592b43db6809db4f39e67be151cdd27"
-
-SRCBRANCH ?= "release/${PV}/master"
-
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
- file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
- file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
- file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
- file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
- file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
- file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
- file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
- file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \
- file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
- file://0014-Add-unused-attribute.patch \
- file://0015-yes-within-the-path-sets-wrong-config-variables.patch \
- file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
- file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
- file://0018-eglibc-Cross-building-and-testing-instructions.patch \
- file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
- file://0020-eglibc-cherry-picked-from.patch \
- file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
- file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
- file://0023-eglibc-Install-PIC-archives.patch \
- file://0025-eglibc-Forward-port-cross-locale-generation-support.patch \
- file://0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch \
-"
-
-SRC_URI += "\
- file://etc/ld.so.conf \
- file://generate-supported.mk \
-"
-
-SRC_URI_append_class-nativesdk = "\
- file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
- file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
- file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
- file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
-"
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build-${TARGET_SYS}"
-
-PACKAGES_DYNAMIC = ""
-
-# the -isystem in bitbake.conf screws up glibc do_stage
-BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
-TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
-
-GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
-
-#
-# We will skip parsing glibc when target system C library selection is not glibc
-# this helps in easing out parsing for non-glibc system libraries
-#
-COMPATIBLE_HOST_libc-musl_class-target = "null"
-COMPATIBLE_HOST_libc-uclibc_class-target = "null"
-
-EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
- --without-cvs --disable-profile \
- --disable-debug --without-gd \
- --enable-clocale=gnu \
- --enable-add-ons \
- --with-headers=${STAGING_INCDIR} \
- --without-selinux \
- --enable-obsolete-rpc \
- ${GLIBC_EXTRA_OECONF}"
-
-EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
-
-
-do_patch_append() {
- bb.build.exec_func('do_fix_readlib_c', d)
-}
-
-do_fix_readlib_c () {
- sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
-}
-
-do_configure () {
-# override this function to avoid the autoconf/automake/aclocal/autoheader
-# calls for now
-# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
-# version check and doesn't really help with anything
- (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
- find ${S} -name "configure" | xargs touch
- CPPFLAGS="" oe_runconf
-}
-
-rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
- yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
- rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
-
-do_compile () {
- # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
- unset LDFLAGS
- base_do_compile
- (
- cd ${S}/sunrpc/rpcsvc
- for r in ${rpcsvc}; do
- h=`echo $r|sed -e's,\.x$,.h,'`
- rm -f $h
- ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
- done
- )
- echo "Adjust ldd script"
- if [ -n "${RTLDLIST}" ]
- then
- prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
- if [ "${prevrtld}" != "${RTLDLIST}" ]
- then
- sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
- fi
- fi
-
-}
-
-require glibc-package.inc
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.24.bb b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.24.bb
new file mode 100644
index 000000000..f5a21b258
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/glibc/glibc_2.24.bb
@@ -0,0 +1,140 @@
+require glibc.inc
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS += "gperf-native"
+
+SRCREV ?= "ea23815a795f72035262953dad5beb03e09c17dd"
+
+SRCBRANCH ?= "release/${PV}/master"
+
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+ file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
+ file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
+ file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
+ file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+ file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
+ file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
+ file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+ file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \
+ file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
+ file://0014-Add-unused-attribute.patch \
+ file://0015-yes-within-the-path-sets-wrong-config-variables.patch \
+ file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
+ file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
+ file://0018-eglibc-Cross-building-and-testing-instructions.patch \
+ file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
+ file://0020-eglibc-cherry-picked-from.patch \
+ file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+ file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+ file://0023-eglibc-Install-PIC-archives.patch \
+ file://0024-eglibc-Forward-port-cross-locale-generation-support.patch \
+ file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \
+ file://0026-build_local_scope.patch \
+"
+
+SRC_URI += "\
+ file://etc/ld.so.conf \
+ file://generate-supported.mk \
+ file://0001-locale-fix-hard-coded-reference-to-gcc-E.patch \
+ "
+
+SRC_URI_append_class-nativesdk = "\
+ file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
+ file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
+ file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
+ file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
+"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+PACKAGES_DYNAMIC = ""
+
+# the -isystem in bitbake.conf screws up glibc do_stage
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
+
+GLIBC_BROKEN_LOCALES = ""
+#
+# We will skip parsing glibc when target system C library selection is not glibc
+# this helps in easing out parsing for non-glibc system libraries
+#
+COMPATIBLE_HOST_libc-musl_class-target = "null"
+COMPATIBLE_HOST_libc-uclibc_class-target = "null"
+
+EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
+ --without-cvs --disable-profile \
+ --disable-debug --without-gd \
+ --enable-clocale=gnu \
+ --enable-add-ons \
+ --with-headers=${STAGING_INCDIR} \
+ --without-selinux \
+ --enable-obsolete-rpc \
+ ${GLIBC_EXTRA_OECONF}"
+
+EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
+
+
+do_patch_append() {
+ bb.build.exec_func('do_fix_readlib_c', d)
+}
+
+do_fix_readlib_c () {
+ sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
+}
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ find ${S} -name "configure" | xargs touch
+ CPPFLAGS="" oe_runconf
+}
+
+rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
+ yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+ rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+
+do_compile () {
+ # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+ unset LDFLAGS
+ base_do_compile
+ (
+ cd ${S}/sunrpc/rpcsvc
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ rm -f $h
+ ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
+ done
+ )
+ echo "Adjust ldd script"
+ if [ -n "${RTLDLIST}" ]
+ then
+ prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
+ if [ "${prevrtld}" != "${RTLDLIST}" ]
+ then
+ sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
+ fi
+ fi
+
+}
+
+# Use the host locale archive when built for nativesdk so that we don't need to
+# ship a complete (100MB) locale set.
+do_compile_prepend_class-nativesdk() {
+ echo "complocaledir=/usr/lib/locale" >> ${S}/configparms
+}
+
+require glibc-package.inc
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb b/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb
index 732b295b8..9de01f961 100644
--- a/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb
@@ -13,8 +13,6 @@ SRC_URI = "git://anonscm.debian.org/git/collab-maint/ifupdown.git;protocol=https
"
SRCREV = "05ea2fd4f49bb1201aeef2a42efbcff8f336112f"
-EXTRA_OEMAKE = ""
-
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb
deleted file mode 100644
index bdcb9212d..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb
+++ /dev/null
@@ -1,120 +0,0 @@
-SUMMARY = "An image containing the build system itself"
-DESCRIPTION = "An image containing the build system that you can boot and run using either VMware Player or VMware Workstation."
-HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted kernel-dev kernel-devsrc "
-
-IMAGE_FEATURES += "x11-base package-management splash"
-
-# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
-IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
-
-# Do a quiet boot with limited console messages
-APPEND += "rootfstype=ext4 quiet"
-
-DEPENDS = "zip-native"
-IMAGE_FSTYPES = "vmdk"
-
-inherit core-image module-base
-
-SRCREV ?= "5f84d6545e6d7a2be8e603a1f4b1afae0dad0a9b"
-SRC_URI = "git://git.yoctoproject.org/poky;branch=krogoth \
- file://Yocto_Build_Appliance.vmx \
- file://Yocto_Build_Appliance.vmxf \
- file://README_VirtualBox_Guest_Additions.txt \
- "
-BA_INCLUDE_SOURCES ??= "0"
-
-IMAGE_CMD_ext4_append () {
- # We don't need to reserve much space for root, 0.5% is more than enough
- tune2fs -m 0.5 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4
-}
-
-fakeroot do_populate_poky_src () {
- # Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
- # will become invalid in the target.
- rm -rf ${WORKDIR}/git/.git
- rm -f ${WORKDIR}/git/.gitignore
-
- cp -R ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
-
- mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
- mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
- if [ ${BA_INCLUDE_SOURCES} != 0 ]; then
- cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
- # Remove the git2_* tarballs -- this is ok since we still have the git2/.
- rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
- fi
-
- # Place the README_VirtualBox_Guest_Additions file in builders home folder.
- cp ${WORKDIR}/README_VirtualBox_Guest_Additions.txt ${IMAGE_ROOTFS}/home/builder/
-
- # Create a symlink, needed for out-of-tree kernel modules build
- ln -snr ${IMAGE_ROOTFS}/usr/src/kernel ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build
-
- echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
- echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
- mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
- echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
- echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
- echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
-
- # Also save (for reference only) the actual SRCREV used to create this image
- echo "export BA_SRCREV=${SRCREV}" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
- echo "" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
- echo "# If working behind a proxy and using the provided oe-git-proxy script" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
- echo "# you need to set ALL_PROXY based on your proxy settings." >> ${IMAGE_ROOTFS}/home/builder/.bashrc
- echo "# Example ALL_PROXY values:" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
- echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
- echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
-
- chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
-
- chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
- chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
-
- # Assume we will need CDROM to install guest additions
- mkdir -p ${IMAGE_ROOTFS}/media/cdrom
-
- # Allow builder to use sudo
- echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
-
- # Load tap/tun at startup
- ln -sr ${IMAGE_ROOTFS}/usr/sbin/iptables ${IMAGE_ROOTFS}/sbin/iptables
- echo "tun" >> ${IMAGE_ROOTFS}/etc/modules
-
- # Use Clearlooks GTK+ theme
- mkdir -p ${IMAGE_ROOTFS}/etc/gtk-2.0
- echo 'gtk-theme-name = "Clearlooks"' > ${IMAGE_ROOTFS}/etc/gtk-2.0/gtkrc
-}
-
-IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
-
-addtask rootfs after do_unpack
-
-python () {
- # Ensure we run these usually noexec tasks
- d.delVarFlag("do_fetch", "noexec")
- d.delVarFlag("do_unpack", "noexec")
-}
-
-create_bundle_files () {
- cd ${WORKDIR}
- mkdir -p Yocto_Build_Appliance
- cp *.vmx* Yocto_Build_Appliance
- ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
- zip -r ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
- ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip
-}
-create_bundle_files[vardepsexclude] = "DATETIME"
-
-python do_bundle_files() {
- bb.build.exec_func('create_bundle_files', d)
-}
-
-addtask bundle_files after do_vmimg before do_build
-do_bundle_files[nostamp] = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
new file mode 100644
index 000000000..e6ed0f482
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -0,0 +1,117 @@
+SUMMARY = "An image containing the build system itself"
+DESCRIPTION = "An image containing the build system that you can boot and run using either VMware Player or VMware Workstation."
+HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted \
+ kernel-dev kernel-devsrc connman connman-plugin-ethernet dhcp-client"
+
+IMAGE_FEATURES += "x11-base package-management splash"
+
+# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
+IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
+
+# Do a quiet boot with limited console messages
+APPEND += "rootfstype=ext4 quiet"
+
+DEPENDS = "zip-native"
+IMAGE_FSTYPES = "vmdk"
+
+inherit core-image module-base
+
+SRCREV ?= "746c681be4c744d0c6c2d3225b94550241546f65"
+SRC_URI = "git://git.yoctoproject.org/poky;branch=morty \
+ file://Yocto_Build_Appliance.vmx \
+ file://Yocto_Build_Appliance.vmxf \
+ file://README_VirtualBox_Guest_Additions.txt \
+ "
+BA_INCLUDE_SOURCES ??= "0"
+
+IMAGE_CMD_ext4_append () {
+ # We don't need to reserve much space for root, 0.5% is more than enough
+ tune2fs -m 0.5 ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ext4
+}
+
+fakeroot do_populate_poky_src () {
+ # Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
+ # will become invalid in the target.
+ rm -rf ${WORKDIR}/git/.git
+ rm -f ${WORKDIR}/git/.gitignore
+
+ cp -R ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
+
+ mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
+ mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
+ if [ ${BA_INCLUDE_SOURCES} != 0 ]; then
+ cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
+ # Remove the git2_* tarballs -- this is ok since we still have the git2/.
+ rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
+ fi
+
+ # Place the README_VirtualBox_Guest_Additions file in builders home folder.
+ cp ${WORKDIR}/README_VirtualBox_Guest_Additions.txt ${IMAGE_ROOTFS}/home/builder/
+
+ # Create a symlink, needed for out-of-tree kernel modules build
+ lnr ${IMAGE_ROOTFS}${KERNEL_SRC_PATH} ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build
+
+ echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
+ echo "export LC_ALL=en_US.utf8" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
+ # Also save (for reference only) the actual SRCREV used to create this image
+ echo "export BA_SRCREV=${SRCREV}" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "export PATH=$PATH:/sbin" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
+ echo "# If working behind a proxy and using the provided oe-git-proxy script" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "# you need to set ALL_PROXY based on your proxy settings." >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "# Example ALL_PROXY values:" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
+ chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
+ chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
+
+ # Assume we will need CDROM to install guest additions
+ mkdir -p ${IMAGE_ROOTFS}/media/cdrom
+
+ # Allow builder to use sudo
+ echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
+
+ # Load tap/tun at startup
+ lnr ${IMAGE_ROOTFS}/usr/sbin/iptables ${IMAGE_ROOTFS}/sbin/iptables
+ echo "tun" >> ${IMAGE_ROOTFS}/etc/modules
+
+ # Use Clearlooks GTK+ theme
+ mkdir -p ${IMAGE_ROOTFS}/etc/gtk-2.0
+ echo 'gtk-theme-name = "Clearlooks"' > ${IMAGE_ROOTFS}/etc/gtk-2.0/gtkrc
+}
+
+IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
+
+addtask rootfs after do_unpack
+
+python () {
+ # Ensure we run these usually noexec tasks
+ d.delVarFlag("do_fetch", "noexec")
+ d.delVarFlag("do_unpack", "noexec")
+}
+
+create_bundle_files () {
+ cd ${WORKDIR}
+ mkdir -p Yocto_Build_Appliance
+ cp *.vmx* Yocto_Build_Appliance
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
+ zip -r ${IMGDEPLOYDIR}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
+ ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${IMGDEPLOYDIR}/Yocto_Build_Appliance.zip
+}
+create_bundle_files[vardepsexclude] = "DATETIME"
+
+python do_bundle_files() {
+ bb.build.exec_func('create_bundle_files', d)
+}
+
+addtask bundle_files after do_vmimg before do_image_complete
diff --git a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
index 8d7c0d2d3..5794a2595 100644
--- a/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -20,3 +20,6 @@ IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
BAD_RECOMMENDATIONS += "busybox-syslog"
+
+# Use the same restriction as initramfs-live-install
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index d58826a24..441e25238 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -29,7 +29,13 @@ esac
echo "Searching for hard drives ..."
-for device in `ls /sys/block/`; do
+# Some eMMC devices have special sub devices such as mmcblk0boot0 etc
+# we're currently only interested in the root device so pick them wisely
+devices=`ls /sys/block/ | grep -v mmcblk` || true
+mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"` || true
+devices="$devices $mmc_devices"
+
+for device in $devices; do
case $device in
loop*)
# skip loop device
@@ -78,17 +84,23 @@ for hdname in $hdnamelist; do
cat /sys/block/$hdname/device/uevent
fi
echo
- # Get user choice
- while true; do
- echo -n "Do you want to install this image there? [y/n] "
- read answer
- if [ "$answer" = "y" -o "$answer" = "n" ]; then
+done
+
+# Get user choice
+while true; do
+ echo "Please select an install target or press n to exit ($hdnamelist ): "
+ read answer
+ if [ "$answer" = "n" ]; then
+ echo "Installation manually aborted."
+ exit 1
+ fi
+ for hdname in $hdnamelist; do
+ if [ "$answer" = "$hdname" ]; then
+ TARGET_DEVICE_NAME=$answer
break
fi
- echo "Please answer y or n"
done
- if [ "$answer" = "y" ]; then
- TARGET_DEVICE_NAME=$hdname
+ if [ -n "$TARGET_DEVICE_NAME" ]; then
break
fi
done
@@ -116,8 +128,8 @@ umount ${device}* 2> /dev/null || /bin/true
mkdir -p /tmp
# Create /etc/mtab if not present
-if [ ! -e /etc/mtab ]; then
- cat /proc/mounts > /etc/mtab
+if [ ! -e /etc/mtab ] && [ -e /proc/mounts ]; then
+ ln -sf /proc/mounts /etc/mtab
fi
disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
@@ -138,6 +150,12 @@ if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
part_prefix="p"
rootwait="rootwait"
fi
+
+# USB devices also require rootwait
+if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then
+ rootwait="rootwait"
+fi
+
bootfs=${device}${part_prefix}1
rootfs=${device}${part_prefix}2
swap=${device}${part_prefix}3
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
index c5623eeb2..04ce5fb4b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -28,7 +28,13 @@ esac
echo "Searching for hard drives ..."
-for device in `ls /sys/block/`; do
+# Some eMMC devices have special sub devices such as mmcblk0boot0 etc
+# we're currently only interested in the root device so pick them wisely
+devices=`ls /sys/block/ | grep -v mmcblk` || true
+mmc_devices=`ls /sys/block/ | grep "mmcblk[0-9]\{1,\}$"` || true
+devices="$devices $mmc_devices"
+
+for device in $devices; do
case $device in
loop*)
# skip loop device
@@ -72,17 +78,23 @@ for hdname in $hdnamelist; do
cat /sys/block/$hdname/device/uevent
fi
echo
- # Get user choice
- while true; do
- echo -n "Do you want to install this image there? [y/n] "
- read answer
- if [ "$answer" = "y" -o "$answer" = "n" ]; then
+done
+
+# Get user choice
+while true; do
+ echo "Please select an install target or press n to exit ($hdnamelist ): "
+ read answer
+ if [ "$answer" = "n" ]; then
+ echo "Installation manually aborted."
+ exit 1
+ fi
+ for hdname in $hdnamelist; do
+ if [ "$answer" = "$hdname" ]; then
+ TARGET_DEVICE_NAME=$answer
break
fi
- echo "Please answer y or n"
done
- if [ "$answer" = "y" ]; then
- TARGET_DEVICE_NAME=$hdname
+ if [ -n "$TARGET_DEVICE_NAME" ]; then
break
fi
done
@@ -112,8 +124,8 @@ if [ ! -b /dev/loop0 ] ; then
fi
mkdir -p /tmp
-if [ ! -L /etc/mtab ]; then
- cat /proc/mounts > /etc/mtab
+if [ ! -L /etc/mtab ] && [ -e /proc/mounts ]; then
+ ln -sf /proc/mounts /etc/mtab
fi
disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
@@ -146,6 +158,11 @@ if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
rootwait="rootwait"
fi
+# USB devices also require rootwait
+if [ -n `readlink /dev/disk/by-id/usb* | grep $TARGET_DEVICE_NAME` ]; then
+ rootwait="rootwait"
+fi
+
if [ $grub_version -eq 0 ] ; then
bios_boot=''
bootfs=${device}${part_prefix}1
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh
index 09fb47991..441b41c9d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -80,7 +80,9 @@ read_args() {
boot_live_root() {
# Watches the udev event queue, and exits if all current events are handled
udevadm settle --timeout=3 --quiet
- killall "${_UDEV_DAEMON##*/}" 2>/dev/null
+ # Kills the current udev running processes, which survived after
+ # device node creation events were handled, to avoid unexpected behavior
+ killall -9 "${_UDEV_DAEMON##*/}" 2>/dev/null
# Allow for identification of the real root even after boot
mkdir -p ${ROOT_MOUNT}/media/realroot
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/finish b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/finish
index d09bbb8be..717383eba 100755
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/finish
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/finish
@@ -8,39 +8,6 @@ finish_enabled() {
finish_run() {
if [ -n "$ROOTFS_DIR" ]; then
- if [ -n "$bootparam_rootdelay" ]; then
- debug "Sleeping for $rootdelay second(s) to wait root to settle..."
- sleep $bootparam_rootdelay
- fi
-
- if [ -n "$bootparam_root" ]; then
- debug "No e2fs compatible filesystem has been mounted, mounting $bootparam_root..."
-
- if [ "`echo ${bootparam_root} | cut -c1-5`" = "UUID=" ]; then
- root_uuid=`echo $bootparam_root | cut -c6-`
- bootparam_root="/dev/disk/by-uuid/$root_uuid"
- fi
-
- if [ -e "$bootparam_root" ]; then
- flags=""
- if [ -n "$bootparam_ro" ]; then
- if [ -n "$bootparam_rootflags" ]; then
- bootparam_rootflags="$bootparam_rootflags,"
- fi
- bootparam_rootflags="${bootparam_rootflags}ro"
- fi
- if [ -n "$bootparam_rootflags" ]; then
- flags="$flags -o$bootparam_rootflags"
- fi
- if [ -n "$bootparam_rootfstype" ]; then
- flags="$flags -t$bootparam_rootfstype"
- fi
- mount $flags $bootparam_root $ROOTFS_DIR
- else
- msg "root '$bootparam_root' doesn't exist."
- fi
- fi
-
if [ ! -d $ROOTFS_DIR/dev ]; then
fatal "ERROR: There's no '/dev' on rootfs."
fi
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/init b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/init
index 204f2379a..37527a840 100755
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -76,8 +76,8 @@ MODULES_DIR=/init.d # place to look for modules
# make mount stop complaining about missing /etc/fstab
touch /etc/fstab
-# initialize /proc, /sys and /var/lock
-mkdir -p /proc /sys /var/lock
+# initialize /proc, /sys, /run/lock and /var/lock
+mkdir -p /proc /sys /run/lock /var/lock
mount -t proc proc /proc
mount -t sysfs sysfs /sys
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
new file mode 100644
index 000000000..14768f1cd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Copyright (C) 2011 O.S. Systems Software LTDA.
+# Licensed on MIT
+
+rootfs_enabled() {
+ return 0
+}
+
+rootfs_run() {
+ if [ -z "$ROOTFS_DIR" ]; then
+ return
+ fi
+ C=0
+ delay=${bootparam_rootdelay:-1}
+ timeout=${bootparam_roottimeout:-5}
+ while [ ! -d $ROOTFS_DIR/dev ]; do
+ if [ $(( $C * $delay )) -gt $timeout ]; then
+ fatal "root '$bootparam_root' doesn't exist or does not contain a /dev."
+ fi
+
+ if [ -n "$bootparam_root" ]; then
+ debug "No e2fs compatible filesystem has been mounted, mounting $bootparam_root..."
+
+ if [ "`echo ${bootparam_root} | cut -c1-5`" = "UUID=" ]; then
+ root_uuid=`echo $bootparam_root | cut -c6-`
+ bootparam_root="/dev/disk/by-uuid/$root_uuid"
+ fi
+
+ if [ "`echo ${bootparam_root} | cut -c1-9`" = "PARTUUID=" ]; then
+ root_uuid=`echo $bootparam_root | cut -c10-`
+ bootparam_root="/dev/disk/by-partuuid/$root_uuid"
+ fi
+
+ if [ -e "$bootparam_root" ]; then
+ flags=""
+ if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then
+ if [ -n "$bootparam_rootflags" ]; then
+ bootparam_rootflags="$bootparam_rootflags,"
+ fi
+ bootparam_rootflags="${bootparam_rootflags}ro"
+ fi
+ if [ -n "$bootparam_rootflags" ]; then
+ flags="$flags -o$bootparam_rootflags"
+ fi
+ if [ -n "$bootparam_rootfstype" ]; then
+ flags="$flags -t$bootparam_rootfstype"
+ fi
+ mount $flags $bootparam_root $ROOTFS_DIR
+ if [ -d $ROOTFS_DIR/dev ]; then
+ break
+ else
+ # It is unlikely to change, but keep trying anyway.
+ # Perhaps we pick a different device next time.
+ umount $ROOTFS_DIR
+ fi
+ fi
+ fi
+ debug "Sleeping for $delay second(s) to wait root to settle..."
+ sleep $delay
+ C=$(( $C + 1 ))
+ done
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 0664a95c9..67a1b04d2 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -8,6 +8,7 @@ PR = "r2"
inherit allarch
SRC_URI = "file://init \
+ file://rootfs \
file://finish \
file://mdev \
file://udev \
@@ -21,6 +22,7 @@ do_install() {
# base
install -m 0755 ${WORKDIR}/init ${D}/init
+ install -m 0755 ${WORKDIR}/rootfs ${D}/init.d/90-rootfs
install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish
# mdev
@@ -45,12 +47,21 @@ PACKAGES = "${PN}-base \
initramfs-module-mdev \
initramfs-module-udev \
initramfs-module-e2fs \
+ initramfs-module-rootfs \
initramfs-module-debug"
FILES_${PN}-base = "/init /init.d/99-finish /dev"
+# 99-finish in base depends on some other module which mounts
+# the rootfs, like 90-rootfs. To replace that default, use
+# BAD_RECOMMENDATIONS += "initramfs-module-rootfs" in your
+# initramfs recipe and install something else, or install
+# something that runs earlier (for example, a 89-my-rootfs)
+# and mounts the rootfs. Then 90-rootfs will proceed immediately.
+RRECOMMENDS_${PN}-base += "initramfs-module-rootfs"
+
SUMMARY_initramfs-module-mdev = "initramfs support for mdev"
-RDEPENDS_initramfs-module-mdev = "${PN}-base"
+RDEPENDS_initramfs-module-mdev = "${PN}-base busybox-mdev"
FILES_initramfs-module-mdev = "/init.d/01-mdev"
SUMMARY_initramfs-module-udev = "initramfs support for udev"
@@ -61,6 +72,10 @@ SUMMARY_initramfs-module-e2fs = "initramfs support for ext4/ext3/ext2 filesystem
RDEPENDS_initramfs-module-e2fs = "${PN}-base"
FILES_initramfs-module-e2fs = "/init.d/10-e2fs"
+SUMMARY_initramfs-module-rootfs = "initramfs support for locating and mounting the root partition"
+RDEPENDS_initramfs-module-rootfs = "${PN}-base"
+FILES_initramfs-module-rootfs = "/init.d/90-rootfs"
+
SUMMARY_initramfs-module-debug = "initramfs dynamic debug support"
RDEPENDS_initramfs-module-debug = "${PN}-base"
FILES_initramfs-module-debug = "/init.d/00-debug"
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh
index dfee2afaa..02f0351fc 100755
--- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh
@@ -69,7 +69,7 @@ fi
# before fsck, since fsck can be quite memory-hungry.
#
test "$VERBOSE" != no && echo "Activating swap"
-swapon -a 2> /dev/null
+[ -x /sbin/swapon ] && swapon -a
#
# Check the root filesystem.
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh
index a97b0681e..2b9eba64c 100644..100755
--- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/dmesg.sh
@@ -8,8 +8,8 @@
### END INIT INFO
if [ -f /var/log/dmesg ]; then
- if [ -f /usr/sbin/logrotate ]; then
- logrotate -f /etc/logrotate-dmesg.conf
+ if LOGPATH=$(which logrotate); then
+ $LOGPATH -f /etc/logrotate-dmesg.conf
else
mv -f /var/log/dmesg /var/log/dmesg.old
fi
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh
index 94bae420c..c719be5d9 100755
--- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh
+++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/mountall.sh
@@ -33,7 +33,7 @@ kill -USR1 1
# Execute swapon command again, in case we want to swap to
# a file on a now mounted filesystem.
#
-swapon -a 2> /dev/null
+[ -x /sbin/swapon ] && swapon -a
: exit 0
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs
index 61324c630..7fb5c58b3 100755
--- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs
+++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/umountfs
@@ -12,7 +12,7 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin
echo "Deactivating swap..."
-swapoff -a
+[ -x /sbin/swapoff ] && swapoff -a
# We leave /proc mounted.
echo "Unmounting local filesystems..."
diff --git a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb
index 148491fb2..8f110b005 100644
--- a/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -138,7 +138,7 @@ do_install () {
update-rc.d -r ${D} sysfs.sh start 02 S .
update-rc.d -r ${D} populate-volatile.sh start 37 S .
update-rc.d -r ${D} read-only-rootfs-hook.sh start 29 S .
- update-rc.d -r ${D} devpts.sh start 38 S .
+ update-rc.d -r ${D} devpts.sh start 06 S .
if [ "${TARGET_ARCH}" = "arm" ]; then
update-rc.d -r ${D} alignment.sh start 06 S .
fi
diff --git a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/run-ptest b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/run-ptest
new file mode 100644
index 000000000..7a2d205f5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/run-ptest
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+CURDIR=$(dirname `readlink -f $0`)
+make -k -C ${CURDIR}/tests check-TESTS
diff --git a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
new file mode 100644
index 000000000..27d6f42aa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch
@@ -0,0 +1,56 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+kbd is out of source built, then the value of $(srcdir) is relative path of
+${S}/tests to ${B}/tests. Macro DATADIR is defined with $(srcdir) and replaced
+in .c files by compiler, and string @DATADIR@ is replaced with $(srdir) by rule
+"%: %.in" in Makefile.
+
+But kbd-ptest puts test cases and resource files in same directory, then some
+ptest cases fail to find resources.
+
+Replace DATADIR and @DATADIR@ with current directory(dot) to make test cases
+run as expected.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 1976333..b36aef3 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -1,7 +1,7 @@
+ AM_CPPFLAGS = \
+ -I$(srcdir)/../src/libkeymap \
+ -I$(builddir)/../src/libkeymap \
+- -DDATADIR=\"$(srcdir)\" -DBUILDDIR=\"$(builddir)\"
++ -DDATADIR=\".\" -DBUILDDIR=\"$(builddir)\"
+
+ AM_CFLAGS = $(CHECK_CFLAGS)
+ LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS)
+diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in
+index ddd5ed8..772fb51 100755
+--- a/tests/alt-is-meta.in
++++ b/tests/alt-is-meta.in
+@@ -7,8 +7,8 @@ cd "$cwd"
+ rc=0
+ temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")"
+
+-./libkeymap-showmaps "@DATADIR@"/alt-is-meta.map > "$temp" || rc=$?
+-cmp -s "@DATADIR@//alt-is-meta.output" "$temp" || rc=$?
++./libkeymap-showmaps ./alt-is-meta.map > "$temp" || rc=$?
++cmp -s "./alt-is-meta.output" "$temp" || rc=$?
+
+ if [ "$rc" != 0 ]; then
+ printf 'failed\n'
+diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in
+index 7c856e5..14d92c1 100755
+--- a/tests/dumpkeys-fulltable.in
++++ b/tests/dumpkeys-fulltable.in
+@@ -5,7 +5,7 @@ cwd="$(readlink -ev "${0%/*}")"
+ cd "$cwd"
+
+ BUILDDIR="@BUILDDIR@"
+-DATADIR="@DATADIR@"
++DATADIR="."
+
+ check_keymap() {
+ local kmap temp rc
diff --git a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.3.bb b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.3.bb
index 858dc0566..54d16835f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/kbd/kbd_2.0.3.bb
@@ -11,6 +11,8 @@ RPROVIDES_${PN} = "console-tools"
RCONFLICTS_${PN} = "console-tools"
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
+ file://run-ptest \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://set-proper-path-of-resources.patch', '', d)} \
"
SRC_URI[md5sum] = "231b46e7142eb41ea3ae06d2ded3c208"
@@ -19,6 +21,21 @@ SRC_URI[sha256sum] = "7a899de1c0eb75f3aea737095a736f2375e1cbfbe693fc14a3fe0bfb46
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
+do_compile_ptest() {
+ oe_runmake -C ${B}/tests dumpkeys-fulltable alt-is-meta
+}
+
+do_install_ptest() {
+ install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile
+ sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \
+ -e '/libkeymap_.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile
+
+ find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \;
+ find ${S}/tests \( -name \*.map -o -name \*.bin -o -name \*.output \) -exec install {} ${D}${PTEST_PATH}/tests \;
+
+ install -D -m 755 ${S}/config/test-driver ${D}${PTEST_PATH}/config/test-driver
+}
+
PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
FILES_${PN}-consolefonts = "${datadir}/consolefonts"
@@ -26,10 +43,11 @@ FILES_${PN}-consoletrans = "${datadir}/consoletrans"
FILES_${PN}-keymaps = "${datadir}/keymaps"
FILES_${PN}-unimaps = "${datadir}/unimaps"
+RDEPENDS_${PN}-ptest = "make"
+
inherit update-alternatives
ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt"
ALTERNATIVE_PRIORITY = "100"
BBCLASSEXTEND = "native"
-PARALLEL_MAKEINST = ""
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch
deleted file mode 100644
index 2f8079b05..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-configure.ac: fix cross compiling warning
-
-There is a warning while cross compiling which triggered a
-failure by do_qa_configure
-...
-|configure:12652: checking for gzread in -lz
-|configure:12677: mips-poky-linux-gcc -meb -mabi=32 -mhard-float
- -L/lib conftest.c -lz >&5
-|ld: warning: library search path "/lib" is unsafe for cross-compilation
-...
-
-While do the lib checking, do not add '-L${Z_DIR}/lib' to LDFLAGS could fix it.
-
-Upstream-Status: Inappropriate [oe specific]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- configure.ac | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9a90600..0bac8a4 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -391,8 +391,6 @@ if test "$with_zlib" = "no"; then
- echo "Disabling compression support"
- else
- AC_CHECK_HEADERS(zlib.h,
-- [SAVE_LDFLAGS="${LDFLAGS}"
-- LDFLAGS="-L${Z_DIR}/lib"
- AC_CHECK_LIB(z, gzread,[
- AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
- WITH_ZLIB=1
-@@ -406,8 +404,7 @@ else
- esac]
- else
- Z_LIBS="-lz"
-- fi])
-- LDFLAGS="${SAVE_LDFLAGS}"])
-+ fi]))
- fi
-
- AC_SUBST(Z_CFLAGS)
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.3.bb b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.3.bb
deleted file mode 100644
index 9c9873fbd..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.3.bb
+++ /dev/null
@@ -1,74 +0,0 @@
-SUMMARY = "XML C Parser Library and Toolkit"
-DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
-HOMEPAGE = "http://www.xmlsoft.org/"
-BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
- file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
- file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
- file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
-
-DEPENDS = "zlib"
-
-SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
- http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
- file://libxml-64bit.patch \
- file://ansidecl.patch \
- file://runtest.patch \
- file://run-ptest \
- file://python-sitepackages-dir.patch \
- file://libxml-m4-use-pkgconfig.patch \
- file://configure.ac-fix-cross-compiling-warning.patch \
- "
-
-SRC_URI[libtar.md5sum] = "daece17e045f1c107610e137ab50c179"
-SRC_URI[libtar.sha256sum] = "4de9e31f46b44d34871c22f54bfc54398ef124d6f7cafb1f4a5958fbcd3ba12d"
-SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
-SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
-
-BINCONFIG = "${bindir}/xml2-config"
-
-inherit autotools pkgconfig binconfig-disabled pythonnative ptest
-
-RDEPENDS_${PN}-ptest += "python-core"
-
-RDEPENDS_${PN}-python += "python-core"
-
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
-
-export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
-
-PACKAGECONFIG ??= "python"
-PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python"
-
-# WARNING: zlib is require for RPM use
-EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
-EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
-
-# required for python binding
-export HOST_SYS
-export BUILD_SYS
-export STAGING_LIBDIR
-export STAGING_INCDIR
-
-python populate_packages_prepend () {
- # autonamer would call this libxml2-2, but we don't want that
- if d.getVar('DEBIAN_NAMES', True):
- d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
-}
-
-PACKAGES += "${PN}-utils ${PN}-python"
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
-FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
-FILES_${PN}-utils += "${bindir}/*"
-FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
-
-do_install_ptest () {
- cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb
new file mode 100644
index 000000000..59874bec2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.4.bb
@@ -0,0 +1,75 @@
+SUMMARY = "XML C Parser Library and Toolkit"
+DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
+HOMEPAGE = "http://www.xmlsoft.org/"
+BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
+ file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
+ file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
+ file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
+
+DEPENDS = "zlib virtual/libiconv"
+
+SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
+ http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
+ file://libxml-64bit.patch \
+ file://ansidecl.patch \
+ file://runtest.patch \
+ file://run-ptest \
+ file://python-sitepackages-dir.patch \
+ file://libxml-m4-use-pkgconfig.patch \
+ "
+
+SRC_URI[libtar.md5sum] = "ae249165c173b1ff386ee8ad676815f5"
+SRC_URI[libtar.sha256sum] = "ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c"
+SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
+SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
+
+BINCONFIG = "${bindir}/xml2-config"
+
+inherit autotools pkgconfig binconfig-disabled pythonnative ptest
+
+RDEPENDS_${PN}-ptest += "python-core"
+
+RDEPENDS_${PN}-python += "python-core"
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
+
+export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
+
+PACKAGECONFIG ??= "python \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
+"
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+# WARNING: zlib is require for RPM use
+EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
+EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
+
+python populate_packages_prepend () {
+ # autonamer would call this libxml2-2, but we don't want that
+ if d.getVar('DEBIAN_NAMES', True):
+ d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
+}
+
+PACKAGES += "${PN}-utils ${PN}-python"
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
+FILES_${PN}-utils += "${bindir}/*"
+FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
+
+do_configure_prepend () {
+ # executables take longer to package: these should not be executable
+ find ${WORKDIR}/xmlconf/ -type f -exec chmod -x {} \+
+}
+
+do_install_ptest () {
+ cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
index e9578cac0..5808c95d8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
@@ -1,4 +1,4 @@
-DESCRIPTION = "SDK type target for building a standalone tarball containing python, chrpath, make, git and tar. The \
+DESCRIPTION = "SDK type target for building a standalone tarball containing python3, chrpath, make, git and tar. The \
tarball can be used to run bitbake builds on systems which don't meet the usual version requirements."
SUMMARY = "Standalone tarball for running builds on systems with inadequate software"
LICENSE = "MIT"
@@ -8,11 +8,10 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
TOOLCHAIN_TARGET_TASK ?= ""
TOOLCHAIN_HOST_TASK ?= "\
- nativesdk-python-core \
- nativesdk-python-modules \
- nativesdk-python-misc \
- nativesdk-python-git \
- nativesdk-python-pexpect \
+ nativesdk-python3-core \
+ nativesdk-python3-modules \
+ nativesdk-python3-misc \
+ nativesdk-python3-git \
nativesdk-ncurses-terminfo-base \
nativesdk-chrpath \
nativesdk-tar \
@@ -24,11 +23,18 @@ TOOLCHAIN_HOST_TASK ?= "\
nativesdk-wget \
nativesdk-ca-certificates \
nativesdk-texinfo \
+ nativesdk-locale-base-en-us \
"
+MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
+PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}"
+PACKAGE_ARCHS = ""
+TARGET_ARCH = "none"
+TARGET_OS = "none"
+
SDK_PACKAGE_ARCHS += "buildtools-dummy-${SDKPKGSUFFIX}"
-TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
+TOOLCHAIN_OUTPUTNAME ?= "${SDK_ARCH}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
SDK_TITLE = "Build tools"
@@ -38,7 +44,17 @@ EXCLUDE_FROM_WORLD = "1"
inherit meta
inherit populate_sdk
-inherit toolchain-scripts
+inherit toolchain-scripts-base
+inherit nopackages
+
+deltask install
+deltask package
+deltask packagedata
+deltask populate_sysroot
+
+do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
+
+REAL_MULTIMACH_TARGET_SYS = "none"
create_sdk_files_append () {
rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
index 49d45f6ec..d9e045f04 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-environment.bb
@@ -12,6 +12,8 @@ REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
inherit toolchain-scripts
TOOLCHAIN_NEED_CONFIGSITE_CACHE_append = " zlib"
+# Need to expand here before cross-candian changes HOST_ARCH -> SDK_ARCH
+TOOLCHAIN_CONFIGSITE_NOCACHE := "${TOOLCHAIN_CONFIGSITE_NOCACHE}"
SDK_DIR = "${WORKDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-extsdk-toolchain.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-extsdk-toolchain.bb
new file mode 100644
index 000000000..2bd9a5b32
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-extsdk-toolchain.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Extensible SDK toolchain meta-recipe"
+DESCRIPTION = "Meta-recipe for ensuring the build directory contains all appropriate toolchain packages for using an IDE"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native"
+
+do_populate_sysroot[deptask] = "do_populate_sysroot"
+
+# NOTE: There is logic specific to this recipe in setscene_depvalid()
+# within sstate.bbclass, so if you copy or rename this and expect the same
+# functionality you'll need to modify that as well.
+
+LOCKED_SIGS_INDIR = "${D}/locked-sigs"
+
+addtask do_locked_sigs after do_populate_sysroot
+SSTATETASKS += "do_locked_sigs"
+do_locked_sigs[sstate-inputdirs] = "${LOCKED_SIGS_INDIR}"
+do_locked_sigs[sstate-outputdirs] = "${STAGING_DIR_HOST}/locked-sigs"
+
+python do_locked_sigs() {
+ import oe.copy_buildsystem
+ outdir = os.path.join(d.getVar('LOCKED_SIGS_INDIR', True))
+ bb.utils.mkdirhier(outdir)
+ sigfile = os.path.join(outdir, 'locked-sigs-extsdk-toolchain.inc')
+ oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-ide-support.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-ide-support.bb
index 86c57cda2..c4ddcfcb4 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/meta-ide-support.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-ide-support.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d
DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native"
PR = "r3"
-inherit meta toolchain-scripts
+inherit meta toolchain-scripts nopackages
do_populate_ide_support () {
toolchain_create_tree_env_script
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb b/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
index 3c5db5001..81c8647fa 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
@@ -1,5 +1,6 @@
SUMMARY = "Pulls in pkgdata for world"
LICENSE = "MIT"
+
INHIBIT_DEFAULT_DEPS = "1"
addtask do_allpackagedata before do_build
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb b/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
index e843301b2..37790373a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/signing-keys.bb
@@ -1,7 +1,7 @@
# Copyright (C) 2015 Intel Corporation
# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "Make public keys of the signing keys available"
+SUMMARY = "Makes public keys of the signing keys available"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -12,6 +12,8 @@ inherit allarch deploy
EXCLUDE_FROM_WORLD = "1"
INHIBIT_DEFAULT_DEPS = "1"
+SYSROOT_DIRS += "${sysconfdir}/pki"
+
PACKAGES =+ "${PN}-ipk ${PN}-rpm ${PN}-packagefeed"
FILES_${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
@@ -54,10 +56,6 @@ do_install () {
fi
}
-sysroot_stage_all_append () {
- sysroot_stage_dir ${D}${sysconfdir}/pki ${SYSROOT_DESTDIR}${sysconfdir}/pki
-}
-
do_deploy () {
if [ -f "${B}/rpm-key" ]; then
install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
new file mode 100644
index 000000000..d9861c4da
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/testexport-tarball.bb
@@ -0,0 +1,58 @@
+DESCRIPTION = "SDK type target for standalone tarball containing packages defined by TEST_EXPORT_TOOLS. The \
+ tarball can be used to run missing programs on testing systems which don't have such tools.\
+ This recipe is almost the same as buildtools-tarball"
+SUMMARY = "Standalone tarball for test systems with missing software"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+TEST_EXPORT_SDK_PACKAGES ??= ""
+
+TOOLCHAIN_TARGET_TASK ?= ""
+
+TOOLCHAIN_HOST_TASK ?= "${TEST_EXPORT_SDK_PACKAGES}"
+
+SDK_PACKAGE_ARCHS += "tesexport-tools-${SDKPKGSUFFIX}"
+
+TOOLCHAIN_OUTPUTNAME ?= "${TEST_EXPORT_SDK_NAME}"
+
+SDK_TITLE = "Testexport tools"
+
+RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit meta
+inherit populate_sdk
+inherit toolchain-scripts
+
+create_sdk_files_append () {
+ rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
+ rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
+ rm -f ${SDK_OUTPUT}/${SDKPATH}/version-*
+
+ # Generate new (mini) sdk-environment-setup file
+ script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
+ touch $script
+ echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
+ # In order for the self-extraction script to correctly extract and set up things,
+ # we need a 'OECORE_NATIVE_SYSROOT=xxx' line in environment setup script.
+ # However, testexport-tarball is inherently a tool set instead of a fully functional SDK,
+ # so instead of exporting the variable, we use a comment here.
+ echo '#OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
+ toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
+
+ echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
+
+ if [ "${SDKMACHINE}" = "i686" ]; then
+ echo 'export NO32LIBS="0"' >>$script
+ echo 'echo "$BB_ENV_EXTRAWHITE" | grep -q "NO32LIBS"' >>$script
+ echo '[ $? != 0 ] && export BB_ENV_EXTRAWHITE="NO32LIBS $BB_ENV_EXTRAWHITE"' >>$script
+ fi
+}
+
+# testexport-tarball doesn't need config site
+TOOLCHAIN_NEED_CONFIGSITE_CACHE = ""
+
+# The recipe doesn't need any default deps
+INHIBIT_DEFAULT_DEPS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
index a983e42c6..e203a8322 100644
--- a/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
@@ -16,6 +16,12 @@ TOOLCHAIN_HOST_TASK = "\
INHIBIT_DEFAULT_DEPS = "1"
+MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
+PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}"
+PACKAGE_ARCHS = ""
+TARGET_ARCH = "none"
+TARGET_OS = "none"
+
TOOLCHAIN_OUTPUTNAME ?= "${SDK_ARCH}-nativesdk-libc"
RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
@@ -24,14 +30,19 @@ EXCLUDE_FROM_WORLD = "1"
inherit meta
inherit populate_sdk
+inherit nopackages
deltask install
deltask package
deltask packagedata
+deltask populate_sysroot
+
+do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
SDK_DEPENDS += "patchelf-native"
SDK_PACKAGING_FUNC = ""
+REAL_MULTIMACH_TARGET_SYS = "none"
fakeroot create_sdk_files() {
cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
@@ -44,13 +55,12 @@ fakeroot create_sdk_files() {
fakeroot tar_sdk() {
- mkdir -p ${SDK_DEPLOY}
cd ${SDK_OUTPUT}/${SDKPATH}
DEST="./${SDK_ARCH}-${SDK_OS}"
mv sysroots/${SDK_SYS} $DEST
rm sysroots -rf
- patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} $DEST/usr/bin/patchelf
+ patchelf --set-interpreter ${@''.join('a' for n in range(1024))} $DEST/usr/bin/patchelf
mv $DEST/usr/bin/patchelf $DEST/usr/bin/patchelf-uninative
- tar ${SDKTAROPTS} -c -j --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
+ tar ${SDKTAROPTS} -c -j --file=${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
}
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc b/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
index d27867f75..7ed931c6d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl.inc
@@ -9,7 +9,7 @@ standards-conformance and safety."
HOMEPAGE = "http://www.musl-libc.org/"
LICENSE = "MIT"
SECTION = "libs"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=082411391b4d1ace0d30f4c84317cc05"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=7928b7ad32ceda04932478e330e52f7f"
PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
@@ -17,10 +17,13 @@ TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
INHIBIT_DEFAULT_DEPS = "1"
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
FILES_SOLIBSDEV = ""
FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
INSANE_SKIP_${PN} = "dev-so"
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET = "mips"
diff --git a/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb b/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
index d4f98191f..c07101b74 100644
--- a/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/musl/musl_git.bb
@@ -3,9 +3,9 @@
require musl.inc
-SRCREV = "5978eb703ce0e64dd778a88c1ffffb76fe5e2202"
+SRCREV = "39494a273eaa6b714e0fa0c59ce7a1f5fbc80a1e"
-PV = "1.1.14+git${SRCPV}"
+PV = "1.1.15+git${SRCPV}"
# mirror is at git://github.com/kraj/musl.git
@@ -26,8 +26,6 @@ DEPENDS = "virtual/${TARGET_PREFIX}binutils \
export CROSS_COMPILE="${TARGET_PREFIX}"
-EXTRA_OEMAKE = ""
-
LDFLAGS += "-Wl,-soname,libc.so"
CONFIGUREOPTS = " \
@@ -52,6 +50,10 @@ do_install() {
install -d ${D}${bindir}
ln -s ../../${libdir}/libc.so ${D}${bindir}/ldd
+ for l in crypt dl m pthread resolv rt util xnet
+ do
+ ln -s libc.so ${D}${libdir}/lib$l.so
+ done
}
RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev"
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160213.bb b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160213.bb
deleted file mode 100644
index 0d56481a5..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160213.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require ncurses.inc
-
-SRC_URI += "file://tic-hang.patch \
- file://config.cache \
-"
-# commit id corresponds to the revision in package version
-SRCREV = "a25949ff653ac5ae7a204381a3ebfd800feeaa01"
-S = "${WORKDIR}/git"
-EXTRA_OECONF += "--with-abi-version=5"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
new file mode 100644
index 000000000..6514613fe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
@@ -0,0 +1,10 @@
+require ncurses.inc
+
+SRC_URI += "file://tic-hang.patch \
+ file://config.cache \
+"
+# commit id corresponds to the revision in package version
+SRCREV = "63dd558cb8e888d6fab5f00bbf7842736a2356b9"
+S = "${WORKDIR}/git"
+EXTRA_OECONF += "--with-abi-version=5"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/import-layers/yocto-poky/meta/recipes-core/netbase/netbase_5.3.bb b/import-layers/yocto-poky/meta/recipes-core/netbase/netbase_5.3.bb
index ccd89ff84..543596a3d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/netbase/netbase_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/netbase/netbase_5.3.bb
@@ -6,13 +6,14 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab"
PE = "1"
-SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.xz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/n/${BPN}/${BPN}_${PV}.tar.xz \
file://netbase-add-rpcbind-as-an-alias-to-sunrpc.patch \
file://hosts"
SRC_URI[md5sum] = "2637a27fd3de02a278d2b5be7e6558c1"
SRC_URI[sha256sum] = "81f6c69795044d62b8ad959cf9daf049d0545fd466c52860ad3f933b1e97b88b"
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netbase/"
do_install () {
install -d ${D}/${mandir}/man8 ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index 0c6a530be..2c2abed33 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -24,6 +24,7 @@ RDEPENDS_${PN} = "\
nativesdk-makedevs \
nativesdk-smartpm \
nativesdk-postinst-intercept \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', '', d)} \
"
RDEPENDS_${PN}_darwin = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
index 9e40b2852..2e94fdefb 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-base.bb
@@ -1,5 +1,4 @@
SUMMARY = "Merge machine and distro options to create a basic machine task/package"
-LICENSE = "MIT"
PR = "r83"
#
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index bac93b89b..04bc0f2b6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -4,7 +4,6 @@
SUMMARY = "Minimal boot requirements"
DESCRIPTION = "The minimal set of packages required to boot the system"
-LICENSE = "MIT"
PR = "r17"
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb
index 74ed24751..78cc65db8 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-buildessential.bb
@@ -4,7 +4,6 @@
#
SUMMARY = "Essential build dependencies"
-LICENSE = "MIT"
inherit packagegroup
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb
index e7b013d40..c45463fc6 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-eclipse-debug.bb
@@ -1,5 +1,4 @@
SUMMARY = "Remote debugging tools for Eclipse integration"
-LICENSE = "MIT"
inherit packagegroup
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
index 1882d3ad1..b345e314a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-nfs.bb
@@ -3,7 +3,6 @@
#
SUMMARY = "NFS package groups"
-LICENSE = "MIT"
PR = "r2"
inherit packagegroup
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index bee1665b5..aceba78de 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -3,7 +3,6 @@
#
SUMMARY = "Software development tools"
-LICENSE = "MIT"
PR = "r9"
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -30,6 +29,7 @@ RDEPENDS_packagegroup-core-sdk = "\
SANITIZERS = "libasan-dev libubsan-dev"
SANITIZERS_aarch64 = ""
SANITIZERS_mips = ""
+SANITIZERS_mipsel = ""
SANITIZERS_mips64 = ""
SANITIZERS_mips64n32 = ""
SANITIZERS_nios2 = ""
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
index e99946f0a..5ec3f6c92 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-dropbear.bb
@@ -1,5 +1,4 @@
SUMMARY = "Dropbear SSH client/server"
-LICENSE = "MIT"
PR = "r1"
inherit packagegroup
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
index 32d20e621..703f956ae 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-ssh-openssh.bb
@@ -1,5 +1,4 @@
SUMMARY = "OpenSSH SSH client/server"
-LICENSE = "MIT"
PR = "r1"
inherit packagegroup
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
index 6997f396b..274e11a8b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bb
@@ -1,6 +1,5 @@
SUMMARY = "Target packages for the standalone SDK"
PR = "r8"
-LICENSE = "MIT"
inherit packagegroup
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
index 82347b975..9fc2b0ef4 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
@@ -3,7 +3,6 @@
#
SUMMARY = "Debugging tools"
-LICENSE = "MIT"
inherit packagegroup
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index ff2b5779a..dd9844504 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -3,7 +3,6 @@
#
SUMMARY = "Profiling tools"
-LICENSE = "MIT"
PR = "r3"
@@ -12,8 +11,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
PROFILE_TOOLS_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'sysprof', '', d)}"
-# sysprof doesn't support aarch64
+# sysprof doesn't support aarch64 and nios2
PROFILE_TOOLS_X_aarch64 = ""
+PROFILE_TOOLS_X_nios2 = ""
PROFILE_TOOLS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-analyze', '', d)}"
RRECOMMENDS_${PN} = "\
@@ -37,6 +37,7 @@ SYSTEMTAP = "systemtap"
SYSTEMTAP_libc-uclibc = ""
SYSTEMTAP_libc-musl = ""
SYSTEMTAP_mips = ""
+SYSTEMTAP_mipsel = ""
SYSTEMTAP_mips64 = ""
SYSTEMTAP_mips64n32 = ""
SYSTEMTAP_nios2 = ""
@@ -59,16 +60,19 @@ LTTNGMODULES = "lttng-modules"
BABELTRACE = "babeltrace"
-# valgrind does not work on mips
+# valgrind does not work on the following configurations/architectures
VALGRIND = "valgrind"
VALGRIND_libc-uclibc = ""
VALGRIND_libc-musl = ""
VALGRIND_mips = ""
+VALGRIND_mipsel = ""
VALGRIND_mips64 = ""
VALGRIND_mips64n32 = ""
VALGRIND_nios2 = ""
-VALGRIND_arm = ""
+VALGRIND_armv4 = ""
+VALGRIND_armv5 = ""
+VALGRIND_armv6 = ""
VALGRIND_aarch64 = ""
RDEPENDS_${PN} = "\
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index e8d585e0b..317097854 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -3,7 +3,6 @@
#
SUMMARY = "Testing tools/applications"
-LICENSE = "MIT"
PR = "r2"
@@ -18,7 +17,6 @@ KEXECTOOLS_nios2 ?= ""
X11GLTOOLS = "\
mesa-demos \
- piglit \
"
3GTOOLS = "\
@@ -27,7 +25,7 @@ X11GLTOOLS = "\
X11TOOLS = "\
fstests \
- gst-player-bin \
+ gst-player \
x11perf \
xrestop \
xwininfo \
@@ -37,8 +35,6 @@ X11TOOLS = "\
RDEPENDS_${PN} = "\
blktool \
- tslib-calibrate \
- tslib-tests \
lrzsz \
${KEXECTOOLS} \
alsa-utils-amixer \
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
index 180dd96f7..d551147b5 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
@@ -1,6 +1,5 @@
SUMMARY = "Host SDK package for cross canadian toolchain"
PN = "packagegroup-cross-canadian-${MACHINE}"
-LICENSE = "MIT"
inherit cross-canadian packagegroup
diff --git a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index 225204df1..73430b86c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -5,7 +5,6 @@
SUMMARY = "Self-hosting"
DESCRIPTION = "Packages required to run the build system"
PR = "r13"
-LICENSE = "MIT"
inherit packagegroup distro_features_check
# rdepends on libx11-dev
@@ -29,9 +28,6 @@ RDEPENDS_packagegroup-self-hosted = "\
"
RDEPENDS_packagegroup-self-hosted-host-tools = "\
- connman \
- connman-plugin-ethernet \
- dhcp-client \
e2fsprogs \
e2fsprogs-e2fsck \
e2fsprogs-mke2fs \
@@ -125,8 +121,6 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
groff \
gzip \
settings-daemon \
- hicolor-icon-theme \
- sato-icon-theme \
libaio \
libusb1 \
libxml2 \
@@ -153,11 +147,11 @@ RDEPENDS_packagegroup-self-hosted-extended = "\
perl-modules \
perl-pod \
python \
- python-compiler \
- python-git \
- python-misc \
python-modules \
- python-rpm \
+ python-git \
+ python3 \
+ python3-modules \
+ python3-git \
quota \
readline \
rpm \
@@ -191,10 +185,10 @@ RDEPENDS_packagegroup-self-hosted-graphics = "\
libsdl \
libsdl-dev \
libx11-dev \
- gtk-theme-clearlooks \
+ adwaita-icon-theme \
xdg-utils \
epiphany \
- leafpad \
+ l3afpad \
pcmanfm \
vte \
"
diff --git a/import-layers/yocto-poky/meta/recipes-core/readline/readline.inc b/import-layers/yocto-poky/meta/recipes-core/readline/readline.inc
index 35df8b4bb..1a0a1558d 100644
--- a/import-layers/yocto-poky/meta/recipes-core/readline/readline.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/readline/readline.inc
@@ -32,6 +32,8 @@ do_install_append () {
oe_libinstall -so -C shlib libreadline ${D}${libdir}
rmdir ${D}${bindir}
+ rm -rf ${D}${datadir}/${BPN}/*.c
+ rmdir ${D}${datadir}/${BPN} || true
install -m 0755 -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb
index 0b8ff09b2..421fc06df 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd-compat-units.bb
@@ -9,10 +9,12 @@ DEPENDS = "systemd-systemctl-native"
S = "${WORKDIR}"
-inherit allarch
+inherit distro_features_check
ALLOW_EMPTY_${PN} = "1"
+REQUIRED_DISTRO_FEATURES = "systemd"
+
SYSTEMD_DISABLED_SYSV_SERVICES = " \
busybox-udhcpc \
hwclock \
@@ -23,21 +25,24 @@ SYSTEMD_DISABLED_SYSV_SERVICES = " \
"
pkg_postinst_${PN} () {
- cd $D${sysconfdir}/init.d
- echo "Disabling the following sysv scripts: "
+ cd $D${sysconfdir}/init.d || exit 0
- OPTS=""
+ echo "Disabling the following sysv scripts: "
if [ -n "$D" ]; then
OPTS="--root=$D"
+ else
+ OPTS=""
fi
for i in ${SYSTEMD_DISABLED_SYSV_SERVICES} ; do
- if [ \( -e $i -o $i.sh \) -a ! \( -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service \) ] ; then
- echo -n "$i: " ; systemctl ${OPTS} mask $i.service
+ if [ -e $i -o -e $i.sh ] && ! [ -e $D${sysconfdir}/systemd/system/$i.service -o -e $D${systemd_unitdir}/system/$i.service ] ; then
+ echo -n "$i: "
+ systemctl $OPTS mask $i.service
fi
- done ; echo
+ done
+ echo
}
-RDPEPENDS_${PN} = "systemd"
+RDEPENDS_${PN} = "systemd"
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
new file mode 100644
index 000000000..f800f42e9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd.inc
@@ -0,0 +1,25 @@
+SUMMARY = "A System and service manager"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
+
+DESCRIPTION = "systemd is a system and service manager for Linux, compatible with \
+SysV and LSB init scripts. systemd provides aggressive parallelization \
+capabilities, uses socket and D-Bus activation for starting services, \
+offers on-demand starting of daemons, keeps track of processes using \
+Linux cgroups, supports snapshotting and restoring of the system \
+state, maintains mount and automount points and implements an \
+elaborate transactional dependency-based service control logic. It can \
+work as a drop-in replacement for sysvinit."
+
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
+ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
+
+SRCREV = "3a74d4fc90cb322a4784a3515bef7118c8f8c5ba"
+
+SRC_URI = "git://github.com/systemd/systemd.git;protocol=git"
+
+PV = "230+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+LDFLAGS_append_libc-uclibc = " -lrt -lssp_nonshared -lssp "
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch
index f183261c8..e62d580f1 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch
@@ -1,6 +1,3 @@
-From 699893a05edac5194f9670529bacfaeb67252edb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 00:42:49 +0000
Subject: [PATCH 03/36] define exp10 if missing
Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch
@@ -11,23 +8,25 @@ Upstream-Status: Pending
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
src/basic/missing.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/basic/missing.h b/src/basic/missing.h
-index f3d3236..ee7e7ea 100644
+index 651e414..fafa233 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
-@@ -1169,3 +1169,8 @@ static inline key_serial_t request_key(const char *type, const char *description
- #endif
+@@ -1013,4 +1013,9 @@ typedef int32_t key_serial_t;
#endif
-+
+
+#ifdef __UCLIBC__
+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
+#define exp10(x) (exp((x) * log(10)))
+#endif /* __UCLIBC__ */
++
+ #include "missing_syscall.h"
--
-1.8.3.1
+2.8.3
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch
index 4a576aa7d..2eea0ff9a 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch
@@ -1,6 +1,3 @@
-From 786883cfa13e21f060ee6da6cabb94845f4349a0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 05:18:20 +0000
Subject: [PATCH 14/36] Make root's home directory configurable
OpenEmbedded has a configurable home directory for root. Allow
@@ -14,6 +11,7 @@ https://github.com/systemd/systemd/issues/541
Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
Makefile.am | 2 ++
configure.ac | 7 +++++++
@@ -26,10 +24,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
8 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/Makefile.am b/Makefile.am
-index b3f3343..a99e8eb 100644
+index 305099a..88c1250 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -202,6 +202,7 @@ AM_CPPFLAGS = \
+@@ -206,6 +206,7 @@ AM_CPPFLAGS = \
-DLIBDIR=\"$(libdir)\" \
-DROOTLIBDIR=\"$(rootlibdir)\" \
-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
@@ -37,7 +35,7 @@ index b3f3343..a99e8eb 100644
-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
-I $(top_srcdir)/src \
-I $(top_builddir)/src/basic \
-@@ -5713,6 +5714,7 @@ EXTRA_DIST += \
+@@ -5863,6 +5864,7 @@ EXTRA_DIST += \
substitutions = \
'|rootlibexecdir=$(rootlibexecdir)|' \
'|rootbindir=$(rootbindir)|' \
@@ -46,10 +44,10 @@ index b3f3343..a99e8eb 100644
'|SYSTEMCTL=$(rootbindir)/systemctl|' \
'|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
diff --git a/configure.ac b/configure.ac
-index c5ab9d0..16c83bb 100644
+index 329861a..01764f5 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1470,6 +1470,11 @@ AC_ARG_WITH([rootlibdir],
+@@ -1478,6 +1478,11 @@ AC_ARG_WITH([rootlibdir],
[with_rootlibdir=${libdir}])
AX_NORMALIZE_PATH([with_rootlibdir])
@@ -61,7 +59,7 @@ index c5ab9d0..16c83bb 100644
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
-@@ -1553,6 +1558,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
+@@ -1562,6 +1567,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
AC_SUBST([pamconfdir], [$with_pamconfdir])
AC_SUBST([rootprefix], [$with_rootprefix])
AC_SUBST([rootlibdir], [$with_rootlibdir])
@@ -69,19 +67,19 @@ index c5ab9d0..16c83bb 100644
AC_CONFIG_FILES([
Makefile
-@@ -1643,6 +1649,7 @@ AC_MSG_RESULT([
- includedir: ${includedir}
- lib dir: ${libdir}
- rootlib dir: ${with_rootlibdir}
-+ root home dir: ${with_roothomedir}
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Build Python: ${PYTHON}
+@@ -1653,6 +1659,7 @@ AC_MSG_RESULT([
+ includedir: ${includedir}
+ lib dir: ${libdir}
+ rootlib dir: ${with_rootlibdir}
++ root home dir: ${with_roothomedir}
+ SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
+ SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
+ Build Python: ${PYTHON}
diff --git a/src/basic/user-util.c b/src/basic/user-util.c
-index 19155bc..55672b3 100644
+index f65ca3e..da1101a 100644
--- a/src/basic/user-util.c
+++ b/src/basic/user-util.c
-@@ -122,7 +122,7 @@ int get_user_creds(
+@@ -123,7 +123,7 @@ int get_user_creds(
*gid = 0;
if (home)
@@ -90,7 +88,7 @@ index 19155bc..55672b3 100644
if (shell)
*shell = "/bin/sh";
-@@ -353,7 +353,7 @@ int get_home_dir(char **_h) {
+@@ -354,7 +354,7 @@ int get_home_dir(char **_h) {
/* Hardcode home directory for root to avoid NSS */
u = getuid();
if (u == 0) {
@@ -100,10 +98,10 @@ index 19155bc..55672b3 100644
return -ENOMEM;
diff --git a/src/core/namespace.c b/src/core/namespace.c
-index b573f00..0f70b14 100644
+index 203d122..45c0d11 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
-@@ -409,7 +409,7 @@ int setup_namespace(
+@@ -415,7 +415,7 @@ int setup_namespace(
home_dir = strjoina("-", home_dir);
run_user_dir = prefix_roota(root_directory, "/run/user");
run_user_dir = strjoina("-", run_user_dir);
@@ -113,24 +111,24 @@ index b573f00..0f70b14 100644
r = append_mounts(&m, STRV_MAKE(home_dir, run_user_dir, root_dir),
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
-index 65e65ec..12f0ee8 100644
+index 8ec0584..51df00b 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
-@@ -2564,7 +2564,7 @@ static int inner_child(
+@@ -2739,7 +2739,7 @@ static int inner_child(
if (envp[n_env])
- n_env ++;
+ n_env++;
- if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
+ if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
(asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
(asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
return log_oom();
-@@ -2647,7 +2647,7 @@ static int inner_child(
- #endif /* HAVE_EXECVPE */
+@@ -2816,7 +2816,7 @@ static int inner_child(
else {
if (!arg_chdir)
-- chdir(home ?: "/root");
-+ chdir(home ?: ROOTHOMEDIR);
+ /* If we cannot change the directory, we'll end up in /, that is expected. */
+- (void) chdir(home ?: "/root");
++ (void) chdir(home ?: ROOTHOMEDIR);
execle("/bin/bash", "-bash", NULL, env_use);
execle("/bin/sh", "-sh", NULL, env_use);
@@ -150,10 +148,10 @@ index a345ec2..3caae7d 100644
ExecStopPost=-@SYSTEMCTL@ poweroff
Type=idle
diff --git a/units/emergency.service.in b/units/emergency.service.in
-index fb390ea..5623a57 100644
+index 0de16f2..4826062 100644
--- a/units/emergency.service.in
+++ b/units/emergency.service.in
-@@ -14,8 +14,8 @@ Conflicts=rescue.service
+@@ -15,8 +15,8 @@ Conflicts=syslog.socket
Before=shutdown.target
[Service]
@@ -180,5 +178,5 @@ index 92553f6..590ae17 100644
ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
--
-1.8.3.1
+2.8.3
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
index a35123733..6e6f34489 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
@@ -1,6 +1,3 @@
-From f70a1a9605cd3adac450c49a5a69da6e9acda517 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:26:25 +0000
Subject: [PATCH 15/36] systemd-user: avoid using system-auth
In OE, we don't provide system-auth, instead, we use common-* files.
@@ -10,15 +7,16 @@ Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
src/login/systemd-user.m4 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/login/systemd-user.m4 b/src/login/systemd-user.m4
-index 7933508..16b73d2 100644
+index f188a8e..862d8d7 100644
--- a/src/login/systemd-user.m4
+++ b/src/login/systemd-user.m4
-@@ -2,10 +2,10 @@
+@@ -2,11 +2,11 @@
#
# Used by systemd --user instances.
@@ -29,8 +27,9 @@ index 7933508..16b73d2 100644
session required pam_selinux.so close
session required pam_selinux.so nottys open
)m4_dnl
+ session required pam_loginuid.so
-session include system-auth
+session include common-session
--
-1.8.3.1
+2.8.3
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
index 8e6289d4a..642625f32 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
@@ -1,6 +1,3 @@
-From 9a3a4e16b36e762291cd1574ec71d7954f8b5363 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 14 Dec 2015 05:33:32 +0000
Subject: [PATCH 17/36] Revert "udev: remove userspace firmware loading
support"
@@ -13,21 +10,21 @@ Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile.am | 12 +++
- README | 6 +-
+ README | 4 +-
TODO | 1 +
configure.ac | 22 ++++++
src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
src/udev/udev-builtin.c | 3 +
src/udev/udev.h | 6 ++
src/udev/udevd.c | 13 ++++
- 8 files changed, 214 insertions(+), 3 deletions(-)
+ 8 files changed, 213 insertions(+), 2 deletions(-)
create mode 100644 src/udev/udev-builtin-firmware.c
diff --git a/Makefile.am b/Makefile.am
-index a99e8eb..b5c6ba7 100644
+index 305099a..e774976 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -3573,6 +3573,18 @@ libudev_core_la_LIBADD = \
+@@ -3706,6 +3706,18 @@ libudev_core_la_LIBADD = \
$(BLKID_LIBS) \
$(KMOD_LIBS)
@@ -47,17 +44,10 @@ index a99e8eb..b5c6ba7 100644
libudev_core_la_SOURCES += \
src/udev/udev-builtin-kmod.c
diff --git a/README b/README
-index 41fb07a..10230ac 100644
+index ca8993c..87f3297 100644
--- a/README
+++ b/README
-@@ -50,14 +50,14 @@ REQUIREMENTS:
- CONFIG_PROC_FS
- CONFIG_FHANDLE (libudev, mount and bind mount handling)
-
-- udev will fail to work with the legacy sysfs layout:
-+ Udev will fail to work with the legacy layout:
- CONFIG_SYSFS_DEPRECATED=n
-
+@@ -56,8 +56,8 @@ REQUIREMENTS:
Legacy hotplug slows down the system and confuses udev:
CONFIG_UEVENT_HELPER_PATH=""
@@ -69,11 +59,11 @@ index 41fb07a..10230ac 100644
Some udev rules and virtualization detection relies on it:
diff --git a/TODO b/TODO
-index 92cc8cc..25f6849 100644
+index fac9ccf..2645582 100644
--- a/TODO
+++ b/TODO
-@@ -628,6 +628,7 @@ Features:
- * rename "userspace" to "core-os"
+@@ -642,6 +642,7 @@ Features:
+ * initialize the hostname from the fs label of /, if /etc/hostname does not exist?
* udev:
+ - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
@@ -81,10 +71,10 @@ index 92cc8cc..25f6849 100644
- kill scsi_id
- add trigger --subsystem-match=usb/usb_device device
diff --git a/configure.ac b/configure.ac
-index 16c83bb..36d20b5 100644
+index 329861a..af85405 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1353,6 +1353,25 @@ AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database
+@@ -1361,6 +1361,25 @@ AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database
AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
# ------------------------------------------------------------------------------
@@ -103,23 +93,23 @@ index 16c83bb..36d20b5 100644
+done
+IFS=$OLD_IFS
+AC_SUBST(FIRMWARE_PATH)
-+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
++AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is availabe]) ])
+AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
+
+# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
AC_PATH_PROG([XSLTPROC], [xsltproc])
-@@ -1653,6 +1672,9 @@ AC_MSG_RESULT([
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Build Python: ${PYTHON}
-+ Installation Python: ${PYTHON_BINARY}
-+ sphinx binary: ${SPHINX_BUILD}
-+ firmware path: ${FIRMWARE_PATH}
- PAM modules dir: ${with_pamlibdir}
- PAM configuration dir: ${with_pamconfdir}
- D-Bus policy dir: ${with_dbuspolicydir}
+@@ -1656,6 +1675,9 @@ AC_MSG_RESULT([
+ SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
+ SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
+ Build Python: ${PYTHON}
++ Installation Python: ${PYTHON_BINARY}
++ sphinx binary: ${SPHINX_BUILD}
++ firmware path: ${FIRMWARE_PATH}
+ PAM modules dir: ${with_pamlibdir}
+ PAM configuration dir: ${with_pamconfdir}
+ D-Bus policy dir: ${with_dbuspolicydir}
diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
new file mode 100644
index 0000000..bd8c2fb
@@ -295,10 +285,10 @@ index e6b36f1..cd9947e 100644
[UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
[UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
diff --git a/src/udev/udev.h b/src/udev/udev.h
-index 1f9c812..fa35a88 100644
+index 8433e8d..d32366d 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
-@@ -147,6 +147,9 @@ enum udev_builtin_cmd {
+@@ -148,6 +148,9 @@ enum udev_builtin_cmd {
UDEV_BUILTIN_BLKID,
#endif
UDEV_BUILTIN_BTRFS,
@@ -308,7 +298,7 @@ index 1f9c812..fa35a88 100644
UDEV_BUILTIN_HWDB,
UDEV_BUILTIN_INPUT_ID,
UDEV_BUILTIN_KEYBOARD,
-@@ -175,6 +178,9 @@ struct udev_builtin {
+@@ -176,6 +179,9 @@ struct udev_builtin {
extern const struct udev_builtin udev_builtin_blkid;
#endif
extern const struct udev_builtin udev_builtin_btrfs;
@@ -319,7 +309,7 @@ index 1f9c812..fa35a88 100644
extern const struct udev_builtin udev_builtin_input_id;
extern const struct udev_builtin udev_builtin_keyboard;
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index bb92f16..84024ac 100644
+index e9dd2f4..0abc28e 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -125,6 +125,9 @@ struct event {
@@ -332,7 +322,7 @@ index bb92f16..84024ac 100644
};
static inline struct event *node_to_event(struct udev_list_node *node) {
-@@ -613,6 +616,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
+@@ -614,6 +617,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
event->devnum = udev_device_get_devnum(dev);
event->is_block = streq("block", udev_device_get_subsystem(dev));
event->ifindex = udev_device_get_ifindex(dev);
@@ -343,7 +333,7 @@ index bb92f16..84024ac 100644
log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
udev_device_get_action(dev), udev_device_get_subsystem(dev));
-@@ -698,6 +705,12 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
+@@ -699,6 +706,12 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
return true;
}
@@ -357,5 +347,5 @@ index bb92f16..84024ac 100644
if (event->devpath[common] == '/') {
event->delaying_seqnum = loop_event->seqnum;
--
-1.8.3.1
+2.8.3
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch
index 5f3f2e8a5..5d13e4af9 100644
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch
@@ -1,6 +1,3 @@
-From 569cd3cf9806a02226d26c4104dbe44262f93d33 Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Fri, 22 Jan 2016 16:44:11 +0800
Subject: [PATCH 18/36] make test dir configurable
Upstream-Status: Pending
@@ -9,16 +6,17 @@ test maybe be run on target in cross-compile environment, and test dir
is not the compilation dir, so make it configurable
Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
---
Makefile.am | 2 +-
configure.ac | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
-index b5c6ba7..d3cd961 100644
+index a94636a..dbd3386 100644
--- a/Makefile.am
+++ b/Makefile.am
-@@ -203,7 +203,7 @@ AM_CPPFLAGS = \
+@@ -207,7 +207,7 @@ AM_CPPFLAGS = \
-DROOTLIBDIR=\"$(rootlibdir)\" \
-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
-DROOTHOMEDIR=\"$(roothomedir)\" \
@@ -28,10 +26,10 @@ index b5c6ba7..d3cd961 100644
-I $(top_builddir)/src/basic \
-I $(top_srcdir)/src/basic \
diff --git a/configure.ac b/configure.ac
-index 36d20b5..d96dc5a 100644
+index 45aae8a..c53fae2 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -1494,6 +1494,11 @@ AC_ARG_WITH([roothomedir],
+@@ -1518,6 +1518,11 @@ AC_ARG_WITH([roothomedir],
[],
[with_roothomedir=/root])
@@ -43,7 +41,7 @@ index 36d20b5..d96dc5a 100644
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
-@@ -1578,6 +1583,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
+@@ -1603,6 +1608,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
AC_SUBST([rootprefix], [$with_rootprefix])
AC_SUBST([rootlibdir], [$with_rootlibdir])
AC_SUBST([roothomedir], [$with_roothomedir])
@@ -51,14 +49,14 @@ index 36d20b5..d96dc5a 100644
AC_CONFIG_FILES([
Makefile
-@@ -1669,6 +1675,7 @@ AC_MSG_RESULT([
- lib dir: ${libdir}
- rootlib dir: ${with_rootlibdir}
- root home dir: ${with_roothomedir}
-+ test dir: ${with_testdir}
- SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
- SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Build Python: ${PYTHON}
+@@ -1695,6 +1701,7 @@ AC_MSG_RESULT([
+ lib dir: ${libdir}
+ rootlib dir: ${with_rootlibdir}
+ root home dir: ${with_roothomedir}
++ test dir: ${with_testdir}
+ SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
+ SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
+ Build Python: ${PYTHON}
--
-1.8.3.1
+2.8.3
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch
deleted file mode 100644
index 1ae3d66c7..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From b68f10bf1f7519e012da5e35fab3a57da7dc46d4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
-Date: Sun, 27 Mar 2016 17:33:54 -0400
-Subject: [PATCH] build-sys: fix build with libgrcypt disabled
-
-- Move gcrypt.h include inside grcrypt-util.h.
-- Allow gcrypt-util.[ch] to be compiled even without gcrypt.
-This allows the logic in files using gcrypt to be simplified.
-
-- Fix compilation of systemd-resolve without gcrypt.
-systemd-resolved already supported that.
-
-Upstream-Status: Backport [ https://github.com/systemd/systemd/pull/2905 ]
-
-Fixes [YOCTO #9219]
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- Makefile.am | 8 ++++----
- src/resolve/resolve-tool.c | 3 +--
- src/shared/gcrypt-util.c | 4 +++-
- src/shared/gcrypt-util.h | 14 ++++++++++++++
- 4 files changed, 22 insertions(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 2b72a53..95eaa9a 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -4262,7 +4262,9 @@ libsystemd_journal_internal_la_SOURCES = \
- src/journal/mmap-cache.h \
- src/journal/compress.c \
- src/journal/audit-type.h \
-- src/journal/audit-type.c
-+ src/journal/audit-type.c \
-+ src/shared/gcrypt-util.h \
-+ src/shared/gcrypt-util.c
-
- nodist_libsystemd_journal_internal_la_SOURCES = \
- src/journal/audit_type-to-name.h
-@@ -4294,9 +4296,7 @@ libsystemd_journal_internal_la_SOURCES += \
- src/journal/journal-authenticate.c \
- src/journal/journal-authenticate.h \
- src/journal/fsprg.c \
-- src/journal/fsprg.h \
-- src/shared/gcrypt-util.c \
-- src/shared/gcrypt-util.h
-+ src/journal/fsprg.h
-
- libsystemd_journal_internal_la_LIBADD += \
- $(GCRYPT_LIBS)
-diff --git a/src/resolve/resolve-tool.c b/src/resolve/resolve-tool.c
-index 009cc73..14ee01c 100644
---- a/src/resolve/resolve-tool.c
-+++ b/src/resolve/resolve-tool.c
-@@ -17,7 +17,6 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
--#include <gcrypt.h>
- #include <getopt.h>
- #include <net/if.h>
-
-@@ -863,7 +862,7 @@ static int resolve_openpgp(sd_bus *bus, const char *address) {
- }
- domain++;
-
-- r = string_hashsum(address, domain - 1 - address, GCRY_MD_SHA224, &hashed);
-+ r = string_hashsum_sha224(address, domain - 1 - address, &hashed);
- if (r < 0)
- return log_error_errno(r, "Hashing failed: %m");
-
-diff --git a/src/shared/gcrypt-util.c b/src/shared/gcrypt-util.c
-index 4ff9452..39b544b 100644
---- a/src/shared/gcrypt-util.c
-+++ b/src/shared/gcrypt-util.c
-@@ -19,10 +19,11 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
-+#ifdef HAVE_GCRYPT
- #include <gcrypt.h>
-
--#include "hexdecoct.h"
- #include "gcrypt-util.h"
-+#include "hexdecoct.h"
-
- void initialize_libgcrypt(bool secmem) {
- const char *p;
-@@ -67,3 +68,4 @@ int string_hashsum(const char *s, size_t len, int md_algorithm, char **out) {
- *out = enc;
- return 0;
- }
-+#endif
-diff --git a/src/shared/gcrypt-util.h b/src/shared/gcrypt-util.h
-index c7652c2..cf33b3c 100644
---- a/src/shared/gcrypt-util.h
-+++ b/src/shared/gcrypt-util.h
-@@ -19,7 +19,21 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
-+#include <errno.h>
- #include <stdbool.h>
-+#include <stddef.h>
-+
-+#ifdef HAVE_GCRYPT
-+#include <gcrypt.h>
-
- void initialize_libgcrypt(bool secmem);
- int string_hashsum(const char *s, size_t len, int md_algorithm, char **out);
-+#endif
-+
-+static inline int string_hashsum_sha224(const char *s, size_t len, char **out) {
-+#ifdef HAVE_GCRYPT
-+ return string_hashsum(s, len, GCRY_MD_SHA224, out);
-+#else
-+ return -EOPNOTSUPP;
-+#endif
-+}
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch
new file mode 100644
index 000000000..23e22d40e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch
@@ -0,0 +1,31 @@
+From: Michael Biebl <biebl@debian.org>
+Date: Sat, 27 Sep 2014 04:19:24 +0200
+Subject: udev: re-enable mount propagation for udevd
+
+Upstream-Status: Backport [http://http.debian.net/debian/pool/main/s/systemd/systemd_215-17+deb8u4.debian.tar.xz]
+
+laptop-mode-tools remounts file systems from within a udev rule to apply
+certain mount options. With MountFlags=slave, those mounts then become private
+to the systemd-udevd namespace and are no longer accessible from outside the
+namespace.
+While the root cause is the broken behaviour of laptop-mode-tools, with mount
+propagation turned off, this can result in a read-only root file system.
+Therefore revert the relevant parts from commit
+c2c13f2df42e0691aecabe3979ea81cd7faa35c7 to re-enable mount propagation for
+udevd.
+
+Once affected packages have been fixed, this patch should be dropped
+again.
+
+Closes: #762018
+diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in
+index e7216d6..1e9a600 100644
+--- a/units/systemd-udevd.service.in
++++ b/units/systemd-udevd.service.in
+@@ -21,6 +21,5 @@ Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket
+ Restart=always
+ RestartSec=0
+ ExecStart=@rootlibexecdir@/systemd-udevd
+-MountFlags=slave
+ KillMode=mixed
+ WatchdogSec=1min
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_229.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_229.bb
deleted file mode 100644
index c23c749e2..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_229.bb
+++ /dev/null
@@ -1,579 +0,0 @@
-SUMMARY = "A System and service manager"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
-
-DESCRIPTION = "systemd is a system and service manager for Linux, compatible with \
-SysV and LSB init scripts. systemd provides aggressive parallelization \
-capabilities, uses socket and D-Bus activation for starting services, \
-offers on-demand starting of daemons, keeps track of processes using \
-Linux cgroups, supports snapshotting and restoring of the system \
-state, maintains mount and automount points and implements an \
-elaborate transactional dependency-based service control logic. It can \
-work as a drop-in replacement for sysvinit."
-
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
- file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-
-PROVIDES = "udev"
-
-PE = "1"
-
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline libcap libcgroup qemu-native util-linux"
-
-SECTION = "base/shell"
-
-inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion
-
-SRCREV = "714c62b46379abb7558c544665522aca91691e10"
-
-PV = "229+git${SRCPV}"
-
-SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
- file://touchscreen.rules \
- file://00-create-volatile.conf \
- file://init \
- file://run-ptest \
- file://0003-define-exp10-if-missing.patch \
- file://0004-Use-getenv-when-secure-versions-are-not-available.patch \
- file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
- file://0006-configure-Check-for-additional-features-that-uclibc-.patch \
- file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
- file://0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch \
- file://0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \
- file://0010-implment-systemd-sysv-install-for-OE.patch \
- file://0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch \
- file://0012-rules-whitelist-hd-devices.patch \
- file://0013-sysv-generator-add-support-for-executing-scripts-und.patch \
- file://0014-Make-root-s-home-directory-configurable.patch \
- file://0015-systemd-user-avoid-using-system-auth.patch \
- file://0016-Revert-rules-remove-firmware-loading-rules.patch \
- file://0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
- file://0018-make-test-dir-configurable.patch \
- file://0019-remove-duplicate-include-uchar.h.patch \
- file://0020-check-for-uchar.h-in-configure.patch \
- file://0021-include-missing.h-for-getting-secure_getenv-definiti.patch \
- file://0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
- file://0023-build-sys-fix-build-with-libgrcypt-disabled.patch \
-"
-SRC_URI_append_libc-uclibc = "\
- file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
-"
-SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
-
-S = "${WORKDIR}/git"
-
-LDFLAGS_append_libc-uclibc = " -lrt -lssp_nonshared -lssp "
-
-GTKDOC_DOCDIR = "${S}/docs/"
-
-PACKAGECONFIG ??= "xz \
- ldconfig \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
- ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'efi', '', d)} \
- binfmt \
- randomseed \
- machined \
- backlight \
- quotacheck \
- bootchart \
- hostnamed \
- ${@bb.utils.contains('TCLIBC', 'glibc', 'myhostname sysusers', '', d)} \
- hibernate \
- timedated \
- timesyncd \
- localed \
- kdbus \
- ima \
- smack \
- logind \
- firstboot \
- utmp \
- polkit \
-"
-PACKAGECONFIG_remove_libc-musl = "selinux"
-PACKAGECONFIG_remove_libc-musl = "smack"
-
-# Use the upstream systemd serial-getty@.service and rely on
-# systemd-getty-generator instead of using the OE-core specific
-# systemd-serialgetty.bb - not enabled by default.
-PACKAGECONFIG[serial-getty-generator] = ""
-
-PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
-# Sign the journal for anti-tampering
-PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
-PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
-PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
-PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
-PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
-PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
-PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
-PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck"
-PACKAGECONFIG[bootchart] = "--enable-bootchart,--disable-bootchart"
-PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
-PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
-PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
-PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
-PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
-PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
-PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
-PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
-PACKAGECONFIG[kdbus] = "--enable-kdbus,--disable-kdbus"
-PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
-PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
-# libseccomp is found in meta-security
-PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
-PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
-PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
-PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
-PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
-PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
-PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
-# importd requires curl/xz/zlib/bzip2/gcrypt
-PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
-PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
-PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
-PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
-# Verify keymaps on locale change
-PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
-# Update NAT firewall rules
-PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
-PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,,"
-PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
-PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind"
-PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
-PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump"
-PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
-PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
-PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
-
-CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill"
-CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
-CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck"
-CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon"
-CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
-
-# Helper variables to clarify locations. This mirrors the logic in systemd's
-# build system.
-rootprefix ?= "${base_prefix}"
-rootlibdir ?= "${base_libdir}"
-rootlibexecdir = "${rootprefix}/lib"
-
-CACHED_CONFIGUREVARS_class-target = "\
- ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
- ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
- ac_cv_path_KMOD=${base_bindir}/kmod \
- ac_cv_path_KILL=${base_bindir}/kill \
- ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
- ac_cv_path_KEXEC=${sbindir}/kexec \
- ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
- ac_cv_path_QUOTAON=${sbindir}/quotaon \
- "
-
-EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
- --with-rootlibdir=${rootlibdir} \
- --with-roothomedir=${ROOT_HOME} \
- --enable-split-usr \
- --without-python \
- --with-sysvrcnd-path=${sysconfdir} \
- --with-firmware-path=/lib/firmware \
- --with-testdir=${PTEST_PATH} \
- "
-# per the systemd README, define VALGRIND=1 to run under valgrind
-CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"
-
-# disable problematic GCC 5.2 optimizations [YOCTO #8291]
-FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
-
-do_configure_prepend() {
- export NM="${HOST_PREFIX}gcc-nm"
- export AR="${HOST_PREFIX}gcc-ar"
- export RANLIB="${HOST_PREFIX}gcc-ranlib"
- export KMOD="${base_bindir}/kmod"
- if [ -d ${S}/units.pre_sed ] ; then
- cp -r ${S}/units.pre_sed ${S}/units
- else
- cp -r ${S}/units ${S}/units.pre_sed
- fi
- sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
- sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
-}
-
-do_install() {
- autotools_do_install
- install -d ${D}/${base_sbindir}
- if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
- # Provided by a separate recipe
- rm ${D}${systemd_unitdir}/system/serial-getty* -f
- fi
-
- # Provide support for initramfs
- [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
- [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
-
- # Create machine-id
- # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
- touch ${D}${sysconfdir}/machine-id
-
-
- install -d ${D}${sysconfdir}/udev/rules.d/
- install -d ${D}${sysconfdir}/tmpfiles.d
- install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
-
- install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
-
- if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
- sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
- fi
-
- chown root:systemd-journal ${D}/${localstatedir}/log/journal
-
- # Delete journal README, as log can be symlinked inside volatile.
- rm -f ${D}/${localstatedir}/log/README
-
- install -d ${D}${systemd_unitdir}/system/graphical.target.wants
- install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
- install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
- install -d ${D}${systemd_unitdir}/system/reboot.target.wants
- install -d ${D}${systemd_unitdir}/system/rescue.target.wants
-
- # Create symlinks for systemd-update-utmp-runlevel.service
- if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
- ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
- fi
-
- # Enable journal to forward message to syslog daemon
- sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
- # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
- # for existence else it fails
- if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
- ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
- fi
- if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
- # if resolved is disabled, it won't handle the link of resolv.conf, so
- # set it up ourselves
- ln -s ../run/resolv.conf ${D}${sysconfdir}/resolv.conf
- echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
- echo 'f /run/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
- fi
- install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
-}
-
-do_install_ptest () {
- # install data files needed for tests
- install -d ${D}${PTEST_PATH}/tests/test
- cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
- sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
-
- install -d ${D}${PTEST_PATH}/tests/catalog
- install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
-
- install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
-
- install -d ${D}${PTEST_PATH}/tests/rules
- install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
-
- # This directory needs to be there for udev-test.pl to work.
- install -d ${D}${libdir}/udev/rules.d
-
- # install actual test binaries
- install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
- install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
-
- install ${B}/Makefile ${D}${PTEST_PATH}/tests/
-}
-
-python populate_packages_prepend (){
- systemdlibdir = d.getVar("rootlibdir", True)
- do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
-}
-PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
-
-PACKAGES =+ "\
- ${PN}-gui \
- ${PN}-vconsole-setup \
- ${PN}-initramfs \
- ${PN}-analyze \
- ${PN}-kernel-install \
- ${PN}-rpm-macros \
- ${PN}-binfmt \
- ${PN}-pam \
- ${PN}-zsh-completion \
- ${PN}-xorg-xinitrc \
- ${PN}-extra-utils \
-"
-
-SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
-SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
-USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
-GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
-
-FILES_${PN}-analyze = "${bindir}/systemd-analyze"
-
-FILES_${PN}-initramfs = "/init"
-RDEPENDS_${PN}-initramfs = "${PN}"
-
-RDEPENDS_${PN}-ptest += "gawk make perl python bash xz \
- tzdata tzdata-americas tzdata-asia \
- tzdata-europe tzdata-africa tzdata-antarctica \
- tzdata-arctic tzdata-atlantic tzdata-australia \
- tzdata-pacific tzdata-posix"
-
-FILES_${PN}-ptest += "${libdir}/udev/rules.d"
-
-FILES_${PN}-gui = "${bindir}/systemadm"
-
-FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
- ${systemd_unitdir}/system/systemd-vconsole-setup.service \
- ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
-
-RDEPENDS_${PN}-kernel-install += "bash"
-FILES_${PN}-kernel-install = "${bindir}/kernel-install \
- ${sysconfdir}/kernel/ \
- ${exec_prefix}/lib/kernel \
- "
-FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
- "
-
-FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
-
-FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
-
-FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
- ${exec_prefix}/lib/binfmt.d \
- ${rootlibexecdir}/systemd/systemd-binfmt \
- ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
- ${systemd_unitdir}/system/systemd-binfmt.service"
-RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
-
-FILES_${PN}-extra-utils = "\
- ${base_bindir}/systemd-escape \
- ${base_bindir}/systemd-inhibit \
- ${bindir}/systemd-detect-virt \
- ${bindir}/systemd-path \
- ${bindir}/systemd-run \
- ${bindir}/systemd-cat \
- ${bindir}/systemd-delta \
- ${bindir}/systemd-cgls \
- ${bindir}/systemd-cgtop \
- ${bindir}/systemd-stdio-bridge \
- ${base_bindir}/systemd-ask-password \
- ${base_bindir}/systemd-tty-ask-password-agent \
- ${systemd_unitdir}/system/systemd-ask-password-console.path \
- ${systemd_unitdir}/system/systemd-ask-password-console.service \
- ${systemd_unitdir}/system/systemd-ask-password-wall.path \
- ${systemd_unitdir}/system/systemd-ask-password-wall.service \
- ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
- ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
- ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
- ${rootlibexecdir}/systemd/systemd-resolve-host \
- ${rootlibexecdir}/systemd/systemd-ac-power \
- ${rootlibexecdir}/systemd/systemd-activate \
- ${bindir}/systemd-nspawn \
- ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
- ${systemd_unitdir}/system/systemd-nspawn@.service \
- ${rootlibexecdir}/systemd/systemd-bus-proxyd \
- ${systemd_unitdir}/system/systemd-bus-proxyd.service \
- ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
- ${rootlibexecdir}/systemd/systemd-socket-proxyd \
- ${rootlibexecdir}/systemd/systemd-reply-password \
- ${rootlibexecdir}/systemd/systemd-sleep \
- ${rootlibexecdir}/systemd/system-sleep \
- ${systemd_unitdir}/system/systemd-hibernate.service \
- ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
- ${systemd_unitdir}/system/systemd-suspend.service \
- ${systemd_unitdir}/system/sleep.target \
- ${rootlibexecdir}/systemd/systemd-initctl \
- ${systemd_unitdir}/system/systemd-initctl.service \
- ${systemd_unitdir}/system/systemd-initctl.socket \
- ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
- ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
- ${rootlibexecdir}/systemd/systemd-cgroups-agent \
-"
-
-CONFFILES_${PN} = "${sysconfdir}/machine-id \
- ${sysconfdir}/systemd/coredump.conf \
- ${sysconfdir}/systemd/journald.conf \
- ${sysconfdir}/systemd/logind.conf \
- ${sysconfdir}/systemd/system.conf \
- ${sysconfdir}/systemd/user.conf"
-
-FILES_${PN} = " ${base_bindir}/* \
- ${datadir}/dbus-1/services \
- ${datadir}/dbus-1/system-services \
- ${datadir}/polkit-1 \
- ${datadir}/${BPN} \
- ${datadir}/factory \
- ${sysconfdir}/dbus-1/ \
- ${sysconfdir}/machine-id \
- ${sysconfdir}/modules-load.d/ \
- ${sysconfdir}/pam.d/ \
- ${sysconfdir}/sysctl.d/ \
- ${sysconfdir}/systemd/ \
- ${sysconfdir}/tmpfiles.d/ \
- ${sysconfdir}/xdg/ \
- ${sysconfdir}/init.d/README \
- ${sysconfdir}/resolv.conf \
- ${rootlibexecdir}/systemd/* \
- ${systemd_unitdir}/* \
- ${base_libdir}/security/*.so \
- ${libdir}/libnss_* \
- /cgroup \
- ${bindir}/systemd* \
- ${bindir}/busctl \
- ${bindir}/coredumpctl \
- ${bindir}/localectl \
- ${bindir}/hostnamectl \
- ${bindir}/timedatectl \
- ${bindir}/bootctl \
- ${bindir}/kernel-install \
- ${exec_prefix}/lib/tmpfiles.d/*.conf \
- ${exec_prefix}/lib/systemd \
- ${exec_prefix}/lib/modules-load.d \
- ${exec_prefix}/lib/sysctl.d \
- ${exec_prefix}/lib/sysusers.d \
- ${localstatedir} \
- ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
- ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
- ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
- ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
- "
-
-FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
-
-RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
-RDEPENDS_${PN} += "volatile-binds update-rc.d"
-
-RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)} \
- systemd-vconsole-setup \
- systemd-extra-utils \
- systemd-compat-units udev-hwdb \
- util-linux-agetty util-linux-fsck e2fsprogs-e2fsck \
- kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
- os-release \
-"
-
-INSANE_SKIP_${PN}-doc += " libdir"
-
-PACKAGES =+ "udev udev-hwdb"
-
-RPROVIDES_udev = "hotplug"
-
-RDEPENDS_udev-hwdb += "udev"
-
-FILES_udev += "${base_sbindir}/udevd \
- ${rootlibexecdir}/systemd/systemd-udevd \
- ${rootlibexecdir}/udev/accelerometer \
- ${rootlibexecdir}/udev/ata_id \
- ${rootlibexecdir}/udev/cdrom_id \
- ${rootlibexecdir}/udev/collect \
- ${rootlibexecdir}/udev/findkeyboards \
- ${rootlibexecdir}/udev/keyboard-force-release.sh \
- ${rootlibexecdir}/udev/keymap \
- ${rootlibexecdir}/udev/mtd_probe \
- ${rootlibexecdir}/udev/scsi_id \
- ${rootlibexecdir}/udev/v4l_id \
- ${rootlibexecdir}/udev/keymaps \
- ${rootlibexecdir}/udev/rules.d/*.rules \
- ${sysconfdir}/udev \
- ${sysconfdir}/init.d/systemd-udevd \
- ${systemd_unitdir}/system/*udev* \
- ${systemd_unitdir}/system/*.wants/*udev* \
- ${base_bindir}/udevadm \
- ${datadir}/bash-completion/completions/udevadm \
- "
-
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
-
-INITSCRIPT_PACKAGES = "udev"
-INITSCRIPT_NAME_udev = "systemd-udevd"
-INITSCRIPT_PARAMS_udev = "start 03 S ."
-
-python __anonymous() {
- if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-# TODO:
-# u-a for runlevel and telinit
-
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
-
-ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
-ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
-ALTERNATIVE_PRIORITY[init] ?= "300"
-
-ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
-ALTERNATIVE_PRIORITY[halt] ?= "300"
-
-ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
-ALTERNATIVE_PRIORITY[reboot] ?= "300"
-
-ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
-ALTERNATIVE_PRIORITY[shutdown] ?= "300"
-
-ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
-ALTERNATIVE_PRIORITY[poweroff] ?= "300"
-
-ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
-ALTERNATIVE_PRIORITY[runlevel] ?= "300"
-
-pkg_postinst_${PN} () {
- sed -e '/^hosts:/s/\s*\<myhostname\>//' \
- -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
- -i $D${sysconfdir}/nsswitch.conf
-}
-
-pkg_prerm_${PN} () {
- sed -e '/^hosts:/s/\s*\<myhostname\>//' \
- -e '/^hosts:/s/\s*myhostname//' \
- -i $D${sysconfdir}/nsswitch.conf
-}
-
-pkg_postinst_udev-hwdb () {
- if test -n "$D"; then
- ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
- --root $D
- chown root:root $D${sysconfdir}/udev/hwdb.bin
- else
- udevadm hwdb --update
- fi
-}
-
-pkg_prerm_udev-hwdb () {
- rm -f $D${sysconfdir}/udev/hwdb.bin
-}
-
-# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
-# that we don't build both udev and systemd in world builds.
-python () {
- if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-
- import re
- if re.match('.*musl*', d.getVar('TARGET_OS', True)) != None:
- raise bb.parse.SkipPackage("Not _yet_ supported on musl based targets")
-}
diff --git a/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_230.bb b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_230.bb
new file mode 100644
index 000000000..a949fe8db
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/systemd/systemd_230.bb
@@ -0,0 +1,598 @@
+require systemd.inc
+
+PROVIDES = "udev"
+
+PE = "1"
+
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline libcap libcgroup qemu-native util-linux"
+
+SECTION = "base/shell"
+
+inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion
+
+SRC_URI += " \
+ file://touchscreen.rules \
+ file://00-create-volatile.conf \
+ file://init \
+ file://run-ptest \
+ file://0003-define-exp10-if-missing.patch \
+ file://0004-Use-getenv-when-secure-versions-are-not-available.patch \
+ file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
+ file://0006-configure-Check-for-additional-features-that-uclibc-.patch \
+ file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+ file://0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch \
+ file://0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \
+ file://0010-implment-systemd-sysv-install-for-OE.patch \
+ file://0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch \
+ file://0012-rules-whitelist-hd-devices.patch \
+ file://0013-sysv-generator-add-support-for-executing-scripts-und.patch \
+ file://0014-Make-root-s-home-directory-configurable.patch \
+ file://0015-systemd-user-avoid-using-system-auth.patch \
+ file://0016-Revert-rules-remove-firmware-loading-rules.patch \
+ file://0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
+ file://0018-make-test-dir-configurable.patch \
+ file://0019-remove-duplicate-include-uchar.h.patch \
+ file://0020-check-for-uchar.h-in-configure.patch \
+ file://0021-include-missing.h-for-getting-secure_getenv-definiti.patch \
+ file://0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
+ file://udev-re-enable-mount-propagation-for-udevd.patch \
+"
+SRC_URI_append_libc-uclibc = "\
+ file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
+"
+SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
+
+PACKAGECONFIG ??= "xz \
+ ldconfig \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
+ ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'efi', '', d)} \
+ binfmt \
+ randomseed \
+ machined \
+ backlight \
+ quotacheck \
+ hostnamed \
+ ${@bb.utils.contains('TCLIBC', 'glibc', 'myhostname sysusers', '', d)} \
+ hibernate \
+ timedated \
+ timesyncd \
+ localed \
+ kdbus \
+ ima \
+ smack \
+ logind \
+ firstboot \
+ utmp \
+ polkit \
+"
+PACKAGECONFIG_remove_libc-musl = "selinux"
+PACKAGECONFIG_remove_libc-musl = "smack"
+
+# Use the upstream systemd serial-getty@.service and rely on
+# systemd-getty-generator instead of using the OE-core specific
+# systemd-serialgetty.bb - not enabled by default.
+PACKAGECONFIG[serial-getty-generator] = ""
+
+PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
+# Sign the journal for anti-tampering
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
+PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
+PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
+PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
+PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
+PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
+PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
+PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
+PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck"
+PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
+PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
+PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
+PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
+PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
+PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
+PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
+PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
+PACKAGECONFIG[kdbus] = "--enable-kdbus,--disable-kdbus"
+PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
+PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
+# libseccomp is found in meta-security
+PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
+PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
+PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
+PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
+PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
+PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
+PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp"
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
+# importd requires curl/xz/zlib/bzip2/gcrypt
+PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
+PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
+PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
+PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
+# Verify keymaps on locale change
+PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
+# Update NAT firewall rules
+PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
+PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,,"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
+PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind"
+PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump"
+PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
+PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
+PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill"
+CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
+CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck"
+CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon"
+CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
+
+# Helper variables to clarify locations. This mirrors the logic in systemd's
+# build system.
+rootprefix ?= "${base_prefix}"
+rootlibdir ?= "${base_libdir}"
+rootlibexecdir = "${rootprefix}/lib"
+
+CACHED_CONFIGUREVARS_class-target = "\
+ ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
+ ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
+ ac_cv_path_KMOD=${base_bindir}/kmod \
+ ac_cv_path_KILL=${base_bindir}/kill \
+ ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
+ ac_cv_path_KEXEC=${sbindir}/kexec \
+ ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
+ ac_cv_path_QUOTAON=${sbindir}/quotaon \
+ "
+
+EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
+ --with-rootlibdir=${rootlibdir} \
+ --with-roothomedir=${ROOT_HOME} \
+ --enable-split-usr \
+ --without-python \
+ --with-sysvrcnd-path=${sysconfdir} \
+ --with-firmware-path=/lib/firmware \
+ --with-testdir=${PTEST_PATH} \
+ "
+# per the systemd README, define VALGRIND=1 to run under valgrind
+CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"
+
+# disable problematic GCC 5.2 optimizations [YOCTO #8291]
+FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
+
+do_configure_prepend() {
+ export NM="${HOST_PREFIX}gcc-nm"
+ export AR="${HOST_PREFIX}gcc-ar"
+ export RANLIB="${HOST_PREFIX}gcc-ranlib"
+ export KMOD="${base_bindir}/kmod"
+ if [ -d ${S}/units.pre_sed ] ; then
+ cp -r ${S}/units.pre_sed ${S}/units
+ else
+ cp -r ${S}/units ${S}/units.pre_sed
+ fi
+ sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
+ sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
+}
+
+do_install() {
+ autotools_do_install
+ install -d ${D}/${base_sbindir}
+ if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
+ # Provided by a separate recipe
+ rm ${D}${systemd_unitdir}/system/serial-getty* -f
+ fi
+
+ # Provide support for initramfs
+ [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
+ [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
+
+ # Create machine-id
+ # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
+ touch ${D}${sysconfdir}/machine-id
+
+
+ install -d ${D}${sysconfdir}/udev/rules.d/
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
+ install -d ${D}${libdir}/pkgconfig
+ install -m 0644 ${B}/src/udev/udev.pc ${D}${libdir}/pkgconfig/
+
+ install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
+ sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
+ fi
+
+ chown root:systemd-journal ${D}/${localstatedir}/log/journal
+
+ # Delete journal README, as log can be symlinked inside volatile.
+ rm -f ${D}/${localstatedir}/log/README
+
+ install -d ${D}${systemd_unitdir}/system/graphical.target.wants
+ install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
+ install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
+ install -d ${D}${systemd_unitdir}/system/reboot.target.wants
+ install -d ${D}${systemd_unitdir}/system/rescue.target.wants
+
+ # Create symlinks for systemd-update-utmp-runlevel.service
+ if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
+ ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
+ fi
+
+ # Enable journal to forward message to syslog daemon
+ sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+ # Set the maximium size of runtime journal to 64M as default
+ sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
+
+ # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
+ # for existence else it fails
+ if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
+ ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
+ fi
+ if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
+ # if resolved is disabled, it won't handle the link of resolv.conf, so
+ # set it up ourselves
+ ln -s ../run/resolv.conf ${D}${sysconfdir}/resolv.conf
+ echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+ echo 'f /run/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+ fi
+ install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
+}
+
+do_install_ptest () {
+ # install data files needed for tests
+ install -d ${D}${PTEST_PATH}/tests/test
+ cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
+ # python is disabled for systemd, thus removing these python testing scripts
+ rm ${D}${PTEST_PATH}/tests/test/*.py
+ sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
+
+ install -d ${D}${PTEST_PATH}/tests/catalog
+ install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
+
+ install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
+
+ install -d ${D}${PTEST_PATH}/tests/rules
+ install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
+
+ # This directory needs to be there for udev-test.pl to work.
+ install -d ${D}${libdir}/udev/rules.d
+
+ # install actual test binaries
+ install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
+ install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
+
+ install ${B}/Makefile ${D}${PTEST_PATH}/tests/
+}
+
+python populate_packages_prepend (){
+ systemdlibdir = d.getVar("rootlibdir", True)
+ do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+}
+PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
+
+PACKAGES =+ "\
+ ${PN}-gui \
+ ${PN}-vconsole-setup \
+ ${PN}-initramfs \
+ ${PN}-analyze \
+ ${PN}-kernel-install \
+ ${PN}-rpm-macros \
+ ${PN}-binfmt \
+ ${PN}-pam \
+ ${PN}-zsh-completion \
+ ${PN}-xorg-xinitrc \
+ ${PN}-container \
+ ${PN}-extra-utils \
+"
+
+SUMMARY_${PN}-container = "Tools for containers and VMs"
+DESCRIPTION_${PN}-container = "Systemd tools to spawn and manage containers and virtual machines."
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
+SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+
+USERADD_PACKAGES = "${PN} ${PN}-extra-utils"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-remote;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '--system -d / -M --shell /bin/nologin systemd-journal-upload;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /bin/nologin systemd-network;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /bin/nologin systemd-coredump;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /bin/nologin systemd-resolve;', '', d)}"
+GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+USERADD_PARAM_${PN}-extra-utils += "--system -d / -M --shell /bin/nologin systemd-bus-proxy;"
+
+FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+RDEPENDS_${PN}-ptest += "gawk make perl bash xz \
+ tzdata tzdata-americas tzdata-asia \
+ tzdata-europe tzdata-africa tzdata-antarctica \
+ tzdata-arctic tzdata-atlantic tzdata-australia \
+ tzdata-pacific tzdata-posix"
+
+FILES_${PN}-ptest += "${libdir}/udev/rules.d"
+
+FILES_${PN}-gui = "${bindir}/systemadm"
+
+FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
+ ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+
+RDEPENDS_${PN}-kernel-install += "bash"
+FILES_${PN}-kernel-install = "${bindir}/kernel-install \
+ ${sysconfdir}/kernel/ \
+ ${exec_prefix}/lib/kernel \
+ "
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
+ "
+
+FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
+
+FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
+
+FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
+ ${exec_prefix}/lib/binfmt.d \
+ ${rootlibexecdir}/systemd/systemd-binfmt \
+ ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
+ ${systemd_unitdir}/system/systemd-binfmt.service"
+RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
+
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
+
+FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
+ ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+ ${base_bindir}/machinectl \
+ ${bindir}/systemd-nspawn \
+ ${nonarch_libdir}/systemd/import-pubring.gpg \
+ ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
+ ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \
+ ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \
+ ${systemd_system_unitdir}/machine.slice \
+ ${systemd_system_unitdir}/machines.target \
+ ${systemd_system_unitdir}/org.freedesktop.import1.busname \
+ ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
+ ${systemd_system_unitdir}/systemd-importd.service \
+ ${systemd_system_unitdir}/systemd-machined.service \
+ ${systemd_system_unitdir}/var-lib-machines.mount \
+ ${rootlibexecdir}/systemd/systemd-import \
+ ${rootlibexecdir}/systemd/systemd-importd \
+ ${rootlibexecdir}/systemd/systemd-journal-gatewayd \
+ ${rootlibexecdir}/systemd/systemd-journal-remote \
+ ${rootlibexecdir}/systemd/systemd-journal-upload \
+ ${rootlibexecdir}/systemd/systemd-machined \
+ ${rootlibexecdir}/systemd/systemd-pull \
+ ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
+ ${systemd_system_unitdir}/systemd-nspawn@.service \
+ ${libdir}/libnss_mymachines.so.2 \
+ ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
+ ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+ ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
+ ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
+ "
+
+FILES_${PN}-extra-utils = "\
+ ${base_bindir}/systemd-escape \
+ ${base_bindir}/systemd-inhibit \
+ ${bindir}/systemd-detect-virt \
+ ${bindir}/systemd-path \
+ ${bindir}/systemd-run \
+ ${bindir}/systemd-cat \
+ ${bindir}/systemd-delta \
+ ${bindir}/systemd-cgls \
+ ${bindir}/systemd-cgtop \
+ ${bindir}/systemd-stdio-bridge \
+ ${base_bindir}/systemd-ask-password \
+ ${base_bindir}/systemd-tty-ask-password-agent \
+ ${systemd_unitdir}/system/systemd-ask-password-console.path \
+ ${systemd_unitdir}/system/systemd-ask-password-console.service \
+ ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+ ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
+ ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+ ${rootlibexecdir}/systemd/systemd-resolve-host \
+ ${rootlibexecdir}/systemd/systemd-ac-power \
+ ${rootlibexecdir}/systemd/systemd-activate \
+ ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+ ${systemd_unitdir}/system/systemd-bus-proxyd.service \
+ ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
+ ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+ ${rootlibexecdir}/systemd/systemd-reply-password \
+ ${rootlibexecdir}/systemd/systemd-sleep \
+ ${rootlibexecdir}/systemd/system-sleep \
+ ${systemd_unitdir}/system/systemd-hibernate.service \
+ ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+ ${systemd_unitdir}/system/systemd-suspend.service \
+ ${systemd_unitdir}/system/sleep.target \
+ ${rootlibexecdir}/systemd/systemd-initctl \
+ ${systemd_unitdir}/system/systemd-initctl.service \
+ ${systemd_unitdir}/system/systemd-initctl.socket \
+ ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+ ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+ ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+"
+
+CONFFILES_${PN} = "${sysconfdir}/machine-id \
+ ${sysconfdir}/systemd/coredump.conf \
+ ${sysconfdir}/systemd/journald.conf \
+ ${sysconfdir}/systemd/logind.conf \
+ ${sysconfdir}/systemd/system.conf \
+ ${sysconfdir}/systemd/user.conf"
+
+FILES_${PN} = " ${base_bindir}/* \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/polkit-1 \
+ ${datadir}/${BPN} \
+ ${datadir}/factory \
+ ${sysconfdir}/dbus-1/ \
+ ${sysconfdir}/machine-id \
+ ${sysconfdir}/modules-load.d/ \
+ ${sysconfdir}/pam.d/ \
+ ${sysconfdir}/sysctl.d/ \
+ ${sysconfdir}/systemd/ \
+ ${sysconfdir}/tmpfiles.d/ \
+ ${sysconfdir}/xdg/ \
+ ${sysconfdir}/init.d/README \
+ ${sysconfdir}/resolv.conf \
+ ${rootlibexecdir}/systemd/* \
+ ${systemd_unitdir}/* \
+ ${base_libdir}/security/*.so \
+ ${libdir}/libnss_* \
+ /cgroup \
+ ${bindir}/systemd* \
+ ${bindir}/busctl \
+ ${bindir}/coredumpctl \
+ ${bindir}/localectl \
+ ${bindir}/hostnamectl \
+ ${bindir}/timedatectl \
+ ${bindir}/bootctl \
+ ${bindir}/kernel-install \
+ ${exec_prefix}/lib/tmpfiles.d/*.conf \
+ ${exec_prefix}/lib/systemd \
+ ${exec_prefix}/lib/modules-load.d \
+ ${exec_prefix}/lib/sysctl.d \
+ ${exec_prefix}/lib/sysusers.d \
+ ${localstatedir} \
+ ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
+ ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
+ ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
+ ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
+ "
+
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
+
+RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
+RDEPENDS_${PN} += "volatile-binds update-rc.d"
+
+RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)} \
+ systemd-vconsole-setup \
+ systemd-extra-utils \
+ systemd-compat-units udev-hwdb \
+ util-linux-agetty util-linux-fsck e2fsprogs-e2fsck \
+ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
+ os-release \
+"
+
+INSANE_SKIP_${PN}-doc += " libdir"
+
+PACKAGES =+ "udev udev-hwdb"
+
+RPROVIDES_udev = "hotplug"
+
+RDEPENDS_udev-hwdb += "udev"
+
+FILES_udev += "${base_sbindir}/udevd \
+ ${rootlibexecdir}/systemd/systemd-udevd \
+ ${rootlibexecdir}/udev/accelerometer \
+ ${rootlibexecdir}/udev/ata_id \
+ ${rootlibexecdir}/udev/cdrom_id \
+ ${rootlibexecdir}/udev/collect \
+ ${rootlibexecdir}/udev/findkeyboards \
+ ${rootlibexecdir}/udev/keyboard-force-release.sh \
+ ${rootlibexecdir}/udev/keymap \
+ ${rootlibexecdir}/udev/mtd_probe \
+ ${rootlibexecdir}/udev/scsi_id \
+ ${rootlibexecdir}/udev/v4l_id \
+ ${rootlibexecdir}/udev/keymaps \
+ ${rootlibexecdir}/udev/rules.d/*.rules \
+ ${sysconfdir}/udev \
+ ${sysconfdir}/init.d/systemd-udevd \
+ ${systemd_unitdir}/system/*udev* \
+ ${systemd_unitdir}/system/*.wants/*udev* \
+ ${base_bindir}/udevadm \
+ ${datadir}/bash-completion/completions/udevadm \
+ "
+
+FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+# TODO:
+# u-a for runlevel and telinit
+
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
+
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
+pkg_postinst_${PN} () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e '/^hosts:/s/\s*myhostname//' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_postinst_udev-hwdb () {
+ if test -n "$D"; then
+ ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
+ --root $D
+ chown root:root $D${sysconfdir}/udev/hwdb.bin
+ else
+ udevadm hwdb --update
+ fi
+}
+
+pkg_prerm_udev-hwdb () {
+ rm -f $D${sysconfdir}/udev/hwdb.bin
+}
+
+# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
+# that we don't build both udev and systemd in world builds.
+python () {
+ if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+ raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
+
+ import re
+ if re.match('.*musl*', d.getVar('TARGET_OS', True)) != None:
+ raise bb.parse.SkipPackage("Not _yet_ supported on musl based targets")
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index c5b8cdca9..f136ad821 100644
--- a/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -26,7 +26,8 @@ do_install() {
for i in $tmp
do
j=`echo ${i} | sed s/\;/\ /g`
- label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
+ l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
+ label=`echo $l | sed 's/.*\(....\)/\1/'`
echo "$label:12345:respawn:${base_bindir}/start_getty ${j}" >> ${D}${sysconfdir}/inittab
done
@@ -57,9 +58,12 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
tmp="${SERIAL_CONSOLES_CHECK}"
for i in $tmp
do
- j=`echo ${i} | sed s/^.*\;//g`
+ j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g`
+ k=`echo ${i} | sed s/^.*\://g`
if [ -z "`grep ${j} /proc/consoles`" ]; then
- sed -i /^.*${j}$/d /etc/inittab
+ if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then
+ sed -i /^.*${j}$/d /etc/inittab
+ fi
fi
done
kill -HUP 1
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/funcs b/import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/funcs
deleted file mode 100644
index ccc85392d..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/funcs
+++ /dev/null
@@ -1,474 +0,0 @@
-a64l
-abs
-access
-__adjtimex
-alarm
-alphasort
-argz_append
-__argz_count
-argz_create_sep
-argz_insert
-__argz_next
-argz_next
-__argz_stringify
-argz_stringify
-asprintf
-atexit
-atof
-atoi
-bcmp
-bcopy
-bindresvport
-bind_textdomain_codeset
-btowc
-bzero
-calloc
-canonicalize_file_name
-catgets
-cfgetospeed
-cfsetispeed
-cfsetspeed
-chmod
-chown
-chroot
-clock
-close
-closedir
-closelog
-confstr
-connect
-daemon
-dcgettext
-difftime
-dirfd
-dirname
-dngettext
-dup2
-ecvt
-endgrent
-endmntent
-endpwent
-endutent
-endutxent
-epoll_ctl
-err
-ether_hostton
-ether_ntohost
-euidaccess
-execv
-fchdir
-fchmod
-fchmodat
-fchown
-fchownat
-fcntl
-fcvt
-fdatasync
-fdopendir
-feof_unlocked
-fgets_unlocked
-fgetxattr
-finite
-flistxattr
-flock
-flockfile
-fnmatch
-fork
-fpathconf
-__fpending
-fprintf
-free
-freeaddrinfo
-freeifaddrs
-fseeko
-__fsetlocking
-fsetxattr
-fstat64
-fstat
-fstatfs
-fsync
-ftello
-ftime
-ftruncate
-funlockfile
-futimes
-futimesat
-gai_strerror
-gcvt
-getaddrinfo
-getc_unlocked
-getcwd
-getdelim
-getdomainname
-getdtablesize
-getegid
-getenv
-geteuid
-getgid
-getgrent
-getgrent_r
-getgrgid_r
-getgrnam
-getgrnam_r
-getgrouplist
-getgroups
-gethostbyaddr_r
-gethostbyname2
-gethostbyname
-gethostbyname_r
-gethostent
-gethostid
-gethostname
-getifaddrs
-getline
-getloadavg
-getmntent
-getmsg
-getnameinfo
-getnetbyaddr_r
-getnetgrent_r
-getopt
-getopt_long
-getopt_long_only
-getpagesize
-getpass
-getpeername
-getpgrp
-getpid
-getppid
-getprotoent_r
-getpwent
-getpwent_r
-getpwnam
-getpwnam_r
-getpwuid
-getpwuid_r
-getresuid
-getrlimit
-getrusage
-getservbyname
-getservbyname_r
-getservbyport_r
-getservent
-getservent_r
-getspnam
-getspnam_r
-gettimeofday
-getttyent
-getttynam
-getuid
-getusershell
-getutent
-getutid
-getutline
-getutmp
-getutmpx
-getutxent
-getutxid
-getutxline
-getwd
-getxattr
-glob
-gmtime
-gmtime_r
-grantpt
-group_member
-herror
-hstrerror
-iconv
-iconv_open
-if_freenameindex
-if_indextoname
-if_nameindex
-if_nametoindex
-index
-inet_addr
-inet_aton
-inet_ntoa
-inet_ntop
-inet_pton
-initgroups
-innetgr
-iruserok
-isascii
-isatty
-isblank
-isgraph
-isinf
-isnan
-isprint
-isspace
-iswalnum
-iswcntrl
-iswctype
-iswprint
-iswspace
-iswupper
-isxdigit
-kill
-killpg
-lchown
-lckpwdf
-lgetxattr
-link
-listxattr
-llistxattr
-localtime
-localtime_r
-lockf
-lrand48
-lsearch
-lseek64
-lsetxattr
-lstat
-mallinfo
-malloc
-mblen
-mbrlen
-mbrtowc
-mbsinit
-mbsrtowcs
-mbtowc
-memalign
-memchr
-memcmp
-memcpy
-memmove
-mempcpy
-memrchr
-memset
-mkdir
-mkdirat
-mkdtemp
-mkfifo
-mknod
-mkstemp64
-mkstemp
-mktime
-mlock
-mmap
-mtrace
-munlock
-munmap
-nanosleep
-nice
-nl_langinfo
-ntp_adjtime
-ntp_gettime
-_obstack_free
-on_exit
-open64
-open
-openat
-opendir
-openlog
-pathconf
-pipe
-poll
-popen
-posix_memalign
-prctl
-pread
-printf
-__progname
-pselect
-pthread_mutex_lock
-ptsname
-putenv
-putgrent
-putpwent
-putspent
-pututline
-pututxline
-putwc
-pwrite
-qsort
-raise
-rand
-random
-rand_r
-read
-readdir
-readdir_r
-readlink
-realloc
-realpath
-re_comp
-recvmsg
-re_exec
-regcomp
-regexec
-remove
-rename
-re_search
-rmdir
-rpmatch
-rresvport_af
-ruserok
-ruserok_af
-sbrk
-scandir
-sched_setscheduler
-sched_yield
-__secure_getenv
-select
-semctl
-semget
-sendmsg
-setbuf
-setbuffer
-setegid
-setenv
-seteuid
-setgid
-setgroups
-sethostname
-setitimer
-_setjmp
-setjmp
-setlinebuf
-setlocale
-setmntent
-setpgid
-setpgrp
-setpriority
-setregid
-setresgid
-setresuid
-setreuid
-setrlimit
-setsid
-setsockopt
-settimeofday
-setuid
-setutent
-setutxent
-setvbuf
-setxattr
-sgetspent
-shmat
-shmctl
-shmdt
-shmget
-shutdown
-sigaction
-sigaddset
-sigaltstack
-sigblock
-sigemptyset
-sighold
-siginterrupt
-signal
-sigprocmask
-sigset
-sigsetmask
-sigstack
-sigsuspend
-sigvec
-snprintf
-socket
-socketpair
-sprintf
-srand48
-srand
-srandom
-sscanf
-stat
-statfs
-statvfs
-stime
-stpcpy
-strcasecmp
-strcasestr
-strchr
-strchrnul
-strcmp
-strcspn
-strdup
-strerror
-strerror_r
-strftime
-strlen
-strncasecmp
-strncmp
-strndup
-strnlen
-strpbrk
-strptime
-strrchr
-strsep
-strsignal
-strspn
-strstr
-strtod
-strtoimax
-strtok_r
-strtol
-strtoll
-strtoul
-strtoull
-strtoumax
-strverscmp
-strxfrm
-symlink
-sync
-sysconf
-sysctl
-sysinfo
-syslog
-_sys_siglist
-sys_siglist
-system
-tcgetattr
-tcgetpgrp
-tcsetattr
-tcsetpgrp
-time
-timegm
-times
-timezone
-tmpnam
-towlower
-towupper
-truncate
-tsearch
-ttyname
-tzset
-ulimit
-umask
-uname
-unlink
-unsetenv
-unshare
-updwtmp
-updwtmpx
-usleep
-ustat
-utime
-utimes
-utmpname
-utmpxname
-valloc
-vasprintf
-verrx
-vfork
-vfprintf
-vfscanf
-vhangup
-vprintf
-vsnprintf
-vsprintf
-wait3
-wait4
-waitpid
-wcrtomb
-wcscoll
-wcsdup
-wcslen
-wctob
-wctomb
-wctype
-wcwidth
-wmemchr
-wmemcpy
-wmempcpy
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/headers b/import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/headers
deleted file mode 100644
index 609ab5379..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/headers
+++ /dev/null
@@ -1,156 +0,0 @@
-aio.h
-alloca.h
-argz.h
-arpa/inet.h
-arpa/nameser.h
-asm/byteorder.h
-asm/ioctls.h
-asm/page.h
-asm/types.h
-assert.h
-byteswap.h
-crypt.h
-ctype.h
-dirent.h
-dlfcn.h
-elf.h
-endian.h
-err.h
-errno.h
-execinfo.h
-fcntl.h
-features.h
-float.h
-fstab.h
-ftw.h
-getopt.h
-glob.h
-grp.h
-iconv.h
-ifaddrs.h
-inttypes.h
-langinfo.h
-lastlog.h
-libgen.h
-libintl.h
-limits.h
-linux/capability.h
-linux/fd.h
-linux/fs.h
-linux/hayesesp.h
-linux/hdreg.h
-linux/icmp.h
-linux/in6.h
-linux/joystick.h
-linux/ptrace.h
-linux/serial.h
-linux/sonypi.h
-linux/unistd.h
-linux/utsname.h
-linux/version.h
-locale.h
-malloc.h
-math.h
-mcheck.h
-memory.h
-mntent.h
-mqueue.h
-netdb.h
-net/if.h
-netinet/ether.h
-netinet/in.h
-netinet/ip6.h
-netinet/ip.h
-netinet/tcp.h
-netinet/udp.h
-netipx/ipx.h
-net/route.h
-paths.h
-poll.h
-pthread.h
-pty.h
-pwd.h
-regex.h
-resolv.h
-rpc/rpc.h
-rpc/types.h
-sched.h
-scsi/scsi.h
-search.h
-semaphore.h
-setjmp.h
-sgtty.h
-shadow.h
-signal.h
-stdarg.h
-stdbool.h
-stdc
-stddef.h
-stdint.h
-stdio.h
-stdlib.h
-string.h
-strings.h
-stropts.h
-sys/bitypes.h
-sys/cdefs.h
-sys/dir.h
-sys/epoll.h
-sysexits.h
-sys/fcntl.h
-sys/file.h
-sys/fsuid.h
-sys/ioctl.h
-sys/ipc.h
-syslog.h
-sys/mman.h
-sys/mount.h
-sys/mtio.h
-sys/param.h
-sys/poll.h
-sys/prctl.h
-sys/ptrace.h
-sys/queue.h
-sys/reg.h
-sys/resource.h
-sys/select.h
-sys/sem.h
-sys/shm.h
-sys/signal.h
-sys/socket.h
-sys/socketvar.h
-sys/soundcard.h
-sys/statfs.h
-sys/stat.h
-sys/statvfs.h
-sys/stropts.h
-sys/swap.h
-sys/sysctl.h
-sys/sysinfo.h
-sys/sysmacros.h
-sys/termios.h
-sys/timeb.h
-sys/time.h
-sys/times.h
-sys/timex.h
-sys/types.h
-sys/uio.h
-sys/un.h
-sys/unistd.h
-sys/user.h
-sys/utsname.h
-sys/vfs.h
-sys/wait.h
-termio.h
-termios.h
-time.h
-ttyent.h
-ulimit.h
-unistd.h
-ustat.h
-utime.h
-utmp.h
-utmpx.h
-values.h
-wchar.h
-wctype.h
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/types b/import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/types
deleted file mode 100644
index 178bd85a0..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/site_config/types
+++ /dev/null
@@ -1,21 +0,0 @@
-char
-char *
-double
-float
-int
-long
-long double
-long int
-long long
-long long int
-short
-short int
-signed char
-unsigned char
-unsigned int
-unsigned long
-unsigned long int
-unsigned long long int
-unsigned short
-unsigned short int
-void *
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-config.inc b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-config.inc
deleted file mode 100644
index ed7b52226..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-config.inc
+++ /dev/null
@@ -1,143 +0,0 @@
-DEPENDS += "kern-tools-native"
-inherit cml1
-#
-# Set the ARCH environment variable for uClibc compilation.
-# Return value must match one of the architectures known to uClibc:
-# libc/sysdeps/*/*
-#
-
-valid_archs = "\
-alpha \
-arm \
-avr32 \
-bfin \
-c6x \
-cris \
-e1 \
-frv \
-h8300 \
-hppa \
-i386 \
-i960 \
-ia64 \
-m68k \
-microblaze \
-mips \
-nios \
-nios2 \
-powerpc \
-sh \
-sh64 \
-sparc \
-v850 \
-vax \
-x86_64 \
-xtensa \
-"
-def map_uclibc_arch(a, d):
- """Return the uClibc architecture for the given TARGET_ARCH."""
- import re
-
- valid_archs = d.getVar('valid_archs', True).split()
-
- if re.match('^(arm|sa110).*', a):
- return 'arm'
- elif re.match('^(i.86|athlon)$', a):
- return 'i386'
- elif re.match('^mips.*', a):
- return 'mips'
- elif re.match('^parisc.*', a):
- return 'hppa'
- elif re.match('^ppc.*', a):
- return 'powerpc'
- elif re.match('^s390.*', a):
- return 's390'
- elif re.match('^sh.*', a):
- return 'sh'
- elif re.match('^(sun|sparc).*', a):
- return 'sparc'
- elif re.match('^xtensa.*', a):
- return 'xtensa'
- elif a in valid_archs:
- return a
- else:
- bb.error("cannot map '%s' to a uClibc architecture" % a)
-
-export UCLIBC_ARCH = "${@map_uclibc_arch(d.getVar('TARGET_ARCH', True), d)}"
-
-def map_uclibc_abi(o, d):
- """Return the uClibc ABI for the given TARGET_OS."""
- import re
-
- arch = d.getVar('TARGET_ARCH', True)
- if map_uclibc_arch(d.getVar('TARGET_ARCH', True), d) == "arm":
- if re.match('.*eabi$', o):
- return 'ARM_EABI'
- else:
- return 'ARM_OABI'
- # FIXME: This is inaccurate! Handle o32, n32, n64
- elif re.match('^mips.*64$', arch):
- return 'MIPS_N64_ABI'
- elif re.match('^mips.*', arch):
- return 'MIPS_O32_ABI'
- return ""
-
-export UCLIBC_ABI = "${@map_uclibc_abi(d.getVar('TARGET_OS', True), d)}"
-
-def map_uclibc_endian(a, d):
- """Return the uClibc endianess for the given TARGET_ARCH."""
- import re
-
- # Always BE
- if re.match('^(avr32|e1|frv|(parisc|hppa)|m68k|microblaze|powerpc.*|(sparc|sun).*)$', a):
- return 'BIG'
- # Possibly BE
- elif re.match('^(((arm|sa110).*eb)|h8300.*eb|(parisc|hppa).*eb|mips|mips64|sh.*eb|xtensa.*eb)$', a):
- return 'BIG'
- return 'LITTLE'
-
-export UCLIBC_ENDIAN = "${@map_uclibc_endian(d.getVar('TARGET_ARCH', True), d)}"
-
-# internal helper
-def uclibc_cfg(feature, features, tokens, cnf, rem):
- if type(tokens) == type(""):
- tokens = [tokens]
- rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens])
- if type(features) == type([]) and feature in features:
- cnf.extend([token + '=y' for token in tokens])
- else:
- cnf.extend(['# ' + token + ' is not set' for token in tokens])
-
-# Map distro features to config settings
-def features_to_uclibc_settings(d):
- cnf, rem = ([], [])
- distro_features = d.getVar('DISTRO_FEATURES', True).split()
- uclibc_cfg('ipv4', distro_features, 'UCLIBC_HAS_IPV4', cnf, rem)
- uclibc_cfg('ipv6', distro_features, 'UCLIBC_HAS_IPV6', cnf, rem)
- uclibc_cfg('largefile', distro_features, 'UCLIBC_HAS_LFS', cnf, rem)
- uclibc_cfg('nls', distro_features, 'UCLIBC_HAS_LOCALE', cnf, rem)
- uclibc_cfg('thumb-interwork', distro_features,'USE_BX', cnf, rem)
- uclibc_cfg('xattr', distro_features, 'UCLIBC_HAS_XATTR', cnf, rem)
- uclibc_cfg('ssp', distro_features, 'UCLIBC_HAS_SSP', cnf, rem)
- uclibc_cfg('ssp', distro_features, 'UCLIBC_BUILD_SSP', cnf, rem)
- uclibc_cfg('argp', distro_features, 'UCLIBC_HAS_ARGP', cnf, rem)
- uclibc_cfg('libc-posix-clang-wchar', distro_features,'UCLIBC_HAS_WCHAR', cnf, rem)
- return "\n".join(cnf), "\n".join(rem)
-# X, Y = ${@features_to_uclibc_settings(d)}
-# unfortunately doesn't seem to work with bitbake, workaround:
-def features_to_uclibc_conf(d):
- cnf, rem = features_to_uclibc_settings(d)
- return cnf
-def features_to_uclibc_del(d):
- cnf, rem = features_to_uclibc_settings(d)
- return rem
-
-# returns all the elements from the src uri that are .cfg files
-def find_cfgs(d):
- sources=src_patches(d, True)
- sources_list=[]
- for s in sources:
- if s.endswith('.cfg'):
- sources_list.append(s)
-
- return sources_list
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git.inc b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git.inc
deleted file mode 100644
index a56fa7cb6..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-SRCREV = "003b266cbeb370a8eae91dc256197f00798c6f93"
-
-PV = "1.0.12+git${SRCPV}"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/uclibc-git:"
-
-SRC_URI = "git://uclibc-ng.org/git/uclibc-ng \
- file://0001-Disable-lrount_tes-function.patch \
- file://uClibc.machine \
- file://uClibc.distro \
- file://obstack.cfg \
- file://locale.cfg \
-"
-S = "${WORKDIR}/git"
-
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-Disable-lrount_tes-function.patch b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-Disable-lrount_tes-function.patch
deleted file mode 100644
index 506f146a7..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-Disable-lrount_tes-function.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 14b865b3438d0df29b4969148678d8fa8943e1ef Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 16 Aug 2015 20:49:33 -0700
-Subject: [PATCH 1/7] Disable lrount_tes() function
-
-Its not used anyway, avoids some strict compiler warnings
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- test/math/libm-test.inc | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/test/math/libm-test.inc b/test/math/libm-test.inc
-index f50b48b..6d70a95 100644
---- a/test/math/libm-test.inc
-+++ b/test/math/libm-test.inc
-@@ -3470,7 +3470,6 @@ logb_test (void)
- }
-
-
--#if 0
- static void
- lround_test (void)
- {
-@@ -3605,7 +3604,6 @@ llround_test (void)
-
- END (llround);
- }
--#endif
-
- static void
- modf_test (void)
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/locale.cfg b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/locale.cfg
deleted file mode 100644
index fc6643516..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/locale.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-UCLIBC_HAS_LOCALE=y
-UCLIBC_HAS_XLOCALE=y
-UCLIBC_BUILD_MINIMAL_LOCALE=y
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/obstack.cfg b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/obstack.cfg
deleted file mode 100644
index 36bf9d6e4..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/obstack.cfg
+++ /dev/null
@@ -1 +0,0 @@
-UCLIBC_HAS_OBSTACK=y
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.distro b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.distro
deleted file mode 100644
index 7785ce8bf..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.distro
+++ /dev/null
@@ -1,195 +0,0 @@
-#
-# General Library Settings
-#
-# HAVE_NO_PIC is not set
-# DOPIC is not set
-# HAVE_NO_SHARED is not set
-# ARCH_HAS_NO_LDSO is not set
-HAVE_SHARED=y
-# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
-LDSO_LDD_SUPPORT=y
-LDSO_CACHE_SUPPORT=y
-# LDSO_PRELOAD_FILE_SUPPORT is not set
-LDSO_BASE_FILENAME="ld.so"
-# UCLIBC_STATIC_LDCONFIG is not set
-LDSO_RUNPATH=y
-UCLIBC_CTOR_DTOR=y
-LDSO_GNU_HASH_SUPPORT=y
-# HAS_NO_THREADS is not set
-UCLIBC_HAS_THREADS=y
-UCLIBC_HAS_THREADS_NATIVE=y
-PTHREADS_DEBUG_SUPPORT=y
-# LINUXTHREADS_OLD is not set
-UCLIBC_HAS_LFS=y
-# MALLOC is not set
-# MALLOC_SIMPLE is not set
-MALLOC_STANDARD=y
-MALLOC_GLIBC_COMPAT=y
-UCLIBC_DYNAMIC_ATEXIT=y
-COMPAT_ATEXIT=y
-UCLIBC_SUSV3_LEGACY=y
-UCLIBC_SUSV3_LEGACY_MACROS=y
-UCLIBC_SUSV4_LEGACY=y
-UCLIBC_HAS_SHADOW=y
-UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
-UCLIBC_HAS___PROGNAME=y
-UNIX98PTY_ONLY=y
-ASSUME_DEVPTS=y
-UCLIBC_HAS_LIBUTIL=y
-UCLIBC_HAS_TM_EXTENSIONS=y
-UCLIBC_HAS_TZ_CACHING=y
-UCLIBC_HAS_TZ_FILE=y
-UCLIBC_HAS_TZ_FILE_READ_MANY=y
-UCLIBC_TZ_FILE_PATH="/etc/TZ"
-
-#
-# Advanced Library Settings
-#
-UCLIBC_PWD_BUFFER_SIZE=256
-UCLIBC_GRP_BUFFER_SIZE=256
-
-#
-# Networking Support
-#
-UCLIBC_HAS_IPV6=y
-UCLIBC_HAS_RPC=y
-UCLIBC_HAS_FULL_RPC=y
-UCLIBC_HAS_REENTRANT_RPC=y
-UCLIBC_USE_NETLINK=y
-UCLIBC_SUPPORT_AI_ADDRCONFIG=y
-
-UCLIBC_HAS_BSD_RES_CLOSE=y
-UCLIBC_HAS_LIBRESOLV_STUB=y
-UCLIBC_HAS_LIBNSL_STUB=y
-
-#
-# String and Stdio Support
-#
-UCLIBC_HAS_STRING_GENERIC_OPT=y
-UCLIBC_HAS_STRING_ARCH_OPT=y
-UCLIBC_HAS_CTYPE_TABLES=y
-UCLIBC_HAS_CTYPE_SIGNED=y
-# UCLIBC_HAS_CTYPE_UNSAFE is not set
-UCLIBC_HAS_CTYPE_CHECKED=y
-# UCLIBC_HAS_CTYPE_ENFORCED is not set
-UCLIBC_HAS_WCHAR=y
-# UCLIBC_HAS_LOCALE is not set
-UCLIBC_HAS_HEXADECIMAL_FLOATS=y
-UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
-UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
-UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
-# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
-UCLIBC_HAS_STDIO_BUFSIZ_4096=y
-# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
-UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
-# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
-UCLIBC_HAS_STDIO_GETC_MACRO=y
-UCLIBC_HAS_STDIO_PUTC_MACRO=y
-UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
-# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
-UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
-UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
-UCLIBC_HAS_PRINTF_M_SPEC=y
-UCLIBC_HAS_ERRNO_MESSAGES=y
-# UCLIBC_HAS_SYS_ERRLIST is not set
-UCLIBC_HAS_SIGNUM_MESSAGES=y
-# UCLIBC_HAS_SYS_SIGLIST is not set
-UCLIBC_HAS_GNU_GETOPT=y
-UCLIBC_HAS_GNU_GETSUBOPT=y
-
-#
-# Big and Tall
-#
-UCLIBC_HAS_REGEX=y
-# UCLIBC_HAS_REGEX_OLD is not set
-UCLIBC_HAS_FNMATCH=y
-# UCLIBC_HAS_FNMATCH_OLD is not set
-UCLIBC_HAS_WORDEXP=y
-UCLIBC_HAS_NFTW=y
-UCLIBC_HAS_FTW=y
-UCLIBC_HAS_FTS=y
-UCLIBC_HAS_GLOB=y
-UCLIBC_HAS_GNU_GLOB=y
-
-#
-# Library Installation Options
-#
-SHARED_LIB_LOADER_PREFIX="/lib"
-RUNTIME_PREFIX="/"
-DEVEL_PREFIX="//usr"
-MULTILIB_DIR="lib"
-
-#
-# Security options
-#
-# UCLIBC_BUILD_PIE is not set
-# UCLIBC_HAS_ARC4RANDOM is not set
-# HAVE_NO_SSP is not set
-# UCLIBC_HAS_SSP is not set
-UCLIBC_BUILD_RELRO=y
-UCLIBC_BUILD_NOW=y
-UCLIBC_BUILD_NOEXECSTACK=y
-
-#
-# uClibc development/debugging options
-#
-CROSS_COMPILER_PREFIX=""
-UCLIBC_EXTRA_CFLAGS=""
-# DODEBUG is not set
-# DODEBUG_PT is not set
-# DOSTRIP is not set
-# DOASSERTS is not set
-# SUPPORT_LD_DEBUG is not set
-# SUPPORT_LD_DEBUG_EARLY is not set
-# UCLIBC_MALLOC_DEBUGGING is not set
-UCLIBC_HAS_BACKTRACE=y
-WARNINGS="-Wall"
-# EXTRA_WARNINGS is not set
-# DOMULTI is not set
-# UCLIBC_MJN3_ONLY is not set
-
-# math stuff for perl
-DO_C99_MATH=y
-UCLIBC_HAS_LONG_DOUBLE_MATH=y
-UCLIBC_HAS_FENV=y
-UCLIBC_LINUX_MODULE_26=y
-# UCLIBC_LINUX_MODULE_24 is not set
-UCLIBC_LINUX_SPECIFIC=y
-UCLIBC_HAS_REALTIME=y
-UCLIBC_HAS_ADVANCED_REALTIME=y
-UCLIBC_HAS_NETWORK_SUPPORT=y
-UCLIBC_HAS_SOCKET=y
-UCLIBC_HAS_BSD_ERR=y
-UCLIBC_HAS_SYSLOG=y
-UCLIBC_HAS_CRYPT=y
-UCLIBC_HAS_CRYPT_IMPL=y
-UCLIBC_HAS_GNU_ERROR=y
-UCLIBC_HAS_PTY=y
-UCLIBC_BSD_SPECIFIC=y
-UCLIBC_HAS_EPOLL=y
-UCLIBC_HAS_FLOATS=y
-
-# The below option is needed for ARM since depending
-# upong what intruction set is chosen this will be
-# enabled. As such it is harmless and will be punted
-# by menuconfig for other arches.
-
-# COMPILE_IN_THUMB_MODE is not set
-
-# needed by shadow
-UCLIBC_HAS_UTMP=y
-# needed by systemd
-UCLIBC_HAS_UTMPX=y
-UCLIBC_LINUX_MODULE_26=y
-UCLIBC_HAS_RESOLVER_SUPPORT=y
-# needed for LTP
-UCLIBC_SUSV4_LEGACY=y
-UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
-DO_XSI_MATH=y
-UCLIBC_SV4_DEPRECATED=y
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.machine b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.machine
deleted file mode 100644
index 595f444da..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.machine
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Version: 0.9.32-git
-# Mon Jul 19 01:34:29 2010
-#
-#
-# Using ELF file format
-#
-FORCE_OPTIONS_FOR_ARCH=y
-ARCH_HAS_MMU=y
-ARCH_USE_MMU=y
-KERNEL_HEADERS="/usr/include"
-HAVE_DOT_CONFIG=y
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-initial_git.bb b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-initial_git.bb
deleted file mode 100644
index c937ccb10..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-initial_git.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SECTION = "base"
-require uclibc.inc
-require uclibc-git.inc
-
-DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial libgcc-initial kern-tools-native"
-PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
-
-PACKAGES = ""
-PACKAGES_DYNAMIC = ""
-
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
-
-do_install() {
- # Install initial headers into the cross dir
- make PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
- install_headers install_startfiles
-
- # add links to linux-libc-headers: final uclibc build need this.
- for t in linux asm asm-generic; do
- if [ -d ${D}${includedir}/$t ]; then
- rm -rf ${D}${includedir}/$t
- fi
- ln -sf ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
- done
-
-}
-do_compile() {
- :
-}
-
-do_siteconfig () {
- :
-}
-
-do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-package.inc b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-package.inc
deleted file mode 100644
index 439f84e4f..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc-package.inc
+++ /dev/null
@@ -1,36 +0,0 @@
-# Ensure the uclibc-dev package is processed before uclibc-staticdev to allow
-# *_nonshared.a libraries to be packaged in the uclibc-dev package.
-PACKAGES = "ldd uclibc-utils uclibc-gconv uclibc-thread-db uclibc-argp uclibc-backtrace uclibc-libcrypt uclibc-libintl uclibc-libnsl uclibc-libresolv uclibc-libm uclibc-libdl uclibc-libutil uclibc-libpthread uclibc-librt ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
-
-FILES_uclibc-libcrypt = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so"
-FILES_uclibc-libintl = "${base_libdir}/libintl*.so.* ${base_libdir}/libintl-*.so"
-FILES_uclibc-libnsl = "${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so"
-FILES_uclibc-libresolv = "${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so"
-FILES_uclibc-libm = "${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so"
-FILES_uclibc-libdl = "${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so"
-FILES_uclibc-libutil = "${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so"
-FILES_uclibc-libpthread = "${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so"
-FILES_uclibc-librt = "${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so"
-
-FILES_ldd = "${bindir}/ldd"
-FILES_uclibc-utils = "${bindir} ${sbindir}"
-FILES_uclibc-gconv = "${libdir}/gconv"
-FILES_uclibc-thread-db = "${base_libdir}/libthread_db*"
-FILES_uclibc-argp = "${base_libdir}/libuargp-*.so ${base_libdir}/libuargp*.so.*"
-FILES_uclibc-backtrace = "${base_libdir}/libubacktrace-*.so ${base_libdir}/libubacktrace*.so.*"
-
-# The last line (gdb and lib1) is for uclinux-uclibc builds
-uclibc_baselibs = "${base_libdir}/ld*.so.* ${base_libdir}/ld*.so \
- ${base_libdir}/libc*.so.* ${base_libdir}/libuClibc-*.so \
- ${libdir}/libc.gdb ${libdir}/libc ${base_libdir}/lib1.so \
- "
-FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
-FILES_${PN}-dev += "\
- ${libdir}/lib*.so \
- ${libdir}/*_nonshared.a \
- ${libdir}/[S]*crt[1in].o \
- ${libdir}/crtreloc*.o \
- ${includedir}/*.h ${includedir}/*/*.h \
- "
-FILES_${PN} = "${sysconfdir} ${uclibc_baselibs} /sbin/ldconfig \
- ${libexecdir} ${datadir}/zoneinfo ${libdir}/locale"
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc.inc b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc.inc
deleted file mode 100644
index 1d42284fb..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc.inc
+++ /dev/null
@@ -1,168 +0,0 @@
-SUMMARY = "C library for embedded systems"
-DESCRIPTION = "The name uClibc is an abbreviation for 'the \
-microcontroller C library'. For simplicity, uClibc is pronounced \
-'yew-see-lib-see'. The goal of uClibc is to provide as much \
-functionality as possible in a small amount of space, and it is intended \
-primarily for embedded use. It is also highly configurable in supported \
-features, at the cost of ABI differences for different configurations. \
-uClibc has been designed from the ground up to be a C library for \
-embedded Linux. It is NOT compatible with binaries linked against glibc."
-
-LICENSE = "LGPLv2.1+"
-SECTION = "libs"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://COPYING.LIB.boilerplate;md5=aaddeadcddeb918297e0e4afc52ce46f \
-file://${S}/test/regex/testregex.c;beginline=1;endline=31;md5=234efb227d0a40677f895e4a1e26e960"
-
-require uclibc-config.inc
-
-PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
-TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
-
-# siteconfig.bbclass runs configure which needs a working compiler
-# For the compiler to work we need a working libc yet libc isn't
-# in the sysroots directory at this point. This means the libc.so
-# linker script won't work as the --sysroot setting isn't correct.
-# Here we create a hacked up libc linker script and pass in the right
-# flags to let configure work. Ugly.
-EXTRASITECONFIG = "CFLAGS='${CFLAGS} -Wl,-L${WORKDIR}/site_config_libc -L${WORKDIR}/site_config_libc -L${SYSROOT_DESTDIR}${libdir} -L${SYSROOT_DESTDIR}${base_libdir} -Wl,-L${SYSROOT_DESTDIR}${libdir} -Wl,-L${SYSROOT_DESTDIR}${base_libdir}'"
-siteconfig_do_siteconfig_gencache_prepend = " \
-mkdir -p ${WORKDIR}/site_config_libc; \
-cp ${SYSROOT_DESTDIR}${libdir}/libc.so ${WORKDIR}/site_config_libc; \
-sed -i -e 's# ${base_libdir}# ${SYSROOT_DESTDIR}${base_libdir}#g' -e 's# ${libdir}# ${SYSROOT_DESTDIR}${libdir}#g' ${WORKDIR}/site_config_libc/libc.so; \
-"
-
-# For now, we will skip building of a gcc package if it is a uclibc one
-# and our build is not a uclibc one, and we skip a glibc one if our build
-# is a uclibc build.
-COMPATIBLE_HOST = ".*-uclibc.*"
-
-INHIBIT_DEFAULT_DEPS = "1"
-
-# There appears to be a parallel race in uclibc:
-# GEN /extra/locale/locale_collate.h
-# xargs: ../..//extra/locale/gen_collate: Text file busy
-# make[1]: *** [../..//extra/locale/locale_collate.h] Error 126
-PARALLEL_MAKE = ""
-
-# do_stage barfs on a CC with whitespace, therefore put the 'HOST_CC_ARCH' in
-# the CFLAGS (when building the utils).
-OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}'"
-EXTRA_OEMAKE = "${OEMAKE_NO_CC} \
- 'HOSTCC=${BUILD_CC}' \
- 'HOST_CFLAGS=${BUILD_CFLAGS}' \
- 'CC=${CC}' \
- ARCH=${UCLIBC_ARCH}"
-
-EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"
-
-# enable verbose output:
-export V="2"
-
-# -O<n> -fno-omit-frame-pointer ends up with GCC ICE on thumb as reported
-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44860
-#
-CFLAGS_remove_arm = "-fno-omit-frame-pointer"
-UCLIBC_EXTRA_CFLAGS = "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
-
-configmangle = '/^KERNEL_HEADERS/d; \
- /^RUNTIME_PREFIX/d; \
- /^DEVEL_PREFIX/d; \
- /^SHARED_LIB_LOADER_PREFIX/d; \
- /^UCLIBC_EXTRA_CFLAGS/d; \
- s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \
- ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", True) == "thumb"]} \
- ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][d.getVar("USE_NLS", True) == "yes"]} \
- ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][d.getVar("TARGET_ARCH", True) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \
- /^CROSS/d; \
- /^TARGET_ARCH=/d; \
- /^TARGET_/s,^\([^=]*\).*,# \1 is not set,g; \
- s,^DOSTRIP.*,# DOSTRIP is not set,g; \
- /_[EO]*ABI/d; \
- /HAS_FPU/d; \
- ${@["","s,.*MULTILIB_DIR.*,MULTILIB_DIR=\"${baselib}\",;"][d.getVar("baselib", True) != "lib"]} \
- '
-OE_FEATURES = "${@features_to_uclibc_conf(d)}"
-OE_DEL = "${@features_to_uclibc_del(d)}"
-python () {
- if "${OE_DEL}":
- d.setVar('configmangle_append', "${OE_DEL}" + "\n")
-
- # by default uclibc uses mips1 ISA for o32 ABI
- # if we use TARGET_CC_ARCH="-march=mips32" we end up
- # with conflicting march options to gcc. Here we
- # ask for MIPS32 ISA to match the chosen arch
- tune = d.getVar("DEFAULTTUNE", True)
- if tune.startswith('mips32'):
- import re
- tune = re.sub('(el)*(-nf)*', '', tune)
- d.setVar('configmangle_append',
- "/^### MIPS32_CHECK$/a\\\nCONFIG_MIPS_ISA_%s=y\n\n" % (tune.upper()))
- if "${OE_FEATURES}":
- d.setVar('configmangle_append',
- "/^### DISTRO FEATURES$/a\\\n%s\n\n" %
- ("\\n".join((d.expand("${OE_FEATURES}").split("\n")))))
- d.setVar('configmangle_append',
- "/^### CROSS$/a\\\n%s\n" %
- ("\\n".join(["CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"",
- "UCLIBC_EXTRA_CFLAGS=\"${UCLIBC_EXTRA_CFLAGS}\"",
- "KERNEL_HEADERS=\"${STAGING_INCDIR}\"",
- "RUNTIME_PREFIX=\"/\"",
- "DEVEL_PREFIX=\"/${prefix}\"",
- "SHARED_LIB_LOADER_PREFIX=\"/lib\"",
- ])
- ))
- d.setVar('configmangle_append',
- "/^### TGT$/a\\\nTARGET_ARCH=\"%s\"\\nTARGET_%s=y\n" %
- ("${UCLIBC_ARCH}", "${UCLIBC_ARCH}"))
- d.setVar('configmangle_append',
- "/^### FPU$/a\\\n%s\n\n" % (["UCLIBC_HAS_FPU=y","# UCLIBC_HAS_FPU is not set"][d.getVar('TARGET_FPU', True) in [ 'soft' ]]))
- if "${UCLIBC_ENDIAN}":
- d.setVar('configmangle_append',
- "/^### ABI$/a\\\nARCH_WANTS_%s_ENDIAN=y\n\n" % ("${UCLIBC_ENDIAN}"))
- if "${UCLIBC_ABI}":
- d.setVar('configmangle_append',
- "/^### ABI$/a\\\nCONFIG_%s=y\n\n" % ("${UCLIBC_ABI}"))
-}
-
-python do_patch_append() {
- import subprocess
- subprocess.call("ln -sf ${STAGING_INCDIR}/linux ${S}/include/linux", shell=True)
- subprocess.call("ln -sf ${STAGING_INCDIR}/asm ${S}/include/asm", shell=True)
-}
-
-do_configure() {
- rm -f ${S}/.config
-
- # OpenEmbedded splits the uClibc.config in two parts:
- # uClibc.machine, uClibc.distro
- echo "### uClibc.machine ###" >${S}/merged.config
- cat ${WORKDIR}/uClibc.machine >>${S}/merged.config
- echo "### uClibc.distro ###" >>${S}/merged.config
- cat ${WORKDIR}/uClibc.distro >>${S}/merged.config
- echo "### CROSS" >>${S}/merged.config
- echo "### TGT" >>${S}/merged.config
- echo "### MMU" >>${S}/merged.config
- echo "### FPU" >>${S}/merged.config
- echo "### ABI" >>${S}/merged.config
- echo "### DISTRO FEATURES" >>${S}/merged.config
- echo "### MIPS32_CHECK" >>${S}/merged.config
-
- # Mangle the resulting .config depending on OE variables
- sed -i -e '${configmangle}' ${S}/merged.config
- cp ${S}/merged.config .config
- merge_config.sh -r -n -m .config ${@" ".join(find_cfgs(d))}
- cml1_do_configure
-
-}
-
-do_install() {
- oe_runmake PREFIX=${D} install
- rm -rf ${D}${includedir}/iconv.h
-}
-
-# build ldd, ldconfig and friends but only for full uclibc
-do_install_append_pn-uclibc () {
- oe_runmake PREFIX=${D} "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" -C utils utils_install
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc_git.bb b/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc_git.bb
deleted file mode 100644
index fd02b3d61..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/uclibc/uclibc_git.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require uclibc.inc
-require uclibc-package.inc
-require uclibc-git.inc
-
-STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
-
-PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils \
- virtual/${TARGET_PREFIX}gcc-initial \
- virtual/${TARGET_PREFIX}libc-initial \
- linux-libc-headers ncurses-native \
- libgcc-initial kern-tools-native"
-
-RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
-RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
-# uclibc does not really have libsegfault but then using the one from glibc is also not
-# going to work. So we pretend that we have it to make bitbake not pull other recipes
-# to satisfy this dependency for the images/tasks
-
-RPROVIDES_${PN} += "libsegfault rtld(GNU_HASH)"
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.1.5.bb b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.1.5.bb
deleted file mode 100644
index ea19ec413..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.1.5.bb
+++ /dev/null
@@ -1,107 +0,0 @@
-SUMMARY = "eudev is a fork of systemd's udev"
-HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
-LICENSE = "GPLv2.0+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
-
-PROVIDES = "udev"
-
-SRC_URI = "https://github.com/gentoo/${BPN}/archive/v${PV}.tar.gz \
- file://devfs-udev.rules \
- file://init \
- file://links.conf \
- file://local.rules \
- file://permissions.rules \
- file://run.rules \
- file://udev-cache \
- file://udev-cache.default \
- file://udev.rules \
-"
-UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases"
-
-SRC_URI[md5sum] = "e130f892d8744e292cb855db79935f68"
-SRC_URI[sha256sum] = "ce9d5fa91e3a42c7eb95512ca0fa2a631e89833053066bb6cdf42046b2a88553"
-
-inherit autotools update-rc.d qemu
-
-EXTRA_OECONF = " \
- --sbindir=${base_sbindir} \
- --libexecdir=${nonarch_base_libdir} \
- --with-rootlibdir=${base_libdir} \
- --with-rootprefix= \
-"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
- install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
- sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
- sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache
-
- install -d ${D}${sysconfdir}/default
- install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
-
- touch ${D}${sysconfdir}/udev/cache.data
-
- install -d ${D}${sysconfdir}/udev/rules.d
- install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
-
- # Use classic network interface naming scheme
- touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
-
- # Fix for multilib systems where libs along with confs are installed incorrectly
- if ! [ -d ${D}${nonarch_base_libdir}/udev ]
- then
- install -d ${D}${nonarch_base_libdir}/udev
- mv ${D}${base_libdir}/udev ${D}${nonarch_base_libdir}
- fi
-
- # hid2hci has moved to bluez4. removed in udev as of version 169
- rm -f ${D}${base_libdir}/udev/hid2hci
-}
-
-INITSCRIPT_PACKAGES = "eudev udev-cache"
-INITSCRIPT_NAME_eudev = "udev"
-INITSCRIPT_PARAMS_eudev = "start 04 S ."
-INITSCRIPT_NAME_udev-cache = "udev-cache"
-INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
-
-PACKAGES =+ "libudev"
-PACKAGES =+ "udev-cache"
-PACKAGES =+ "eudev-hwdb"
-
-
-FILES_${PN} += "${libexecdir} ${nonarch_base_libdir}/udev ${bindir}/udevadm"
-FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
- ${includedir}/libudev.h ${libdir}/libudev.so \
- ${includedir}/udev.h ${libdir}/libudev.la \
- ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
-FILES_libudev = "${base_libdir}/libudev.so.*"
-FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
-FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
-
-RDEPENDS_eudev-hwdb += "eudev"
-
-RRECOMMENDS_${PN} += "udev-cache eudev-hwdb"
-
-RPROVIDES_${PN} = "hotplug udev"
-
-python () {
- if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
- raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
-}
-
-pkg_postinst_eudev-hwdb () {
- if test -n "$D"; then
- ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
- chown root:root $D${sysconfdir}/udev/hwdb.bin
- else
- udevadm hwdb --update
- fi
-}
-
-pkg_prerm_eudev-hwdb () {
- rm -f $D${sysconfdir}/udev/hwdb.bin
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.bb b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.bb
new file mode 100644
index 000000000..211252ceb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/udev/eudev_3.2.bb
@@ -0,0 +1,101 @@
+SUMMARY = "eudev is a fork of systemd's udev"
+HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
+LICENSE = "GPLv2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
+
+PROVIDES = "udev"
+
+SRC_URI = "https://github.com/gentoo/${BPN}/archive/v${PV}.tar.gz \
+ file://devfs-udev.rules \
+ file://init \
+ file://links.conf \
+ file://local.rules \
+ file://permissions.rules \
+ file://run.rules \
+ file://udev-cache \
+ file://udev-cache.default \
+ file://udev.rules \
+"
+UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases"
+
+SRC_URI[md5sum] = "9eb477cc8718db272b5d24dff1126b04"
+SRC_URI[sha256sum] = "37829d37f4beb7e358ca33abc1ad0907d87f917ce157777aeaeebeacae24efdc"
+
+inherit autotools update-rc.d qemu pkgconfig
+
+EXTRA_OECONF = " \
+ --sbindir=${base_sbindir} \
+ --with-rootlibdir=${base_libdir} \
+ --with-rootprefix= \
+"
+
+PACKAGECONFIG ??= "hwdb"
+PACKAGECONFIG[hwdb] = "--enable-hwdb,--disable-hwdb"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
+ sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
+ sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
+
+ touch ${D}${sysconfdir}/udev/cache.data
+
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
+
+ # Use classic network interface naming scheme
+ touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
+
+ # hid2hci has moved to bluez4. removed in udev as of version 169
+ rm -f ${D}${base_libdir}/udev/hid2hci
+}
+
+INITSCRIPT_PACKAGES = "eudev udev-cache"
+INITSCRIPT_NAME_eudev = "udev"
+INITSCRIPT_PARAMS_eudev = "start 04 S ."
+INITSCRIPT_NAME_udev-cache = "udev-cache"
+INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
+
+PACKAGES =+ "libudev"
+PACKAGES =+ "udev-cache"
+PACKAGES =+ "eudev-hwdb"
+
+
+FILES_${PN} += "${libexecdir} ${base_libdir}/udev ${bindir}/udevadm"
+FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
+ ${includedir}/libudev.h ${libdir}/libudev.so \
+ ${includedir}/udev.h ${libdir}/libudev.la \
+ ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
+FILES_libudev = "${base_libdir}/libudev.so.*"
+FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
+FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
+
+RDEPENDS_eudev-hwdb += "eudev"
+
+RRECOMMENDS_${PN} += "udev-cache"
+
+RPROVIDES_${PN} = "hotplug udev"
+
+python () {
+ if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+ raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
+}
+
+pkg_postinst_eudev-hwdb () {
+ if test -n "$D"; then
+ ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
+ chown root:root $D${sysconfdir}/udev/hwdb.bin
+ else
+ udevadm hwdb --update
+ fi
+}
+
+pkg_prerm_eudev-hwdb () {
+ rm -f $D${sysconfdir}/udev/hwdb.bin
+}
diff --git a/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb b/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
index c15cb7803..3b965c50b 100644
--- a/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
@@ -1,5 +1,5 @@
SUMMARY = "manage symlinks in /etc/rcN.d"
-DESCRIPTION = "update-rc.d is a utilities that allows the management of symlinks to the initscripts in the /etc/rcN.d directory structure."
+DESCRIPTION = "update-rc.d is a utility that allows the management of symlinks to the initscripts in the /etc/rcN.d directory structure."
SECTION = "base"
LICENSE = "GPLv2+"
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
index 8c0c63083..c6355021f 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
@@ -17,7 +17,8 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
-inherit autotools gettext pkgconfig systemd update-alternatives python-dir ptest bash-completion
+#gtk-doc is not enabled as it requires xmlto which requires util-linux
+inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest
DEPENDS = "zlib ncurses"
DEPENDS_append_class-native = " lzo-native"
DEPENDS_append_class-nativesdk = " lzo-native"
@@ -32,7 +33,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
util-linux-mkfs util-linux-mcookie util-linux-reset \
util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \
util-linux-partx util-linux-hwclock util-linux-mountpoint \
- util-linux-findfs util-linux-getopt util-linux-sulogin"
+ util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit"
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
@@ -61,14 +62,14 @@ PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_u
PACKAGECONFIG[libcap-ng] = "--enable-setpriv,--disable-setpriv,libcap-ng,"
# Build python bindings for libmount
-PACKAGECONFIG[pylibmount] = "--with-python --enable-pylibmount,--without-python --disable-pylibmount,python"
+PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3"
# Readline support
PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
-FILES_${PN}-dev += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.la"
+FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
FILES_util-linux-agetty = "${base_sbindir}/agetty"
FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}"
@@ -89,9 +90,11 @@ FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
FILES_util-linux-findfs = "${sbindir}/findfs"
FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
FILES_util-linux-runuser = "${sbindir}/runuser"
+FILES_util-linux-prlimit = "${bindir}/prlimit"
-FILES_util-linux-pylibmount = "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.so \
- ${libdir}/${PYTHON_DIR}/dist-packages/libmount/__init__.*"
+FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
+ ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
+ ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
FILES_util-linux-lscpu = "${bindir}/lscpu"
FILES_util-linux-fsck = "${base_sbindir}/fsck*"
@@ -116,7 +119,7 @@ RDEPENDS_util-linux-runuser += "libpam"
RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin"
RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
-RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint"
+RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit"
RRECOMMENDS_${PN}_class-native = ""
RRECOMMENDS_${PN}_class-nativesdk = ""
@@ -280,7 +283,7 @@ python populate_packages_prepend() {
extra_depends='', prepend=True, allow_links=True)
}
-RDEPENDS_${PN}-ptest = "bash"
+RDEPENDS_${PN}-ptest = "bash grep coreutils"
do_compile_ptest() {
oe_runmake buildtest-TESTS
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
deleted file mode 100644
index a0d5efad0..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Avoid unsupported grep options
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Pending
-
-diff -ruN a/ts/ipcs/headers b/ts/ipcs/headers
---- a/tests/ts/ipcs/headers 2013-09-04 11:03:36.118613250 +0200
-+++ b/teste/ts/ipcs/headers 2013-09-04 11:03:27.906958437 +0200
-@@ -22,35 +22,35 @@
- ts_init "$*"
-
- ts_log "test: shm headers"
--$TS_CMD_IPCS -m -t | grep --after-context=1 "^---" >> $TS_OUTPUT
--$TS_CMD_IPCS -m -p | grep --after-context=1 "^---" >> $TS_OUTPUT
--$TS_CMD_IPCS -m -c | grep --after-context=1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -m -t | grep -A 1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -m -p | grep -A 1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -m -c | grep -A 1 "^---" >> $TS_OUTPUT
- $TS_CMD_IPCS -m -l | grep "^---" >> $TS_OUTPUT
- $TS_CMD_IPCS -m -u | grep "^---" >> $TS_OUTPUT
- echo >> $TS_OUTPUT
-
- ts_log "test: mesg headers"
--$TS_CMD_IPCS -q -t | grep --after-context=1 "^---" >> $TS_OUTPUT
--$TS_CMD_IPCS -q -p | grep --after-context=1 "^---" >> $TS_OUTPUT
--$TS_CMD_IPCS -q -c | grep --after-context=1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -q -t | grep -A 1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -q -p | grep -A 1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -q -c | grep -A 1 "^---" >> $TS_OUTPUT
- $TS_CMD_IPCS -q -l | grep "^---" >> $TS_OUTPUT
- $TS_CMD_IPCS -q -u | grep "^---" >> $TS_OUTPUT
- echo >> $TS_OUTPUT
-
- ts_log "test: sem headers"
--$TS_CMD_IPCS -s -t | grep --after-context=1 "^---" >> $TS_OUTPUT
--$TS_CMD_IPCS -s -p | grep --after-context=1 "^---" >> $TS_OUTPUT
--$TS_CMD_IPCS -s -c | grep --after-context=1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -s -t | grep -A 1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -s -p | grep -A 1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -s -c | grep -A 1 "^---" >> $TS_OUTPUT
- $TS_CMD_IPCS -s -l | grep "^---" >> $TS_OUTPUT
- $TS_CMD_IPCS -s -u | grep "^---" >> $TS_OUTPUT
- echo >> $TS_OUTPUT
-
- ts_log "test: all headers"
--$TS_CMD_IPCS -a | grep --after-context=1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -a | grep -A 1 "^---" >> $TS_OUTPUT
-
--$TS_CMD_IPCS -a -t | grep --after-context=1 "^---" >> $TS_OUTPUT
--$TS_CMD_IPCS -a -p | grep --after-context=1 "^---" >> $TS_OUTPUT
--$TS_CMD_IPCS -a -c | grep --after-context=1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -a -t | grep -A 1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -a -p | grep -A 1 "^---" >> $TS_OUTPUT
-+$TS_CMD_IPCS -a -c | grep -A 1 "^---" >> $TS_OUTPUT
- $TS_CMD_IPCS -a -l | grep "^---" >> $TS_OUTPUT
- $TS_CMD_IPCS -a -u | grep "^---" >> $TS_OUTPUT
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
deleted file mode 100644
index 7a63a4e05..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Avoid unsupported sleep parameter
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Pending
-
-diff -ruN a/simple b/simple
---- a/tests/ts/tailf/simple 2015-11-12 11:34:49.971817130 +0200
-+++ b/tests/ts/tailf/simple 2013-11-12 11:34:37.876325128 +0200
-@@ -27,9 +27,9 @@
-
- $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 &
-
--sleep 0.5
-+sleep 1
- echo {0..9} >> $INPUT
--sleep 0.5
-+sleep 1
-
- rm -f $INPUT
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
index 0eb881085..417ca1d98 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
@@ -3,16 +3,23 @@ Display testname for subtest
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Pending
-diff -ruN a/functions.sh b/functions.sh
---- a/tests/functions.sh 2015-11-12 21:32:02.434542124 +0100
-+++ b/tests/functions.sh 2015-11-12 21:40:37.095317280 +0100
-@@ -297,7 +297,7 @@
- if [ "$TS_PARALLEL" == "yes" ]; then
- TS_TITLE=$(printf "%13s: %-30s ...\n%16s: %-27s ..." "$TS_COMPONENT" "$TS_DESC" "" "$TS_SUBNAME")
- else
-- TS_TITLE=$(printf "%16s: %-27s ..." "" "$TS_SUBNAME")
-+ TS_TITLE=$(printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME")
- echo -n "$TS_TITLE"
+---
+ tests/functions.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/functions.sh b/tests/functions.sh
+index 5246605..b24dc15 100644
+--- a/tests/functions.sh
++++ b/tests/functions.sh
+@@ -320,7 +320,7 @@ function ts_init_subtest {
+
+ if [ "$TS_PARSABLE" != "yes" ]; then
+ [ $TS_NSUBTESTS -eq 1 ] && echo
+- printf "%16s: %-27s ..." "" "$TS_SUBNAME"
++ printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME"
fi
}
+
+--
+2.8.3
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch
index 837f18934..0537f7d85 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch
@@ -2,16 +2,22 @@ Define TESTS variable
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Upstream-Status: Pending
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
-diff -ruN a/Makefile.am b/Makefile.am
---- a/Makefile.am 2015-11-12 20:29:46.778396936 +0100
-+++ b/Makefile.am 2015-11-12 20:32:24.342450279 +0100
-@@ -48,7 +48,7 @@
+diff --git a/Makefile.am b/Makefile.am
+index bbaccb1..7d5a6bb 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -48,6 +48,7 @@ systemdsystemunit_DATA =
dist_bashcompletion_DATA =
check_PROGRAMS =
dist_check_SCRIPTS =
--TESTS =
+TESTS = $(check_PROGRAMS)
PATHFILES =
+
+--
+2.8.3
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
deleted file mode 100644
index 1f496dee2..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Support older hosts with latest util-linux-native
-
-mkostemp is not defined on older machines. So we detect this and
-provide a define that uses mkstemp instead.
-
-O_CLOEXEC is not defined on older machines. It is however defined
-in the 'c.h' header. Fix up the users to include 'c.h'.
-
-fdisks/fdisksunlabel.c was modified to use qsort_r, however
-this is not defined on older hosts. Revert:
- commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698
- fdisk: (sun): use ask API, remove global variable
-
-Upstream-Status: Inappropriate [other]
-Patches revert upstream changes in order to support older
-machines.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- configure.ac | 1 +
- include/c.h | 7 +++++++
- 2 files changed, 8 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index eb3680b..93e015f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -318,6 +318,7 @@ AC_CHECK_FUNCS([ \
- llseek \
- lseek64 \
- mempcpy \
-+ mkostemp \
- nanosleep \
- open_memstream \
- personality \
-diff --git a/include/c.h b/include/c.h
-index e423e8b..cf33b94 100644
---- a/include/c.h
-+++ b/include/c.h
-@@ -233,6 +233,13 @@ static inline int dirfd(DIR *d)
- #endif
-
- /*
-+ * mkostemp replacement
-+ */
-+#ifndef HAVE_MKOSTEMP
-+#define mkostemp(template, flags) mkstemp(template)
-+#endif
-+
-+/*
- * MAXHOSTNAMELEN replacement
- */
- static inline size_t get_hostname_max(void)
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch
deleted file mode 100644
index 5773d7ea1..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-The FHS indicates that /etc must be capable of being mounted R/O.
-
-The FHS also indicates that lock files belong in /var/lock, and /var must
-be R/W as soon as possible during boot.
-
-This patch moves the mtab lock file from the potentially R/O /etc, to the
-R/W /var/lock area. This lock file is used when mounting disks and making
-other mount adjustments. The _PATH_MOUNTED_TMP is not adjusted, as failing
-to write to this file does not cause any functional limitations.
-
-(Note, if /etc is R/O, then /etc/mtab should be a symlink to /proc/mounts)
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
---- util-linux-ng-2.16/include/pathnames.h.orig
-+++ util-linux-ng-2.16/include/pathnames.h
-@@ -90,7 +90,7 @@
- # endif
- #endif
-
--#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~"
-+#define _PATH_MOUNTED_LOCK "/var/lock/mtab~"
- #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp"
-
- #ifndef _PATH_DEV
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
index 1b0ff79d4..a6fde5d9c 100644
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
@@ -3,19 +3,23 @@ This patch adds error() API implementation for non-glibc system C libs
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: util-linux-2.27.1/tests/helpers/test_uuidd.c
-===================================================================
---- util-linux-2.27.1.orig/tests/helpers/test_uuidd.c
-+++ util-linux-2.27.1/tests/helpers/test_uuidd.c
+---
+ misc-utils/test_uuidd.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 61 insertions(+), 1 deletion(-)
+
+diff --git a/misc-utils/test_uuidd.c b/misc-utils/test_uuidd.c
+index 36f3b3d..7d579ce 100644
+--- a/misc-utils/test_uuidd.c
++++ b/misc-utils/test_uuidd.c
@@ -23,7 +23,6 @@
*
* make uuidd uuidgen localstatedir=/var
*/
-#include <error.h>
- #include <libgen.h>
#include <pthread.h>
#include <stdio.h>
-@@ -39,6 +38,17 @@
+ #include <stdlib.h>
+@@ -38,6 +37,17 @@
#include "xalloc.h"
#include "strutils.h"
@@ -33,7 +37,7 @@ Index: util-linux-2.27.1/tests/helpers/test_uuidd.c
#define LOG(level,args) if (loglev >= level) { fprintf args; }
size_t nprocesses = 4;
-@@ -257,6 +267,56 @@ static void object_dump(size_t idx, obje
+@@ -256,6 +266,56 @@ static void object_dump(size_t idx, object_t *obj)
fprintf(stderr, "}\n");
}
@@ -90,3 +94,6 @@ Index: util-linux-2.27.1/tests/helpers/test_uuidd.c
int main(int argc, char *argv[])
{
size_t i, nfailed = 0, nignored = 0;
+--
+2.8.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.27.1.bb b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.27.1.bb
deleted file mode 100644
index 754915831..000000000
--- a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.27.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-MAJOR_VERSION = "2.27"
-require util-linux.inc
-
-# To support older hosts, we need to patch and/or revert
-# some upstream changes. Only do this for native packages.
-OLDHOST = ""
-OLDHOST_class-native = "file://util-linux-native.patch \
- file://util-linux-native-qsort.patch \
- "
-
-SRC_URI += "file://util-linux-ng-2.16-mount_lock_path.patch \
- file://configure-sbindir.patch \
- file://runuser.pamd \
- file://runuser-l.pamd \
- ${OLDHOST} \
- file://ptest.patch \
- file://run-ptest \
- file://avoid_unsupported_sleep_param.patch \
- file://avoid_unsupported_grep_opts.patch \
- file://display_testname_for_subtest.patch \
- file://avoid_parallel_tests.patch \
- file://uuid-test-error-api.patch \
-"
-SRC_URI[md5sum] = "3cd2698d1363a2c64091c2dadc974647"
-SRC_URI[sha256sum] = "0a818fcdede99aec43ffe6ca5b5388bff80d162f2f7bd4541dca94fecb87a290"
-
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
-
-EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
- --disable-fallocate \
- --disable-use-tty-group \
-"
-EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
- --disable-fallocate \
- --disable-use-tty-group \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.28.1.bb b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.28.1.bb
new file mode 100644
index 000000000..f232cb9f3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/util-linux/util-linux_2.28.1.bb
@@ -0,0 +1,31 @@
+MAJOR_VERSION = "2.28"
+require util-linux.inc
+
+# To support older hosts, we need to patch and/or revert
+# some upstream changes. Only do this for native packages.
+OLDHOST = ""
+OLDHOST_class-native = "file://util-linux-native-qsort.patch"
+
+SRC_URI += "file://configure-sbindir.patch \
+ file://runuser.pamd \
+ file://runuser-l.pamd \
+ ${OLDHOST} \
+ file://ptest.patch \
+ file://run-ptest \
+ file://display_testname_for_subtest.patch \
+ file://avoid_parallel_tests.patch \
+ file://uuid-test-error-api.patch \
+"
+SRC_URI[md5sum] = "e2d863efaf4fd330a42c5efe9f1b02b4"
+SRC_URI[sha256sum] = "3ece4ea4a34ef786b68f5c415e848390424232abd1ee00f7ee5bddc30657b60f"
+
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+
+EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
+ --disable-fallocate \
+ --disable-use-tty-group \
+"
+EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
+ --disable-fallocate \
+ --disable-use-tty-group \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
index 27cc9ff0b..9fa206efe 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native.inc
@@ -17,8 +17,8 @@ python do_install () {
}
python do_install_config () {
- indir = os.path.dirname(d.getVar('FILE',1))
- infile = file(oe.path.join(indir, 'files', 'apt.conf'), 'r')
+ indir = os.path.dirname(d.getVar('FILE', True))
+ infile = open(oe.path.join(indir, 'files', 'apt.conf'), 'r')
data = infile.read()
infile.close()
@@ -30,7 +30,7 @@ python do_install_config () {
outpath = oe.path.join(outdir, 'apt.conf.sample')
if not os.path.exists(outpath):
- outfile = file(outpath, 'w')
+ outfile = open(outpath, 'w')
outfile.write(data)
outfile.close()
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.0.10.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb
index 1e660da74..1e660da74 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.0.10.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt-native_1.2.12.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc
index 78ef5a7e1..302637084 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt.inc
@@ -2,7 +2,7 @@ SUMMARY = "Advanced front-end for dpkg"
LICENSE = "GPLv2.0+"
SECTION = "base"
-SRC_URI = "http://snapshot.debian.org/archive/debian/20150805T094928Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
file://use-host.patch \
file://makerace.patch \
file://no-nls-dpkg.patch \
@@ -12,16 +12,17 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20150805T094928Z/pool/main/
file://disable-configure-in-makefile.patch \
file://disable-test.patch \
file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
+ file://0001-apt-1.2.12-Fix-musl-build.patch \
"
-SRC_URI[md5sum] = "6505c4297b338adb2087ce87bbc4a276"
-SRC_URI[sha256sum] = "3fb1de9598363c416591d49e3c285458e095b035e6c06d5b944a54e15fc9b543"
+SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7"
+SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6"
LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
# the package is taken from snapshots.debian.org; that source is static and goes stale
# so we check the latest upstream from a directory that does get updated
UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/"
-inherit autotools gettext
+inherit autotools gettext useradd
EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
@@ -29,3 +30,6 @@ do_configure_prepend() {
rm -rf ${S}/buildlib/config.sub
rm -rf ${S}/buildlib/config.guess
}
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /nonexistent --shell /bin/false --user-group _apt"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
index d33069b73..b3a883bae 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
@@ -1,4 +1,4 @@
-From 106797f1c66fa578dad21fd9380bf9d576573dfd Mon Sep 17 00:00:00 2001
+From dfc1370d50322e2e9d225a7a63b44993fc01a727 Mon Sep 17 00:00:00 2001
From: Roy Li <rongqing.li@windriver.com>
Date: Fri, 22 May 2015 08:05:15 +0800
Subject: [PATCH] Revert "always run 'dpkg --configure -a' at the end of our
@@ -16,21 +16,16 @@ be passed into dpkg, and lead to the below similar error:
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
- apt-pkg/deb/dpkgpm.cc | 9 +--
- test/integration/framework | 25 ++++----
- test/integration/test-apt-progress-fd | 67 +++++++++----------
- test/integration/test-apt-progress-fd-deb822 | 18 ++----
- test/integration/test-apt-progress-fd-error | 2 +-
- ...est-bug-769609-triggers-still-pending-after-run | 75 ----------------------
- .../test-no-fds-leaked-to-maintainer-scripts | 6 +-
- 7 files changed, 56 insertions(+), 146 deletions(-)
- delete mode 100755 test/integration/test-bug-769609-triggers-still-pending-after-run
+ apt-pkg/deb/dpkgpm.cc | 9 ++-------
+ test/integration/test-apt-progress-fd-deb822 | 14 +++++++-------
+ test/integration/test-no-fds-leaked-to-maintainer-scripts | 6 ++----
+ 3 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
-index b187efb..f269764 100644
+index 834cb0e..84ded3a 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
-@@ -1049,12 +1049,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
+@@ -1037,12 +1037,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
PackagesTotal++;
}
}
@@ -42,8 +37,8 @@ index b187efb..f269764 100644
- ++PackagesTotal;
}
/*}}}*/
- #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13)
-@@ -1294,8 +1288,9 @@ bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress)
+ bool pkgDPkgPM::Go(int StatusFd)
+@@ -1250,8 +1244,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
// support subpressing of triggers processing for special
// cases like d-i that runs the triggers handling manually
@@ -54,159 +49,11 @@ index b187efb..f269764 100644
List.push_back(Item(Item::ConfigurePending, PkgIterator()));
// for the progress
-diff --git a/test/integration/framework b/test/integration/framework
-index 70ad381..00672ad 100644
---- a/test/integration/framework
-+++ b/test/integration/framework
-@@ -1178,13 +1178,10 @@ testnopackage() {
- fi
- }
-
--testdpkgstatus() {
-- local STATE="$1"
-- local NR="$2"
-- shift 2
-- msgtest "Test that $NR package(s) are in state $STATE with" "dpkg -l $*"
-- local PKGS="$(dpkg -l "$@" 2>/dev/null | grep "^${STATE}" | wc -l)"
-- if [ "$PKGS" != $NR ]; then
-+testdpkginstalled() {
-+ msgtest "Test for correctly installed package(s) with" "dpkg -l $*"
-+ local PKGS="$(dpkg -l "$@" 2>/dev/null | grep '^i' | wc -l)"
-+ if [ "$PKGS" != $# ]; then
- echo >&2 $PKGS
- dpkg -l "$@" | grep '^[a-z]' >&2
- msgfail
-@@ -1193,12 +1190,16 @@ testdpkgstatus() {
- fi
- }
-
--testdpkginstalled() {
-- testdpkgstatus 'ii' "$#" "$@"
--}
--
- testdpkgnotinstalled() {
-- testdpkgstatus 'ii' '0' "$@"
-+ msgtest "Test for correctly not-installed package(s) with" "dpkg -l $*"
-+ local PKGS="$(dpkg -l "$@" 2> /dev/null | grep '^i' | wc -l)"
-+ if [ "$PKGS" != 0 ]; then
-+ echo
-+ dpkg -l "$@" | grep '^[a-z]' >&2
-+ msgfail
-+ else
-+ msgpass
-+ fi
- }
-
- testmarkedauto() {
-diff --git a/test/integration/test-apt-progress-fd b/test/integration/test-apt-progress-fd
-index 68cc043..d72e7e7 100755
---- a/test/integration/test-apt-progress-fd
-+++ b/test/integration/test-apt-progress-fd
-@@ -19,14 +19,13 @@ testequal "dlstatus:1:0:Retrieving file 1 of 1
- dlstatus:1:0:Retrieving file 1 of 1
- pmstatus:dpkg-exec:0:Running dpkg
- pmstatus:testing:0:Installing testing (amd64)
--pmstatus:testing:16.6667:Preparing testing (amd64)
--pmstatus:testing:33.3333:Unpacking testing (amd64)
--pmstatus:testing:50:Preparing to configure testing (amd64)
--pmstatus:dpkg-exec:50:Running dpkg
--pmstatus:testing:50:Configuring testing (amd64)
--pmstatus:testing:66.6667:Configuring testing (amd64)
--pmstatus:testing:83.3333:Installed testing (amd64)
--pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log
-+pmstatus:testing:20:Preparing testing (amd64)
-+pmstatus:testing:40:Unpacking testing (amd64)
-+pmstatus:testing:60:Preparing to configure testing (amd64)
-+pmstatus:dpkg-exec:60:Running dpkg
-+pmstatus:testing:60:Configuring testing (amd64)
-+pmstatus:testing:80:Configuring testing (amd64)
-+pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log
-
- # upgrade
- exec 3> apt-progress.log
-@@ -35,14 +34,13 @@ testequal "dlstatus:1:0:Retrieving file 1 of 1
- dlstatus:1:0:Retrieving file 1 of 1
- pmstatus:dpkg-exec:0:Running dpkg
- pmstatus:testing:0:Installing testing (amd64)
--pmstatus:testing:16.6667:Preparing testing (amd64)
--pmstatus:testing:33.3333:Unpacking testing (amd64)
--pmstatus:testing:50:Preparing to configure testing (amd64)
--pmstatus:dpkg-exec:50:Running dpkg
--pmstatus:testing:50:Configuring testing (amd64)
--pmstatus:testing:66.6667:Configuring testing (amd64)
--pmstatus:testing:83.3333:Installed testing (amd64)
--pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log
-+pmstatus:testing:20:Preparing testing (amd64)
-+pmstatus:testing:40:Unpacking testing (amd64)
-+pmstatus:testing:60:Preparing to configure testing (amd64)
-+pmstatus:dpkg-exec:60:Running dpkg
-+pmstatus:testing:60:Configuring testing (amd64)
-+pmstatus:testing:80:Configuring testing (amd64)
-+pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log
-
- # reinstall
- exec 3> apt-progress.log
-@@ -51,24 +49,22 @@ testequal "dlstatus:1:0:Retrieving file 1 of 1
- dlstatus:1:0:Retrieving file 1 of 1
- pmstatus:dpkg-exec:0:Running dpkg
- pmstatus:testing:0:Installing testing (amd64)
--pmstatus:testing:16.6667:Preparing testing (amd64)
--pmstatus:testing:33.3333:Unpacking testing (amd64)
--pmstatus:testing:50:Preparing to configure testing (amd64)
--pmstatus:dpkg-exec:50:Running dpkg
--pmstatus:testing:50:Configuring testing (amd64)
--pmstatus:testing:66.6667:Configuring testing (amd64)
--pmstatus:testing:83.3333:Installed testing (amd64)
--pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log
-+pmstatus:testing:20:Preparing testing (amd64)
-+pmstatus:testing:40:Unpacking testing (amd64)
-+pmstatus:testing:60:Preparing to configure testing (amd64)
-+pmstatus:dpkg-exec:60:Running dpkg
-+pmstatus:testing:60:Configuring testing (amd64)
-+pmstatus:testing:80:Configuring testing (amd64)
-+pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log
-
- # and remove
- exec 3> apt-progress.log
- testsuccess aptget remove testing -y -o APT::Status-Fd=3
- testequal "pmstatus:dpkg-exec:0:Running dpkg
- pmstatus:testing:0:Removing testing (amd64)
--pmstatus:testing:25:Preparing for removal of testing (amd64)
--pmstatus:testing:50:Removing testing (amd64)
--pmstatus:testing:75:Removed testing (amd64)
--pmstatus:dpkg-exec:75:Running dpkg" cat apt-progress.log
-+pmstatus:testing:33.3333:Preparing for removal of testing (amd64)
-+pmstatus:testing:66.6667:Removing testing (amd64)
-+pmstatus:testing:100:Removed testing (amd64)" cat apt-progress.log
-
- # install non-native and ensure we get proper progress info
- exec 3> apt-progress.log
-@@ -79,13 +75,12 @@ testequal "dlstatus:1:0:Retrieving file 1 of 1
- dlstatus:1:0:Retrieving file 1 of 1
- pmstatus:dpkg-exec:0:Running dpkg
- pmstatus:testing2:0:Installing testing2 (i386)
--pmstatus:testing2:16.6667:Preparing testing2 (i386)
--pmstatus:testing2:33.3333:Unpacking testing2 (i386)
--pmstatus:testing2:50:Preparing to configure testing2 (i386)
--pmstatus:dpkg-exec:50:Running dpkg
--pmstatus:testing2:50:Configuring testing2 (i386)
--pmstatus:testing2:66.6667:Configuring testing2 (i386)
--pmstatus:testing2:83.3333:Installed testing2 (i386)
--pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log
-+pmstatus:testing2:20:Preparing testing2 (i386)
-+pmstatus:testing2:40:Unpacking testing2 (i386)
-+pmstatus:testing2:60:Preparing to configure testing2 (i386)
-+pmstatus:dpkg-exec:60:Running dpkg
-+pmstatus:testing2:60:Configuring testing2 (i386)
-+pmstatus:testing2:80:Configuring testing2 (i386)
-+pmstatus:testing2:100:Installed testing2 (i386)" cat apt-progress.log
-
- rm -f apt-progress*.log
diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822
-index badc985..9d22794 100755
+index 58fd732..3359762 100755
--- a/test/integration/test-apt-progress-fd-deb822
+++ b/test/integration/test-apt-progress-fd-deb822
-@@ -27,41 +27,37 @@ Message: Installing testing (amd64)
+@@ -27,36 +27,36 @@ Message: Installing testing (amd64)
Status: progress
Package: testing:amd64
@@ -248,109 +95,10 @@ index badc985..9d22794 100755
-Percent: 83.3333
+Percent: 100
Message: Installed testing (amd64)
--
--Status: progress
--Percent: 83.3333
--Message: Running dpkg
- " cat apt-progress.log
-
-diff --git a/test/integration/test-apt-progress-fd-error b/test/integration/test-apt-progress-fd-error
-index 6323007..a47095b 100755
---- a/test/integration/test-apt-progress-fd-error
-+++ b/test/integration/test-apt-progress-fd-error
-@@ -18,7 +18,7 @@ setupaptarchive
- exec 3> apt-progress.log
- testfailure aptget install foo1 foo2 -y -o APT::Status-Fd=3
- msgtest "Ensure correct error message"
--if grep -q "aptarchive/pool/foo2_0.8.15_amd64.deb:36.3636:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log; then
-+if grep -q "aptarchive/pool/foo2_0.8.15_amd64.deb:40:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log; then
- msgpass
- else
- cat apt-progress.log
-diff --git a/test/integration/test-bug-769609-triggers-still-pending-after-run b/test/integration/test-bug-769609-triggers-still-pending-after-run
-deleted file mode 100755
-index 146fa76..0000000
---- a/test/integration/test-bug-769609-triggers-still-pending-after-run
-+++ /dev/null
-@@ -1,75 +0,0 @@
--#!/bin/sh
--set -e
--
--TESTDIR=$(readlink -f $(dirname $0))
--. $TESTDIR/framework
--
--setupenvironment
--configarchitecture 'amd64'
--
--msgtest 'Check if installed dpkg supports' 'noawait trigger'
--if dpkg-checkbuilddeps -d 'dpkg (>= 1.16.1)' /dev/null; then
-- msgpass
--else
-- msgskip 'dpkg version too old'
-- exit 0
--fi
--configdpkgnoopchroot
--
--buildtriggerpackages() {
-- local TYPE="$1"
-- setupsimplenativepackage "triggerable-$TYPE" 'all' '1.0' 'unstable' "Depends: trigdepends-$TYPE"
-- BUILDDIR="incoming/triggerable-${TYPE}-1.0"
-- cat >${BUILDDIR}/debian/postinst <<EOF
--#!/bin/sh
--if [ "\$1" = 'triggered' ]; then
-- ls -l /proc/self/fd/
--fi
--EOF
-- echo "$TYPE /usr/share/doc" > ${BUILDDIR}/debian/triggers
-- buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
-- rm -rf "$BUILDDIR"
-- buildsimplenativepackage "trigdepends-$TYPE" 'all' '1.0' 'unstable'
--}
--
--#buildtriggerpackages 'interest'
--buildtriggerpackages 'interest-noawait'
--buildsimplenativepackage "trigstuff" 'all' '1.0' 'unstable'
--
--setupaptarchive
--
--runtests() {
-- local TYPE="$1"
-- msgmsg 'Working with trigger type' "$TYPE"
-- testsuccess aptget install triggerable-$TYPE -y
-- cp rootdir/tmp/testsuccess.output terminal.output
-- testsuccess grep '^REWRITE ' terminal.output
-- testdpkginstalled triggerable-$TYPE trigdepends-$TYPE
--
-- testsuccess aptget install trigdepends-$TYPE -y --reinstall
-- cp rootdir/tmp/testsuccess.output terminal.output
-- testsuccess grep '^REWRITE ' terminal.output
-- testsuccess grep ' root root ' terminal.output
-- testdpkginstalled triggerable-$TYPE trigdepends-$TYPE
--
-- testsuccess aptget install trigstuff -y
-- cp rootdir/tmp/testsuccess.output terminal.output
-- testsuccess grep '^REWRITE ' terminal.output
-- testsuccess grep ' root root ' terminal.output
-- testdpkginstalled triggerable-$TYPE trigdepends-$TYPE trigstuff
--
-- testsuccess aptget purge trigstuff -y
-- cp rootdir/tmp/testsuccess.output terminal.output
-- testsuccess grep '^REWRITE ' terminal.output
-- testsuccess grep ' root root ' terminal.output
-- testdpkginstalled triggerable-$TYPE trigdepends-$TYPE
-- testdpkgnotinstalled trigstuff
--
-- testsuccess aptget purge trigdepends-$TYPE -y
-- cp rootdir/tmp/testsuccess.output terminal.output
-- testfailure grep '^REWRITE ' terminal.output
-- testfailure grep ' root root ' terminal.output
-- testdpkgnotinstalled triggerable-$TYPE trigdepends-$TYPE
--}
--#runtests 'interest'
--runtests 'interest-noawait'
+ Status: progress
diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts
-index 41c0570..d3960d7 100755
+index d86e638..ef6d23b 100755
--- a/test/integration/test-no-fds-leaked-to-maintainer-scripts
+++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts
@@ -59,8 +59,7 @@ startup packages configure
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
new file mode 100644
index 000000000..04b040658
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
@@ -0,0 +1,50 @@
+From 33b97e089d4a98d3acd20bd78337dd915b989bc2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Fri, 5 Aug 2016 15:24:27 -0500
+Subject: [PATCH] apt 1.2.12: Fix musl build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+methods/connect.cc: Musl doesn't support AI_IDN flag in netdb.h
+header so define it manually.
+apt-pkg/contrib/srvrec.h: Add explicity include of sys/types.h
+to avoid errors in types u_int_SIZE.
+
+Upstream-status: Pending
+
+Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
+---
+ apt-pkg/contrib/srvrec.h | 1 +
+ methods/connect.cc | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h
+index 01b8102..15b6875 100644
+--- a/apt-pkg/contrib/srvrec.h
++++ b/apt-pkg/contrib/srvrec.h
+@@ -9,6 +9,7 @@
+ #ifndef SRVREC_H
+ #define SRVREC_H
+
++#include <sys/types.h>
+ #include <arpa/nameser.h>
+ #include <vector>
+ #include <string>
+diff --git a/methods/connect.cc b/methods/connect.cc
+index 07a730b..bb0ab5a 100644
+--- a/methods/connect.cc
++++ b/methods/connect.cc
+@@ -33,6 +33,9 @@
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <netdb.h>
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
+
+ #include "connect.h"
+ #include "rfc2553emu.h"
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch
index beea56d2a..3ac92462c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch
@@ -1,4 +1,4 @@
-From 15c6ef6a827d3681ad06e862d27ab3dfb84cb687 Mon Sep 17 00:00:00 2001
+From 53c5d0982f03fd0e24c4195d6e1e42b9ade9d500 Mon Sep 17 00:00:00 2001
From: Roy Li <rongqing.li@windriver.com>
Date: Wed, 27 May 2015 14:30:28 +0800
Subject: [PATCH] fix the gcc version check
@@ -9,37 +9,29 @@ Upstream-Status: pending
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
- apt-pkg/cacheset.h | 4 ++--
- apt-pkg/deb/debsrcrecords.cc | 12 ++++++------
- apt-pkg/srcrecords.cc | 4 ++--
- apt-pkg/srcrecords.h | 4 ++--
- apt-pkg/vendorlist.cc | 4 ++--
- 5 files changed, 14 insertions(+), 14 deletions(-)
+ apt-pkg/contrib/macros.h | 2 +-
+ apt-pkg/deb/debsrcrecords.cc | 4 ++--
+ apt-pkg/srcrecords.cc | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
-diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
-index b7229bc..8cc2917 100644
---- a/apt-pkg/cacheset.h
-+++ b/apt-pkg/cacheset.h
-@@ -119,12 +119,12 @@ public:
- inline std::string FullName(bool const Pretty) const { return getPkg().FullName(Pretty); }
- inline std::string FullName() const { return getPkg().FullName(); }
- APT_DEPRECATED inline const char *Section() const {
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
+index 2727fd8..0ecae50 100644
+--- a/apt-pkg/contrib/macros.h
++++ b/apt-pkg/contrib/macros.h
+@@ -136,7 +136,7 @@
#endif
- return getPkg().Section();
+ #endif
+
-#if __GNUC__ >= 4
+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic pop
- #endif
- }
+ #define APT_IGNORE_DEPRECATED_PUSH \
+ _Pragma("GCC diagnostic push") \
+ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
-index 49a348d..4bc9dcf 100644
+index e8295de..40160b2 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
-@@ -126,13 +126,13 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F)
+@@ -139,13 +139,13 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F)
for (std::vector<pkgSrcRecords::File2>::const_iterator f2 = F2.begin(); f2 != F2.end(); ++f2)
{
pkgSrcRecords::File2 f;
@@ -55,46 +47,11 @@ index 49a348d..4bc9dcf 100644
#pragma GCC diagnostic pop
#endif
f.Path = f2->Path;
-@@ -190,14 +190,14 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
- // we have it already, store the new hash and be done
- if (file != List.end())
- {
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- // set for compatibility only, so warn users not us
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- #endif
- if (checksumField == "Files")
- file->MD5Hash = hash;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic pop
- #endif
- // an error here indicates that we have two different hashes for the same file
-@@ -212,7 +212,7 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
- F.FileSize = strtoull(size.c_str(), NULL, 10);
- F.Hashes.push_back(hashString);
-
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- // set for compatibility only, so warn users not us
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-@@ -220,7 +220,7 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
- F.Size = F.FileSize;
- if (checksumField == "Files")
- F.MD5Hash = hash;
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic pop
- #endif
-
diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc
-index 3175ee7..340e796 100644
+index 53d7e60..1484828 100644
--- a/apt-pkg/srcrecords.cc
+++ b/apt-pkg/srcrecords.cc
-@@ -160,7 +160,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
+@@ -157,7 +157,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
for (std::vector<pkgSrcRecords::File>::const_iterator f = F.begin(); f != F.end(); ++f)
{
pkgSrcRecords::File2 f2;
@@ -103,7 +60,7 @@ index 3175ee7..340e796 100644
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
-@@ -168,7 +168,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
+@@ -165,7 +165,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
f2.Size = f->Size;
f2.Hashes.push_back(HashString("MD5Sum", f->MD5Hash));
f2.FileSize = f->Size;
@@ -112,49 +69,6 @@ index 3175ee7..340e796 100644
#pragma GCC diagnostic pop
#endif
f2.Path = f->Path;
-diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h
-index dde22bd..91f8061 100644
---- a/apt-pkg/srcrecords.h
-+++ b/apt-pkg/srcrecords.h
-@@ -30,7 +30,7 @@ class pkgSrcRecords
- {
- public:
-
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- // ensure that con- & de-structor don't trigger this warning
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-@@ -48,7 +48,7 @@ class pkgSrcRecords
- unsigned long long FileSize;
- HashStringList Hashes;
- };
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic pop
- #endif
-
-diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc
-index fb33ff1..ba1d3c3 100644
---- a/apt-pkg/vendorlist.cc
-+++ b/apt-pkg/vendorlist.cc
-@@ -11,7 +11,7 @@
-
- #include <apti18n.h>
-
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- #endif
-@@ -163,6 +163,6 @@ const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput) /*
- }
- /*}}}*/
-
--#if __GNUC__ >= 4
-+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
- #pragma GCC diagnostic pop
- #endif
--
-1.9.1
+2.1.4
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch
index 7c42ff07b..47870e3c8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch
@@ -1,4 +1,4 @@
-From 2bff7ee06a4f96e7d326991d61fb86f8aa651d48 Mon Sep 17 00:00:00 2001
+From 9fdf50d63df08ee65e7d8e62c35f19ac4841bca9 Mon Sep 17 00:00:00 2001
From: Roy Li <rongqing.li@windriver.com>
Date: Wed, 27 May 2015 09:48:45 +0800
Subject: [PATCH] remove Wsuggest-attribute from CXXFLAGS
@@ -15,29 +15,29 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
2 files changed, 2 deletions(-)
diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in
-index b0a8d9d..91ed011 100644
+index 9620722..c344d01 100644
--- a/buildlib/environment.mak.in
+++ b/buildlib/environment.mak.in
-@@ -11,7 +11,6 @@ CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT -D_FORTIFY_SOURCE=2
- CXX = @CXX@
- CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra
+@@ -14,7 +14,6 @@ CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra
CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations
--CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
+ CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef
+ # suggests methods which already have such an attribute
+-#CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
+ # sanitize options to be enabled for testing
+ #CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr
# a bit too pedantic to be run by default
- #CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros
- NUM_PROCS = @NUM_PROCS@
diff --git a/test/libapt/makefile b/test/libapt/makefile
-index 7f23ace..e805f13 100644
+index 5ff9cf6..c5b5190 100644
--- a/test/libapt/makefile
+++ b/test/libapt/makefile
-@@ -39,7 +39,6 @@ CXXFLAGS += -pthread
+@@ -40,7 +40,6 @@ CXXFLAGS += -pthread
# disable some flags for gtest again
CXXFLAGS+= -Wno-missing-declarations
CXXFLAGS+= -Wno-missing-field-initializers
-CXXFLAGS+= -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wno-suggest-attribute=noreturn
+ CXXFLAGS+= -Wno-undef
# All Google Test headers. Usually you shouldn't change this definition.
- GTEST_HEADERS = /usr/include/gtest/*.h \
--
-1.9.1
+2.1.4
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
index 676795dc8..053267174 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt/disable-test.patch
@@ -1,35 +1,51 @@
-[PATCH] disable test
+From 67bc7948e0a721c75d636931abc105da5dcb0763 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Thu, 26 May 2016 15:32:11 -0500
+Subject: [PATCH] [PATCH] disable test
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
Upstream-Status: Inappropriate [configuration]
test needs gtest package, so not build the test dir
Signed-off-by: Roy Li <rongqing.li@windriver.com>
+Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
---
- Makefile | 7 +++----
- configure.ac | 6 ------
- 2 files changed, 3 insertions(+), 10 deletions(-)
+ Makefile | 9 +++------
+ configure.ac | 7 -------
+ 2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
-index 5f5fb27..5070e96 100644
+index 7680f08..69527a5 100644
--- a/Makefile
+++ b/Makefile
@@ -9,8 +9,8 @@ endif
.PHONY: default
default: startup all
--.PHONY: headers library clean veryclean all binary program doc test update-po
+-.PHONY: fast headers library clean veryclean all binary program doc test update-po
-all headers library clean veryclean binary program doc manpages docbook test update-po startup dirs:
-+.PHONY: headers library clean veryclean all binary program doc update-po
++.PHONY: fast headers library clean veryclean all binary program doc update-po
+all headers library clean veryclean binary program doc manpages docbook update-po startup dirs:
$(MAKE) -C vendor $@
$(MAKE) -C apt-pkg $@
$(MAKE) -C apt-inst $@
-@@ -21,9 +21,8 @@ all headers library clean veryclean binary program doc manpages docbook test upd
+@@ -21,8 +21,6 @@ all headers library clean veryclean binary program doc manpages docbook test upd
$(MAKE) -C dselect $@
- # $(MAKE) -C doc $@
+ $(MAKE) -C doc $@
$(MAKE) -C po $@
-- $(MAKE) -C test $@
+- # FIXME: -C test has issue swith parallel builds, investigate!
+- -$(MAKE) -C test $@
+
+ fast:
+ $(MAKE) -C vendor all
+@@ -32,9 +30,8 @@ fast:
+ $(MAKE) -C methods all
+ $(MAKE) -C cmdline all
+ $(MAKE) -C ftparchive all
+- $(MAKE) -C test all
-all headers library clean veryclean binary program doc manpages docbook test update-po: startup dirs
+all headers library clean veryclean binary program doc manpages docbook update-po: startup dirs
@@ -37,22 +53,23 @@ index 5f5fb27..5070e96 100644
dirs: startup
diff --git a/configure.ac b/configure.ac
-index 5663aaf..b0f9564 100644
+index 1f05da5..e47f459 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -89,12 +89,6 @@ AC_CHECK_LIB(curl, curl_easy_init,
+@@ -90,13 +90,6 @@ AC_CHECK_LIB(curl, curl_easy_init,
AC_MSG_ERROR([failed: I need CURL due https support]),
)
-AC_LANG_PUSH([C++])
-AC_CHECK_HEADER(gtest/gtest.h,,
-- AC_MSG_ERROR([failed: I need gtest to build tests]),
+- AC_MSG_WARN([failed: I need gtest (packaged as libgtest-dev) for unit testing]),
-)
-AC_LANG_POP([C++])
-
-
+-
AC_SUBST(BDBLIB)
+ HAVE_ZLIB=no
--
-1.9.1
+2.1.4
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.0.10.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.0.10.1.bb
deleted file mode 100644
index 85c0d5615..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.0.10.1.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-DEPENDS = "curl db zlib"
-RDEPENDS_${PN} = "dpkg bash debianutils"
-require apt.inc
-
-require apt-package.inc
-
-PACKAGECONFIG ??= "lzma"
-PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz"
-PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2"
-
-FILES_${PN} += "${bindir}/apt-key"
-apt-manpages += "doc/apt-key.8"
-
-do_install_append() {
- #Write the correct apt-architecture to apt.conf
- APT_CONF=${D}/etc/apt/apt.conf
- echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF}
- oe_libinstall -so -C bin libapt-private ${D}${libdir}/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb
new file mode 100644
index 000000000..ae0bce933
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/apt_1.2.12.bb
@@ -0,0 +1,20 @@
+DEPENDS = "curl db zlib"
+RDEPENDS_${PN} = "dpkg bash debianutils"
+require apt.inc
+
+require apt-package.inc
+
+PACKAGECONFIG ??= "lzma"
+PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz"
+PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2"
+PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4"
+
+FILES_${PN} += "${bindir}/apt-key"
+apt-manpages += "doc/apt-key.8"
+
+do_install_append() {
+ #Write the correct apt-architecture to apt.conf
+ APT_CONF=${D}/etc/apt/apt.conf
+ echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF}
+ oe_libinstall -so -C bin libapt-private ${D}${libdir}/
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/apt/files/no-curl.patch b/import-layers/yocto-poky/meta/recipes-devtools/apt/files/no-curl.patch
index 30238faad..0838552b2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/apt/files/no-curl.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/apt/files/no-curl.patch
@@ -1,13 +1,23 @@
Upstream-Status: Inappropriate [configuration]
+From 5d61ac822fd9a3871cd5089389c210606232ecdc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Thu, 26 May 2016 15:34:45 -0500
+Subject: [PATCH] Upstream-Status: Inappropriate [configuration]
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
---
- configure.in | 6 ------
- methods/makefile | 7 -------
- 2 files changed, 13 deletions(-)
+ configure.ac | 7 -------
+ methods/makefile | 7 -------
+ 2 files changed, 14 deletions(-)
+diff --git a/configure.ac b/configure.ac
+index e47f459..cd24264 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -86,12 +86,6 @@ AC_CHECK_HEADER(db.h,
+@@ -83,13 +83,6 @@ AC_CHECK_HEADER(db.h,
LIBS="$saveLIBS"
@@ -17,9 +27,12 @@ Upstream-Status: Inappropriate [configuration]
- curl_ok=no)],
- AC_MSG_ERROR([failed: I need CURL due https support]),
-)
-
+-
AC_SUBST(BDBLIB)
+ HAVE_ZLIB=no
+diff --git a/methods/makefile b/methods/makefile
+index 3274e92..255086b 100644
--- a/methods/makefile
+++ b/methods/makefile
@@ -51,13 +51,6 @@ LIB_MAKES = apt-pkg/makefile
@@ -28,11 +41,14 @@ Upstream-Status: Inappropriate [configuration]
-# The https method
-PROGRAM=https
--SLIBS = -lapt-pkg -lcurl $(INTLLIBS)
+-SLIBS = -lapt-pkg -lcurl $(INTLLIBS) -lresolv
-LIB_MAKES = apt-pkg/makefile
-SOURCE = https.cc server.cc
-include $(PROGRAM_H)
-
# The ftp method
PROGRAM=ftp
- SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
+ SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) -lresolv
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf/autoreconf-include.patch b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf/autoreconf-include.patch
deleted file mode 100644
index 31326f0bc..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf/autoreconf-include.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Pending
-
-Index: autoconf-2.63/bin/autoreconf.in
-===================================================================
---- autoconf-2.63.orig/bin/autoreconf.in 2008-08-28 03:08:10.000000000 +0100
-+++ autoconf-2.63/bin/autoreconf.in 2008-12-31 17:38:40.000000000 +0000
-@@ -190,6 +190,7 @@
- $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
- $autoheader .= join (' --include=', '', map { shell_quote ($_) } @include);
- $autoheader .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include);
-+ $aclocal .= join (' -I ', '', map { shell_quote ($_) } @include);
-
- # --install and --symlink;
- if ($install)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb
index adb6ad7cc..aa1877a1f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb
@@ -5,8 +5,7 @@ PR = "r11"
LICENSE = "GPLv2 & GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504"
-SRC_URI += "file://autoreconf-include.patch \
- file://check-automake-cross-warning.patch \
+SRC_URI += "file://check-automake-cross-warning.patch \
file://autoreconf-exclude.patch \
file://autoreconf-gnuconfigize.patch \
file://config_site.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.10.bb b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.10.bb
new file mode 100644
index 000000000..274427c7e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.10.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Automated text and program generation tool"
+DESCRIPTION = "AutoGen is a tool designed to simplify the creation and\
+ maintenance of programs that contain large amounts of repetitious text.\
+ It is especially valuable in programs that have several blocks of text\
+ that must be kept synchronized."
+HOMEPAGE = "http://www.gnu.org/software/autogen/"
+SECTION = "devel"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
+ file://increase-timeout-limit.patch \
+ file://mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch \
+ file://fix-script-err-when-processing-libguile.patch \
+"
+
+SRC_URI[md5sum] = "2d1b5226e1929d0680011df631289571"
+SRC_URI[sha256sum] = "0b8681d9724c481d3b726b5a9e81d3d09dc7f307d1a801c76d0a30d8f843d20a"
+
+UPSTREAM_CHECK_URI = "http://ftp.gnu.org/gnu/autogen/"
+UPSTREAM_CHECK_REGEX = "rel(?P<pver>\d+(\.\d+)+)/"
+
+DEPENDS = "guile-native libtool-native libxml2-native"
+
+inherit autotools texinfo native pkgconfig
+
+# autogen-native links against libguile which may have been relocated with sstate
+# these environment variables ensure there isn't a relocation issue
+export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
+export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
+
+do_install_append () {
+ create_wrapper ${D}/${bindir}/autogen \
+ GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
+ GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.6.bb
deleted file mode 100644
index d77b8273e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.6.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Automated text and program generation tool"
-DESCRIPTION = "AutoGen is a tool designed to simplify the creation and\
- maintenance of programs that contain large amounts of repetitious text.\
- It is especially valuable in programs that have several blocks of text\
- that must be kept synchronized."
-HOMEPAGE = "http://www.gnu.org/software/autogen/"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
- file://increase-timeout-limit.patch \
- file://mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch \
- file://redirect-output-dir.patch \
-"
-
-SRC_URI[md5sum] = "fdee403e524c0af3ded6b3becb365671"
-SRC_URI[sha256sum] = "2fc7f12a5ecb3b1e8bd4364aa906b837cff01f80edb7d2fb38ed8b9dfbcd3271"
-
-UPSTREAM_CHECK_URI = "http://ftp.gnu.org/gnu/autogen/"
-UPSTREAM_CHECK_REGEX = "rel(?P<pver>\d+(\.\d+)+)/"
-
-DEPENDS = "guile-native libtool-native libxml2-native"
-
-inherit autotools texinfo native pkgconfig
-
-# autogen-native links against libguile which may have been relocated with sstate
-# these environment variables ensure there isn't a relocation issue
-export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
-export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
-
-do_install_append () {
- create_wrapper ${D}/${bindir}/autogen \
- GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
- GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch
new file mode 100644
index 000000000..694a3953e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/fix-script-err-when-processing-libguile.patch
@@ -0,0 +1,37 @@
+autogen-native: fix script err when processing libguile
+
+do_configure for autogen will fail if project directory path
+contains '-I' character, which is caused by the unsuitable sed
+script when processing libguile.
+
+Upstream-Status: Pending
+
+Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+
+diff --git a/config/ag_macros.m4 b/config/ag_macros.m4
+index 58186b6..58ed2ad 100644
+--- a/config/ag_macros.m4
++++ b/config/ag_macros.m4
+@@ -32,7 +32,7 @@ AC_DEFUN([INVOKE_AG_MACROS_LAST],[
+ GUILE_FLAGS
+ [ag_gv=`gdir=\`pkg-config --cflags-only-I \
+ guile-${GUILE_EFFECTIVE_VERSION} | \
+- sed 's/-I *//;s/ *-I.*/ /g'\`
++ sed 's/ *-I *\// \//g'\`
+ for d in $gdir
+ do test -f "$d/libguile/version.h" && gdir=$d && break
+ done
+diff --git a/config/misc.def b/config/misc.def
+index 490d361..6e183ef 100644
+--- a/config/misc.def
++++ b/config/misc.def
+@@ -342,7 +342,7 @@ do-always = <<- _END_ALWAYS_
+ GUILE_FLAGS
+ [ag_gv=`gdir=\`pkg-config --cflags-only-I \
+ guile-${GUILE_EFFECTIVE_VERSION} | \
+- sed 's/-I *//;s/ *-I.*/ /g'\`
++ sed 's/ *-I *\// \//g'\`
+ test -z "$gdir" && gdir=/usr/include
+ for d in $gdir
+ do test -f "$d/libguile/version.h" && gdir=$d && break
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/redirect-output-dir.patch b/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/redirect-output-dir.patch
deleted file mode 100644
index fc5a71b85..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/autogen/autogen/redirect-output-dir.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-[PATCH] redirect the dir of mklibsrc-log.tx
-
-Upstream-Status: Pending
-
-redirect mklibsrc-log.tx to builddir, not /tmp; otherwise mklibsrc-log.tx
-maybe unable to be written if other users is building autogen at the same time.
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- pkg/libopts/mklibsrc.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pkg/libopts/mklibsrc.sh b/pkg/libopts/mklibsrc.sh
-index 416b402..d612fbc 100644
---- a/pkg/libopts/mklibsrc.sh
-+++ b/pkg/libopts/mklibsrc.sh
-@@ -19,7 +19,7 @@
- ## with this program. If not, see <http://www.gnu.org/licenses/>.
-
- set -ex
--exec 2> /tmp/mklibsrc-log.tx
-+exec 2> $top_builddir/mklibsrc-log.tx
-
- top_builddir=`cd $top_builddir ; pwd`
- top_srcdir=`cd $top_srcdir ; pwd`
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/python-libdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/python-libdir.patch
index 47541bded..2a48b133e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/python-libdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/automake/automake/python-libdir.patch
@@ -1,3 +1,8 @@
+From 472a3d36c97ef7535f05d6c185edcbc22b0074c4 Mon Sep 17 00:00:00 2001
+From: Kumar Gala <galak@kernel.crashing.org>
+Date: Thu, 11 Aug 2011 01:26:33 -0500
+Subject: [PATCH 1/4] automake: Update for python.m4 to respect libdir
+
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
@@ -5,11 +10,17 @@ Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Updated for automake-1.12.6
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ m4/python.m4 | 27 +++++++--------------------
+ 1 file changed, 7 insertions(+), 20 deletions(-)
-diff -Nurd automake-1.12.6/m4/python.m4 automake-1.12.6/m4/python.m4
---- automake-1.12.6/m4/python.m4 2012-12-13 22:02:25.000000000 +0200
-+++ automake-1.12.6/m4/python.m4 2012-12-27 17:40:26.558164660 +0200
-@@ -91,12 +91,13 @@
+diff --git a/m4/python.m4 b/m4/python.m4
+index 5b2c695..ed19261 100644
+--- a/m4/python.m4
++++ b/m4/python.m4
+@@ -91,12 +91,13 @@ AC_DEFUN([AM_PATH_PYTHON],
[am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
@@ -25,17 +36,23 @@ diff -Nurd automake-1.12.6/m4/python.m4 automake-1.12.6/m4/python.m4
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
dnl At times (like when building shared libraries) you may want
-@@ -148,7 +149,8 @@
- else:
- from distutils import sysconfig
- sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
+@@ -141,14 +142,7 @@ except ImportError:
+ else
+ am_py_prefix=$prefix
+ fi
+- am_cv_python_pythondir=`$PYTHON -c "
+-$am_python_setup_sysconfig
+-if can_use_sysconfig:
+- sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
+-else:
+- from distutils import sysconfig
+- sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
-sys.stdout.write(sitedir)"`
-+sys.stdout.write(sitedir)" ||
-+ echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
++ am_cv_python_pythondir=`echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
case $am_cv_python_pythondir in
$am_py_prefix*)
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
-@@ -158,7 +160,7 @@
+@@ -158,7 +152,7 @@ sys.stdout.write(sitedir)"`
case $am_py_prefix in
/usr|/System*) ;;
*)
@@ -44,17 +61,23 @@ diff -Nurd automake-1.12.6/m4/python.m4 automake-1.12.6/m4/python.m4
;;
esac
;;
-@@ -190,7 +192,8 @@
- else:
- from distutils import sysconfig
- sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
+@@ -183,14 +177,7 @@ sys.stdout.write(sitedir)"`
+ else
+ am_py_exec_prefix=$exec_prefix
+ fi
+- am_cv_python_pyexecdir=`$PYTHON -c "
+-$am_python_setup_sysconfig
+-if can_use_sysconfig:
+- sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
+-else:
+- from distutils import sysconfig
+- sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
-sys.stdout.write(sitedir)"`
-+sys.stdout.write(sitedir)" ||
-+ echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
++ am_cv_python_pyexecdir=`echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
case $am_cv_python_pyexecdir in
$am_py_exec_prefix*)
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
-@@ -200,7 +203,7 @@
+@@ -200,7 +187,7 @@ sys.stdout.write(sitedir)"`
case $am_py_exec_prefix in
/usr|/System*) ;;
*)
@@ -63,3 +86,6 @@ diff -Nurd automake-1.12.6/m4/python.m4 automake-1.12.6/m4/python.m4
;;
esac
;;
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.26.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.26.inc
deleted file mode 100644
index 6d535fcaa..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.26.inc
+++ /dev/null
@@ -1,42 +0,0 @@
-LIC_FILES_CHKSUM="\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
- file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
- file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
- file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
- file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
- "
-
-def binutils_branch_version(d):
- pvsplit = d.getVar('PV', True).split('.')
- return pvsplit[0] + "_" + pvsplit[1]
-
-BINUPV = "${@binutils_branch_version(d)}"
-
-UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
-
-SRCREV = "71fa566a9cf2597b60a58c1d7c148bab637454a6"
-SRC_URI = "\
- git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
- file://0002-configure-widen-the-regexp-for-SH-architectures.patch \
- file://0003-Point-scripts-location-to-libdir.patch \
- file://0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
- file://0005-Explicitly-link-with-libm-on-uclibc.patch \
- file://0006-Use-libtool-2.4.patch \
- file://0007-Add-the-armv5e-architecture-to-binutils.patch \
- file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
- file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
- file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
- file://0011-Change-default-emulation-for-mips64-linux.patch \
- file://0012-Add-support-for-Netlogic-XLP.patch \
- file://0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch \
- file://0014-Correct-nios2-_gp-address-computation.patch \
-"
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
- rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.27.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.27.inc
new file mode 100644
index 000000000..af1420b24
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-2.27.inc
@@ -0,0 +1,44 @@
+LIC_FILES_CHKSUM="\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+ file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+ file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+ file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+ file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+ "
+
+def binutils_branch_version(d):
+ pvsplit = d.getVar('PV', True).split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+BINUPV = "${@binutils_branch_version(d)}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
+
+SRCREV = "5fe53ce37f9d9dd544ec8cc9e2863b68e1a61f4c"
+SRC_URI = "\
+ git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
+ file://0002-configure-widen-the-regexp-for-SH-architectures.patch \
+ file://0003-Point-scripts-location-to-libdir.patch \
+ file://0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
+ file://0005-Explicitly-link-with-libm-on-uclibc.patch \
+ file://0006-Use-libtool-2.4.patch \
+ file://0007-Add-the-armv5e-architecture-to-binutils.patch \
+ file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
+ file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
+ file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
+ file://0011-Change-default-emulation-for-mips64-linux.patch \
+ file://0012-Add-support-for-Netlogic-XLP.patch \
+ file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
+ file://0014-libtool-remove-rpath.patch \
+ file://0015-binutils-mips-gas-pic-relax-linkonce.diff \
+ file://0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch \
+"
+S = "${WORKDIR}/git"
+
+do_configure_prepend () {
+ rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.26.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.27.bb
index 5dbaa0301..5dbaa0301 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.26.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.27.bb
index fbd1f7d25..fbd1f7d25 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.26.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.27.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.26.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.26.bb
deleted file mode 100644
index 788106f9e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.26.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require binutils-cross_${PV}.bb
-
-inherit crosssdk
-
-PN = "binutils-crosssdk-${TARGET_ARCH}"
-
-PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
-
-SRC_URI += "file://0001-Generate-relocatable-SDKs.patch"
-
-do_configure_prepend () {
- sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.27.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.27.bb
new file mode 100644
index 000000000..62c03d724
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.27.bb
@@ -0,0 +1,13 @@
+require binutils-cross_${PV}.bb
+
+inherit crosssdk
+
+PN = "binutils-crosssdk-${SDK_SYS}"
+
+PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
+
+SRC_URI += "file://0001-Generate-relocatable-SDKs.patch"
+
+do_configure_prepend () {
+ sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils.inc b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils.inc
index 43e2aa232..75d190f80 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils.inc
@@ -57,7 +57,6 @@ USE_ALTERNATIVES_FOR = " \
strings \
strip \
"
-USE_ALTERNATIVES_FOR_remove_mips = "ld.gold dwp"
python do_package_prepend() {
make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or ""
@@ -72,6 +71,7 @@ B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
--disable-werror \
+ --enable-deterministic-archives \
--enable-plugins \
${LDGOLD} \
${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch
index 91f901761..cad704a72 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch
@@ -1,7 +1,7 @@
-From 3c75355342a8562ccb65b8bbbe81a0495fec5c57 Mon Sep 17 00:00:00 2001
+From 2dae6b137ce609fd008f2063034a4403d95484c5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:58:54 +0000
-Subject: [PATCH 01/14] Generate relocatable SDKs
+Subject: [PATCH 01/13] Generate relocatable SDKs
This patch will modify the ELF linker scripts so that the crosssdk
linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
@@ -18,7 +18,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index a84d233..d12c4e2 100755
+index eb262e7..1a3b8bc 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -43,7 +43,7 @@ index a84d233..d12c4e2 100755
LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index ec78c90..f9e7a31 100644
+index f0c6439..223c55f 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -136,8 +136,8 @@ if test -n "${COMMONPAGESIZE}"; then
@@ -58,5 +58,5 @@ index ec78c90..f9e7a31 100644
if test -z "$PLT"; then
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
index 4a202d047..8d7cf00d4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
@@ -1,7 +1,7 @@
-From b1ae604880562ed065f614a745d3f8922838bc5a Mon Sep 17 00:00:00 2001
+From e4cd40722f597dff39c7214fab1742dd5bcc67eb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:07:33 +0000
-Subject: [PATCH 02/14] configure: widen the regexp for SH architectures
+Subject: [PATCH 02/13] configure: widen the regexp for SH architectures
gprof needs to know about uclibc
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
-index 34b66f7..85414ab 100755
+index ad3dfb7..2a74a77 100755
--- a/configure
+++ b/configure
-@@ -3445,7 +3445,7 @@ case "${target}" in
+@@ -3444,7 +3444,7 @@ case "${target}" in
;;
s390-*-* | s390x-*-*)
;;
@@ -26,7 +26,7 @@ index 34b66f7..85414ab 100755
;;
sh64-*-* | sh5*-*-*)
;;
-@@ -3939,7 +3939,7 @@ case "${target}" in
+@@ -3946,7 +3946,7 @@ case "${target}" in
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
@@ -36,10 +36,10 @@ index 34b66f7..85414ab 100755
sh*-*-elf)
;;
diff --git a/gprof/configure b/gprof/configure
-index 693b927..d4db554 100755
+index bf3ecaa..626e1c7 100755
--- a/gprof/configure
+++ b/gprof/configure
-@@ -5869,6 +5869,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+@@ -5873,6 +5873,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -52,5 +52,5 @@ index 693b927..d4db554 100755
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch
index 2c70ecd93..acc198b3e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch
@@ -1,7 +1,7 @@
-From 01808e8ef8ee709c8218d962601c18a63a063a1f Mon Sep 17 00:00:00 2001
+From 93c49f6197bd59b2abbf04b3296bf10029b80f48 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:09:58 +0000
-Subject: [PATCH 03/14] Point scripts location to libdir
+Subject: [PATCH 03/13] Point scripts location to libdir
Upstream-Status: Inappropriate [debian patch]
@@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 0b3b049..3871c74 100644
+index 0598923..b478ba7 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -57,7 +57,7 @@ endif
@@ -25,10 +25,10 @@ index 0b3b049..3871c74 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/ld/Makefile.in b/ld/Makefile.in
-index ed98f87..530e4c9 100644
+index 7c78198..5eb67e0 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
-@@ -413,7 +413,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+@@ -451,7 +451,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
@@ -38,5 +38,5 @@ index ed98f87..530e4c9 100644
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
index 8f0a40210..28a17f386 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
@@ -1,7 +1,7 @@
-From c008c7f97c1cf487749c6c375820a1f3b3c6c53d Mon Sep 17 00:00:00 2001
+From 4ff83779de8621715c6c2a79cf7ed8d74ff2d7c5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:27:17 +0000
-Subject: [PATCH 04/14] Only generate an RPATH entry if LD_RUN_PATH is not
+Subject: [PATCH 04/13] Only generate an RPATH entry if LD_RUN_PATH is not
empty
for cases where -rpath isn't specified. debian (#151024)
@@ -15,10 +15,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 0405d4f..73c5447 100644
+index 47fa549..f4c640e 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
-@@ -1242,6 +1242,8 @@ fragment <<EOF
+@@ -1244,6 +1244,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -27,7 +27,7 @@ index 0405d4f..73c5447 100644
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
force))
break;
-@@ -1523,6 +1525,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1525,6 +1527,8 @@ gld${EMULATION_NAME}_before_allocation (void)
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
@@ -37,5 +37,5 @@ index 0405d4f..73c5447 100644
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch
index 92ead7fb4..331f78221 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch
@@ -1,7 +1,7 @@
-From 6a41635e29c4a6c064b1f66e79a8fe2026f4361b Mon Sep 17 00:00:00 2001
+From 18a7ae169e8d55ace683357d1de6b07e4fdf797a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:32:49 +0000
-Subject: [PATCH 05/14] Explicitly link with libm on uclibc
+Subject: [PATCH 05/13] Explicitly link with libm on uclibc
Description:
@@ -31,7 +31,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 6 insertions(+)
diff --git a/gas/configure.tgt b/gas/configure.tgt
-index 0b490d4..086e0d2 100644
+index e2df659..1b9fd99 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -487,6 +487,12 @@ case ${generic_target} in
@@ -48,5 +48,5 @@ index 0b490d4..086e0d2 100644
aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | sparc | z80 | z8k)
bfd_gas=yes
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
index e54ab1bc8..f0fdf46ae 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
@@ -1,7 +1,7 @@
-From da70f0876cdd8ed703d9ed1524212ccfefb09ef3 Mon Sep 17 00:00:00 2001
+From 71adcde3648db47f7fa155db12810591ffd3ae34 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 14 Feb 2016 17:04:07 +0000
-Subject: [PATCH 06/14] Use libtool 2.4
+Subject: [PATCH 06/13] Use libtool 2.4
get libtool sysroot support
@@ -9,28 +9,28 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
- bfd/configure | 1322 +++++++++++++++++------
+ bfd/configure | 1318 +++++++++++++++++------
bfd/configure.ac | 2 +-
- binutils/configure | 1320 +++++++++++++++++------
+ binutils/configure | 1316 +++++++++++++++++------
configure | 4 +-
- gas/configure | 1320 +++++++++++++++++------
- gprof/configure | 1325 +++++++++++++++++------
- ld/configure | 1695 +++++++++++++++++++++--------
+ gas/configure | 1314 +++++++++++++++++------
+ gprof/configure | 1321 +++++++++++++++++------
+ ld/configure | 1691 +++++++++++++++++++++--------
libtool.m4 | 1080 +++++++++++++------
ltmain.sh | 2925 +++++++++++++++++++++++++++++++++-----------------
ltoptions.m4 | 2 +-
ltversion.m4 | 12 +-
lt~obsolete.m4 | 2 +-
- opcodes/configure | 1322 +++++++++++++++++------
+ opcodes/configure | 1318 +++++++++++++++++------
opcodes/configure.ac | 2 +-
zlib/configure | 1320 +++++++++++++++++------
- 15 files changed, 9944 insertions(+), 3709 deletions(-)
+ 15 files changed, 9930 insertions(+), 3697 deletions(-)
diff --git a/bfd/configure b/bfd/configure
-index 7411c6d..eae743e 100755
+index a437569..575a257 100755
--- a/bfd/configure
+++ b/bfd/configure
-@@ -670,6 +670,9 @@ OTOOL
+@@ -671,6 +671,9 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -40,7 +40,7 @@ index 7411c6d..eae743e 100755
OBJDUMP
LN_S
NM
-@@ -782,6 +785,7 @@ enable_static
+@@ -784,6 +787,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -48,7 +48,7 @@ index 7411c6d..eae743e 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1458,6 +1462,8 @@ Optional Packages:
+@@ -1460,6 +1464,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -57,7 +57,7 @@ index 7411c6d..eae743e 100755
--with-mmap try using mmap for BFD input files if available
--with-separate-debug-dir=DIR
Look for global separate debug info in DIR
-@@ -5388,8 +5394,8 @@ esac
+@@ -5392,8 +5398,8 @@ esac
@@ -68,7 +68,7 @@ index 7411c6d..eae743e 100755
-@@ -5429,7 +5435,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5433,7 +5439,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -77,7 +77,7 @@ index 7411c6d..eae743e 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6115,8 +6121,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6119,8 +6125,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -88,7 +88,7 @@ index 7411c6d..eae743e 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -6165,6 +6171,80 @@ esac
+@@ -6169,6 +6175,80 @@ esac
@@ -169,7 +169,7 @@ index 7411c6d..eae743e 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -6181,6 +6261,11 @@ case $reload_flag in
+@@ -6185,6 +6265,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -181,7 +181,7 @@ index 7411c6d..eae743e 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6349,7 +6434,8 @@ mingw* | pw32*)
+@@ -6353,7 +6438,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -191,7 +191,7 @@ index 7411c6d..eae743e 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6503,6 +6589,21 @@ esac
+@@ -6507,6 +6593,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -213,7 +213,7 @@ index 7411c6d..eae743e 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6518,9 +6619,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6522,9 +6623,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -378,7 +378,7 @@ index 7411c6d..eae743e 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6536,7 +6790,7 @@ do
+@@ -6540,7 +6794,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -387,7 +387,7 @@ index 7411c6d..eae743e 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6556,11 +6810,15 @@ $as_echo "no" >&6; }
+@@ -6560,11 +6814,15 @@ $as_echo "no" >&6; }
fi
@@ -406,7 +406,7 @@ index 7411c6d..eae743e 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6576,7 +6834,7 @@ do
+@@ -6580,7 +6838,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -415,7 +415,7 @@ index 7411c6d..eae743e 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6595,6 +6853,10 @@ else
+@@ -6599,6 +6857,10 @@ else
$as_echo "no" >&6; }
fi
@@ -426,7 +426,7 @@ index 7411c6d..eae743e 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6606,16 +6868,72 @@ ac_tool_warned=yes ;;
+@@ -6610,16 +6872,72 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -503,7 +503,7 @@ index 7411c6d..eae743e 100755
-@@ -6957,8 +7275,8 @@ esac
+@@ -6961,8 +7279,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -514,7 +514,7 @@ index 7411c6d..eae743e 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6994,6 +7312,7 @@ for ac_symprfx in "" "_"; do
+@@ -6998,6 +7316,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -522,7 +522,7 @@ index 7411c6d..eae743e 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -7035,6 +7354,18 @@ _LT_EOF
+@@ -7039,6 +7358,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -541,7 +541,7 @@ index 7411c6d..eae743e 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -7046,7 +7377,7 @@ _LT_EOF
+@@ -7050,7 +7381,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -550,7 +550,7 @@ index 7411c6d..eae743e 100755
const char *name;
void *address;
}
-@@ -7072,8 +7403,8 @@ static const void *lt_preloaded_setup() {
+@@ -7076,8 +7407,8 @@ static const void *lt_preloaded_setup() {
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -561,7 +561,7 @@ index 7411c6d..eae743e 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7083,8 +7414,8 @@ _LT_EOF
+@@ -7087,8 +7418,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -572,7 +572,7 @@ index 7411c6d..eae743e 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -7121,6 +7452,16 @@ else
+@@ -7125,6 +7456,16 @@ else
$as_echo "ok" >&6; }
fi
@@ -589,7 +589,7 @@ index 7411c6d..eae743e 100755
-@@ -7142,6 +7483,45 @@ fi
+@@ -7146,6 +7487,45 @@ fi
@@ -635,7 +635,7 @@ index 7411c6d..eae743e 100755
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
-@@ -7348,6 +7728,123 @@ esac
+@@ -7352,6 +7732,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -759,7 +759,7 @@ index 7411c6d..eae743e 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7911,6 +8408,8 @@ _LT_EOF
+@@ -7915,6 +8412,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -768,7 +768,7 @@ index 7411c6d..eae743e 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -8075,7 +8574,8 @@ fi
+@@ -8079,7 +8578,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -778,7 +778,7 @@ index 7411c6d..eae743e 100755
-@@ -8164,7 +8664,7 @@ aix3*)
+@@ -8168,7 +8668,7 @@ aix3*)
esac
# Global variables:
@@ -787,7 +787,7 @@ index 7411c6d..eae743e 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8462,8 +8962,6 @@ fi
+@@ -8466,8 +8966,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -796,7 +796,7 @@ index 7411c6d..eae743e 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8629,6 +9127,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8633,6 +9131,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -809,7 +809,7 @@ index 7411c6d..eae743e 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8691,7 +9195,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8695,7 +9199,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -818,7 +818,7 @@ index 7411c6d..eae743e 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8748,13 +9252,17 @@ case $host_os in
+@@ -8752,13 +9256,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -842,7 +842,7 @@ index 7411c6d..eae743e 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8815,6 +9323,11 @@ fi
+@@ -8819,6 +9327,11 @@ fi
@@ -854,7 +854,7 @@ index 7411c6d..eae743e 100755
#
# Check to make sure the static flag actually works.
#
-@@ -9165,7 +9678,8 @@ _LT_EOF
+@@ -9169,7 +9682,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -864,7 +864,7 @@ index 7411c6d..eae743e 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9264,12 +9778,12 @@ _LT_EOF
+@@ -9268,12 +9782,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -879,7 +879,7 @@ index 7411c6d..eae743e 100755
fi
;;
esac
-@@ -9283,8 +9797,8 @@ _LT_EOF
+@@ -9287,8 +9801,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -890,7 +890,7 @@ index 7411c6d..eae743e 100755
fi
;;
-@@ -9302,8 +9816,8 @@ _LT_EOF
+@@ -9306,8 +9820,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -901,7 +901,7 @@ index 7411c6d..eae743e 100755
else
ld_shlibs=no
fi
-@@ -9349,8 +9863,8 @@ _LT_EOF
+@@ -9353,8 +9867,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -912,7 +912,7 @@ index 7411c6d..eae743e 100755
else
ld_shlibs=no
fi
-@@ -9480,7 +9994,13 @@ _LT_EOF
+@@ -9484,7 +9998,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -927,7 +927,7 @@ index 7411c6d..eae743e 100755
/* end confdefs.h. */
int
-@@ -9493,22 +10013,29 @@ main ()
+@@ -9497,22 +10017,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -970,7 +970,7 @@ index 7411c6d..eae743e 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9520,7 +10047,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9524,7 +10051,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -985,7 +985,7 @@ index 7411c6d..eae743e 100755
/* end confdefs.h. */
int
-@@ -9533,22 +10066,29 @@ main ()
+@@ -9537,22 +10070,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -1028,7 +1028,7 @@ index 7411c6d..eae743e 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9593,20 +10133,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9597,20 +10137,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -1106,7 +1106,7 @@ index 7411c6d..eae743e 100755
;;
darwin* | rhapsody*)
-@@ -9667,7 +10250,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9671,7 +10254,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -1115,7 +1115,7 @@ index 7411c6d..eae743e 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9675,7 +10258,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9679,7 +10262,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux9*)
if test "$GCC" = yes; then
@@ -1124,7 +1124,7 @@ index 7411c6d..eae743e 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9691,7 +10274,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9695,7 +10278,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -1133,7 +1133,7 @@ index 7411c6d..eae743e 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9715,10 +10298,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9719,10 +10302,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -1146,7 +1146,7 @@ index 7411c6d..eae743e 100755
;;
esac
else
-@@ -9797,23 +10380,36 @@ fi
+@@ -9801,23 +10384,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -1191,7 +1191,7 @@ index 7411c6d..eae743e 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9898,7 +10494,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9902,7 +10498,7 @@ rm -f core conftest.err conftest.$ac_objext \
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -1200,7 +1200,7 @@ index 7411c6d..eae743e 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9917,9 +10513,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9921,9 +10517,9 @@ rm -f core conftest.err conftest.$ac_objext \
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -1212,7 +1212,7 @@ index 7411c6d..eae743e 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10495,8 +11091,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10499,8 +11095,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -1224,7 +1224,7 @@ index 7411c6d..eae743e 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10529,13 +11126,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10533,13 +11130,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -1297,7 +1297,7 @@ index 7411c6d..eae743e 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10627,7 +11282,7 @@ haiku*)
+@@ -10631,7 +11286,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -1306,16 +1306,7 @@ index 7411c6d..eae743e 100755
hardcode_into_libs=yes
;;
-@@ -11423,7 +12078,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11426 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11467,10 +12122,10 @@ else
+@@ -11471,10 +12126,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -1328,16 +1319,7 @@ index 7411c6d..eae743e 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11529,7 +12184,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11532 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11573,10 +12228,10 @@ else
+@@ -11577,10 +12232,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -1350,7 +1332,7 @@ index 7411c6d..eae743e 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15121,7 +15776,7 @@ SHARED_LDFLAGS=
+@@ -14078,7 +14733,7 @@ SHARED_LDFLAGS=
if test "$enable_shared" = "yes"; then
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
if test -n "$x"; then
@@ -1359,7 +1341,7 @@ index 7411c6d..eae743e 100755
fi
# More hacks to build DLLs on Windows.
-@@ -16746,13 +17401,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -16789,13 +17444,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -1380,7 +1362,7 @@ index 7411c6d..eae743e 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -16767,14 +17429,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -16810,14 +17472,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -1399,7 +1381,7 @@ index 7411c6d..eae743e 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -16807,12 +17472,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -16850,12 +17515,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -1413,7 +1395,7 @@ index 7411c6d..eae743e 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -16867,8 +17532,13 @@ reload_flag \
+@@ -16910,8 +17575,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -1427,7 +1409,7 @@ index 7411c6d..eae743e 100755
STRIP \
RANLIB \
CC \
-@@ -16878,12 +17548,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -16921,12 +17591,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -1443,7 +1425,7 @@ index 7411c6d..eae743e 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -16899,7 +17571,6 @@ no_undefined_flag \
+@@ -16942,7 +17614,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -1451,7 +1433,7 @@ index 7411c6d..eae743e 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -16935,6 +17606,7 @@ module_cmds \
+@@ -16978,6 +17649,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -1459,7 +1441,7 @@ index 7411c6d..eae743e 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -17714,7 +18386,8 @@ $as_echo X"$file" |
+@@ -17757,7 +18429,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -1469,7 +1451,7 @@ index 7411c6d..eae743e 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -17817,19 +18490,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -17860,19 +18533,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -1513,7 +1495,7 @@ index 7411c6d..eae743e 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -17859,6 +18555,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -17902,6 +18598,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -1526,7 +1508,7 @@ index 7411c6d..eae743e 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -17868,6 +18570,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -17911,6 +18613,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -1536,7 +1518,7 @@ index 7411c6d..eae743e 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -17982,12 +18687,12 @@ with_gcc=$GCC
+@@ -18025,12 +18730,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -1552,7 +1534,7 @@ index 7411c6d..eae743e 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -18074,9 +18779,6 @@ inherit_rpath=$inherit_rpath
+@@ -18117,9 +18822,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -1562,7 +1544,7 @@ index 7411c6d..eae743e 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -18092,6 +18794,9 @@ include_expsyms=$lt_include_expsyms
+@@ -18135,6 +18837,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -1572,7 +1554,7 @@ index 7411c6d..eae743e 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -18124,210 +18829,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -18167,210 +18872,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -1947,10 +1929,10 @@ index 7411c6d..eae743e 100755
chmod +x "$ofile"
diff --git a/bfd/configure.ac b/bfd/configure.ac
-index 6f5e85f..44bd02c 100644
+index 669cff7..5f57877 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
-@@ -567,7 +567,7 @@ changequote(,)dnl
+@@ -253,7 +253,7 @@ changequote(,)dnl
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
changequote([,])dnl
if test -n "$x"; then
@@ -1960,10 +1942,10 @@ index 6f5e85f..44bd02c 100644
# More hacks to build DLLs on Windows.
diff --git a/binutils/configure b/binutils/configure
-index d4f3e1e..a6df5bb 100755
+index 6cbf17c..6d20600 100755
--- a/binutils/configure
+++ b/binutils/configure
-@@ -657,8 +657,11 @@ OTOOL
+@@ -658,8 +658,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -1975,7 +1957,7 @@ index d4f3e1e..a6df5bb 100755
OBJDUMP
LN_S
NM
-@@ -769,6 +772,7 @@ enable_static
+@@ -771,6 +774,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -1983,7 +1965,7 @@ index d4f3e1e..a6df5bb 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1441,6 +1445,8 @@ Optional Packages:
+@@ -1443,6 +1447,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -1992,7 +1974,7 @@ index d4f3e1e..a6df5bb 100755
--with-system-zlib use installed libz
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
-@@ -5155,8 +5161,8 @@ esac
+@@ -5159,8 +5165,8 @@ esac
@@ -2003,7 +1985,7 @@ index d4f3e1e..a6df5bb 100755
-@@ -5196,7 +5202,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5200,7 +5206,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -2012,7 +1994,7 @@ index d4f3e1e..a6df5bb 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5882,8 +5888,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -5886,8 +5892,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -2023,7 +2005,7 @@ index d4f3e1e..a6df5bb 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -5932,6 +5938,80 @@ esac
+@@ -5936,6 +5942,80 @@ esac
@@ -2104,7 +2086,7 @@ index d4f3e1e..a6df5bb 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5948,6 +6028,11 @@ case $reload_flag in
+@@ -5952,6 +6032,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -2116,7 +2098,7 @@ index d4f3e1e..a6df5bb 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6116,7 +6201,8 @@ mingw* | pw32*)
+@@ -6120,7 +6205,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -2126,7 +2108,7 @@ index d4f3e1e..a6df5bb 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6270,6 +6356,21 @@ esac
+@@ -6274,6 +6360,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -2148,7 +2130,7 @@ index d4f3e1e..a6df5bb 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6285,9 +6386,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6289,9 +6390,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -2313,7 +2295,7 @@ index d4f3e1e..a6df5bb 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6303,7 +6557,7 @@ do
+@@ -6307,7 +6561,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -2322,7 +2304,7 @@ index d4f3e1e..a6df5bb 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6323,11 +6577,15 @@ $as_echo "no" >&6; }
+@@ -6327,11 +6581,15 @@ $as_echo "no" >&6; }
fi
@@ -2341,7 +2323,7 @@ index d4f3e1e..a6df5bb 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6343,7 +6601,7 @@ do
+@@ -6347,7 +6605,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -2350,7 +2332,7 @@ index d4f3e1e..a6df5bb 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6362,6 +6620,10 @@ else
+@@ -6366,6 +6624,10 @@ else
$as_echo "no" >&6; }
fi
@@ -2361,7 +2343,7 @@ index d4f3e1e..a6df5bb 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6373,12 +6635,10 @@ ac_tool_warned=yes ;;
+@@ -6377,12 +6639,10 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -2376,7 +2358,7 @@ index d4f3e1e..a6df5bb 100755
-@@ -6390,6 +6650,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6394,6 +6654,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -2441,7 +2423,7 @@ index d4f3e1e..a6df5bb 100755
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-@@ -6724,8 +7042,8 @@ esac
+@@ -6728,8 +7046,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -2452,7 +2434,7 @@ index d4f3e1e..a6df5bb 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6761,6 +7079,7 @@ for ac_symprfx in "" "_"; do
+@@ -6765,6 +7083,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -2460,7 +2442,7 @@ index d4f3e1e..a6df5bb 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -6802,6 +7121,18 @@ _LT_EOF
+@@ -6806,6 +7125,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -2479,7 +2461,7 @@ index d4f3e1e..a6df5bb 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -6813,7 +7144,7 @@ _LT_EOF
+@@ -6817,7 +7148,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -2488,7 +2470,7 @@ index d4f3e1e..a6df5bb 100755
const char *name;
void *address;
}
-@@ -6839,8 +7170,8 @@ static const void *lt_preloaded_setup() {
+@@ -6843,8 +7174,8 @@ static const void *lt_preloaded_setup() {
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -2499,7 +2481,7 @@ index d4f3e1e..a6df5bb 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6850,8 +7181,8 @@ _LT_EOF
+@@ -6854,8 +7185,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -2510,7 +2492,7 @@ index d4f3e1e..a6df5bb 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -6888,6 +7219,21 @@ else
+@@ -6892,6 +7223,21 @@ else
$as_echo "ok" >&6; }
fi
@@ -2532,7 +2514,7 @@ index d4f3e1e..a6df5bb 100755
-@@ -6906,6 +7252,40 @@ fi
+@@ -6910,6 +7256,40 @@ fi
@@ -2573,7 +2555,7 @@ index d4f3e1e..a6df5bb 100755
-@@ -7115,6 +7495,123 @@ esac
+@@ -7119,6 +7499,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -2697,7 +2679,7 @@ index d4f3e1e..a6df5bb 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7678,6 +8175,8 @@ _LT_EOF
+@@ -7682,6 +8179,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -2706,7 +2688,7 @@ index d4f3e1e..a6df5bb 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7873,7 +8372,8 @@ fi
+@@ -7877,7 +8376,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -2716,7 +2698,7 @@ index d4f3e1e..a6df5bb 100755
-@@ -7962,7 +8462,7 @@ aix3*)
+@@ -7966,7 +8466,7 @@ aix3*)
esac
# Global variables:
@@ -2725,7 +2707,7 @@ index d4f3e1e..a6df5bb 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8260,8 +8760,6 @@ fi
+@@ -8264,8 +8764,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -2734,7 +2716,7 @@ index d4f3e1e..a6df5bb 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8427,6 +8925,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8431,6 +8929,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -2747,7 +2729,7 @@ index d4f3e1e..a6df5bb 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8489,7 +8993,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8493,7 +8997,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -2756,7 +2738,7 @@ index d4f3e1e..a6df5bb 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8546,13 +9050,17 @@ case $host_os in
+@@ -8550,13 +9054,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -2780,7 +2762,7 @@ index d4f3e1e..a6df5bb 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8613,6 +9121,11 @@ fi
+@@ -8617,6 +9125,11 @@ fi
@@ -2792,7 +2774,7 @@ index d4f3e1e..a6df5bb 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8963,7 +9476,8 @@ _LT_EOF
+@@ -8967,7 +9480,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -2802,7 +2784,7 @@ index d4f3e1e..a6df5bb 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9062,12 +9576,12 @@ _LT_EOF
+@@ -9066,12 +9580,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -2817,7 +2799,7 @@ index d4f3e1e..a6df5bb 100755
fi
;;
esac
-@@ -9081,8 +9595,8 @@ _LT_EOF
+@@ -9085,8 +9599,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -2828,7 +2810,7 @@ index d4f3e1e..a6df5bb 100755
fi
;;
-@@ -9100,8 +9614,8 @@ _LT_EOF
+@@ -9104,8 +9618,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -2839,7 +2821,7 @@ index d4f3e1e..a6df5bb 100755
else
ld_shlibs=no
fi
-@@ -9147,8 +9661,8 @@ _LT_EOF
+@@ -9151,8 +9665,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -2850,7 +2832,7 @@ index d4f3e1e..a6df5bb 100755
else
ld_shlibs=no
fi
-@@ -9278,7 +9792,13 @@ _LT_EOF
+@@ -9282,7 +9796,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -2865,7 +2847,7 @@ index d4f3e1e..a6df5bb 100755
/* end confdefs.h. */
int
-@@ -9291,22 +9811,29 @@ main ()
+@@ -9295,22 +9815,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -2908,7 +2890,7 @@ index d4f3e1e..a6df5bb 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9318,7 +9845,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9322,7 +9849,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -2923,7 +2905,7 @@ index d4f3e1e..a6df5bb 100755
/* end confdefs.h. */
int
-@@ -9331,22 +9864,29 @@ main ()
+@@ -9335,22 +9868,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -2966,7 +2948,7 @@ index d4f3e1e..a6df5bb 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9391,20 +9931,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9395,20 +9935,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -3044,7 +3026,7 @@ index d4f3e1e..a6df5bb 100755
;;
darwin* | rhapsody*)
-@@ -9465,7 +10048,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9469,7 +10052,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -3053,7 +3035,7 @@ index d4f3e1e..a6df5bb 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9473,7 +10056,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9477,7 +10060,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux9*)
if test "$GCC" = yes; then
@@ -3062,7 +3044,7 @@ index d4f3e1e..a6df5bb 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9489,7 +10072,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9493,7 +10076,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -3071,7 +3053,7 @@ index d4f3e1e..a6df5bb 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9513,10 +10096,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9517,10 +10100,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -3084,7 +3066,7 @@ index d4f3e1e..a6df5bb 100755
;;
esac
else
-@@ -9595,23 +10178,36 @@ fi
+@@ -9599,23 +10182,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -3129,7 +3111,7 @@ index d4f3e1e..a6df5bb 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9696,7 +10292,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9700,7 +10296,7 @@ rm -f core conftest.err conftest.$ac_objext \
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -3138,7 +3120,7 @@ index d4f3e1e..a6df5bb 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9715,9 +10311,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9719,9 +10315,9 @@ rm -f core conftest.err conftest.$ac_objext \
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -3150,7 +3132,7 @@ index d4f3e1e..a6df5bb 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10293,8 +10889,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10297,8 +10893,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -3162,7 +3144,7 @@ index d4f3e1e..a6df5bb 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10327,13 +10924,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10331,13 +10928,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -3235,7 +3217,7 @@ index d4f3e1e..a6df5bb 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10425,7 +11080,7 @@ haiku*)
+@@ -10429,7 +11084,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -3244,16 +3226,7 @@ index d4f3e1e..a6df5bb 100755
hardcode_into_libs=yes
;;
-@@ -11221,7 +11876,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11224 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11265,10 +11920,10 @@ else
+@@ -11269,10 +11924,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -3266,16 +3239,7 @@ index d4f3e1e..a6df5bb 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11327,7 +11982,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11330 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11371,10 +12026,10 @@ else
+@@ -11375,10 +12030,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -3288,7 +3252,7 @@ index d4f3e1e..a6df5bb 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15355,13 +16010,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15392,13 +16047,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -3309,7 +3273,7 @@ index d4f3e1e..a6df5bb 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15376,14 +16038,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15413,14 +16075,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -3328,7 +3292,7 @@ index d4f3e1e..a6df5bb 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15416,12 +16081,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15453,12 +16118,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -3342,7 +3306,7 @@ index d4f3e1e..a6df5bb 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -15476,8 +16141,13 @@ reload_flag \
+@@ -15513,8 +16178,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -3356,7 +3320,7 @@ index d4f3e1e..a6df5bb 100755
STRIP \
RANLIB \
CC \
-@@ -15487,12 +16157,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -15524,12 +16194,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -3372,7 +3336,7 @@ index d4f3e1e..a6df5bb 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -15508,7 +16180,6 @@ no_undefined_flag \
+@@ -15545,7 +16217,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -3380,7 +3344,7 @@ index d4f3e1e..a6df5bb 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -15544,6 +16215,7 @@ module_cmds \
+@@ -15581,6 +16252,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -3388,7 +3352,7 @@ index d4f3e1e..a6df5bb 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -16301,7 +16973,8 @@ $as_echo X"$file" |
+@@ -16338,7 +17010,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -3398,7 +3362,7 @@ index d4f3e1e..a6df5bb 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -16404,19 +17077,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16441,19 +17114,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -3442,7 +3406,7 @@ index d4f3e1e..a6df5bb 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -16446,6 +17142,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -16483,6 +17179,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -3455,7 +3419,7 @@ index d4f3e1e..a6df5bb 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -16455,6 +17157,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -16492,6 +17194,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -3465,7 +3429,7 @@ index d4f3e1e..a6df5bb 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -16569,12 +17274,12 @@ with_gcc=$GCC
+@@ -16606,12 +17311,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -3481,7 +3445,7 @@ index d4f3e1e..a6df5bb 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -16661,9 +17366,6 @@ inherit_rpath=$inherit_rpath
+@@ -16698,9 +17403,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -3491,7 +3455,7 @@ index d4f3e1e..a6df5bb 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -16679,6 +17381,9 @@ include_expsyms=$lt_include_expsyms
+@@ -16716,6 +17418,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -3501,7 +3465,7 @@ index d4f3e1e..a6df5bb 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -16711,210 +17416,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -16748,210 +17453,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -3876,10 +3840,10 @@ index d4f3e1e..a6df5bb 100755
chmod +x "$ofile"
diff --git a/configure b/configure
-index 85414ab..34b66f7 100755
+index 2a74a77..ad3dfb7 100755
--- a/configure
+++ b/configure
-@@ -3445,7 +3445,7 @@ case "${target}" in
+@@ -3444,7 +3444,7 @@ case "${target}" in
;;
s390-*-* | s390x-*-*)
;;
@@ -3888,7 +3852,7 @@ index 85414ab..34b66f7 100755
;;
sh64-*-* | sh5*-*-*)
;;
-@@ -3939,7 +3939,7 @@ case "${target}" in
+@@ -3946,7 +3946,7 @@ case "${target}" in
or1k*-*-*)
noconfigdirs="$noconfigdirs gdb"
;;
@@ -3898,10 +3862,10 @@ index 85414ab..34b66f7 100755
sh*-*-elf)
;;
diff --git a/gas/configure b/gas/configure
-index dd9c953..89f18b3 100755
+index f7753b8..45da030 100755
--- a/gas/configure
+++ b/gas/configure
-@@ -647,8 +647,11 @@ OTOOL
+@@ -648,8 +648,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -3913,7 +3877,7 @@ index dd9c953..89f18b3 100755
OBJDUMP
LN_S
NM
-@@ -759,6 +762,7 @@ enable_static
+@@ -761,6 +764,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -3921,16 +3885,7 @@ index dd9c953..89f18b3 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1430,6 +1434,8 @@ Optional Packages:
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-+ --with-libtool-sysroot=DIR Search for dependent libraries within DIR
-+ (or the compiler's sysroot if not specified).
- --with-system-zlib use installed libz
-
- Some influential environment variables:
-@@ -4909,8 +4915,8 @@ esac
+@@ -4919,8 +4923,8 @@ esac
@@ -3941,7 +3896,7 @@ index dd9c953..89f18b3 100755
-@@ -4950,7 +4956,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -4960,7 +4964,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -3950,7 +3905,7 @@ index dd9c953..89f18b3 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5636,8 +5642,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -5646,8 +5650,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -3961,7 +3916,7 @@ index dd9c953..89f18b3 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -5686,6 +5692,80 @@ esac
+@@ -5696,6 +5700,80 @@ esac
@@ -4042,7 +3997,7 @@ index dd9c953..89f18b3 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5702,6 +5782,11 @@ case $reload_flag in
+@@ -5712,6 +5790,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -4054,7 +4009,7 @@ index dd9c953..89f18b3 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -5870,7 +5955,8 @@ mingw* | pw32*)
+@@ -5880,7 +5963,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -4064,7 +4019,7 @@ index dd9c953..89f18b3 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6024,6 +6110,21 @@ esac
+@@ -6034,6 +6118,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -4086,7 +4041,7 @@ index dd9c953..89f18b3 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6039,9 +6140,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6049,9 +6148,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -4251,7 +4206,7 @@ index dd9c953..89f18b3 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6057,7 +6311,7 @@ do
+@@ -6067,7 +6319,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -4260,7 +4215,7 @@ index dd9c953..89f18b3 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6077,11 +6331,15 @@ $as_echo "no" >&6; }
+@@ -6087,11 +6339,15 @@ $as_echo "no" >&6; }
fi
@@ -4279,7 +4234,7 @@ index dd9c953..89f18b3 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6097,7 +6355,7 @@ do
+@@ -6107,7 +6363,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -4288,7 +4243,7 @@ index dd9c953..89f18b3 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6116,6 +6374,10 @@ else
+@@ -6126,6 +6382,10 @@ else
$as_echo "no" >&6; }
fi
@@ -4299,7 +4254,7 @@ index dd9c953..89f18b3 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6127,12 +6389,10 @@ ac_tool_warned=yes ;;
+@@ -6137,12 +6397,10 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -4314,7 +4269,7 @@ index dd9c953..89f18b3 100755
-@@ -6144,6 +6404,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6154,6 +6412,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -4379,7 +4334,7 @@ index dd9c953..89f18b3 100755
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-@@ -6478,8 +6796,8 @@ esac
+@@ -6488,8 +6804,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -4390,7 +4345,7 @@ index dd9c953..89f18b3 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6515,6 +6833,7 @@ for ac_symprfx in "" "_"; do
+@@ -6525,6 +6841,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -4398,7 +4353,7 @@ index dd9c953..89f18b3 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -6556,6 +6875,18 @@ _LT_EOF
+@@ -6566,6 +6883,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -4417,7 +4372,7 @@ index dd9c953..89f18b3 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -6567,7 +6898,7 @@ _LT_EOF
+@@ -6577,7 +6906,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -4426,7 +4381,7 @@ index dd9c953..89f18b3 100755
const char *name;
void *address;
}
-@@ -6593,8 +6924,8 @@ static const void *lt_preloaded_setup() {
+@@ -6603,8 +6932,8 @@ static const void *lt_preloaded_setup() {
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -4437,7 +4392,7 @@ index dd9c953..89f18b3 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6604,8 +6935,8 @@ _LT_EOF
+@@ -6614,8 +6943,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -4448,7 +4403,7 @@ index dd9c953..89f18b3 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -6642,6 +6973,21 @@ else
+@@ -6652,6 +6981,21 @@ else
$as_echo "ok" >&6; }
fi
@@ -4470,7 +4425,7 @@ index dd9c953..89f18b3 100755
-@@ -6660,6 +7006,40 @@ fi
+@@ -6670,6 +7014,40 @@ fi
@@ -4511,7 +4466,7 @@ index dd9c953..89f18b3 100755
-@@ -6869,6 +7249,123 @@ esac
+@@ -6879,6 +7257,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -4635,7 +4590,7 @@ index dd9c953..89f18b3 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7432,6 +7929,8 @@ _LT_EOF
+@@ -7442,6 +7937,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -4644,7 +4599,7 @@ index dd9c953..89f18b3 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7627,7 +8126,8 @@ fi
+@@ -7637,7 +8134,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -4654,7 +4609,7 @@ index dd9c953..89f18b3 100755
-@@ -7716,7 +8216,7 @@ aix3*)
+@@ -7726,7 +8224,7 @@ aix3*)
esac
# Global variables:
@@ -4663,7 +4618,7 @@ index dd9c953..89f18b3 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8014,8 +8514,6 @@ fi
+@@ -8024,8 +8522,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -4672,7 +4627,7 @@ index dd9c953..89f18b3 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8181,6 +8679,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8191,6 +8687,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -4685,7 +4640,7 @@ index dd9c953..89f18b3 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8243,7 +8747,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8253,7 +8755,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -4694,7 +4649,7 @@ index dd9c953..89f18b3 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8300,13 +8804,17 @@ case $host_os in
+@@ -8310,13 +8812,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -4718,7 +4673,7 @@ index dd9c953..89f18b3 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8367,6 +8875,11 @@ fi
+@@ -8377,6 +8883,11 @@ fi
@@ -4730,7 +4685,7 @@ index dd9c953..89f18b3 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8717,7 +9230,8 @@ _LT_EOF
+@@ -8727,7 +9238,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -4740,7 +4695,7 @@ index dd9c953..89f18b3 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8816,12 +9330,12 @@ _LT_EOF
+@@ -8826,12 +9338,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -4755,7 +4710,7 @@ index dd9c953..89f18b3 100755
fi
;;
esac
-@@ -8835,8 +9349,8 @@ _LT_EOF
+@@ -8845,8 +9357,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -4766,7 +4721,7 @@ index dd9c953..89f18b3 100755
fi
;;
-@@ -8854,8 +9368,8 @@ _LT_EOF
+@@ -8864,8 +9376,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -4777,7 +4732,7 @@ index dd9c953..89f18b3 100755
else
ld_shlibs=no
fi
-@@ -8901,8 +9415,8 @@ _LT_EOF
+@@ -8911,8 +9423,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -4788,7 +4743,7 @@ index dd9c953..89f18b3 100755
else
ld_shlibs=no
fi
-@@ -9032,7 +9546,13 @@ _LT_EOF
+@@ -9042,7 +9554,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -4803,7 +4758,7 @@ index dd9c953..89f18b3 100755
/* end confdefs.h. */
int
-@@ -9045,22 +9565,29 @@ main ()
+@@ -9055,22 +9573,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -4846,7 +4801,7 @@ index dd9c953..89f18b3 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9072,7 +9599,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9082,7 +9607,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -4861,7 +4816,7 @@ index dd9c953..89f18b3 100755
/* end confdefs.h. */
int
-@@ -9085,22 +9618,29 @@ main ()
+@@ -9095,22 +9626,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -4904,7 +4859,7 @@ index dd9c953..89f18b3 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9145,20 +9685,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9155,20 +9693,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -4982,7 +4937,7 @@ index dd9c953..89f18b3 100755
;;
darwin* | rhapsody*)
-@@ -9219,7 +9802,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9229,7 +9810,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -4991,7 +4946,7 @@ index dd9c953..89f18b3 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9227,7 +9810,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9237,7 +9818,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux9*)
if test "$GCC" = yes; then
@@ -5000,7 +4955,7 @@ index dd9c953..89f18b3 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9243,7 +9826,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9253,7 +9834,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -5009,7 +4964,7 @@ index dd9c953..89f18b3 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9267,10 +9850,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9277,10 +9858,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -5022,7 +4977,7 @@ index dd9c953..89f18b3 100755
;;
esac
else
-@@ -9349,23 +9932,36 @@ fi
+@@ -9359,23 +9940,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -5067,7 +5022,7 @@ index dd9c953..89f18b3 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9450,7 +10046,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9460,7 +10054,7 @@ rm -f core conftest.err conftest.$ac_objext \
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -5076,7 +5031,7 @@ index dd9c953..89f18b3 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9469,9 +10065,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9479,9 +10073,9 @@ rm -f core conftest.err conftest.$ac_objext \
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -5088,7 +5043,7 @@ index dd9c953..89f18b3 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10047,8 +10643,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10057,8 +10651,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -5100,7 +5055,7 @@ index dd9c953..89f18b3 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10081,13 +10678,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10091,13 +10686,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -5173,7 +5128,7 @@ index dd9c953..89f18b3 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10179,7 +10834,7 @@ haiku*)
+@@ -10189,7 +10842,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -5182,16 +5137,7 @@ index dd9c953..89f18b3 100755
hardcode_into_libs=yes
;;
-@@ -10975,7 +11630,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 10978 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11019,10 +11674,10 @@ else
+@@ -11029,10 +11682,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -5204,16 +5150,7 @@ index dd9c953..89f18b3 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11081,7 +11736,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11084 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11125,10 +11780,10 @@ else
+@@ -11135,10 +11788,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -5226,7 +5163,7 @@ index dd9c953..89f18b3 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15276,13 +15931,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15350,13 +16003,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -5247,7 +5184,7 @@ index dd9c953..89f18b3 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15297,14 +15959,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15371,14 +16031,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -5266,7 +5203,7 @@ index dd9c953..89f18b3 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15337,12 +16002,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15411,12 +16074,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -5280,7 +5217,7 @@ index dd9c953..89f18b3 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -15397,8 +16062,13 @@ reload_flag \
+@@ -15471,8 +16134,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -5294,7 +5231,7 @@ index dd9c953..89f18b3 100755
STRIP \
RANLIB \
CC \
-@@ -15408,12 +16078,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -15482,12 +16150,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -5310,7 +5247,7 @@ index dd9c953..89f18b3 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -15429,7 +16101,6 @@ no_undefined_flag \
+@@ -15503,7 +16173,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -5318,7 +5255,7 @@ index dd9c953..89f18b3 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -15465,6 +16136,7 @@ module_cmds \
+@@ -15539,6 +16208,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -5326,7 +5263,7 @@ index dd9c953..89f18b3 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -16229,7 +16901,8 @@ $as_echo X"$file" |
+@@ -16303,7 +16973,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -5336,7 +5273,7 @@ index dd9c953..89f18b3 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -16332,19 +17005,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16406,19 +17077,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -5380,7 +5317,7 @@ index dd9c953..89f18b3 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -16374,6 +17070,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -16448,6 +17142,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -5393,7 +5330,7 @@ index dd9c953..89f18b3 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -16383,6 +17085,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -16457,6 +17157,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -5403,7 +5340,7 @@ index dd9c953..89f18b3 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -16497,12 +17202,12 @@ with_gcc=$GCC
+@@ -16571,12 +17274,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -5419,7 +5356,7 @@ index dd9c953..89f18b3 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -16589,9 +17294,6 @@ inherit_rpath=$inherit_rpath
+@@ -16663,9 +17366,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -5429,7 +5366,7 @@ index dd9c953..89f18b3 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -16607,6 +17309,9 @@ include_expsyms=$lt_include_expsyms
+@@ -16681,6 +17381,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -5439,7 +5376,7 @@ index dd9c953..89f18b3 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -16639,210 +17344,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -16713,210 +17416,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -5814,10 +5751,10 @@ index dd9c953..89f18b3 100755
chmod +x "$ofile"
diff --git a/gprof/configure b/gprof/configure
-index d4db554..78b292c 100755
+index 626e1c7..a88719c 100755
--- a/gprof/configure
+++ b/gprof/configure
-@@ -629,8 +629,11 @@ OTOOL
+@@ -630,8 +630,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -5829,7 +5766,7 @@ index d4db554..78b292c 100755
OBJDUMP
LN_S
NM
-@@ -741,6 +744,7 @@ enable_static
+@@ -743,6 +746,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -5837,7 +5774,7 @@ index d4db554..78b292c 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1399,6 +1403,8 @@ Optional Packages:
+@@ -1401,6 +1405,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -5846,7 +5783,7 @@ index d4db554..78b292c 100755
Some influential environment variables:
CC C compiler command
-@@ -4831,8 +4837,8 @@ esac
+@@ -4835,8 +4841,8 @@ esac
@@ -5857,7 +5794,7 @@ index d4db554..78b292c 100755
-@@ -4872,7 +4878,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -4876,7 +4882,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -5866,7 +5803,7 @@ index d4db554..78b292c 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5558,8 +5564,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -5562,8 +5568,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -5877,7 +5814,7 @@ index d4db554..78b292c 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -5608,6 +5614,80 @@ esac
+@@ -5612,6 +5618,80 @@ esac
@@ -5958,7 +5895,7 @@ index d4db554..78b292c 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5624,6 +5704,11 @@ case $reload_flag in
+@@ -5628,6 +5708,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -5970,7 +5907,7 @@ index d4db554..78b292c 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -5792,7 +5877,8 @@ mingw* | pw32*)
+@@ -5796,7 +5881,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -5980,7 +5917,7 @@ index d4db554..78b292c 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -5869,11 +5955,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+@@ -5873,11 +5959,6 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5992,7 +5929,7 @@ index d4db554..78b292c 100755
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-@@ -5951,6 +6032,21 @@ esac
+@@ -5955,6 +6036,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -6014,7 +5951,7 @@ index d4db554..78b292c 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -5966,9 +6062,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -5970,9 +6066,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -6179,7 +6116,7 @@ index d4db554..78b292c 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -5984,7 +6233,7 @@ do
+@@ -5988,7 +6237,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -6188,7 +6125,7 @@ index d4db554..78b292c 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6004,11 +6253,15 @@ $as_echo "no" >&6; }
+@@ -6008,11 +6257,15 @@ $as_echo "no" >&6; }
fi
@@ -6207,7 +6144,7 @@ index d4db554..78b292c 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6024,7 +6277,7 @@ do
+@@ -6028,7 +6281,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -6216,7 +6153,7 @@ index d4db554..78b292c 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6043,6 +6296,10 @@ else
+@@ -6047,6 +6300,10 @@ else
$as_echo "no" >&6; }
fi
@@ -6227,7 +6164,7 @@ index d4db554..78b292c 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6054,12 +6311,10 @@ ac_tool_warned=yes ;;
+@@ -6058,12 +6315,10 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -6242,7 +6179,7 @@ index d4db554..78b292c 100755
-@@ -6071,6 +6326,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6075,6 +6330,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -6307,7 +6244,7 @@ index d4db554..78b292c 100755
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-@@ -6405,8 +6718,8 @@ esac
+@@ -6409,8 +6722,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -6318,7 +6255,7 @@ index d4db554..78b292c 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6442,6 +6755,7 @@ for ac_symprfx in "" "_"; do
+@@ -6446,6 +6759,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -6326,7 +6263,7 @@ index d4db554..78b292c 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -6483,6 +6797,18 @@ _LT_EOF
+@@ -6487,6 +6801,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -6345,7 +6282,7 @@ index d4db554..78b292c 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -6494,7 +6820,7 @@ _LT_EOF
+@@ -6498,7 +6824,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -6354,7 +6291,7 @@ index d4db554..78b292c 100755
const char *name;
void *address;
}
-@@ -6520,8 +6846,8 @@ static const void *lt_preloaded_setup() {
+@@ -6524,8 +6850,8 @@ static const void *lt_preloaded_setup() {
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -6365,7 +6302,7 @@ index d4db554..78b292c 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6531,8 +6857,8 @@ _LT_EOF
+@@ -6535,8 +6861,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -6376,7 +6313,7 @@ index d4db554..78b292c 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -6569,6 +6895,18 @@ else
+@@ -6573,6 +6899,18 @@ else
$as_echo "ok" >&6; }
fi
@@ -6395,7 +6332,7 @@ index d4db554..78b292c 100755
-@@ -6590,6 +6928,43 @@ fi
+@@ -6594,6 +6932,43 @@ fi
@@ -6439,7 +6376,7 @@ index d4db554..78b292c 100755
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
-@@ -6796,6 +7171,123 @@ esac
+@@ -6800,6 +7175,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -6563,7 +6500,7 @@ index d4db554..78b292c 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7359,6 +7851,8 @@ _LT_EOF
+@@ -7363,6 +7855,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -6572,7 +6509,7 @@ index d4db554..78b292c 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7554,7 +8048,8 @@ fi
+@@ -7558,7 +8052,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -6582,7 +6519,7 @@ index d4db554..78b292c 100755
-@@ -7643,7 +8138,7 @@ aix3*)
+@@ -7647,7 +8142,7 @@ aix3*)
esac
# Global variables:
@@ -6591,7 +6528,7 @@ index d4db554..78b292c 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -7941,8 +8436,6 @@ fi
+@@ -7945,8 +8440,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -6600,7 +6537,7 @@ index d4db554..78b292c 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8108,6 +8601,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8112,6 +8605,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -6613,7 +6550,7 @@ index d4db554..78b292c 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8170,7 +8669,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8174,7 +8673,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -6622,7 +6559,7 @@ index d4db554..78b292c 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8227,13 +8726,17 @@ case $host_os in
+@@ -8231,13 +8730,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -6646,7 +6583,7 @@ index d4db554..78b292c 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8294,6 +8797,11 @@ fi
+@@ -8298,6 +8801,11 @@ fi
@@ -6658,7 +6595,7 @@ index d4db554..78b292c 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8644,7 +9152,8 @@ _LT_EOF
+@@ -8648,7 +9156,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -6668,7 +6605,7 @@ index d4db554..78b292c 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8743,12 +9252,12 @@ _LT_EOF
+@@ -8747,12 +9256,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -6683,7 +6620,7 @@ index d4db554..78b292c 100755
fi
;;
esac
-@@ -8762,8 +9271,8 @@ _LT_EOF
+@@ -8766,8 +9275,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -6694,7 +6631,7 @@ index d4db554..78b292c 100755
fi
;;
-@@ -8781,8 +9290,8 @@ _LT_EOF
+@@ -8785,8 +9294,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -6705,7 +6642,7 @@ index d4db554..78b292c 100755
else
ld_shlibs=no
fi
-@@ -8828,8 +9337,8 @@ _LT_EOF
+@@ -8832,8 +9341,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -6716,7 +6653,7 @@ index d4db554..78b292c 100755
else
ld_shlibs=no
fi
-@@ -8959,7 +9468,13 @@ _LT_EOF
+@@ -8963,7 +9472,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -6731,7 +6668,7 @@ index d4db554..78b292c 100755
/* end confdefs.h. */
int
-@@ -8972,22 +9487,29 @@ main ()
+@@ -8976,22 +9491,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -6774,7 +6711,7 @@ index d4db554..78b292c 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -8999,7 +9521,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9003,7 +9525,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -6789,7 +6726,7 @@ index d4db554..78b292c 100755
/* end confdefs.h. */
int
-@@ -9012,22 +9540,29 @@ main ()
+@@ -9016,22 +9544,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -6832,7 +6769,7 @@ index d4db554..78b292c 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9072,20 +9607,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9076,20 +9611,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -6910,7 +6847,7 @@ index d4db554..78b292c 100755
;;
darwin* | rhapsody*)
-@@ -9146,7 +9724,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9150,7 +9728,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -6919,7 +6856,7 @@ index d4db554..78b292c 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9154,7 +9732,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9158,7 +9736,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux9*)
if test "$GCC" = yes; then
@@ -6928,7 +6865,7 @@ index d4db554..78b292c 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9170,7 +9748,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9174,7 +9752,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -6937,7 +6874,7 @@ index d4db554..78b292c 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9194,10 +9772,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9198,10 +9776,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -6950,7 +6887,7 @@ index d4db554..78b292c 100755
;;
esac
else
-@@ -9276,23 +9854,36 @@ fi
+@@ -9280,23 +9858,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -6995,7 +6932,7 @@ index d4db554..78b292c 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9377,7 +9968,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9381,7 +9972,7 @@ rm -f core conftest.err conftest.$ac_objext \
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -7004,7 +6941,7 @@ index d4db554..78b292c 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9396,9 +9987,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9400,9 +9991,9 @@ rm -f core conftest.err conftest.$ac_objext \
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -7016,7 +6953,7 @@ index d4db554..78b292c 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -9974,8 +10565,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -9978,8 +10569,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -7028,7 +6965,7 @@ index d4db554..78b292c 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10008,13 +10600,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10012,13 +10604,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -7101,7 +7038,7 @@ index d4db554..78b292c 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10106,7 +10756,7 @@ haiku*)
+@@ -10110,7 +10760,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -7110,16 +7047,7 @@ index d4db554..78b292c 100755
hardcode_into_libs=yes
;;
-@@ -10902,7 +11552,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 10900 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -10946,10 +11596,10 @@ else
+@@ -10950,10 +11600,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -7132,16 +7060,7 @@ index d4db554..78b292c 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11008,7 +11658,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11006 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11052,10 +11702,10 @@ else
+@@ -11056,10 +11706,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -7154,7 +7073,7 @@ index d4db554..78b292c 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12924,13 +13574,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -12961,13 +13611,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -7175,7 +7094,7 @@ index d4db554..78b292c 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -12945,14 +13602,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -12982,14 +13639,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -7194,7 +7113,7 @@ index d4db554..78b292c 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -12985,12 +13645,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -13022,12 +13682,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -7208,7 +7127,7 @@ index d4db554..78b292c 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -13045,8 +13705,13 @@ reload_flag \
+@@ -13082,8 +13742,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -7222,7 +7141,7 @@ index d4db554..78b292c 100755
STRIP \
RANLIB \
CC \
-@@ -13056,12 +13721,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -13093,12 +13758,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -7238,7 +7157,7 @@ index d4db554..78b292c 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -13077,7 +13744,6 @@ no_undefined_flag \
+@@ -13114,7 +13781,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -7246,7 +7165,7 @@ index d4db554..78b292c 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -13113,6 +13779,7 @@ module_cmds \
+@@ -13150,6 +13816,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -7254,7 +7173,7 @@ index d4db554..78b292c 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -13869,7 +14536,8 @@ $as_echo X"$file" |
+@@ -13906,7 +14573,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -7264,7 +7183,7 @@ index d4db554..78b292c 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -13972,19 +14640,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -14009,19 +14677,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -7308,7 +7227,7 @@ index d4db554..78b292c 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -14014,6 +14705,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -14051,6 +14742,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -7321,7 +7240,7 @@ index d4db554..78b292c 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -14023,6 +14720,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -14060,6 +14757,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -7331,7 +7250,7 @@ index d4db554..78b292c 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -14137,12 +14837,12 @@ with_gcc=$GCC
+@@ -14174,12 +14874,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -7347,7 +7266,7 @@ index d4db554..78b292c 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -14229,9 +14929,6 @@ inherit_rpath=$inherit_rpath
+@@ -14266,9 +14966,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -7357,7 +7276,7 @@ index d4db554..78b292c 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -14247,6 +14944,9 @@ include_expsyms=$lt_include_expsyms
+@@ -14284,6 +14981,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -7367,7 +7286,7 @@ index d4db554..78b292c 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -14279,210 +14979,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -14316,210 +15016,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -7742,10 +7661,10 @@ index d4db554..78b292c 100755
chmod +x "$ofile"
diff --git a/ld/configure b/ld/configure
-index 8095b71..eb4f0d7 100755
+index f9be51a..3df1149 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -657,8 +657,11 @@ OTOOL
+@@ -658,8 +658,11 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -7757,7 +7676,7 @@ index 8095b71..eb4f0d7 100755
OBJDUMP
LN_S
NM
-@@ -779,6 +782,7 @@ enable_static
+@@ -781,6 +784,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -7765,7 +7684,7 @@ index 8095b71..eb4f0d7 100755
enable_libtool_lock
enable_plugins
enable_largefile
-@@ -1458,6 +1462,8 @@ Optional Packages:
+@@ -1462,6 +1466,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -7774,7 +7693,7 @@ index 8095b71..eb4f0d7 100755
--with-lib-path=dir1:dir2... set default LIB_PATH
--with-sysroot=DIR Search for usr/lib et al within DIR.
-@@ -5649,8 +5655,8 @@ esac
+@@ -5656,8 +5662,8 @@ esac
@@ -7785,7 +7704,7 @@ index 8095b71..eb4f0d7 100755
-@@ -5690,7 +5696,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5697,7 +5703,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -7794,7 +7713,7 @@ index 8095b71..eb4f0d7 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6376,8 +6382,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6383,8 +6389,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -7805,7 +7724,7 @@ index 8095b71..eb4f0d7 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -6426,6 +6432,80 @@ esac
+@@ -6433,6 +6439,80 @@ esac
@@ -7886,7 +7805,7 @@ index 8095b71..eb4f0d7 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -6442,6 +6522,11 @@ case $reload_flag in
+@@ -6449,6 +6529,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -7898,7 +7817,7 @@ index 8095b71..eb4f0d7 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6610,7 +6695,8 @@ mingw* | pw32*)
+@@ -6617,7 +6702,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -7908,7 +7827,7 @@ index 8095b71..eb4f0d7 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6764,6 +6850,21 @@ esac
+@@ -6771,6 +6857,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -7930,7 +7849,7 @@ index 8095b71..eb4f0d7 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6779,9 +6880,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6786,9 +6887,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -8095,7 +8014,7 @@ index 8095b71..eb4f0d7 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6797,7 +7051,7 @@ do
+@@ -6804,7 +7058,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -8104,7 +8023,7 @@ index 8095b71..eb4f0d7 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6817,11 +7071,15 @@ $as_echo "no" >&6; }
+@@ -6824,11 +7078,15 @@ $as_echo "no" >&6; }
fi
@@ -8123,7 +8042,7 @@ index 8095b71..eb4f0d7 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6837,7 +7095,7 @@ do
+@@ -6844,7 +7102,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -8132,7 +8051,7 @@ index 8095b71..eb4f0d7 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6856,6 +7114,10 @@ else
+@@ -6863,6 +7121,10 @@ else
$as_echo "no" >&6; }
fi
@@ -8143,7 +8062,7 @@ index 8095b71..eb4f0d7 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6867,12 +7129,12 @@ ac_tool_warned=yes ;;
+@@ -6874,12 +7136,12 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -8160,7 +8079,7 @@ index 8095b71..eb4f0d7 100755
-@@ -6882,6 +7144,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6889,6 +7151,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
@@ -8223,7 +8142,7 @@ index 8095b71..eb4f0d7 100755
if test -n "$ac_tool_prefix"; then
-@@ -7218,8 +7536,8 @@ esac
+@@ -7225,8 +7543,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -8234,7 +8153,7 @@ index 8095b71..eb4f0d7 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -7255,6 +7573,7 @@ for ac_symprfx in "" "_"; do
+@@ -7262,6 +7580,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -8242,7 +8161,7 @@ index 8095b71..eb4f0d7 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -7296,6 +7615,18 @@ _LT_EOF
+@@ -7303,6 +7622,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -8261,7 +8180,7 @@ index 8095b71..eb4f0d7 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -7307,7 +7638,7 @@ _LT_EOF
+@@ -7314,7 +7645,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -8270,7 +8189,7 @@ index 8095b71..eb4f0d7 100755
const char *name;
void *address;
}
-@@ -7333,8 +7664,8 @@ static const void *lt_preloaded_setup() {
+@@ -7340,8 +7671,8 @@ static const void *lt_preloaded_setup() {
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -8281,7 +8200,7 @@ index 8095b71..eb4f0d7 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7344,8 +7675,8 @@ _LT_EOF
+@@ -7351,8 +7682,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -8292,7 +8211,7 @@ index 8095b71..eb4f0d7 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -7382,6 +7713,19 @@ else
+@@ -7389,6 +7720,19 @@ else
$as_echo "ok" >&6; }
fi
@@ -8312,7 +8231,7 @@ index 8095b71..eb4f0d7 100755
-@@ -7402,6 +7746,42 @@ fi
+@@ -7409,6 +7753,42 @@ fi
@@ -8355,7 +8274,7 @@ index 8095b71..eb4f0d7 100755
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
-@@ -7609,6 +7989,123 @@ esac
+@@ -7616,6 +7996,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -8479,7 +8398,7 @@ index 8095b71..eb4f0d7 100755
case $host_os in
rhapsody* | darwin*)
-@@ -8172,6 +8669,8 @@ _LT_EOF
+@@ -8179,6 +8676,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -8488,7 +8407,7 @@ index 8095b71..eb4f0d7 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -8240,6 +8739,16 @@ done
+@@ -8247,6 +8746,16 @@ done
@@ -8505,7 +8424,7 @@ index 8095b71..eb4f0d7 100755
# Set options
-@@ -8368,7 +8877,8 @@ fi
+@@ -8375,7 +8884,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -8515,7 +8434,7 @@ index 8095b71..eb4f0d7 100755
-@@ -8457,7 +8967,7 @@ aix3*)
+@@ -8464,7 +8974,7 @@ aix3*)
esac
# Global variables:
@@ -8524,7 +8443,7 @@ index 8095b71..eb4f0d7 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8755,8 +9265,6 @@ fi
+@@ -8762,8 +9272,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -8533,7 +8452,7 @@ index 8095b71..eb4f0d7 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8922,6 +9430,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8929,6 +9437,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -8546,7 +8465,7 @@ index 8095b71..eb4f0d7 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8984,7 +9498,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8991,7 +9505,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -8555,7 +8474,7 @@ index 8095b71..eb4f0d7 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -9041,13 +9555,17 @@ case $host_os in
+@@ -9048,13 +9562,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -8579,7 +8498,7 @@ index 8095b71..eb4f0d7 100755
#
# Check to make sure the PIC flag actually works.
-@@ -9108,6 +9626,11 @@ fi
+@@ -9115,6 +9633,11 @@ fi
@@ -8591,7 +8510,7 @@ index 8095b71..eb4f0d7 100755
#
# Check to make sure the static flag actually works.
#
-@@ -9458,7 +9981,8 @@ _LT_EOF
+@@ -9465,7 +9988,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -8601,7 +8520,7 @@ index 8095b71..eb4f0d7 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9557,12 +10081,12 @@ _LT_EOF
+@@ -9564,12 +10088,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -8616,7 +8535,7 @@ index 8095b71..eb4f0d7 100755
fi
;;
esac
-@@ -9576,8 +10100,8 @@ _LT_EOF
+@@ -9583,8 +10107,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -8627,7 +8546,7 @@ index 8095b71..eb4f0d7 100755
fi
;;
-@@ -9595,8 +10119,8 @@ _LT_EOF
+@@ -9602,8 +10126,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8638,7 +8557,7 @@ index 8095b71..eb4f0d7 100755
else
ld_shlibs=no
fi
-@@ -9642,8 +10166,8 @@ _LT_EOF
+@@ -9649,8 +10173,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8649,7 +8568,7 @@ index 8095b71..eb4f0d7 100755
else
ld_shlibs=no
fi
-@@ -9773,7 +10297,13 @@ _LT_EOF
+@@ -9780,7 +10304,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -8664,7 +8583,7 @@ index 8095b71..eb4f0d7 100755
/* end confdefs.h. */
int
-@@ -9786,22 +10316,29 @@ main ()
+@@ -9793,22 +10323,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -8707,7 +8626,7 @@ index 8095b71..eb4f0d7 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9813,7 +10350,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9820,7 +10357,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -8722,7 +8641,7 @@ index 8095b71..eb4f0d7 100755
/* end confdefs.h. */
int
-@@ -9826,22 +10369,29 @@ main ()
+@@ -9833,22 +10376,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -8765,7 +8684,7 @@ index 8095b71..eb4f0d7 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9885,21 +10435,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9892,21 +10442,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -8845,7 +8764,7 @@ index 8095b71..eb4f0d7 100755
;;
darwin* | rhapsody*)
-@@ -9960,7 +10553,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9967,7 +10560,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -8854,7 +8773,7 @@ index 8095b71..eb4f0d7 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9968,7 +10561,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9975,7 +10568,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux9*)
if test "$GCC" = yes; then
@@ -8863,7 +8782,7 @@ index 8095b71..eb4f0d7 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9984,7 +10577,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9991,7 +10584,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -8872,7 +8791,7 @@ index 8095b71..eb4f0d7 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -10008,10 +10601,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10015,10 +10608,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -8885,7 +8804,7 @@ index 8095b71..eb4f0d7 100755
;;
esac
else
-@@ -10090,23 +10683,36 @@ fi
+@@ -10097,23 +10690,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -8930,7 +8849,7 @@ index 8095b71..eb4f0d7 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -10191,7 +10797,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10198,7 +10804,7 @@ rm -f core conftest.err conftest.$ac_objext \
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -8939,7 +8858,7 @@ index 8095b71..eb4f0d7 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -10210,9 +10816,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10217,9 +10823,9 @@ rm -f core conftest.err conftest.$ac_objext \
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -8951,7 +8870,7 @@ index 8095b71..eb4f0d7 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10788,8 +11394,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10795,8 +11401,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -8963,7 +8882,7 @@ index 8095b71..eb4f0d7 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10822,13 +11429,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10829,13 +11436,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -9036,7 +8955,7 @@ index 8095b71..eb4f0d7 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10920,7 +11585,7 @@ haiku*)
+@@ -10927,7 +11592,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -9045,16 +8964,7 @@ index 8095b71..eb4f0d7 100755
hardcode_into_libs=yes
;;
-@@ -11716,7 +12381,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11719 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11760,10 +12425,10 @@ else
+@@ -11767,10 +12432,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -9067,16 +8977,7 @@ index 8095b71..eb4f0d7 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11822,7 +12487,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11825 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11866,10 +12531,10 @@ else
+@@ -11873,10 +12538,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -9089,7 +8990,7 @@ index 8095b71..eb4f0d7 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12261,6 +12926,7 @@ $RM -r conftest*
+@@ -12268,6 +12933,7 @@ $RM -r conftest*
# Allow CC to be a program name with arguments.
lt_save_CC=$CC
@@ -9097,7 +8998,7 @@ index 8095b71..eb4f0d7 100755
lt_save_LD=$LD
lt_save_GCC=$GCC
GCC=$GXX
-@@ -12278,6 +12944,7 @@ $RM -r conftest*
+@@ -12285,6 +12951,7 @@ $RM -r conftest*
fi
test -z "${LDCXX+set}" || LD=$LDCXX
CC=${CXX-"c++"}
@@ -9105,7 +9006,7 @@ index 8095b71..eb4f0d7 100755
compiler=$CC
compiler_CXX=$CC
for cc_temp in $compiler""; do
-@@ -12560,7 +13227,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -12567,7 +13234,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
allow_undefined_flag_CXX='-berok'
# Determine the default libpath from the value encoded in an empty
# executable.
@@ -9120,7 +9021,7 @@ index 8095b71..eb4f0d7 100755
/* end confdefs.h. */
int
-@@ -12573,22 +13246,29 @@ main ()
+@@ -12580,22 +13253,29 @@ main ()
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
@@ -9163,7 +9064,7 @@ index 8095b71..eb4f0d7 100755
hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-@@ -12601,7 +13281,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12608,7 +13288,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -9178,7 +9079,7 @@ index 8095b71..eb4f0d7 100755
/* end confdefs.h. */
int
-@@ -12614,22 +13300,29 @@ main ()
+@@ -12621,22 +13307,29 @@ main ()
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
@@ -9221,7 +9122,7 @@ index 8095b71..eb4f0d7 100755
hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -12672,29 +13365,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12679,29 +13372,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
cygwin* | mingw* | pw32* | cegcc*)
@@ -9320,7 +9221,7 @@ index 8095b71..eb4f0d7 100755
darwin* | rhapsody*)
-@@ -12800,7 +13539,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12807,7 +13546,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
*)
if test "$GXX" = yes; then
@@ -9329,7 +9230,7 @@ index 8095b71..eb4f0d7 100755
else
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
-@@ -12871,10 +13610,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12878,10 +13617,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
@@ -9342,7 +9243,7 @@ index 8095b71..eb4f0d7 100755
;;
esac
fi
-@@ -12915,9 +13654,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12922,9 +13661,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
*)
if test "$GXX" = yes; then
if test "$with_gnu_ld" = no; then
@@ -9354,7 +9255,7 @@ index 8095b71..eb4f0d7 100755
fi
fi
link_all_deplibs_CXX=yes
-@@ -12987,20 +13726,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12994,20 +13733,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
prelink_cmds_CXX='tpldir=Template.dir~
rm -rf $tpldir~
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
@@ -9379,7 +9280,7 @@ index 8095b71..eb4f0d7 100755
;;
*) # Version 6 and above use weak symbols
archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-@@ -13195,7 +13934,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13202,7 +13941,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
;;
*)
@@ -9388,7 +9289,7 @@ index 8095b71..eb4f0d7 100755
;;
esac
-@@ -13241,7 +13980,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13248,7 +13987,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
solaris*)
case $cc_basename in
@@ -9397,7 +9298,7 @@ index 8095b71..eb4f0d7 100755
# Sun C++ 4.2, 5.x and Centerline C++
archive_cmds_need_lc_CXX=yes
no_undefined_flag_CXX=' -zdefs'
-@@ -13282,9 +14021,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13289,9 +14028,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
@@ -9409,7 +9310,7 @@ index 8095b71..eb4f0d7 100755
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
-@@ -13419,6 +14158,13 @@ private:
+@@ -13426,6 +14165,13 @@ private:
};
_LT_EOF
@@ -9423,7 +9324,7 @@ index 8095b71..eb4f0d7 100755
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
-@@ -13432,7 +14178,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13439,7 +14185,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
pre_test_object_deps_done=no
for p in `eval "$output_verbose_link_cmd"`; do
@@ -9432,7 +9333,7 @@ index 8095b71..eb4f0d7 100755
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
-@@ -13441,13 +14187,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13448,13 +14194,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
test $p = "-R"; then
prev=$p
continue
@@ -9459,7 +9360,7 @@ index 8095b71..eb4f0d7 100755
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
-@@ -13467,8 +14222,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13474,8 +14229,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
postdeps_CXX="${postdeps_CXX} ${prev}${p}"
fi
fi
@@ -9470,7 +9371,7 @@ index 8095b71..eb4f0d7 100755
*.$objext)
# This assumes that the test object file only shows up
# once in the compiler output.
-@@ -13504,6 +14261,7 @@ else
+@@ -13511,6 +14268,7 @@ else
fi
$RM -f confest.$objext
@@ -9478,7 +9379,7 @@ index 8095b71..eb4f0d7 100755
# PORTME: override above test on systems where it is broken
case $host_os in
-@@ -13539,7 +14297,7 @@ linux*)
+@@ -13546,7 +14304,7 @@ linux*)
solaris*)
case $cc_basename in
@@ -9487,7 +9388,7 @@ index 8095b71..eb4f0d7 100755
# The more standards-conforming stlport4 library is
# incompatible with the Cstd library. Avoid specifying
# it if it's in CXXFLAGS. Ignore libCrun as
-@@ -13604,8 +14362,6 @@ fi
+@@ -13611,8 +14369,6 @@ fi
lt_prog_compiler_pic_CXX=
lt_prog_compiler_static_CXX=
@@ -9496,7 +9397,7 @@ index 8095b71..eb4f0d7 100755
# C++ specific cases for pic, static, wl, etc.
if test "$GXX" = yes; then
-@@ -13710,6 +14466,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -13717,6 +14473,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
;;
esac
;;
@@ -9508,7 +9409,7 @@ index 8095b71..eb4f0d7 100755
dgux*)
case $cc_basename in
ec++*)
-@@ -13862,7 +14623,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -13869,7 +14630,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
;;
solaris*)
case $cc_basename in
@@ -9517,7 +9418,7 @@ index 8095b71..eb4f0d7 100755
# Sun C++ 4.2, 5.x and Centerline C++
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-Bstatic'
-@@ -13927,10 +14688,17 @@ case $host_os in
+@@ -13934,10 +14695,17 @@ case $host_os in
lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
;;
esac
@@ -9538,7 +9439,7 @@ index 8095b71..eb4f0d7 100755
#
# Check to make sure the PIC flag actually works.
-@@ -13988,6 +14756,8 @@ fi
+@@ -13995,6 +14763,8 @@ fi
@@ -9547,7 +9448,7 @@ index 8095b71..eb4f0d7 100755
#
# Check to make sure the static flag actually works.
#
-@@ -14165,6 +14935,7 @@ fi
+@@ -14172,6 +14942,7 @@ fi
$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -9555,7 +9456,7 @@ index 8095b71..eb4f0d7 100755
case $host_os in
aix[4-9]*)
# If we're using GNU nm, then we don't want the "-C" option.
-@@ -14179,15 +14950,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -14186,15 +14957,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
;;
pw32*)
export_symbols_cmds_CXX="$ltdll_cmds"
@@ -9581,7 +9482,7 @@ index 8095b71..eb4f0d7 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
$as_echo "$ld_shlibs_CXX" >&6; }
-@@ -14450,8 +15226,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14457,8 +15233,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -9593,7 +9494,7 @@ index 8095b71..eb4f0d7 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -14483,13 +15260,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14490,13 +15267,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -9666,7 +9567,7 @@ index 8095b71..eb4f0d7 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -14580,7 +15415,7 @@ haiku*)
+@@ -14587,7 +15422,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -9675,7 +9576,7 @@ index 8095b71..eb4f0d7 100755
hardcode_into_libs=yes
;;
-@@ -15039,6 +15874,7 @@ fi
+@@ -15046,6 +15881,7 @@ fi
fi # test -n "$compiler"
CC=$lt_save_CC
@@ -9683,7 +9584,7 @@ index 8095b71..eb4f0d7 100755
LDCXX=$LD
LD=$lt_save_LD
GCC=$lt_save_GCC
-@@ -17953,13 +18789,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -17982,13 +18818,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -9704,7 +9605,7 @@ index 8095b71..eb4f0d7 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -17974,14 +18817,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -18003,14 +18846,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -9723,7 +9624,7 @@ index 8095b71..eb4f0d7 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -18014,12 +18860,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -18043,12 +18889,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -9737,7 +9638,7 @@ index 8095b71..eb4f0d7 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -18058,8 +18904,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
+@@ -18087,8 +18933,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9747,7 +9648,7 @@ index 8095b71..eb4f0d7 100755
lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -18086,12 +18932,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
+@@ -18115,12 +18961,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9761,7 +9662,7 @@ index 8095b71..eb4f0d7 100755
file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -18129,8 +18975,13 @@ reload_flag \
+@@ -18158,8 +19004,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -9775,7 +9676,7 @@ index 8095b71..eb4f0d7 100755
STRIP \
RANLIB \
CC \
-@@ -18140,12 +18991,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -18169,12 +19020,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -9791,7 +9692,7 @@ index 8095b71..eb4f0d7 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -18161,7 +19014,6 @@ no_undefined_flag \
+@@ -18190,7 +19043,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -9799,7 +9700,7 @@ index 8095b71..eb4f0d7 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -18183,8 +19035,8 @@ LD_CXX \
+@@ -18212,8 +19064,8 @@ LD_CXX \
reload_flag_CXX \
compiler_CXX \
lt_prog_compiler_no_builtin_flag_CXX \
@@ -9809,7 +9710,7 @@ index 8095b71..eb4f0d7 100755
lt_prog_compiler_static_CXX \
lt_cv_prog_compiler_c_o_CXX \
export_dynamic_flag_spec_CXX \
-@@ -18196,7 +19048,6 @@ no_undefined_flag_CXX \
+@@ -18225,7 +19077,6 @@ no_undefined_flag_CXX \
hardcode_libdir_flag_spec_CXX \
hardcode_libdir_flag_spec_ld_CXX \
hardcode_libdir_separator_CXX \
@@ -9817,7 +9718,7 @@ index 8095b71..eb4f0d7 100755
exclude_expsyms_CXX \
include_expsyms_CXX \
file_list_spec_CXX \
-@@ -18230,6 +19081,7 @@ module_cmds \
+@@ -18259,6 +19110,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -9825,7 +9726,7 @@ index 8095b71..eb4f0d7 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -18244,7 +19096,8 @@ archive_expsym_cmds_CXX \
+@@ -18273,7 +19125,8 @@ archive_expsym_cmds_CXX \
module_cmds_CXX \
module_expsym_cmds_CXX \
export_symbols_cmds_CXX \
@@ -9835,7 +9736,7 @@ index 8095b71..eb4f0d7 100755
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-@@ -19037,7 +19890,8 @@ $as_echo X"$file" |
+@@ -19066,7 +19919,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -9845,7 +9746,7 @@ index 8095b71..eb4f0d7 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -19140,19 +19994,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -19169,19 +20023,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -9889,7 +9790,7 @@ index 8095b71..eb4f0d7 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -19182,6 +20059,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -19211,6 +20088,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -9902,7 +9803,7 @@ index 8095b71..eb4f0d7 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -19191,6 +20074,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -19220,6 +20103,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -9912,7 +9813,7 @@ index 8095b71..eb4f0d7 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -19305,12 +20191,12 @@ with_gcc=$GCC
+@@ -19334,12 +20220,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -9928,7 +9829,7 @@ index 8095b71..eb4f0d7 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -19397,9 +20283,6 @@ inherit_rpath=$inherit_rpath
+@@ -19426,9 +20312,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -9938,7 +9839,7 @@ index 8095b71..eb4f0d7 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -19415,6 +20298,9 @@ include_expsyms=$lt_include_expsyms
+@@ -19444,6 +20327,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -9948,7 +9849,7 @@ index 8095b71..eb4f0d7 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -19461,210 +20347,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -19490,210 +20376,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -10322,7 +10223,7 @@ index 8095b71..eb4f0d7 100755
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
-@@ -19692,12 +20537,12 @@ with_gcc=$GCC_CXX
+@@ -19721,12 +20566,12 @@ with_gcc=$GCC_CXX
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
@@ -10338,7 +10239,7 @@ index 8095b71..eb4f0d7 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static_CXX
-@@ -19784,9 +20629,6 @@ inherit_rpath=$inherit_rpath_CXX
+@@ -19813,9 +20658,6 @@ inherit_rpath=$inherit_rpath_CXX
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs_CXX
@@ -10348,7 +10249,7 @@ index 8095b71..eb4f0d7 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols_CXX
-@@ -19802,6 +20644,9 @@ include_expsyms=$lt_include_expsyms_CXX
+@@ -19831,6 +20673,9 @@ include_expsyms=$lt_include_expsyms_CXX
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds_CXX
@@ -10359,7 +10260,7 @@ index 8095b71..eb4f0d7 100755
file_list_spec=$lt_file_list_spec_CXX
diff --git a/libtool.m4 b/libtool.m4
-index 4b2d30a..008d331 100644
+index 24d13f3..e45fdc6 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -1,7 +1,8 @@
@@ -16451,7 +16352,7 @@ index 9503ec8..70e856e 100644
case "$perm_rpath " in
*" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
-+ *) func_apped perm_rpath " $libdir" ;;
++ *) func_append perm_rpath " $libdir" ;;
esac
fi
done
@@ -17442,10 +17343,10 @@ index bf92b5e..c573da9 100644
# These exist entirely to fool aclocal when bootstrapping libtool.
#
diff --git a/opcodes/configure b/opcodes/configure
-index eedb184..d3076e1 100755
+index f615634..a340983 100755
--- a/opcodes/configure
+++ b/opcodes/configure
-@@ -648,6 +648,9 @@ OTOOL
+@@ -649,6 +649,9 @@ OTOOL
LIPO
NMEDIT
DSYMUTIL
@@ -17455,7 +17356,7 @@ index eedb184..d3076e1 100755
OBJDUMP
LN_S
NM
-@@ -760,6 +763,7 @@ enable_static
+@@ -762,6 +765,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -17463,7 +17364,7 @@ index eedb184..d3076e1 100755
enable_libtool_lock
enable_targets
enable_werror
-@@ -1420,6 +1424,8 @@ Optional Packages:
+@@ -1422,6 +1426,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -17472,7 +17373,7 @@ index eedb184..d3076e1 100755
Some influential environment variables:
CC C compiler command
-@@ -5110,8 +5116,8 @@ esac
+@@ -5114,8 +5120,8 @@ esac
@@ -17483,7 +17384,7 @@ index eedb184..d3076e1 100755
-@@ -5151,7 +5157,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5155,7 +5161,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -17492,7 +17393,7 @@ index eedb184..d3076e1 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5837,8 +5843,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -5841,8 +5847,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -17503,7 +17404,7 @@ index eedb184..d3076e1 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -5887,6 +5893,80 @@ esac
+@@ -5891,6 +5897,80 @@ esac
@@ -17584,7 +17485,7 @@ index eedb184..d3076e1 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5903,6 +5983,11 @@ case $reload_flag in
+@@ -5907,6 +5987,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -17596,7 +17497,7 @@ index eedb184..d3076e1 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6071,7 +6156,8 @@ mingw* | pw32*)
+@@ -6075,7 +6160,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -17606,7 +17507,7 @@ index eedb184..d3076e1 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -6225,6 +6311,21 @@ esac
+@@ -6229,6 +6315,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -17628,7 +17529,7 @@ index eedb184..d3076e1 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6240,9 +6341,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6244,9 +6345,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -17793,7 +17694,7 @@ index eedb184..d3076e1 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6258,7 +6512,7 @@ do
+@@ -6262,7 +6516,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -17802,7 +17703,7 @@ index eedb184..d3076e1 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6278,11 +6532,15 @@ $as_echo "no" >&6; }
+@@ -6282,11 +6536,15 @@ $as_echo "no" >&6; }
fi
@@ -17821,7 +17722,7 @@ index eedb184..d3076e1 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6298,7 +6556,7 @@ do
+@@ -6302,7 +6560,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -17830,7 +17731,7 @@ index eedb184..d3076e1 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -6317,6 +6575,10 @@ else
+@@ -6321,6 +6579,10 @@ else
$as_echo "no" >&6; }
fi
@@ -17841,7 +17742,7 @@ index eedb184..d3076e1 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -6328,16 +6590,72 @@ ac_tool_warned=yes ;;
+@@ -6332,16 +6594,72 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -17918,7 +17819,7 @@ index eedb184..d3076e1 100755
-@@ -6679,8 +6997,8 @@ esac
+@@ -6683,8 +7001,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -17929,7 +17830,7 @@ index eedb184..d3076e1 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -6716,6 +7034,7 @@ for ac_symprfx in "" "_"; do
+@@ -6720,6 +7038,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -17937,7 +17838,7 @@ index eedb184..d3076e1 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -6757,6 +7076,18 @@ _LT_EOF
+@@ -6761,6 +7080,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -17956,7 +17857,7 @@ index eedb184..d3076e1 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -6768,7 +7099,7 @@ _LT_EOF
+@@ -6772,7 +7103,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -17965,7 +17866,7 @@ index eedb184..d3076e1 100755
const char *name;
void *address;
}
-@@ -6794,8 +7125,8 @@ static const void *lt_preloaded_setup() {
+@@ -6798,8 +7129,8 @@ static const void *lt_preloaded_setup() {
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -17976,7 +17877,7 @@ index eedb184..d3076e1 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6805,8 +7136,8 @@ _LT_EOF
+@@ -6809,8 +7140,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -17987,7 +17888,7 @@ index eedb184..d3076e1 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -6843,6 +7174,16 @@ else
+@@ -6847,6 +7178,16 @@ else
$as_echo "ok" >&6; }
fi
@@ -18004,7 +17905,7 @@ index eedb184..d3076e1 100755
-@@ -6864,6 +7205,45 @@ fi
+@@ -6868,6 +7209,45 @@ fi
@@ -18050,7 +17951,7 @@ index eedb184..d3076e1 100755
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
-@@ -7070,6 +7450,123 @@ esac
+@@ -7074,6 +7454,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -18174,7 +18075,7 @@ index eedb184..d3076e1 100755
case $host_os in
rhapsody* | darwin*)
-@@ -7633,6 +8130,8 @@ _LT_EOF
+@@ -7637,6 +8134,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -18183,7 +18084,7 @@ index eedb184..d3076e1 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7798,7 +8297,8 @@ fi
+@@ -7802,7 +8301,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -18193,7 +18094,7 @@ index eedb184..d3076e1 100755
-@@ -7887,7 +8387,7 @@ aix3*)
+@@ -7891,7 +8391,7 @@ aix3*)
esac
# Global variables:
@@ -18202,7 +18103,7 @@ index eedb184..d3076e1 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8185,8 +8685,6 @@ fi
+@@ -8189,8 +8689,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -18211,7 +18112,7 @@ index eedb184..d3076e1 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -8352,6 +8850,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8356,6 +8854,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -18224,7 +18125,7 @@ index eedb184..d3076e1 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -8414,7 +8918,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8418,7 +8922,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -18233,7 +18134,7 @@ index eedb184..d3076e1 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -8471,13 +8975,17 @@ case $host_os in
+@@ -8475,13 +8979,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -18257,7 +18158,7 @@ index eedb184..d3076e1 100755
#
# Check to make sure the PIC flag actually works.
-@@ -8538,6 +9046,11 @@ fi
+@@ -8542,6 +9050,11 @@ fi
@@ -18269,7 +18170,7 @@ index eedb184..d3076e1 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8888,7 +9401,8 @@ _LT_EOF
+@@ -8892,7 +9405,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -18279,7 +18180,7 @@ index eedb184..d3076e1 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8987,12 +9501,12 @@ _LT_EOF
+@@ -8991,12 +9505,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -18294,7 +18195,7 @@ index eedb184..d3076e1 100755
fi
;;
esac
-@@ -9006,8 +9520,8 @@ _LT_EOF
+@@ -9010,8 +9524,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -18305,7 +18206,7 @@ index eedb184..d3076e1 100755
fi
;;
-@@ -9025,8 +9539,8 @@ _LT_EOF
+@@ -9029,8 +9543,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -18316,7 +18217,7 @@ index eedb184..d3076e1 100755
else
ld_shlibs=no
fi
-@@ -9072,8 +9586,8 @@ _LT_EOF
+@@ -9076,8 +9590,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -18327,7 +18228,7 @@ index eedb184..d3076e1 100755
else
ld_shlibs=no
fi
-@@ -9203,7 +9717,13 @@ _LT_EOF
+@@ -9207,7 +9721,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -18342,7 +18243,7 @@ index eedb184..d3076e1 100755
/* end confdefs.h. */
int
-@@ -9216,22 +9736,29 @@ main ()
+@@ -9220,22 +9740,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -18385,7 +18286,7 @@ index eedb184..d3076e1 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9243,7 +9770,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9247,7 +9774,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -18400,7 +18301,7 @@ index eedb184..d3076e1 100755
/* end confdefs.h. */
int
-@@ -9256,22 +9789,29 @@ main ()
+@@ -9260,22 +9793,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -18443,7 +18344,7 @@ index eedb184..d3076e1 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -9316,20 +9856,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9320,20 +9860,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -18521,7 +18422,7 @@ index eedb184..d3076e1 100755
;;
darwin* | rhapsody*)
-@@ -9390,7 +9973,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9394,7 +9977,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -18530,7 +18431,7 @@ index eedb184..d3076e1 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -9398,7 +9981,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9402,7 +9985,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux9*)
if test "$GCC" = yes; then
@@ -18539,7 +18440,7 @@ index eedb184..d3076e1 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -9414,7 +9997,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9418,7 +10001,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -18548,7 +18449,7 @@ index eedb184..d3076e1 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -9438,10 +10021,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9442,10 +10025,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -18561,7 +18462,7 @@ index eedb184..d3076e1 100755
;;
esac
else
-@@ -9520,23 +10103,36 @@ fi
+@@ -9524,23 +10107,36 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -18606,7 +18507,7 @@ index eedb184..d3076e1 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9621,7 +10217,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9625,7 +10221,7 @@ rm -f core conftest.err conftest.$ac_objext \
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -18615,7 +18516,7 @@ index eedb184..d3076e1 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -9640,9 +10236,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9644,9 +10240,9 @@ rm -f core conftest.err conftest.$ac_objext \
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -18627,7 +18528,7 @@ index eedb184..d3076e1 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -10218,8 +10814,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10222,8 +10818,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -18639,7 +18540,7 @@ index eedb184..d3076e1 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -10252,13 +10849,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10256,13 +10853,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -18712,7 +18613,7 @@ index eedb184..d3076e1 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -10350,7 +11005,7 @@ haiku*)
+@@ -10354,7 +11009,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -18721,16 +18622,7 @@ index eedb184..d3076e1 100755
hardcode_into_libs=yes
;;
-@@ -11146,7 +11801,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11149 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11190,10 +11845,10 @@ else
+@@ -11194,10 +11849,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -18743,16 +18635,7 @@ index eedb184..d3076e1 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11252,7 +11907,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11255 "configure"
-+#line $LINENO "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -11296,10 +11951,10 @@ else
+@@ -11300,10 +11955,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -18765,7 +18648,7 @@ index eedb184..d3076e1 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12462,7 +13117,7 @@ if test "$enable_shared" = "yes"; then
+@@ -12499,7 +13154,7 @@ if test "$enable_shared" = "yes"; then
# since libbfd may not pull in the entirety of libiberty.
x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'`
if test -n "$x"; then
@@ -18774,7 +18657,7 @@ index eedb184..d3076e1 100755
fi
case "${host}" in
-@@ -13436,13 +14091,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -13473,13 +14128,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -18795,7 +18678,7 @@ index eedb184..d3076e1 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -13457,14 +14119,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -13494,14 +14156,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -18814,7 +18697,7 @@ index eedb184..d3076e1 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -13497,12 +14162,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -13534,12 +14199,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -18828,7 +18711,7 @@ index eedb184..d3076e1 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -13557,8 +14222,13 @@ reload_flag \
+@@ -13594,8 +14259,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -18842,7 +18725,7 @@ index eedb184..d3076e1 100755
STRIP \
RANLIB \
CC \
-@@ -13568,12 +14238,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -13605,12 +14275,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -18858,7 +18741,7 @@ index eedb184..d3076e1 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -13589,7 +14261,6 @@ no_undefined_flag \
+@@ -13626,7 +14298,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -18866,7 +18749,7 @@ index eedb184..d3076e1 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -13625,6 +14296,7 @@ module_cmds \
+@@ -13662,6 +14333,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -18874,7 +18757,7 @@ index eedb184..d3076e1 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -14381,7 +15053,8 @@ $as_echo X"$file" |
+@@ -14418,7 +15090,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -18884,7 +18767,7 @@ index eedb184..d3076e1 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -14484,19 +15157,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -14521,19 +15194,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -18928,7 +18811,7 @@ index eedb184..d3076e1 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -14526,6 +15222,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -14563,6 +15259,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -18941,7 +18824,7 @@ index eedb184..d3076e1 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -14535,6 +15237,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -14572,6 +15274,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -18951,7 +18834,7 @@ index eedb184..d3076e1 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -14649,12 +15354,12 @@ with_gcc=$GCC
+@@ -14686,12 +15391,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -18967,7 +18850,7 @@ index eedb184..d3076e1 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -14741,9 +15446,6 @@ inherit_rpath=$inherit_rpath
+@@ -14778,9 +15483,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -18977,7 +18860,7 @@ index eedb184..d3076e1 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -14759,6 +15461,9 @@ include_expsyms=$lt_include_expsyms
+@@ -14796,6 +15498,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -18987,7 +18870,7 @@ index eedb184..d3076e1 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -14791,210 +15496,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -14828,210 +15533,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -19362,7 +19245,7 @@ index eedb184..d3076e1 100755
chmod +x "$ofile"
diff --git a/opcodes/configure.ac b/opcodes/configure.ac
-index 07e3162..c0c75d4 100644
+index c7f4783..f2e002d 100644
--- a/opcodes/configure.ac
+++ b/opcodes/configure.ac
@@ -167,7 +167,7 @@ changequote(,)dnl
@@ -19375,7 +19258,7 @@ index 07e3162..c0c75d4 100644
case "${host}" in
diff --git a/zlib/configure b/zlib/configure
-index 8378857..7584940 100755
+index bba9fd2..25a2dae 100755
--- a/zlib/configure
+++ b/zlib/configure
@@ -614,8 +614,11 @@ OTOOL
@@ -19390,7 +19273,7 @@ index 8378857..7584940 100755
OBJDUMP
LN_S
NM
-@@ -736,6 +739,7 @@ enable_static
+@@ -737,6 +740,7 @@ enable_static
with_pic
enable_fast_install
with_gnu_ld
@@ -19398,7 +19281,7 @@ index 8378857..7584940 100755
enable_libtool_lock
enable_host_shared
'
-@@ -1384,6 +1388,8 @@ Optional Packages:
+@@ -1385,6 +1389,8 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
@@ -19407,7 +19290,7 @@ index 8378857..7584940 100755
Some influential environment variables:
CC C compiler command
-@@ -3907,8 +3913,8 @@ esac
+@@ -3910,8 +3916,8 @@ esac
@@ -19418,7 +19301,7 @@ index 8378857..7584940 100755
-@@ -3948,7 +3954,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -3951,7 +3957,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
$as_echo_n "checking how to print strings... " >&6; }
# Test print first, because it will be a builtin if present.
@@ -19427,7 +19310,7 @@ index 8378857..7584940 100755
test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
ECHO='print -r --'
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -4764,8 +4770,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -4767,8 +4773,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
# Try some XSI features
xsi_shell=no
( _lt_dummy="a/b/c"
@@ -19438,7 +19321,7 @@ index 8378857..7584940 100755
&& eval 'test $(( 1 + 1 )) -eq 2 \
&& test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
&& xsi_shell=yes
-@@ -4814,6 +4820,80 @@ esac
+@@ -4817,6 +4823,80 @@ esac
@@ -19519,7 +19402,7 @@ index 8378857..7584940 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
$as_echo_n "checking for $LD option to reload object files... " >&6; }
if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -4830,6 +4910,11 @@ case $reload_flag in
+@@ -4833,6 +4913,11 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
@@ -19531,7 +19414,7 @@ index 8378857..7584940 100755
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -4998,7 +5083,8 @@ mingw* | pw32*)
+@@ -5001,7 +5086,8 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -19541,7 +19424,7 @@ index 8378857..7584940 100755
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
-@@ -5152,6 +5238,21 @@ esac
+@@ -5155,6 +5241,21 @@ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
$as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -19563,7 +19446,7 @@ index 8378857..7584940 100755
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -5167,9 +5268,163 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -5170,9 +5271,163 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -19729,7 +19612,7 @@ index 8378857..7584940 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -5185,7 +5440,7 @@ do
+@@ -5188,7 +5443,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -19738,7 +19621,7 @@ index 8378857..7584940 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -5205,11 +5460,15 @@ $as_echo "no" >&6; }
+@@ -5208,11 +5463,15 @@ $as_echo "no" >&6; }
fi
@@ -19757,7 +19640,7 @@ index 8378857..7584940 100755
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -5225,7 +5484,7 @@ do
+@@ -5228,7 +5487,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -19766,7 +19649,7 @@ index 8378857..7584940 100755
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
-@@ -5244,6 +5503,10 @@ else
+@@ -5247,6 +5506,10 @@ else
$as_echo "no" >&6; }
fi
@@ -19777,7 +19660,7 @@ index 8378857..7584940 100755
if test "x$ac_ct_AR" = x; then
AR="false"
else
-@@ -5255,16 +5518,72 @@ ac_tool_warned=yes ;;
+@@ -5258,16 +5521,72 @@ ac_tool_warned=yes ;;
esac
AR=$ac_ct_AR
fi
@@ -19854,7 +19737,7 @@ index 8378857..7584940 100755
-@@ -5606,8 +5925,8 @@ esac
+@@ -5609,8 +5928,8 @@ esac
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
@@ -19865,7 +19748,7 @@ index 8378857..7584940 100755
# Handle CRLF in mingw tool chain
opt_cr=
-@@ -5643,6 +5962,7 @@ for ac_symprfx in "" "_"; do
+@@ -5646,6 +5965,7 @@ for ac_symprfx in "" "_"; do
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
@@ -19873,7 +19756,7 @@ index 8378857..7584940 100755
# Check to see that the pipe works correctly.
pipe_works=no
-@@ -5684,6 +6004,18 @@ _LT_EOF
+@@ -5687,6 +6007,18 @@ _LT_EOF
if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
@@ -19892,7 +19775,7 @@ index 8378857..7584940 100755
#ifdef __cplusplus
extern "C" {
#endif
-@@ -5695,7 +6027,7 @@ _LT_EOF
+@@ -5698,7 +6030,7 @@ _LT_EOF
cat <<_LT_EOF >> conftest.$ac_ext
/* The mapping between symbol names and symbols. */
@@ -19901,7 +19784,7 @@ index 8378857..7584940 100755
const char *name;
void *address;
}
-@@ -5721,8 +6053,8 @@ static const void *lt_preloaded_setup() {
+@@ -5724,8 +6056,8 @@ static const void *lt_preloaded_setup() {
_LT_EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
@@ -19912,7 +19795,7 @@ index 8378857..7584940 100755
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -5732,8 +6064,8 @@ _LT_EOF
+@@ -5735,8 +6067,8 @@ _LT_EOF
test $ac_status = 0; } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
@@ -19923,7 +19806,7 @@ index 8378857..7584940 100755
else
echo "cannot find nm_test_func in $nlist" >&5
fi
-@@ -5770,6 +6102,19 @@ else
+@@ -5773,6 +6105,19 @@ else
$as_echo "ok" >&6; }
fi
@@ -19943,7 +19826,7 @@ index 8378857..7584940 100755
-@@ -5790,6 +6135,41 @@ fi
+@@ -5793,6 +6138,41 @@ fi
@@ -19985,7 +19868,7 @@ index 8378857..7584940 100755
# Check whether --enable-libtool-lock was given.
-@@ -6001,6 +6381,123 @@ esac
+@@ -6004,6 +6384,123 @@ esac
need_locks="$enable_libtool_lock"
@@ -20109,7 +19992,7 @@ index 8378857..7584940 100755
case $host_os in
rhapsody* | darwin*)
-@@ -6567,6 +7064,8 @@ _LT_EOF
+@@ -6570,6 +7067,8 @@ _LT_EOF
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
echo "$AR cru libconftest.a conftest.o" >&5
$AR cru libconftest.a conftest.o 2>&5
@@ -20118,7 +20001,7 @@ index 8378857..7584940 100755
cat > conftest.c << _LT_EOF
int main() { return 0;}
_LT_EOF
-@@ -7030,7 +7529,8 @@ fi
+@@ -7033,7 +7532,8 @@ fi
LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
@@ -20128,7 +20011,7 @@ index 8378857..7584940 100755
-@@ -7119,7 +7619,7 @@ aix3*)
+@@ -7122,7 +7622,7 @@ aix3*)
esac
# Global variables:
@@ -20137,7 +20020,7 @@ index 8378857..7584940 100755
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -7417,8 +7917,6 @@ fi
+@@ -7420,8 +7920,6 @@ fi
lt_prog_compiler_pic=
lt_prog_compiler_static=
@@ -20146,7 +20029,7 @@ index 8378857..7584940 100755
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
-@@ -7584,6 +8082,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -7587,6 +8085,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='--shared'
lt_prog_compiler_static='--static'
;;
@@ -20159,7 +20042,7 @@ index 8378857..7584940 100755
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
-@@ -7646,7 +8150,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -7649,7 +8153,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
@@ -20168,7 +20051,7 @@ index 8378857..7584940 100755
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
-@@ -7703,13 +8207,17 @@ case $host_os in
+@@ -7706,13 +8210,17 @@ case $host_os in
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
@@ -20192,7 +20075,7 @@ index 8378857..7584940 100755
#
# Check to make sure the PIC flag actually works.
-@@ -7770,6 +8278,11 @@ fi
+@@ -7773,6 +8281,11 @@ fi
@@ -20204,7 +20087,7 @@ index 8378857..7584940 100755
#
# Check to make sure the static flag actually works.
#
-@@ -8120,7 +8633,8 @@ _LT_EOF
+@@ -8123,7 +8636,8 @@ _LT_EOF
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -20214,7 +20097,7 @@ index 8378857..7584940 100755
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8219,12 +8733,12 @@ _LT_EOF
+@@ -8222,12 +8736,12 @@ _LT_EOF
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -20229,7 +20112,7 @@ index 8378857..7584940 100755
fi
;;
esac
-@@ -8238,8 +8752,8 @@ _LT_EOF
+@@ -8241,8 +8755,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -20240,7 +20123,7 @@ index 8378857..7584940 100755
fi
;;
-@@ -8257,8 +8771,8 @@ _LT_EOF
+@@ -8260,8 +8774,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -20251,7 +20134,7 @@ index 8378857..7584940 100755
else
ld_shlibs=no
fi
-@@ -8304,8 +8818,8 @@ _LT_EOF
+@@ -8307,8 +8821,8 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -20262,7 +20145,7 @@ index 8378857..7584940 100755
else
ld_shlibs=no
fi
-@@ -8435,7 +8949,13 @@ _LT_EOF
+@@ -8438,7 +8952,13 @@ _LT_EOF
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -20277,7 +20160,7 @@ index 8378857..7584940 100755
as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -8451,22 +8971,29 @@ main ()
+@@ -8454,22 +8974,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -20320,7 +20203,7 @@ index 8378857..7584940 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -8478,7 +9005,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8481,7 +9008,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else
# Determine the default libpath from the value encoded in an
# empty executable.
@@ -20335,7 +20218,7 @@ index 8378857..7584940 100755
as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -8494,22 +9027,29 @@ main ()
+@@ -8497,22 +9030,29 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -20378,7 +20261,7 @@ index 8378857..7584940 100755
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
-@@ -8554,20 +9094,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8557,20 +9097,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
@@ -20456,7 +20339,7 @@ index 8378857..7584940 100755
;;
darwin* | rhapsody*)
-@@ -8628,7 +9211,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8631,7 +9214,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | dragonfly*)
@@ -20465,7 +20348,7 @@ index 8378857..7584940 100755
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
-@@ -8636,7 +9219,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8639,7 +9222,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux9*)
if test "$GCC" = yes; then
@@ -20474,7 +20357,7 @@ index 8378857..7584940 100755
else
archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
-@@ -8652,7 +9235,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8655,7 +9238,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hpux10*)
if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -20483,7 +20366,7 @@ index 8378857..7584940 100755
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
-@@ -8676,10 +9259,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -8679,10 +9262,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
@@ -20496,7 +20379,7 @@ index 8378857..7584940 100755
;;
esac
else
-@@ -8758,26 +9341,39 @@ fi
+@@ -8761,26 +9344,39 @@ fi
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
@@ -20544,7 +20427,7 @@ index 8378857..7584940 100755
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -8862,7 +9458,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -8865,7 +9461,7 @@ rm -f core conftest.err conftest.$ac_objext \
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -20553,7 +20436,7 @@ index 8378857..7584940 100755
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
-@@ -8881,9 +9477,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -8884,9 +9480,9 @@ rm -f core conftest.err conftest.$ac_objext \
no_undefined_flag=' -z defs'
if test "$GCC" = yes; then
wlarc='${wl}'
@@ -20565,7 +20448,7 @@ index 8378857..7584940 100755
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
-@@ -9459,8 +10055,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -9462,8 +10058,9 @@ cygwin* | mingw* | pw32* | cegcc*)
need_version=no
need_lib_prefix=no
@@ -20577,7 +20460,7 @@ index 8378857..7584940 100755
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
-@@ -9493,13 +10090,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -9496,13 +10093,71 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
@@ -20650,7 +20533,7 @@ index 8378857..7584940 100755
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
-@@ -9591,7 +10246,7 @@ haiku*)
+@@ -9594,7 +10249,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -20659,16 +20542,16 @@ index 8378857..7584940 100755
hardcode_into_libs=yes
;;
-@@ -10405,7 +11060,7 @@ else
+@@ -10408,7 +11063,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
--#line 10408 "configure"
+-#line 10411 "configure"
+#line $LINENO "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-@@ -10449,10 +11104,10 @@ else
+@@ -10452,10 +11107,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -20681,16 +20564,16 @@ index 8378857..7584940 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -10511,7 +11166,7 @@ else
+@@ -10514,7 +11169,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
--#line 10514 "configure"
+-#line 10517 "configure"
+#line $LINENO "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-@@ -10555,10 +11210,10 @@ else
+@@ -10558,10 +11213,10 @@ else
/* When -fvisbility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -20703,7 +20586,7 @@ index 8378857..7584940 100755
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11990,13 +12645,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -11993,13 +12648,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -20724,7 +20607,7 @@ index 8378857..7584940 100755
STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -12011,14 +12673,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -12014,14 +12676,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -20743,7 +20626,7 @@ index 8378857..7584940 100755
DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -12051,12 +12716,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -12054,12 +12719,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -20757,7 +20640,7 @@ index 8378857..7584940 100755
file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -12111,8 +12776,13 @@ reload_flag \
+@@ -12114,8 +12779,13 @@ reload_flag \
OBJDUMP \
deplibs_check_method \
file_magic_cmd \
@@ -20771,7 +20654,7 @@ index 8378857..7584940 100755
STRIP \
RANLIB \
CC \
-@@ -12122,12 +12792,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -12125,12 +12795,14 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -20787,7 +20670,7 @@ index 8378857..7584940 100755
DSYMUTIL \
NMEDIT \
LIPO \
-@@ -12143,7 +12815,6 @@ no_undefined_flag \
+@@ -12146,7 +12818,6 @@ no_undefined_flag \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
@@ -20795,7 +20678,7 @@ index 8378857..7584940 100755
exclude_expsyms \
include_expsyms \
file_list_spec \
-@@ -12179,6 +12850,7 @@ module_cmds \
+@@ -12182,6 +12853,7 @@ module_cmds \
module_expsym_cmds \
export_symbols_cmds \
prelink_cmds \
@@ -20803,7 +20686,7 @@ index 8378857..7584940 100755
postinstall_cmds \
postuninstall_cmds \
finish_cmds \
-@@ -12768,7 +13440,8 @@ $as_echo X"$file" |
+@@ -12771,7 +13443,8 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -20813,7 +20696,7 @@ index 8378857..7584940 100755
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
-@@ -12871,19 +13544,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -12874,19 +13547,42 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces.
NL2SP=$lt_lt_NL2SP
@@ -20857,7 +20740,7 @@ index 8378857..7584940 100755
# A symbol stripping program.
STRIP=$lt_STRIP
-@@ -12913,6 +13609,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -12916,6 +13612,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
@@ -20870,7 +20753,7 @@ index 8378857..7584940 100755
# The name of the directory that contains temporary libtool files.
objdir=$objdir
-@@ -12922,6 +13624,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -12925,6 +13627,9 @@ MAGIC_CMD=$MAGIC_CMD
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
@@ -20880,7 +20763,7 @@ index 8378857..7584940 100755
# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
DSYMUTIL=$lt_DSYMUTIL
-@@ -13036,12 +13741,12 @@ with_gcc=$GCC
+@@ -13039,12 +13744,12 @@ with_gcc=$GCC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
@@ -20896,7 +20779,7 @@ index 8378857..7584940 100755
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
-@@ -13128,9 +13833,6 @@ inherit_rpath=$inherit_rpath
+@@ -13131,9 +13836,6 @@ inherit_rpath=$inherit_rpath
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
@@ -20906,7 +20789,7 @@ index 8378857..7584940 100755
# Set to "yes" if exported symbols are required.
always_export_symbols=$always_export_symbols
-@@ -13146,6 +13848,9 @@ include_expsyms=$lt_include_expsyms
+@@ -13149,6 +13851,9 @@ include_expsyms=$lt_include_expsyms
# Commands necessary for linking programs (against libraries) with templates.
prelink_cmds=$lt_prelink_cmds
@@ -20916,7 +20799,7 @@ index 8378857..7584940 100755
# Specify filename containing input files.
file_list_spec=$lt_file_list_spec
-@@ -13178,210 +13883,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -13181,210 +13886,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
@@ -21291,5 +21174,4 @@ index 8378857..7584940 100755
chmod +x "$ofile"
--
-2.7.1
-
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
index cb3f83b4f..795abf365 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
@@ -1,7 +1,7 @@
-From 4ff9dbe13f38e4fea24fbcc9879cf7352c0561ff Mon Sep 17 00:00:00 2001
+From 9475aee8a702aa531737ec12dfd928d52951bc84 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:37:10 +0000
-Subject: [PATCH 07/14] Add the armv5e architecture to binutils
+Subject: [PATCH 07/13] Add the armv5e architecture to binutils
Binutils has a comment that indicates it is supposed to match gcc for
all of the support "-march=" settings, but it was lacking the armv5e setting.
@@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
-index 3bd4bc9..5d99921 100644
+index 73d0531..4b9e32f 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
-@@ -24791,6 +24791,7 @@ static const struct arm_arch_option_table arm_archs[] =
+@@ -25421,6 +25421,7 @@ static const struct arm_arch_option_table arm_archs[] =
ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
@@ -31,5 +31,5 @@ index 3bd4bc9..5d99921 100644
ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
index f8382f872..af524ced2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
@@ -1,7 +1,7 @@
-From cb36d94dbd521752e6444418af500e139a26eabb Mon Sep 17 00:00:00 2001
+From b2d277937d11f1ce1d581f48ff74a25822a052da Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:39:01 +0000
-Subject: [PATCH 08/14] don't let the distro compiler point to the wrong
+Subject: [PATCH 08/13] don't let the distro compiler point to the wrong
installation location
Thanks to RP for helping find the source code causing the issue.
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index 7d7e2f4..1aaaf0e 100644
+index c7a4568..f766b72 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -364,7 +364,8 @@ install-strip: install
@@ -31,5 +31,5 @@ index 7d7e2f4..1aaaf0e 100644
if test -n "${target_header_dir}"; then \
${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
index d3f510b11..3c83e69e4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -1,7 +1,7 @@
-From 4daa841ce16ba52b717bdff9eb1dfc4f19638814 Mon Sep 17 00:00:00 2001
+From 7ab8e318659eb5d9adc758c78d084a95560b93fd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 15 Jan 2016 06:31:09 +0000
-Subject: [PATCH 09/14] warn for uses of system directories when cross linking
+Subject: [PATCH 09/13] warn for uses of system directories when cross linking
2008-07-02 Joseph Myers <joseph@codesourcery.com>
@@ -63,10 +63,10 @@ Upstream-Status: Pending
9 files changed, 86 insertions(+)
diff --git a/ld/config.in b/ld/config.in
-index 276fb77..35c58eb 100644
+index 2c6d698..d3cb7e8 100644
--- a/ld/config.in
+++ b/ld/config.in
-@@ -14,6 +14,9 @@
+@@ -17,6 +17,9 @@
language is requested. */
#undef ENABLE_NLS
@@ -77,10 +77,10 @@ index 276fb77..35c58eb 100644
#undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure
-index eb4f0d7..e9054b4 100755
+index 3df1149..0601c98 100755
--- a/ld/configure
+++ b/ld/configure
-@@ -790,6 +790,7 @@ with_lib_path
+@@ -792,6 +792,7 @@ with_lib_path
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -88,7 +88,7 @@ index eb4f0d7..e9054b4 100755
enable_gold
enable_got
enable_compressed_debug_sections
-@@ -1446,6 +1447,8 @@ Optional Features:
+@@ -1449,6 +1450,8 @@ Optional Features:
--disable-largefile omit support for large files
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
@@ -97,7 +97,7 @@ index eb4f0d7..e9054b4 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
-@@ -16306,6 +16309,19 @@ fi
+@@ -16313,6 +16316,19 @@ fi
@@ -118,7 +118,7 @@ index eb4f0d7..e9054b4 100755
if test "${enable_gold+set}" = set; then :
enableval=$enable_gold; case "${enableval}" in
diff --git a/ld/configure.ac b/ld/configure.ac
-index e28f38e..7b474e7 100644
+index d17281f..9fb3db9 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
@@ -139,10 +139,10 @@ index e28f38e..7b474e7 100644
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
diff --git a/ld/ld.h b/ld/ld.h
-index d84ec4e..3476b26 100644
+index 85a48ad..a8fdddf 100644
--- a/ld/ld.h
+++ b/ld/ld.h
-@@ -164,6 +164,14 @@ typedef struct {
+@@ -169,6 +169,14 @@ typedef struct
/* If set, display the target memory usage (per memory region). */
bfd_boolean print_memory_usage;
@@ -158,10 +158,10 @@ index d84ec4e..3476b26 100644
enum endian_enum endian;
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index 2389661..d06112b 100644
+index bc16764..838c75d 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
-@@ -2338,6 +2338,18 @@ string identifying the original linked file does not change.
+@@ -2357,6 +2357,18 @@ string identifying the original linked file does not change.
Passing @code{none} for @var{style} disables the setting from any
@code{--build-id} options earlier on the command line.
@@ -181,7 +181,7 @@ index 2389661..d06112b 100644
@c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 96f9ecc..af231c0 100644
+index e397737..013727b 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
@@ -209,7 +209,7 @@ index 96f9ecc..af231c0 100644
/* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 6f11e7b..0ca3110 100644
+index cf943e4..12cfcaa 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -144,6 +144,8 @@ enum option_values
@@ -222,7 +222,7 @@ index 6f11e7b..0ca3110 100644
/* The initial parser states. */
diff --git a/ld/ldmain.c b/ld/ldmain.c
-index bb0b9cc..a23c56c 100644
+index e7a8dff..3ccf2af 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -257,6 +257,8 @@ main (int argc, char **argv)
@@ -235,7 +235,7 @@ index bb0b9cc..a23c56c 100644
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
diff --git a/ld/lexsup.c b/ld/lexsup.c
-index e2fb212..a2064f1 100644
+index 6d28e91..5c9da57 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
@@ -269,5 +269,5 @@ index e2fb212..a2064f1 100644
}
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
index 407424103..e2f6a51a3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
@@ -1,7 +1,7 @@
-From bb9eb09411ddcef515f0f7ad7c29214b0766e960 Mon Sep 17 00:00:00 2001
+From 27fc7a4927ab92925a5be84217959d9f1c808ccc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:42:38 +0000
-Subject: [PATCH 10/14] Fix rpath in libtool when sysroot is enabled
+Subject: [PATCH 10/13] Fix rpath in libtool when sysroot is enabled
Enabling sysroot support in libtool exposed a bug where the final
library had an RPATH encoded into it which still pointed to the
@@ -48,5 +48,5 @@ index 70e856e..11ee684 100644
if test -z "$hardcode_libdirs"; then
hardcode_libdirs="$libdir"
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
index c0d2d718a..3fdb5eb92 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
@@ -1,7 +1,7 @@
-From af1b4ee69b4fd617b88127ed40c3ca7351a9532f Mon Sep 17 00:00:00 2001
+From 6b018e8129298dbd5b714e459ef0b3aef5bbce13 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 2 Mar 2015 01:44:14 +0000
-Subject: [PATCH 11/14] Change default emulation for mips64*-*-linux
+Subject: [PATCH 11/13] Change default emulation for mips64*-*-linux
we change the default emulations to be N64 instead of N32
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/bfd/config.bfd b/bfd/config.bfd
-index c5688cb..5c27b49 100644
+index b998830..ab17e72 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
-@@ -1087,12 +1087,12 @@ case "${targ}" in
+@@ -1101,12 +1101,12 @@ case "${targ}" in
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
;;
mips64*el-*-linux*)
@@ -35,10 +35,10 @@ index c5688cb..5c27b49 100644
mips*el-*-linux*)
targ_defvec=mips_elf32_trad_le_vec
diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 6b6bbf2..b45b1e5 100644
+index a3db909..212327c 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
-@@ -509,11 +509,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
+@@ -513,11 +513,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmipvxworks
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
@@ -55,5 +55,5 @@ index 6b6bbf2..b45b1e5 100644
mips*el-*-linux-*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
index af7f12ff8..8103347ba 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
@@ -1,7 +1,7 @@
-From 9f967c555b3fda64af4549ae252a0fba00120529 Mon Sep 17 00:00:00 2001
+From c2e138f4ccdf8af81c18c8511c901d3deee696b5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 14 Feb 2016 17:06:19 +0000
-Subject: [PATCH 12/14] Add support for Netlogic XLP
+Subject: [PATCH 12/13] Add support for Netlogic XLP
Patch From: Nebu Philips <nphilips@netlogicmicro.com>
@@ -35,10 +35,10 @@ Upstream-Status: Pending
15 files changed, 65 insertions(+), 25 deletions(-)
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
-index f78b910..d0d8dd3 100644
+index be0126a..4ca7e24 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
-@@ -802,6 +802,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
+@@ -812,6 +812,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
case bfd_mach_mipsisa64r6:
case bfd_mach_mips_sb1:
case bfd_mach_mips_xlr:
@@ -47,10 +47,10 @@ index f78b910..d0d8dd3 100644
arch_flags = M_MIPS2;
break;
diff --git a/bfd/archures.c b/bfd/archures.c
-index 51068b9..727741f 100644
+index 96c9109..5a30d02 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
-@@ -181,6 +181,7 @@ DESCRIPTION
+@@ -197,6 +197,7 @@ DESCRIPTION
.#define bfd_mach_mips_octeon2 6502
.#define bfd_mach_mips_octeon3 6503
.#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *}
@@ -59,10 +59,10 @@ index 51068b9..727741f 100644
.#define bfd_mach_mipsisa32r2 33
.#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index 779ffbf..bf5a565 100644
+index 30513c4..5e8ed4c 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
-@@ -1993,6 +1993,7 @@ enum bfd_architecture
+@@ -2008,6 +2008,7 @@ enum bfd_architecture
#define bfd_mach_mips_octeon2 6502
#define bfd_mach_mips_octeon3 6503
#define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
@@ -71,10 +71,10 @@ index 779ffbf..bf5a565 100644
#define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa32r3 34
diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 5c27b49..d553039 100644
+index ab17e72..863be89 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
-@@ -1066,6 +1066,11 @@ case "${targ}" in
+@@ -1084,6 +1084,11 @@ case "${targ}" in
targ_defvec=mips_elf32_le_vec
targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
;;
@@ -83,11 +83,11 @@ index 5c27b49..d553039 100644
+ targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
+ want64=true
+ ;;
- mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss)
+ mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none)
targ_defvec=mips_elf32_be_vec
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
-index 8a9475d..de7e5a3 100644
+index d209fb6..b6a86ae 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -104,7 +104,8 @@ enum
@@ -111,10 +111,10 @@ index 8a9475d..de7e5a3 100644
/* The default architecture is mips:3000, but with a machine number of
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
-index 1f2f4a3..700afd3 100644
+index e47276b..71c30a0 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
-@@ -6605,6 +6605,9 @@ _bfd_elf_mips_mach (flagword flags)
+@@ -6646,6 +6646,9 @@ _bfd_elf_mips_mach (flagword flags)
case E_MIPS_MACH_XLR:
return bfd_mach_mips_xlr;
@@ -124,7 +124,7 @@ index 1f2f4a3..700afd3 100644
default:
switch (flags & EF_MIPS_ARCH)
{
-@@ -11901,6 +11904,10 @@ mips_set_isa_flags (bfd *abfd)
+@@ -11949,6 +11952,10 @@ mips_set_isa_flags (bfd *abfd)
val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
break;
@@ -135,7 +135,7 @@ index 1f2f4a3..700afd3 100644
case bfd_mach_mipsisa32:
val = E_MIPS_ARCH_32;
break;
-@@ -13931,6 +13938,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
+@@ -13975,6 +13982,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
{ bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
{ bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
{ bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
@@ -144,10 +144,10 @@ index 1f2f4a3..700afd3 100644
/* MIPS64 extensions. */
{ bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
diff --git a/binutils/readelf.c b/binutils/readelf.c
-index d5dd46f..66810cc 100644
+index 274ddd1..d31558c 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
-@@ -3140,6 +3140,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
+@@ -3230,6 +3230,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
@@ -156,7 +156,7 @@ index d5dd46f..66810cc 100644
/* We simply ignore the field in this case to avoid confusion:
MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
-index a2d45a4..75902c0 100644
+index eb8b26b..e59dce6 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -552,6 +552,7 @@ static int mips_32bitmode = 0;
@@ -175,20 +175,20 @@ index a2d45a4..75902c0 100644
)
/* Whether the processor uses hardware interlocks to protect reads
-@@ -18702,7 +18704,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
+@@ -18858,7 +18860,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
/* Broadcom XLP.
XLP is mostly like XLR, with the prominent exception that it is
MIPS64R2 rather than MIPS64. */
- { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLR },
+ { "xlp", 0, 0, ISA_MIPS64R2, CPU_XLP },
- /* i6400. */
+ /* MIPS 64 Release 6 */
{ "i6400", 0, ASE_MSA, ISA_MIPS64R6, CPU_MIPS64R6},
diff --git a/gas/configure b/gas/configure
-index 89f18b3..86b19ae 100755
+index 45da030..aba89f7 100755
--- a/gas/configure
+++ b/gas/configure
-@@ -12851,6 +12851,9 @@ _ACEOF
+@@ -12914,6 +12914,9 @@ _ACEOF
mipsisa64r6 | mipsisa64r6el)
mips_cpu=mips64r6
;;
@@ -199,7 +199,7 @@ index 89f18b3..86b19ae 100755
mips_cpu=r3900
;;
diff --git a/gas/configure.tgt b/gas/configure.tgt
-index 086e0d2..2b71270 100644
+index 1b9fd99..a9f1977 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -339,7 +339,7 @@ case ${generic_target} in
@@ -212,10 +212,10 @@ index 086e0d2..2b71270 100644
mips-*-openbsd*) fmt=elf em=tmips ;;
diff --git a/include/elf/mips.h b/include/elf/mips.h
-index 57de3bc..9ba141d 100644
+index 7e813de..d7d72c1 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
-@@ -285,6 +285,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
+@@ -290,6 +290,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
#define E_MIPS_MACH_SB1 0x008a0000
#define E_MIPS_MACH_OCTEON 0x008b0000
#define E_MIPS_MACH_XLR 0x008c0000
@@ -224,10 +224,10 @@ index 57de3bc..9ba141d 100644
#define E_MIPS_MACH_OCTEON3 0x008e0000
#define E_MIPS_MACH_5400 0x00910000
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
-index 9318fcc..9be5645 100644
+index b1d4ef6..f2c8e88 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
-@@ -1228,8 +1228,10 @@ static const unsigned int mips_isa_table[] = {
+@@ -1232,8 +1232,10 @@ static const unsigned int mips_isa_table[] = {
#define INSN_LOONGSON_2F 0x80000000
/* Loongson 3A. */
#define INSN_LOONGSON_3A 0x00000400
@@ -240,7 +240,7 @@ index 9318fcc..9be5645 100644
/* DSP ASE */
#define ASE_DSP 0x00000001
-@@ -1326,6 +1328,7 @@ static const unsigned int mips_isa_table[] = {
+@@ -1331,6 +1333,7 @@ static const unsigned int mips_isa_table[] = {
#define CPU_OCTEON2 6502
#define CPU_OCTEON3 6503
#define CPU_XLR 887682 /* decimal 'XLR' */
@@ -248,7 +248,7 @@ index 9318fcc..9be5645 100644
/* Return true if the given CPU is included in INSN_* mask MASK. */
-@@ -1403,6 +1406,9 @@ cpu_is_member (int cpu, unsigned int mask)
+@@ -1408,6 +1411,9 @@ cpu_is_member (int cpu, unsigned int mask)
return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
|| ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
@@ -259,10 +259,10 @@ index 9318fcc..9be5645 100644
return FALSE;
}
diff --git a/ld/configure.tgt b/ld/configure.tgt
-index b45b1e5..fb2f36a 100644
+index 212327c..212e09c 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
-@@ -495,6 +495,8 @@ mips*el-sde-elf*) targ_emul=elf32ltsmip
+@@ -499,6 +499,8 @@ mips*el-sde-elf* | mips*el-mti-elf* | mips*el-img-elf*)
mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
@@ -272,7 +272,7 @@ index b45b1e5..fb2f36a 100644
targ_extra_emuls="elf32lr5900"
targ_extra_libpath=$targ_extra_emuls ;;
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
-index 8200920..40d9fe2 100644
+index 3f874e7..9813d0e 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -648,13 +648,11 @@ const struct mips_arch_choice mips_arch_choices[] =
@@ -295,7 +295,7 @@ index 8200920..40d9fe2 100644
/* This entry, mips16, is here only for ISA/processor selection; do
not print its name. */
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
-index 402f887..3764836 100644
+index a95eff1..99fb7bb 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -320,7 +320,8 @@ decode_mips_operand (const char *p)
@@ -308,7 +308,7 @@ index 402f887..3764836 100644
#define IVIRT ASE_VIRT
#define IVIRT64 ASE_VIRT64
-@@ -957,6 +958,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -958,6 +959,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"clo", "U,s", 0x70000021, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
{"clz", "d,s", 0x00000050, 0xfc1f07ff, WR_1|RD_2, 0, I37, 0, 0 },
{"clz", "U,s", 0x70000020, 0xfc0007ff, WR_1|RD_2, 0, I32|N55, 0, I37 },
@@ -316,7 +316,7 @@ index 402f887..3764836 100644
/* ctc0 is at the bottom of the table. */
{"ctc1", "t,G", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
{"ctc1", "t,S", 0x44c00000, 0xffe007ff, RD_1|WR_CC|CM, 0, I1, 0, 0 },
-@@ -989,12 +991,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -990,12 +992,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_1|RD_2, 0, I3, 0, 0 },
{"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I3, 0, 0 },
{"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3, 0, 0 },
@@ -331,7 +331,7 @@ index 402f887..3764836 100644
/* dctr and dctw are used on the r5000. */
{"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
{"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_2, 0, I3, 0, 0 },
-@@ -1066,6 +1069,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1067,6 +1070,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"dmfc0", "t,G,H", 0x40200000, 0xffe007f8, WR_1|RD_C0|LC, 0, I64, 0, 0 },
{"dmfgc0", "t,G", 0x40600100, 0xffe007ff, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
{"dmfgc0", "t,G,H", 0x40600100, 0xffe007f8, WR_1|RD_C0|LC, 0, 0, IVIRT64, 0 },
@@ -339,7 +339,7 @@ index 402f887..3764836 100644
{"dmt", "", 0x41600bc1, 0xffffffff, TRAP, 0, 0, MT32, 0 },
{"dmt", "t", 0x41600bc1, 0xffe0ffff, WR_1|TRAP, 0, 0, MT32, 0 },
{"dmtc0", "t,G", 0x40a00000, 0xffe007ff, RD_1|WR_C0|WR_CC|CM, 0, I3, 0, EE },
-@@ -1081,6 +1085,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1082,6 +1086,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* dmfc3 is at the bottom of the table. */
/* dmtc3 is at the bottom of the table. */
{"dmuh", "d,s,t", 0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
@@ -348,7 +348,7 @@ index 402f887..3764836 100644
{"dmul", "d,s,t", 0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3, 0, I69, 0, 0 },
{"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO, 0, IOCT, 0, 0 },
{"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3, 0, M32|I69 },
-@@ -1234,9 +1240,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1235,9 +1241,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"ld", "s,-b(+R)", 0xec180000, 0xfc1c0000, WR_1, RD_pc, I69, 0, 0 },
{"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1, 0, 0 },
{"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_1|RD_3|LM, 0, I3, 0, 0 },
@@ -361,7 +361,7 @@ index 402f887..3764836 100644
{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
{"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D, 0, I2, 0, SF },
{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2, 0, SF },
-@@ -1401,7 +1407,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1402,7 +1408,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_1|RD_LO, 0, 0, D32, 0 },
{"mflo1", "d", 0x70000012, 0xffff07ff, WR_1|RD_LO, 0, EE, 0, 0 },
{"mflhxu", "d", 0x00000052, 0xffff07ff, WR_1|MOD_HILO, 0, 0, SMT, 0 },
@@ -370,7 +370,7 @@ index 402f887..3764836 100644
{"mfsa", "d", 0x00000028, 0xffff07ff, WR_1, 0, EE, 0, 0 },
{"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, SB1, MX, 0 },
{"min.ob", "D,S,Q", 0x48000006, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, N54, 0, 0 },
-@@ -1446,10 +1452,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1447,10 +1453,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* move is at the top of the table. */
{"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_1|RD_2|RD_3|FP_D, 0, 0, MX, 0 },
{"msgsnd", "t", 0, (int) M_MSGSND, INSN_MACRO, 0, XLR, 0, 0 },
@@ -386,7 +386,7 @@ index 402f887..3764836 100644
{"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0, I4_33, 0, I37 },
{"msub.d", "D,S,T", 0x46200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2E, 0, 0 },
{"msub.d", "D,S,T", 0x72200019, 0xffe0003f, WR_1|RD_2|RD_3|FP_D, 0, IL2F, 0, 0 },
-@@ -1499,7 +1508,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1500,7 +1509,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_1|WR_LO, 0, 0, D32, 0 },
{"mtlo1", "s", 0x70000013, 0xfc1fffff, RD_1|WR_LO, 0, EE, 0, 0 },
{"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_1|MOD_HILO, 0, 0, SMT, 0 },
@@ -395,7 +395,7 @@ index 402f887..3764836 100644
{"mtm0", "s", 0x70000008, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
{"mtm0", "s,t", 0x70000008, 0xfc00ffff, RD_1|RD_2, 0, IOCT3, 0, 0 },
{"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_1, 0, IOCT, 0, 0 },
-@@ -1936,9 +1945,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
+@@ -1937,9 +1946,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D, 0, I5_33|N55, 0, I37},
{"sw", "t,o(b)", 0xac000000, 0xfc000000, RD_1|RD_3|SM, 0, I1, 0, 0 },
{"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1, 0, 0 },
@@ -409,5 +409,5 @@ index 402f887..3764836 100644
{"swc0", "E,A(b)", 0, (int) M_SWC0_AB, INSN_MACRO, 0, I1, 0, IOCT|IOCTP|IOCT2|I37 },
{"swc1", "T,o(b)", 0xe4000000, 0xfc000000, RD_1|RD_3|SM|FP_S, 0, I1, 0, 0 },
--
-2.7.1
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
deleted file mode 100644
index 24af1207c..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 9619a608528383a44ccc1637ae939b5f3e97adc5 Mon Sep 17 00:00:00 2001
-From: Sandra Loosemore <sandra@codesourcery.com>
-Date: Wed, 9 Dec 2015 16:13:58 -0800
-Subject: [PATCH 13/14] Fix GOT address computations in initial PLT entries for
- nios2.
-
-2015-12-09 Sandra Loosemore <sandra@codesourcery.com>
-
- bfd/
- * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
- %hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial
- PLT entries. Assert alignment requirements.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport
----
- bfd/elf32-nios2.c | 23 ++++++++++++++++-------
- 1 file changed, 16 insertions(+), 7 deletions(-)
-
-diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
-index 6b29d8b..1c54320 100644
---- a/bfd/elf32-nios2.c
-+++ b/bfd/elf32-nios2.c
-@@ -5383,12 +5383,17 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
- + sgotplt->output_offset);
- if (bfd_link_pic (info))
- {
-- bfd_vma corrected = got_address - (splt->output_section->vma
-- + splt->output_offset + 4);
-+ bfd_vma got_pcrel = got_address - (splt->output_section->vma
-+ + splt->output_offset);
-+ /* Both GOT and PLT must be aligned to a 16-byte boundary
-+ for the two loads to share the %hiadj part. The 4-byte
-+ offset for nextpc is accounted for in the %lo offsets
-+ on the loads. */
-+ BFD_ASSERT ((got_pcrel & 0xf) == 0);
- nios2_elf32_install_data (splt, nios2_so_plt0_entry, 0, 6);
-- nios2_elf32_install_imm16 (splt, 4, hiadj (corrected));
-- nios2_elf32_install_imm16 (splt, 12, (corrected & 0xffff) + 4);
-- nios2_elf32_install_imm16 (splt, 16, (corrected & 0xffff) + 8);
-+ nios2_elf32_install_imm16 (splt, 4, hiadj (got_pcrel));
-+ nios2_elf32_install_imm16 (splt, 12, got_pcrel & 0xffff);
-+ nios2_elf32_install_imm16 (splt, 16, (got_pcrel + 4) & 0xffff);
- }
- else
- {
-@@ -5404,6 +5409,10 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
- 6 | ((res_size - (res_offset + 4)) << 6),
- splt->contents + res_offset);
-
-+ /* The GOT must be aligned to a 16-byte boundary for the
-+ two loads to share the same %hiadj part. */
-+ BFD_ASSERT ((got_address & 0xf) == 0);
-+
- nios2_elf32_install_data (splt, nios2_plt0_entry, res_size, 7);
- nios2_elf32_install_imm16 (splt, res_size, hiadj (res_start));
- nios2_elf32_install_imm16 (splt, res_size + 4,
-@@ -5411,9 +5420,9 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
- nios2_elf32_install_imm16 (splt, res_size + 12,
- hiadj (got_address));
- nios2_elf32_install_imm16 (splt, res_size + 16,
-- (got_address & 0xffff) + 4);
-+ (got_address + 4) & 0xffff);
- nios2_elf32_install_imm16 (splt, res_size + 20,
-- (got_address & 0xffff) + 8);
-+ (got_address + 8) & 0xffff);
- }
- }
- }
---
-2.7.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
new file mode 100644
index 000000000..f314d6420
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
@@ -0,0 +1,36 @@
+From 0c04c3b626998c8e7b595381b35456428581f52a Mon Sep 17 00:00:00 2001
+From: Zhenhua Luo <zhenhua.luo@nxp.com>
+Date: Sat, 11 Jun 2016 22:08:29 -0500
+Subject: [PATCH 13/13] fix the incorrect assembling for ppc wait mnemonic
+
+Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
+
+Upstream-Status: Pending
+---
+ opcodes/ppc-opc.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
+index 8106ab7..ca4b0f3 100644
+--- a/opcodes/ppc-opc.c
++++ b/opcodes/ppc-opc.c
+@@ -4811,7 +4811,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+ {"ldepx", X(31,29), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
+
+ {"waitasec", X(31,30), XRTRARB_MASK, POWER8, POWER9, {0}},
+-{"wait", X(31,30), XWC_MASK, POWER9, 0, {WC}},
+
+ {"lwepx", X(31,31), X_MASK, E500MC|PPCA2, 0, {RT, RA0, RB}},
+
+@@ -4865,7 +4864,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+
+ {"waitrsv", X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
+ {"waitimpl", X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, 0, {0}},
+-{"wait", X(31,62), XWC_MASK, E500MC|PPCA2, 0, {WC}},
++{"wait", X(31,62), XWC_MASK, E500MC|PPCA2|POWER9, 0, {WC}},
+
+ {"dcbstep", XRT(31,63,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}},
+
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Correct-nios2-_gp-address-computation.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Correct-nios2-_gp-address-computation.patch
deleted file mode 100644
index 86eeded6e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Correct-nios2-_gp-address-computation.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 27f155fd0ab4ba954366643dbfdc3c7104933794 Mon Sep 17 00:00:00 2001
-From: Sandra Loosemore <sandra@codesourcery.com>
-Date: Sun, 27 Dec 2015 12:30:26 -0800
-Subject: [PATCH 14/14] Correct nios2 _gp address computation.
-
-2015-12-27 Sandra Loosemore <sandra@codesourcery.com>
-
- bfd/
- * elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
- address.
- (nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
- messages.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport
----
- bfd/elf32-nios2.c | 31 +++++++++++++++++++++----------
- 1 file changed, 21 insertions(+), 10 deletions(-)
-
-diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
-index 1c54320..babecf3 100644
---- a/bfd/elf32-nios2.c
-+++ b/bfd/elf32-nios2.c
-@@ -3086,7 +3086,15 @@ lookup:
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- gp_found = TRUE;
-- *pgp = lh->u.def.value;
-+ {
-+ asection *sym_sec = lh->u.def.section;
-+ bfd_vma sym_value = lh->u.def.value;
-+
-+ if (sym_sec->output_section)
-+ sym_value = (sym_value + sym_sec->output_offset
-+ + sym_sec->output_section->vma);
-+ *pgp = sym_value;
-+ }
- break;
- case bfd_link_hash_indirect:
- case bfd_link_hash_warning:
-@@ -3719,7 +3727,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
- struct elf32_nios2_link_hash_entry *eh;
- bfd_vma relocation;
- bfd_vma gp;
-- bfd_vma reloc_address;
- bfd_reloc_status_type r = bfd_reloc_ok;
- const char *name = NULL;
- int r_type;
-@@ -3762,12 +3769,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
- if (bfd_link_relocatable (info))
- continue;
-
-- if (sec && sec->output_section)
-- reloc_address = (sec->output_section->vma + sec->output_offset
-- + rel->r_offset);
-- else
-- reloc_address = 0;
--
- if (howto)
- {
- switch (howto->type)
-@@ -3816,6 +3817,15 @@ nios2_elf32_relocate_section (bfd *output_bfd,
- /* Turns an absolute address into a gp-relative address. */
- if (!nios2_elf_assign_gp (output_bfd, &gp, info))
- {
-+ bfd_vma reloc_address;
-+
-+ if (sec && sec->output_section)
-+ reloc_address = (sec->output_section->vma
-+ + sec->output_offset
-+ + rel->r_offset);
-+ else
-+ reloc_address = 0;
-+
- format = _("global pointer relative relocation at address "
- "0x%08x when _gp not defined\n");
- sprintf (msgbuf, format, reloc_address);
-@@ -3825,7 +3835,7 @@ nios2_elf32_relocate_section (bfd *output_bfd,
- else
- {
- bfd_vma symbol_address = rel->r_addend + relocation;
-- relocation = relocation + rel->r_addend - gp;
-+ relocation = symbol_address - gp;
- rel->r_addend = 0;
- if (((signed) relocation < -32768
- || (signed) relocation > 32767)
-@@ -3833,6 +3843,8 @@ nios2_elf32_relocate_section (bfd *output_bfd,
- || h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak))
- {
-+ if (h)
-+ name = h->root.root.string;
- format = _("Unable to reach %s (at 0x%08x) from the "
- "global pointer (at 0x%08x) because the "
- "offset (%d) is out of the allowed range, "
-@@ -3848,7 +3860,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
- rel->r_offset, relocation,
- rel->r_addend);
- }
--
- break;
- case R_NIOS2_UJMP:
- r = nios2_elf32_do_ujmp_relocate (input_bfd, howto,
---
-2.7.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-libtool-remove-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-libtool-remove-rpath.patch
new file mode 100644
index 000000000..d56948f15
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-libtool-remove-rpath.patch
@@ -0,0 +1,100 @@
+Apply these patches from our libtool patches as not only are redundant RPATHs a
+waste of space but they can cause incorrect linking when native packages are
+restored from sstate.
+
+fix-rpath.patch:
+We don't want to add RPATHS which match default linker
+search paths, they're a waste of space. This patch
+filters libtools list and removes the ones we don't need.
+
+norm-rpath.patch:
+Libtool may be passed link paths of the form "/usr/lib/../lib", which
+fool its detection code into thinking it should be included as an
+RPATH in the generated binary. Normalize before comparision.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 683317c..860a16a 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -8053,8 +8053,14 @@ EOF
+ esac
+ fi
+ else
+- eval flag=\"$hardcode_libdir_flag_spec\"
+- func_append dep_rpath " $flag"
++ # We only want to hardcode in an rpath if it isn't in the
++ # default dlsearch path.
++ case " $sys_lib_dlsearch_path " in
++ *" $libdir "*) ;;
++ *) eval flag=\"$hardcode_libdir_flag_spec\"
++ func_append dep_rpath " $flag"
++ ;;
++ esac
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+@@ -8790,8 +8796,14 @@ EOF
+ esac
+ fi
+ else
+- eval flag=\"$hardcode_libdir_flag_spec\"
+- func_append rpath " $flag"
++ # We only want to hardcode in an rpath if it isn't in the
++ # default dlsearch path.
++ case " $sys_lib_dlsearch_path " in
++ *" $libdir "*) ;;
++ *) eval flag=\"$hardcode_libdir_flag_spec\"
++ rpath+=" $flag"
++ ;;
++ esac
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+@@ -8841,8 +8853,14 @@ EOF
+ esac
+ fi
+ else
+- eval flag=\"$hardcode_libdir_flag_spec\"
+- func_append rpath " $flag"
++ # We only want to hardcode in an rpath if it isn't in the
++ # default dlsearch path.
++ case " $sys_lib_dlsearch_path " in
++ *" $libdir "*) ;;
++ *) eval flag=\"$hardcode_libdir_flag_spec\"
++ func_append rpath " $flag"
++ ;;
++ esac
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+diff --git a/ltmain.sh b/ltmain.sh
+index 683317c..860a16a 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -8055,8 +8055,10 @@ EOF
+ else
+ # We only want to hardcode in an rpath if it isn't in the
+ # default dlsearch path.
++ func_normal_abspath "$libdir"
++ libdir_norm=$func_normal_abspath_result
+ case " $sys_lib_dlsearch_path " in
+- *" $libdir "*) ;;
++ *" $libdir_norm "*) ;;
+ *) eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ ;;
+@@ -8798,8 +8800,10 @@ EOF
+ else
+ # We only want to hardcode in an rpath if it isn't in the
+ # default dlsearch path.
++ func_normal_abspath "$libdir"
++ libdir_norm=$func_normal_abspath_result
+ case " $sys_lib_dlsearch_path " in
+- *" $libdir "*) ;;
++ *" $libdir_norm "*) ;;
+ *) eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath+=" $flag"
+ ;;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch
new file mode 100644
index 000000000..f3e3a11b1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch
@@ -0,0 +1,97 @@
+From 3d3424e9a8d6ad56160b98bf6e223c0346164468 Mon Sep 17 00:00:00 2001
+From: Matthew Fortune <matthew.fortune@imgtec.com>
+Date: Thu, 29 Sep 2016 11:13:46 +0100
+Subject: [PATCH] Refine .cfi_sections check to only consider compact eh_frame
+
+The .cfi_sections directive can be safely used multiple times
+with different sections named at any time unless the compact form
+of exception handling is requested after CFI information has
+been emitted. Only the compact form of CFI information changes
+the way in which CFI is generated and therefore cannot be
+retrospectively requested after generating CFI information.
+
+gas/
+
+ PR gas/20648
+ * dw2gencfi.c (dot_cfi_sections): Refine the check for
+ inconsistent .cfi_sections to only consider compact vs non
+ compact forms.
+ * testsuite/gas/cfi/cfi-common-9.d: New file.
+ * testsuite/gas/cfi/cfi-common-9.s: New file.
+ * testsuite/gas/cfi/cfi.exp: Run new test.
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com
+
+ gas/ChangeLog | 10 ++++++++++
+ gas/dw2gencfi.c | 5 ++++-
+ gas/testsuite/gas/cfi/cfi-common-9.d | 23 +++++++++++++++++++++++
+ gas/testsuite/gas/cfi/cfi-common-9.s | 4 ++++
+ gas/testsuite/gas/cfi/cfi.exp | 1 +
+ 5 files changed, 42 insertions(+), 1 deletion(-)
+ create mode 100644 gas/testsuite/gas/cfi/cfi-common-9.d
+ create mode 100644 gas/testsuite/gas/cfi/cfi-common-9.s
+
+Index: git/gas/dw2gencfi.c
+===================================================================
+--- git.orig/gas/dw2gencfi.c
++++ git/gas/dw2gencfi.c
+@@ -1244,7 +1244,10 @@ dot_cfi_sections (int ignored ATTRIBUTE_
+ }
+
+ demand_empty_rest_of_line ();
+- if (cfi_sections_set && cfi_sections != sections)
++ if (cfi_sections_set
++ && (sections & (CFI_EMIT_eh_frame | CFI_EMIT_eh_frame_compact))
++ && (cfi_sections & (CFI_EMIT_eh_frame | CFI_EMIT_eh_frame_compact))
++ != (sections & (CFI_EMIT_eh_frame | CFI_EMIT_eh_frame_compact)))
+ as_bad (_("inconsistent uses of .cfi_sections"));
+ cfi_sections = sections;
+ }
+Index: git/gas/testsuite/gas/cfi/cfi-common-9.d
+===================================================================
+--- /dev/null
++++ git/gas/testsuite/gas/cfi/cfi-common-9.d
+@@ -0,0 +1,23 @@
++#objdump: -Wf
++#name: CFI common 9
++#...
++Contents of the .eh_frame section:
++
++00000000 0+0010 0+0000 CIE
++ Version: 1
++ Augmentation: "zR"
++ Code alignment factor: .*
++ Data alignment factor: .*
++ Return address column: .*
++ Augmentation data: [01]b
++
++ DW_CFA_nop
++ DW_CFA_nop
++ DW_CFA_nop
++
++00000014 0+00(10|18|1c|20) 0+0018 FDE cie=0+0000 pc=.*
++
++ DW_CFA_nop
++ DW_CFA_nop
++ DW_CFA_nop
++#...
+Index: git/gas/testsuite/gas/cfi/cfi-common-9.s
+===================================================================
+--- /dev/null
++++ git/gas/testsuite/gas/cfi/cfi-common-9.s
+@@ -0,0 +1,4 @@
++ .cfi_sections .eh_frame
++ .cfi_startproc simple
++ .cfi_sections .debug_frame
++ .cfi_endproc
+Index: git/gas/testsuite/gas/cfi/cfi.exp
+===================================================================
+--- git.orig/gas/testsuite/gas/cfi/cfi.exp
++++ git/gas/testsuite/gas/cfi/cfi.exp
+@@ -135,4 +135,5 @@ if { ![istarget "hppa64*-*"] } then {
+ run_dump_test "cfi-common-6"
+ }
+ run_dump_test "cfi-common-7"
++ run_dump_test "cfi-common-9"
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-binutils-mips-gas-pic-relax-linkonce.diff b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-binutils-mips-gas-pic-relax-linkonce.diff
new file mode 100644
index 000000000..78b971a99
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-binutils-mips-gas-pic-relax-linkonce.diff
@@ -0,0 +1,65 @@
+Patch taken from Binutils Bugzilla:
+
+ https://sourceware.org/bugzilla/show_bug.cgi?id=20649
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+Index: binutils/gas/config/tc-mips.c
+===================================================================
+--- binutils.orig/gas/config/tc-mips.c 2016-09-29 05:12:31.000000000 +0100
++++ binutils/gas/config/tc-mips.c 2016-09-29 20:05:13.257411084 +0100
+@@ -1353,7 +1353,7 @@ static void s_mips_stab (int);
+ static void s_mips_weakext (int);
+ static void s_mips_file (int);
+ static void s_mips_loc (int);
+-static bfd_boolean pic_need_relax (symbolS *, asection *);
++static bfd_boolean pic_need_relax (symbolS *);
+ static int relaxed_branch_length (fragS *, asection *, int);
+ static int relaxed_micromips_16bit_branch_length (fragS *, asection *, int);
+ static int relaxed_micromips_32bit_branch_length (fragS *, asection *, int);
+@@ -4258,6 +4258,8 @@ mips_move_text_labels (void)
+ mips_move_labels (seg_info (now_seg)->label_list, TRUE);
+ }
+
++/* Duplicate the test for LINK_ONCE sections as in `adjust_reloc_syms'. */
++
+ static bfd_boolean
+ s_is_linkonce (symbolS *sym, segT from_seg)
+ {
+@@ -14823,7 +14825,7 @@ mips_frob_file (void)
+ constants; we'll report an error for those later. */
+ if (got16_reloc_p (l->fixp->fx_r_type)
+ && !(l->fixp->fx_addsy
+- && pic_need_relax (l->fixp->fx_addsy, l->seg)))
++ && pic_need_relax (l->fixp->fx_addsy)))
+ continue;
+
+ /* Check quickly whether the next fixup happens to be a matching %lo. */
+@@ -17043,7 +17045,7 @@ nopic_need_relax (symbolS *sym, int befo
+ /* Return true if the given symbol should be considered local for SVR4 PIC. */
+
+ static bfd_boolean
+-pic_need_relax (symbolS *sym, asection *segtype)
++pic_need_relax (symbolS *sym)
+ {
+ asection *symsec;
+
+@@ -17068,7 +17070,6 @@ pic_need_relax (symbolS *sym, asection *
+ return (!bfd_is_und_section (symsec)
+ && !bfd_is_abs_section (symsec)
+ && !bfd_is_com_section (symsec)
+- && !s_is_linkonce (sym, segtype)
+ /* A global or weak symbol is treated as external. */
+ && (!S_IS_WEAK (sym) && !S_IS_EXTERNAL (sym)));
+ }
+@@ -17507,7 +17508,7 @@ md_estimate_size_before_relax (fragS *fr
+ if (mips_pic == NO_PIC)
+ change = nopic_need_relax (fragp->fr_symbol, 0);
+ else if (mips_pic == SVR4_PIC)
+- change = pic_need_relax (fragp->fr_symbol, segtype);
++ change = pic_need_relax (fragp->fr_symbol);
+ else if (mips_pic == VXWORKS_PIC)
+ /* For vxworks, GOT16 relocations never have a corresponding LO16. */
+ change = 0;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.26.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.26.bb
deleted file mode 100644
index b70ffbf28..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.26.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-require binutils.inc
-require binutils-${PV}.inc
-
-DEPENDS += "flex bison zlib"
-
-EXTRA_OECONF += "--with-sysroot=/ \
- --enable-install-libbfd \
- --enable-install-libiberty \
- --enable-shared \
- --with-system-zlib \
- "
-
-EXTRA_OECONF_class-native = "--enable-targets=all \
- --enable-64-bit-bfd \
- --enable-install-libiberty \
- --enable-install-libbfd"
-
-do_install_class-native () {
- autotools_do_install
-
- # Install the libiberty header
- install -d ${D}${includedir}
- install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
- install -m 644 ${S}/include/libiberty.h ${D}${includedir}
-
- # We only want libiberty, libbfd and libopcodes
- rm -rf ${D}${bindir}
- rm -rf ${D}${prefix}/${TARGET_SYS}
- rm -rf ${D}${prefix}/lib/ldscripts
- rm -rf ${D}${prefix}/share/info
- rm -rf ${D}${prefix}/share/locale
- rm -rf ${D}${prefix}/share/man
- rmdir ${D}${prefix}/share || :
- rmdir ${D}/${libdir}/gcc-lib || :
- rmdir ${D}/${libdir}64/gcc-lib || :
- rmdir ${D}/${libdir} || :
- rmdir ${D}/${libdir}64 || :
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.27.bb b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.27.bb
new file mode 100644
index 000000000..b51437bbc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/binutils/binutils_2.27.bb
@@ -0,0 +1,45 @@
+require binutils.inc
+require binutils-${PV}.inc
+
+DEPENDS += "flex bison zlib"
+
+EXTRA_OECONF += "--with-sysroot=/ \
+ --enable-install-libbfd \
+ --enable-install-libiberty \
+ --enable-shared \
+ --with-system-zlib \
+ "
+
+EXTRA_OEMAKE_append_libc-musl = "\
+ gt_cv_func_gnugettext1_libc=yes \
+ gt_cv_func_gnugettext2_libc=yes \
+ "
+EXTRA_OECONF_class-native = "--enable-targets=all \
+ --enable-64-bit-bfd \
+ --enable-install-libiberty \
+ --enable-install-libbfd \
+ --disable-werror"
+
+do_install_class-native () {
+ autotools_do_install
+
+ # Install the libiberty header
+ install -d ${D}${includedir}
+ install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
+ install -m 644 ${S}/include/libiberty.h ${D}${includedir}
+
+ # We only want libiberty, libbfd and libopcodes
+ rm -rf ${D}${bindir}
+ rm -rf ${D}${prefix}/${TARGET_SYS}
+ rm -rf ${D}${prefix}/lib/ldscripts
+ rm -rf ${D}${prefix}/share/info
+ rm -rf ${D}${prefix}/share/locale
+ rm -rf ${D}${prefix}/share/man
+ rmdir ${D}${prefix}/share || :
+ rmdir ${D}/${libdir}/gcc-lib || :
+ rmdir ${D}/${libdir}64/gcc-lib || :
+ rmdir ${D}/${libdir} || :
+ rmdir ${D}/${libdir}64 || :
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2/0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2/0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch
new file mode 100644
index 000000000..118814a80
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2/0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch
@@ -0,0 +1,30 @@
+From 2225ab2038bfe50f16f972e39d89bcd0bd7767f5 Mon Sep 17 00:00:00 2001
+From: Steffen Pankratz <kratz00@gmx.de>
+Date: Tue, 9 Feb 2016 13:49:42 +0100
+Subject: [PATCH] Fixed: Missing default value for BOOTLOG_DEST
+
+Upstream-Status: Backport
+
+BUILDLOG_DEST seems to be a typo or mix-up which was introduced with 281d1df80884bf2969c509ec60ee8a6593524fe8
+
+Signed-off-by: Peter Liu <peter.x.liu@external.atlascopco.com>
+---
+ bootchartd.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bootchartd.in b/bootchartd.in
+index f58ab9e..30af677 100755
+--- a/bootchartd.in
++++ b/bootchartd.in
+@@ -37,7 +37,7 @@ PATH="/sbin:/bin:/usr/sbin:/usr/bin:$PATH"
+
+ # Defaults, in case we can't find our configuration
+ SAMPLE_HZ=50
+-BUILDLOG_DEST=/var/log/bootchart.tgz
++BOOTLOG_DEST=/var/log/bootchart.tgz
+ AUTO_RENDER="no"
+ AUTO_RENDER_DIR="/var/log"
+ AUTO_RENDER_FORMAT="png"
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch
new file mode 100644
index 000000000..7a8813e96
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2/0001-collector-Allocate-space-on-heap-for-chunks.patch
@@ -0,0 +1,45 @@
+From 09505532b49573663fb4ff4dad424dc2ef4c1f84 Mon Sep 17 00:00:00 2001
+From: Kyle Russell <bkylerussell@gmail.com>
+Date: Wed, 13 Jul 2016 17:30:00 -0400
+Subject: [PATCH] collector: Allocate space on heap for chunks
+
+Nicer for embedded devices which may have smaller stack limitations.
+
+Upstream-Status: Submitted [https://github.com/xrmx/bootchart/pull/74]
+
+Signed-off-by: Kyle Russell <bkylerussell@gmail.com>
+---
+ collector/dump.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/collector/dump.c b/collector/dump.c
+index e673b5b..2f094b4 100644
+--- a/collector/dump.c
++++ b/collector/dump.c
+@@ -184,12 +184,12 @@ static void dump_buffers (DumpState *s)
+ log ("reading %d chunks (of %d) ...\n", max_chunk, s->map.max_chunk);
+ for (i = 0; i < max_chunk; i++) {
+ FILE *output;
+- char buffer[CHUNK_SIZE];
+- Chunk *c = (Chunk *)&buffer;
++ char *buffer = malloc(CHUNK_SIZE);
++ Chunk *c = (Chunk *)buffer;
+ size_t addr = (size_t) s->map.chunks[i];
+
+ lseek (s->mem, addr, SEEK_SET);
+- read (s->mem, &buffer, CHUNK_SIZE);
++ read (s->mem, buffer, CHUNK_SIZE);
+ /* log ("type: '%s' len %d\n",
+ c->dest_stream, (int)c->length); */
+
+@@ -197,6 +197,7 @@ static void dump_buffers (DumpState *s)
+ fwrite (c->data, 1, c->length, output);
+ bytes_dumped += c->length;
+ fclose (output);
++ free(buffer);
+ }
+ log ("wrote %ld kb\n", (long)(bytes_dumped+1023)/1024);
+ }
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
index 86c614a63..4f01734bb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
@@ -92,14 +92,18 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
SRC_URI = "git://github.com/mmeeks/bootchart.git \
file://bootchartd_stop.sh \
+ file://0001-Fixed-Missing-default-value-for-BOOTLOG_DEST.patch \
+ file://0001-collector-Allocate-space-on-heap-for-chunks.patch \
"
S = "${WORKDIR}/git"
SRCREV = "48e0071048564c6af75ab969e842d6dec808da09"
-inherit systemd
-inherit update-rc.d
-inherit pythonnative
+inherit systemd update-rc.d python3native update-alternatives
+
+ALTERNATIVE_${PN} = "bootchartd"
+ALTERNATIVE_LINK_NAME[bootchartd] = "${base_sbindir}/bootchartd"
+ALTERNATIVE_PRIORITY = "100"
# The only reason to build bootchart2-native is for a native pybootchartgui.
BBCLASSEXTEND = "native"
@@ -110,13 +114,6 @@ UPDATERCPN = "bootchartd-stop-initscript"
INITSCRIPT_NAME = "bootchartd_stop.sh"
INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
-# We want native pybootchartgui to execute with the correct Python interpeter.
-do_compile_append_class-native () {
- echo "#! ${PYTHON}" | cat - ${S}/pybootchartgui.py > ${WORKDIR}/temp_pybootchartgui
- mv ${WORKDIR}/temp_pybootchartgui ${S}/pybootchartgui.py
- chmod +x ${S}/pybootchartgui
-}
-
do_compile_prepend () {
export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
export BINDIR="${bindir}"
@@ -135,17 +132,21 @@ do_install () {
install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d
echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
+
+ # Use python 3 instead of python 2
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/pybootchartgui
}
PACKAGES =+ "pybootchartgui"
-FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
-RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image python-textutils python-shell python-compression python-codecs"
+FILES_pybootchartgui += "${PYTHON_SITEPACKAGES_DIR}/pybootchartgui ${bindir}/pybootchartgui"
+RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs"
RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
RDEPENDS_${PN}_class-target += "lsb"
-DEPENDS_append_class-native = " python-pycairo-native"
+DEPENDS_append_class-native = " python3-pycairo-native"
PACKAGES =+ "bootchartd-stop-initscript"
FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"
+RDEPENDS_bootchartd-stop-initscript = "${PN}"
FILES_${PN} += "${base_libdir}/bootchart/bootchart-collector"
FILES_${PN} += "${base_libdir}/bootchart/tmpfs"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch
deleted file mode 100644
index a94549639..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 05ab78e9183575e38f342e05a056cb7bcd1e52e1 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 18 Feb 2016 20:41:28 -0500
-Subject: [PATCH] btrfs-progs: fix symlink creation multiple times
-
-The rule to create symlink in Makefile caused parallel issue:
-$ make -j 40 DESTDIR=/image install BUILD_VERBOSE=1
-...
- 1 [LN] libbtrfs.so.0
- 2 [LN] libbtrfs.so
- 3 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0
- 4 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0
- 5 ln -s -f libbtrfs.so.0.1 libbtrfs.so
- 6 ln -s -f libbtrfs.so.0.1 libbtrfs.so
-...
-
-It failed occasionally:
-...
-|symlinkat: couldn't stat 'git/libbtrfs.so' even though symlink
-creation succeeded (No such file or directory).
-|ln: failed to create symbolic link 'libbtrfs.so': No such file or directory
-...
-
-Upstream-Status: Submitted [linux-btrfs@vger.kernel.org]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- Makefile.in | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 1f4002e..16eeaf9 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -236,8 +236,7 @@ $(libs_static): $(libbtrfs_objects)
-
- $(lib_links):
- @echo " [LN] $@"
-- $(Q)$(LN_S) -f libbtrfs.so.0.1 libbtrfs.so.0
-- $(Q)$(LN_S) -f libbtrfs.so.0.1 libbtrfs.so
-+ $(Q)$(LN_S) -f libbtrfs.so.0.1 $@
-
- # keep intermediate files from the below implicit rules around
- .PRECIOUS: $(addsuffix .o,$(progs))
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb
deleted file mode 100644
index 32e7bae58..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Checksumming Copy on Write Filesystem utilities"
-DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
-implementing advanced features while focusing on fault tolerance, repair and \
-easy administration. \
-This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
-btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
-
-HOMEPAGE = "https://btrfs.wiki.kernel.org"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
-SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl"
-RDEPENDS_${PN} = "libgcc"
-
-SRCREV = "21258fab2caeade405a15ba932d373b364aa6e8c"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
- file://fix-parallel.patch \
- file://fix-symlink-creation-multiple-times.patch \
-"
-
-inherit autotools-brokensep pkgconfig
-
-EXTRA_OECONF += "--disable-documentation"
-EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
-
-
-do_configure_prepend() {
- sh autogen.sh
-}
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.7.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.7.1.bb
new file mode 100644
index 000000000..becf09396
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.7.1.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Checksumming Copy on Write Filesystem utilities"
+DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
+implementing advanced features while focusing on fault tolerance, repair and \
+easy administration. \
+This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
+btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
+
+HOMEPAGE = "https://btrfs.wiki.kernel.org"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
+SECTION = "base"
+DEPENDS = "util-linux attr e2fsprogs lzo acl"
+RDEPENDS_${PN} = "libgcc"
+
+SRCREV = "6819fbcdcab63c2d95da1a2997e37be9a71ca533"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
+ file://fix-parallel.patch \
+"
+
+inherit autotools-brokensep pkgconfig
+
+EXTRA_OECONF += "--disable-documentation"
+EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
+
+
+do_configure_prepend() {
+ sh autogen.sh
+}
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
index 676f11dd8..fa9c6b45d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/build-compare_git.bb
@@ -9,6 +9,12 @@ SRC_URI = "git://github.com/openSUSE/build-compare.git \
file://Rename-rpm-check.sh-to-pkg-diff.sh.patch;striplevel=1 \
file://Ignore-DWARF-sections.patch;striplevel=1 \
file://0001-Add-support-for-deb-and-ipk-packaging.patch \
+ file://functions.sh-remove-space-at-head.patch \
+ file://functions.sh-run-rpm-once-to-make-it-faster.patch \
+ file://pkg-diff.sh-check-for-fifo-named-pipe.patch \
+ file://pkg-diff.sh-check_single_file-return-at-once-when-sa.patch \
+ file://pkg-diff.sh-remove-space-in-the-end-for-ftype.patch \
+ file://functions.sh-improve-deb-and-ipk-checking.patch \
"
SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch
index 5c15218c8..82fd8169f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch
@@ -3,7 +3,7 @@ From: Paul Eggleton <paul.eggleton@linux.intel.com>
Date: Tue, 1 Sep 2015 12:04:33 +0100
Subject: [PATCH] Add support for deb and ipk packaging
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
@@ -34,7 +34,7 @@ index 06079df..85c9003 100644
return $RES
}
+
-+function adjust_controlfile () {
++function adjust_controlfile() {
+ cat $1/control | sed '/^Version: /d' > $1/control.fixed
+ mv $1/control.fixed $1/control
+ cat $2/control | sed '/^Version: /d' > $2/control.fixed
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-improve-deb-and-ipk-checking.patch b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-improve-deb-and-ipk-checking.patch
new file mode 100644
index 000000000..05420f89f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-improve-deb-and-ipk-checking.patch
@@ -0,0 +1,117 @@
+From b4eb7fde10318162bd2d02b9017ef51746752a91 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 14 Jul 2016 23:14:21 -0700
+Subject: [PATCH 4/4] functions.sh: improve deb and ipk checking
+
+* The deb and ipk's depends version string is like:
+ Depends: libc6 (>= 2.24)
+ Update trim_release_old and trim_release_new to match the bracket in
+ the end ")".
+
+* The deb's data tarball now is .tar.xz, and ipk's is .tar.gz.
+
+* Update adjust_controlfile() to make ituse trim_release_old and
+ trim_release_new.
+
+Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ functions.sh | 45 ++++++++++++++++++++++++++++-----------------
+ 1 file changed, 28 insertions(+), 17 deletions(-)
+
+diff --git a/functions.sh b/functions.sh
+index aa572f9..fe493ba 100755
+--- a/functions.sh
++++ b/functions.sh
+@@ -78,7 +78,7 @@ check_header()
+ function trim_release_old()
+ {
+ sed -e "
+- /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_old_regex_l\$\)/{s,$version_release_old_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_old_regex_s,@VERSION@-@RELEASE_SHORT@,g}
++ /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_old_regex_l\$\|$version_release_old_regex_l)\)/{s,$version_release_old_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_old_regex_s,@VERSION@-@RELEASE_SHORT@,g}
+ s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
+ s/^ *//g
+ "
+@@ -86,7 +86,7 @@ function trim_release_old()
+ function trim_release_new()
+ {
+ sed -e "
+- /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_new_regex_l\$\)/{s,$version_release_new_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_new_regex_s,@VERSION@-@RELEASE_SHORT@,g}
++ /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_new_regex_l\$\|$version_release_new_regex_l)\)/{s,$version_release_new_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_new_regex_s,@VERSION@-@RELEASE_SHORT@,g}
+ s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
+ s/^ *//g
+ "
+@@ -133,8 +133,8 @@ function unpackage()
+ ar x $file
+ tar xf control.tar.gz
+ rm control.tar.gz
+- tar xf data.tar.gz
+- rm data.tar.gz
++ tar xf data.tar.[xg]z
++ rm data.tar.[xg]z
+ ;;
+ esac
+ popd 1>/dev/null
+@@ -164,6 +164,22 @@ function get_value()
+ sed -n -e "/^___${1}___/,/^___${1}___/p" $2 | sed -e "/^___${1}___/d"
+ }
+
++# Set version_release_old_regex_s, version_release_old_regex_l and
++# name_ver_rel_old_regex_l, also the new ones.
++function set_regex() {
++ # Remember to quote the . which is in release
++ # Short version without B_CN
++ version_release_old_regex_s=${version_release_old%.*}
++ version_release_old_regex_s=${version_release_old_regex_s//./\\.}
++ version_release_new_regex_s=${version_release_new%.*}
++ version_release_new_regex_s=${version_release_new_regex_s//./\\.}
++ # Long version with B_CNT
++ version_release_old_regex_l=${version_release_old//./\\.}
++ version_release_new_regex_l=${version_release_new//./\\.}
++ name_ver_rel_old_regex_l=${name_ver_rel_old//./\\.}
++ name_ver_rel_new_regex_l=${name_ver_rel_new//./\\.}
++}
++
+ # Compare just the rpm meta data of two rpms
+ # Returns:
+ # 0 in case of same content
+@@ -194,17 +210,7 @@ function cmp_spec ()
+ version_release_old="$(get_value QF_VER_REL $spec_old)"
+ name_ver_rel_old="$(get_value QF_NAME_VER_REL $spec_old)"
+
+- # Remember to quote the . which is in release
+- # Short version without B_CN
+- version_release_old_regex_s=${version_release_old%.*}
+- version_release_old_regex_s=${version_release_old_regex_s//./\\.}
+- version_release_new_regex_s=${version_release_new%.*}
+- version_release_new_regex_s=${version_release_new_regex_s//./\\.}
+- # Long version with B_CNT
+- version_release_old_regex_l=${version_release_old//./\\.}
+- version_release_new_regex_l=${version_release_new//./\\.}
+- name_ver_rel_old_regex_l=${name_ver_rel_old//./\\.}
+- name_ver_rel_new_regex_l=${name_ver_rel_new//./\\.}
++ set_regex
+
+ # Check the whole spec file at first, return 0 immediately if the
+ # are the same.
+@@ -285,9 +291,14 @@ function cmp_spec ()
+ }
+
+ function adjust_controlfile() {
+- cat $1/control | sed '/^Version: /d' > $1/control.fixed
++ version_release_old="`sed -ne 's/^Version: \(.*\)/\1/p' $1/control`"
++ name_ver_rel_old="`sed -n -e 's/^Package: \(.*\)/\1/p' $1/control`-`sed -n -e 's/^Version: \(.*\)/\1/p' $1/control`"
++ version_release_new="`sed -ne 's/^Version: \(.*\)/\1/p' $2/control`"
++ name_ver_rel_new="`sed -n -e 's/^Package: \(.*\)/\1/p' $2/control`-`sed -n -e 's/^Version: \(.*\)/\1/p' $2/control`"
++ set_regex
++ cat $1/control | trim_release_old > $1/control.fixed
+ mv $1/control.fixed $1/control
+- cat $2/control | sed '/^Version: /d' > $2/control.fixed
++ cat $2/control | trim_release_new > $2/control.fixed
+ mv $2/control.fixed $2/control
+ }
+
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-remove-space-at-head.patch b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-remove-space-at-head.patch
new file mode 100644
index 000000000..02e96bab5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-remove-space-at-head.patch
@@ -0,0 +1,41 @@
+From 402a821e604f280e62c34bf4d40c6d1b4c6c892d Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 4 Jul 2016 20:11:33 -0700
+Subject: [PATCH] functions.sh: remove space at head
+
+The command like:
+rpm -qp --nodigest --nosignature --qf '<foo> [%{REQUIRENAME}\n]\n'
+ ^^space
+
+The space will be printed, and will impact the check result, so remove it.
+
+Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/9]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ functions.sh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/functions.sh b/functions.sh
+index 85c9003..b1069d2 100644
+--- a/functions.sh
++++ b/functions.sh
+@@ -26,6 +26,7 @@ function trim_release_old()
+ sed -e "
+ /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_old_regex_l\$\)/{s,$version_release_old_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_old_regex_s,@VERSION@-@RELEASE_SHORT@,g}
+ s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_old_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
++ s/^ *//g
+ "
+ }
+ function trim_release_new()
+@@ -33,6 +34,7 @@ function trim_release_new()
+ sed -e "
+ /\(\/boot\|\/lib\/modules\|\/lib\/firmware\|\/usr\/src\|$version_release_new_regex_l\$\)/{s,$version_release_new_regex_l,@VERSION@-@RELEASE_LONG@,g;s,$version_release_new_regex_s,@VERSION@-@RELEASE_SHORT@,g}
+ s/\(\/var\/adm\/update-scripts\/\)${name_ver_rel_new_regex_l}\([^[:blank:]]\+\)/\1@NAME_VER_REL@\2/g
++ s/^ *//g
+ "
+ }
+ # Get single directory or filename with long or short release string
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-run-rpm-once-to-make-it-faster.patch b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-run-rpm-once-to-make-it-faster.patch
new file mode 100644
index 000000000..f5b99d944
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/functions.sh-run-rpm-once-to-make-it-faster.patch
@@ -0,0 +1,361 @@
+From f34d632c427b1e1570ef9136454fc01d8c9f10a6 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 7 Jul 2016 19:34:09 -0700
+Subject: [PATCH] functions.sh: run rpm once to make it faster
+
+The rpm tool is a heavy process, it ran 16 (or 17 for kernel)
+"rpm -qp" times when the pkgs are identical, now we only run
+"rpm -qp --qf <all we need>" twice (one is for old pkg, and one is for
+new), save the results to spec_old and spec_new, then use sed command to
+get what we need later, this can make it 75% faster when the pkgs are
+identical. Here is the rough data on my host Ubuntu 14.04.4, 32 cores
+CPU and 128G mem:
+* When the pkgs are identical:
+ - Before the patch: 1s
+ - After the patch: 0.26s
+ I compare the whole spec firstly, and return 0 if they are the same,
+ or go on checking one by one if not, without this, it would be 0.46s,
+ the gain is great when there are lot of packages, usually, we have
+ more than 10,000 rpms to compare.
+
+* When the pkgs are different:
+ That depends on where is the different, if the different is at the
+ comparing rpmtags stage:
+ - Before the patch: 0.26s
+ - After the patch: 0.29s
+ Increased 0.03s, but if the different is happend later than comparing
+ rpmtags, it will save time.
+
+Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/9]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ functions.sh | 245 ++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 132 insertions(+), 113 deletions(-)
+ mode change 100644 => 100755 functions.sh
+
+diff --git a/functions.sh b/functions.sh
+old mode 100644
+new mode 100755
+index b1069d2..aa572f9
+--- a/functions.sh
++++ b/functions.sh
+@@ -10,9 +10,63 @@
+
+ RPM="rpm -qp --nodigest --nosignature"
+
+-check_header()
++# Name, Version, Release
++QF_NAME="%{NAME}"
++QF_VER_REL="%{VERSION}-%{RELEASE}"
++QF_NAME_VER_REL="%{NAME}-%{VERSION}-%{RELEASE}"
++
++# provides destroy this because at least the self-provide includes the
++# -buildnumber :-(
++QF_PROVIDES="[%{PROVIDENAME} %{PROVIDEFLAGS} %{PROVIDEVERSION}\\n]\\n"
++QF_PROVIDES="$QF_PROVIDES [%{REQUIRENAME} %{REQUIREFLAGS} %{REQUIREVERSION}\\n]\\n"
++QF_PROVIDES="$QF_PROVIDES [%{CONFLICTNAME} %{CONFLICTFLAGS} %{CONFLICTVERSION}\\n]\\n"
++QF_PROVIDES="$QF_PROVIDES [%{OBSOLETENAME} %{OBSOLETEFLAGS} %{OBSOLETEVERSION}\\n]\\n"
++
++# don't look at RELEASE, it contains our build number
++QF_TAGS="%{NAME} %{VERSION} %{EPOCH}\\n"
++QF_TAGS="$QF_TAGS %{SUMMARY}\\n%{DESCRIPTION}\\n"
++# the DISTURL tag can be used as checkin ID
++QF_TAGS="$QF_TAGS %{VENDOR} %{DISTRIBUTION} %{DISTURL}"
++QF_TAGS="$QF_TAGS %{LICENSE} %{LICENSE}\\n"
++QF_TAGS="$QF_TAGS %{GROUP} %{URL} %{EXCLUDEARCH} %{EXCLUDEOS} %{EXCLUSIVEARCH}\\n"
++QF_TAGS="$QF_TAGS %{EXCLUSIVEOS} %{RPMVERSION} %{PLATFORM}\\n"
++QF_TAGS="$QF_TAGS %{PAYLOADFORMAT} %{PAYLOADCOMPRESSOR} %{PAYLOADFLAGS}\\n"
++
++# XXX We also need to check the existence (but not the content (!))
++# of SIGGPG (and perhaps the other SIG*)
++# XXX We don't look at triggers
++QF_TAGS="$QF_TAGS [%{VERIFYSCRIPTPROG} %{VERIFYSCRIPT}]\\n"
++# Only the first ChangeLog entry; should be enough
++QF_TAGS="$QF_TAGS %{CHANGELOGTIME} %{CHANGELOGNAME} %{CHANGELOGTEXT}\\n"
++
++# scripts, might contain release number
++QF_SCRIPT="[%{PREINPROG} %{PREIN}\\n]\\n[%{POSTINPROG} %{POSTIN}\\n]\\n[%{PREUNPROG} %{PREUN}\\n]\\n[%{POSTUNPROG} %{POSTUN}\\n]\\n"
++
++# Now the files. We leave out mtime and size. For normal files
++# the size will influence the MD5 anyway. For directories the sizes can
++# differ, depending on which file system the package was built. To not
++# have to filter out directories we simply ignore all sizes.
++# Also leave out FILEDEVICES, FILEINODES (depends on the build host),
++# FILECOLORS, FILECLASS (normally useful but file output contains mtimes),
++# FILEDEPENDSX and FILEDEPENDSN.
++# Also FILELANGS (or?)
++QF_FILELIST="[%{FILENAMES} %{FILEFLAGS} %{FILESTATES} %{FILEMODES:octal} %{FILEUSERNAME} %{FILEGROUPNAME} %{FILERDEVS} %{FILEVERIFYFLAGS} %{FILELINKTOS}\n]\\n"
++# ??? what to do with FILEPROVIDE and FILEREQUIRE?
++
++QF_CHECKSUM="[%{FILENAMES} %{FILEMD5S} %{FILEFLAGS}\n]\\n"
++
++QF_ALL="\n___QF_NAME___\n${QF_NAME}\n___QF_NAME___\n"
++QF_ALL="$QF_ALL\n___QF_TAGS___\n${QF_TAGS}\n___QF_TAGS___\n"
++QF_ALL="$QF_ALL\n___QF_VER_REL___\n${QF_VER_REL}\n___QF_VER_REL___\n"
++QF_ALL="$QF_ALL\n___QF_NAME_VER_REL___\n${QF_NAME_VER_REL}\n___QF_NAME_VER_REL___\n"
++QF_ALL="$QF_ALL\n___QF_PROVIDES___\n${QF_PROVIDES}\n___QF_PROVIDES___\n"
++QF_ALL="$QF_ALL\n___QF_SCRIPT___\n${QF_SCRIPT}\n___QF_SCRIPT___\n"
++QF_ALL="$QF_ALL\n___QF_FILELIST___\n${QF_FILELIST}\n___QF_FILELIST___\n"
++QF_ALL="$QF_ALL\n___QF_CHECKSUM___\n${QF_CHECKSUM}\n___QF_CHECKSUM___\n"
++
++check_header()
+ {
+- $RPM --qf "$QF" "$1"
++ $RPM --qf "$1" "$2"
+ }
+
+ # Trim version-release string:
+@@ -47,18 +101,6 @@ function grep_release_new()
+ grep -E "(/boot|/lib/modules|/lib/firmware|/usr/src)/[^/]+(${version_release_new_regex_l}(\$|[^/]+\$)|${version_release_new_regex_s}(\$|[^/]+\$))"
+ }
+
+-function check_provides()
+-{
+- local pkg=$1
+- # provides destroy this because at least the self-provide includes the
+- # -buildnumber :-(
+- QF="[%{PROVIDENAME} %{PROVIDEFLAGS} %{PROVIDEVERSION}\\n]\\n"
+- QF="$QF [%{REQUIRENAME} %{REQUIREFLAGS} %{REQUIREVERSION}\\n]\\n"
+- QF="$QF [%{CONFLICTNAME} %{CONFLICTFLAGS} %{CONFLICTVERSION}\\n]\\n"
+- QF="$QF [%{OBSOLETENAME} %{OBSOLETEFLAGS} %{OBSOLETEVERSION}\\n]\\n"
+- check_header "$pkg"
+-}
+-
+ #usage unpackage <file> $dir
+ # Unpack files in directory $dir
+ # like /usr/bin/unpackage - just for one file and with no options
+@@ -98,6 +140,30 @@ function unpackage()
+ popd 1>/dev/null
+ }
+
++# Run diff command on the files
++# $1: printed info
++# $2: file1
++# $3: file2
++function comp_file()
++{
++ echo "comparing $1"
++ if ! diff -au $2 $3; then
++ if test -z "$check_all"; then
++ rm $2 $3 $spec_old $spec_new
++ return 1
++ fi
++ fi
++ return 0
++}
++
++# Get var's value from specfile.
++# $1: var name
++# $2: specfile
++function get_value()
++{
++ sed -n -e "/^___${1}___/,/^___${1}___/p" $2 | sed -e "/^___${1}___/d"
++}
++
+ # Compare just the rpm meta data of two rpms
+ # Returns:
+ # 0 in case of same content
+@@ -107,56 +173,29 @@ function unpackage()
+ function cmp_spec ()
+ {
+ local RES
+- local file1 file2
++ local file_old file_new
+ local f
+ local sh=$1
+ local oldrpm=$2
+ local newrpm=$3
+
+- QF="%{NAME}"
+-
+- # don't look at RELEASE, it contains our build number
+- QF="$QF %{VERSION} %{EPOCH}\\n"
+- QF="$QF %{SUMMARY}\\n%{DESCRIPTION}\\n"
+- QF="$QF %{VENDOR} %{DISTRIBUTION} %{DISTURL}"
+- QF="$QF %{LICENSE} %{LICENSE}\\n"
+- QF="$QF %{GROUP} %{URL} %{EXCLUDEARCH} %{EXCLUDEOS} %{EXCLUSIVEARCH}\\n"
+- QF="$QF %{EXCLUSIVEOS} %{RPMVERSION} %{PLATFORM}\\n"
+- QF="$QF %{PAYLOADFORMAT} %{PAYLOADCOMPRESSOR} %{PAYLOADFLAGS}\\n"
+-
+-
+- # XXX We also need to check the existence (but not the content (!))
+- # of SIGGPG (and perhaps the other SIG*)
+-
+- # XXX We don't look at triggers
+-
+- QF="$QF [%{VERIFYSCRIPTPROG} %{VERIFYSCRIPT}]\\n"
+-
+- # Only the first ChangeLog entry; should be enough
+- QF="$QF %{CHANGELOGTIME} %{CHANGELOGNAME} %{CHANGELOGTEXT}\\n"
+-
+- file1=`mktemp`
+- file2=`mktemp`
+-
+- check_header $oldrpm > $file1
+- check_header $newrpm > $file2
+-
+- # the DISTURL tag can be used as checkin ID
+- #echo "$QF"
+- echo "comparing rpmtags"
+- if ! diff -au $file1 $file2; then
+- if test -z "$check_all"; then
+- rm $file1 $file2
+- return 1
+- fi
+- fi
+-
++ file_old=`mktemp`
++ file_new=`mktemp`
++ spec_old=`mktemp`
++ spec_new=`mktemp`
++
++ check_header "$QF_ALL" $oldrpm > $spec_old
++ check_header "$QF_ALL" $newrpm > $spec_new
++
++ name_new="$(get_value QF_NAME $spec_new)"
++ version_release_new="$(get_value QF_VER_REL $spec_new)"
++ name_ver_rel_new="$(get_value QF_NAME_VER_REL $spec_new)"
++
++ version_release_old="$(get_value QF_VER_REL $spec_old)"
++ name_ver_rel_old="$(get_value QF_NAME_VER_REL $spec_old)"
++
+ # Remember to quote the . which is in release
+- version_release_old=$($RPM --qf "%{VERSION}-%{RELEASE}" "$oldrpm")
+- version_release_new=$($RPM --qf "%{VERSION}-%{RELEASE}" "$newrpm")
+- name_ver_rel_old=$($RPM --qf "%{NAME}-%{VERSION}-%{RELEASE}" "$oldrpm")
+- name_ver_rel_new=$($RPM --qf "%{NAME}-%{VERSION}-%{RELEASE}" "$newrpm")
+- # Short version without B_CNT
++ # Short version without B_CN
+ version_release_old_regex_s=${version_release_old%.*}
+ version_release_old_regex_s=${version_release_old_regex_s//./\\.}
+ version_release_new_regex_s=${version_release_new%.*}
+@@ -166,10 +205,27 @@ function cmp_spec ()
+ version_release_new_regex_l=${version_release_new//./\\.}
+ name_ver_rel_old_regex_l=${name_ver_rel_old//./\\.}
+ name_ver_rel_new_regex_l=${name_ver_rel_new//./\\.}
++
++ # Check the whole spec file at first, return 0 immediately if the
++ # are the same.
++ cat $spec_old | trim_release_old > $file_old
++ cat $spec_new | trim_release_new > $file_new
++ echo "comparing the whole specfile"
++ if diff -au $spec_old $spec_new; then
++ if test -z "$check_all"; then
++ rm $file_old $file_new $spec_old $spec_new
++ return 0
++ fi
++ fi
++
++ get_value QF_TAGS $spec_old > $file_old
++ get_value QF_TAGS $spec_new > $file_new
++ comp_file rpmtags $file_old $file_new || return 1
++
+ # This might happen when?!
+ echo "comparing RELEASE"
+ if [ "${version_release_old%.*}" != "${version_release_new%.*}" ] ; then
+- case $($RPM --qf '%{NAME}' "$newrpm") in
++ case $name_new in
+ kernel-*)
+ # Make sure all kernel packages have the same %RELEASE
+ echo "release prefix mismatch"
+@@ -181,71 +237,34 @@ function cmp_spec ()
+ *) ;;
+ esac
+ fi
+-
+- check_provides $oldrpm | trim_release_old | sort > $file1
+- check_provides $newrpm | trim_release_new | sort > $file2
+-
+- echo "comparing PROVIDES"
+- if ! diff -au $file1 $file2; then
+- if test -z "$check_all"; then
+- rm $file1 $file2
+- return 1
+- fi
+- fi
+
+- # scripts, might contain release number
+- QF="[%{PREINPROG} %{PREIN}\\n]\\n[%{POSTINPROG} %{POSTIN}\\n]\\n[%{PREUNPROG} %{PREUN}\\n]\\n[%{POSTUNPROG} %{POSTUN}\\n]\\n"
+- check_header $oldrpm | trim_release_old > $file1
+- check_header $newrpm | trim_release_new > $file2
++ get_value QF_PROVIDES $spec_old | trim_release_old | sort > $file_old
++ get_value QF_PROVIDES $spec_new | trim_release_new | sort > $file_new
++ comp_file PROVIDES $file_old $file_new || return 1
++
++ get_value QF_SCRIPT $spec_old | trim_release_old > $file_old
++ get_value QF_SCRIPT $spec_new | trim_release_new > $file_new
++ comp_file scripts $file_old $file_new || return 1
+
+- echo "comparing scripts"
+- if ! diff -au $file1 $file2; then
+- if test -z "$check_all"; then
+- rm $file1 $file2
+- return 1
+- fi
+- fi
+-
+ # First check the file attributes and later the md5s
+-
+- # Now the files. We leave out mtime and size. For normal files
+- # the size will influence the MD5 anyway. For directories the sizes can
+- # differ, depending on which file system the package was built. To not
+- # have to filter out directories we simply ignore all sizes.
+- # Also leave out FILEDEVICES, FILEINODES (depends on the build host),
+- # FILECOLORS, FILECLASS (normally useful but file output contains mtimes),
+- # FILEDEPENDSX and FILEDEPENDSN.
+- # Also FILELANGS (or?)
+- QF="[%{FILENAMES} %{FILEFLAGS} %{FILESTATES} %{FILEMODES:octal} %{FILEUSERNAME} %{FILEGROUPNAME} %{FILERDEVS} %{FILEVERIFYFLAGS} %{FILELINKTOS}\n]\\n"
+- # ??? what to do with FILEPROVIDE and FILEREQUIRE?
+-
+- check_header $oldrpm | trim_release_old > $file1
+- check_header $newrpm | trim_release_new > $file2
+-
+- echo "comparing filelist"
+- if ! diff -au $file1 $file2; then
+- if test -z "$check_all"; then
+- rm $file1 $file2
+- return 1
+- fi
+- fi
+-
++ get_value QF_FILELIST $spec_old | trim_release_old > $file_old
++ get_value QF_FILELIST $spec_new | trim_release_new > $file_new
++ comp_file filelist $file_old $file_new || return 1
++
+ # now the md5sums. if they are different, we check more detailed
+ # if there are different filenames, we will already have aborted before
+ # file flag 64 means "ghost", filter those out.
+- QF="[%{FILENAMES} %{FILEMD5S} %{FILEFLAGS}\n]\\n"
+- check_header $oldrpm |grep -v " 64$"| trim_release_old > $file1
+- check_header $newrpm |grep -v " 64$"| trim_release_new > $file2
+-
++ get_value QF_CHECKSUM $spec_old | grep -v " 64$" | trim_release_old > $file_old
++ get_value QF_CHECKSUM $spec_new | grep -v " 64$" | trim_release_new > $file_new
+ RES=2
+ # done if the same
+ echo "comparing file checksum"
+- if cmp -s $file1 $file2; then
++ if cmp -s $file_old $file_new; then
+ RES=0
+ fi
+-
++
+ # Get only files with different MD5sums
+- files=`diff -U0 $file1 $file2 | fgrep -v +++ | grep ^+ | cut -b2- | awk '{print $1}'`
++ files=`diff -U0 $file_old $file_new | fgrep -v +++ | grep ^+ | cut -b2- | awk '{print $1}'`
+
+ if test -f "$sh"; then
+ echo "creating rename script"
+@@ -261,7 +280,7 @@ function cmp_spec ()
+ done >> "${sh}"
+ fi
+ #
+- rm $file1 $file2
++ rm $file_old $file_new
+ return $RES
+ }
+
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch
new file mode 100644
index 000000000..e4f0c5416
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check-for-fifo-named-pipe.patch
@@ -0,0 +1,35 @@
+From a78fe4f792a9ac9f4d364e836c8855f48561d6f2 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 14 Jul 2016 19:52:18 -0700
+Subject: [PATCH 3/4] pkg-diff.sh: check for fifo(named pipe)
+
+Otherwise "cmp -s fifo1 fifo2" will wait for inputing forever.
+
+Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ pkg-diff.sh | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/pkg-diff.sh b/pkg-diff.sh
+index 5dd3a38..1f353aa 100644
+--- a/pkg-diff.sh
++++ b/pkg-diff.sh
+@@ -735,6 +735,13 @@ check_single_file()
+ return 1
+ fi
+ ;;
++ fifo*pipe*)
++ ftype_new="`/usr/bin/file new/$file | sed -e 's@^[^:]\+:[[:blank:]]*@@' -e 's@[[:blank:]]*$@@'`"
++ if [ "$ftype_new" = "$ftype" ]; then
++ return 0
++ fi
++ return 1
++ ;;
+ *)
+ if ! diff_two_files; then
+ return 1
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch
new file mode 100644
index 000000000..b42af2531
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-check_single_file-return-at-once-when-sa.patch
@@ -0,0 +1,37 @@
+From 657983ef9ca8f8354172682e17408c4f6b5bc667 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 14 Jul 2016 19:46:08 -0700
+Subject: [PATCH 1/4] pkg-diff.sh: check_single_file(): return at once when
+ same
+
+If the two files are the same, return at once, this can save a lot of
+time when there are archives inside archives.
+
+Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ pkg-diff.sh | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/pkg-diff.sh b/pkg-diff.sh
+index 3cf10aa..402d4a4 100644
+--- a/pkg-diff.sh
++++ b/pkg-diff.sh
+@@ -293,6 +293,13 @@ check_compressed_file()
+ check_single_file()
+ {
+ local file="$1"
++
++ # If the two files are the same, return at once.
++ if [ -f old/$file -a -f new/$file ]; then
++ if cmp -s old/$file new/$file; then
++ return 0
++ fi
++ fi
+ case $file in
+ *.spec)
+ sed -i -e "s,Release:.*$release1,Release: @RELEASE@," old/$file
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch
new file mode 100644
index 000000000..807717233
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/build-compare/files/pkg-diff.sh-remove-space-in-the-end-for-ftype.patch
@@ -0,0 +1,32 @@
+From 836a6783df9c582a834fca239f227063a5687715 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 14 Jul 2016 19:49:12 -0700
+Subject: [PATCH 2/4] pkg-diff.sh: remove space in the end for ftype
+
+Versions of file like 5.14 returns a " " in the end, for example:
+ftype="directory ", but we need ftype="directory", remove the space to
+fix the problem.
+
+Upstream-Status: Submitted [https://github.com/openSUSE/build-compare/pull/10]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ pkg-diff.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkg-diff.sh b/pkg-diff.sh
+index 402d4a4..5dd3a38 100644
+--- a/pkg-diff.sh
++++ b/pkg-diff.sh
+@@ -633,7 +633,7 @@ check_single_file()
+ ;;
+ esac
+
+- ftype=`/usr/bin/file old/$file | sed 's@^[^:]\+:[[:blank:]]*@@'`
++ ftype=`/usr/bin/file old/$file | sed -e 's@^[^:]\+:[[:blank:]]*@@' -e 's@[[:blank:]]*$@@'`
+ case $ftype in
+ PE32\ executable*Mono\/\.Net\ assembly*)
+ echo "PE32 Mono/.Net assembly: $file"
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.4.bb
deleted file mode 100644
index fd45e4160..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.4.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require ccache.inc
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b3c337e7664559a789d9f7a93e5283c1"
-
-SRCREV = "2254797f1c5cfb83c4272da7b138f7f47218eb7d"
-
-SRC_URI += " \
- file://0002-dev.mk.in-fix-file-name-too-long.patch \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.5.bb
new file mode 100644
index 000000000..afd1b0ea1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.5.bb
@@ -0,0 +1,11 @@
+require ccache.inc
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b8a4fa173ed91c1a5204ea4f9c9eadc3"
+
+SRCREV = "424d3ae1fb73444c6c38bf189f8fc048f66d6499"
+
+SRC_URI += " \
+ file://0002-dev.mk.in-fix-file-name-too-long.patch \
+ file://Revert-Create-man-page-in-the-make-install-from-git-.patch \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/Revert-Create-man-page-in-the-make-install-from-git-.patch b/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/Revert-Create-man-page-in-the-make-install-from-git-.patch
new file mode 100644
index 000000000..f0208b9dc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ccache/files/Revert-Create-man-page-in-the-make-install-from-git-.patch
@@ -0,0 +1,33 @@
+From 94fabcdda5c7e54ccdbc1f0aeccb26ce30e61226 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 18 Jul 2016 19:53:00 -0700
+Subject: [PATCH] Revert "Create man page in the make-install-from-git-repo
+ case"
+
+This reverts commit b86784902d28defd5e475c8922de594787df4541.
+
+We dont' have asciidoc, so revert it.
+
+Upstream-Status: Inappropriate [OE-Core specific]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index d474f2a..c6cdc04 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -76,7 +76,7 @@ ccache$(EXEEXT): $(ccache_objs) $(extra_libs)
+ $(CC) $(all_cflags) -o $@ $(ccache_objs) $(LDFLAGS) $(extra_libs) $(LIBS)
+
+ .PHONY: install
+-install: all $(srcdir)/ccache.1
++install: all
+ $(installcmd) -d $(DESTDIR)$(bindir)
+ $(installcmd) -m 755 ccache$(EXEEXT) $(DESTDIR)$(bindir)
+ $(installcmd) -d $(DESTDIR)$(mandir)/man1
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.4.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.4.3.bb
deleted file mode 100644
index cb4e749d7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.4.3.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require cmake.inc
-inherit native
-
-# Using cmake's internal libarchive, so some dependencies are needed
-DEPENDS += "bzip2-native zlib-native"
-
-SRC_URI += "\
- file://cmlibarchive-disable-ext2fs.patch \
-"
-
-# Disable ccmake since we don't depend on ncurses
-CMAKE_EXTRACONF = "\
- -DBUILD_CursesDialog=0 \
- -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
- -DHAVE_SYS_ACL_H=0 \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
new file mode 100644
index 000000000..aec0d64de
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
@@ -0,0 +1,36 @@
+require cmake.inc
+inherit native
+
+DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native"
+
+SRC_URI += "\
+ file://cmlibarchive-disable-ext2fs.patch \
+"
+
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+# Disable ccmake since we don't depend on ncurses
+CMAKE_EXTRACONF = "\
+ -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
+ -DBUILD_CursesDialog=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
+ -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
+ -DHAVE_SYS_ACL_H=0 \
+"
+
+do_configure () {
+ ${S}/configure --verbose --prefix=${prefix} -- ${CMAKE_EXTRACONF}
+}
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
+
+do_compile[progress] = "percent"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
index 968d003b2..4fcb0b1ed 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
@@ -6,24 +6,21 @@ HOMEPAGE = "http://www.cmake.org/"
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
SECTION = "console/utils"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=3ba5a6c34481652ce573e5c4e1d707e4 \
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=052f86c15bbde68af55c7f7b340ab639 \
file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
-CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
+CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV', True).split('.')[0:2])}"
SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
file://support-oe-qt4-tools-names.patch \
file://qt4-fail-silent.patch \
- file://0001-Add-NIOS2-CPU-support.patch \
"
-SRC_URI[md5sum] = "4cb3ff35b2472aae70f542116d616e63"
-SRC_URI[sha256sum] = "b73f8c1029611df7ed81796bf5ca8ba0ef41c6761132340c73ffe42704f980fa"
+SRC_URI[md5sum] = "d6dd661380adacdb12f41b926ec99545"
+SRC_URI[sha256sum] = "28ee98ec40427d41a45673847db7a905b59ce9243bb866eaf59dce0f58aaef11"
UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
-inherit autotools
-
# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
# and possibly missing qmake binary (qtbase-native can be removed from sysroot
# e.g. in order to upgrade it, even when there is target qtbase)
@@ -46,10 +43,3 @@ do_configure_prepend() {
sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt
sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
}
-
-# Extra flags to pass to cmake invoked by bootstrap
-CMAKE_EXTRACONF = ""
-
-do_configure () {
- ${S}/configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-Add-NIOS2-CPU-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-Add-NIOS2-CPU-support.patch
deleted file mode 100644
index 6e0ab9fb7..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-Add-NIOS2-CPU-support.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 3f8c3d3011ea192da2c761560b615f55763715ef Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Thu, 26 Nov 2015 21:31:04 +0100
-Subject: [PATCH] Add NIOS2 CPU support
-
-Add necessary bits to support the NIOS2 little-endian CPU.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Cc: Ley Foon Tan <lftan@altera.com>
-Cc: Thomas Chou <thomas@wytron.com.tw>
-Cc: Walter Goossens <waltergoossens@home.nl>
-Upstream-Status: Submitted
----
- Source/kwsys/CPU.h.in | 4 ++++
- Utilities/KWIML/ABI.h.in | 4 ++++
- 2 files changed, 8 insertions(+)
-
-diff --git a/Source/kwsys/CPU.h.in b/Source/kwsys/CPU.h.in
-index 884d71a..66ffbb1 100644
---- a/Source/kwsys/CPU.h.in
-+++ b/Source/kwsys/CPU.h.in
-@@ -88,6 +88,10 @@
- #elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
- # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
-
-+/* NIOS2 */
-+#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__)
-+# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE
-+
- /* OpenRISC 1000 */
- #elif defined(__or1k__)
- # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
-diff --git a/Utilities/KWIML/ABI.h.in b/Utilities/KWIML/ABI.h.in
-index 6300ada..87b6e96 100644
---- a/Utilities/KWIML/ABI.h.in
-+++ b/Utilities/KWIML/ABI.h.in
-@@ -398,6 +398,10 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
- #elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
- # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
-
-+/* NIOS2 */
-+#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__)
-+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_LITTLE
-+
- /* OpenRISC 1000 */
- #elif defined(__or1k__)
- # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index 60014bbf2..6518408c7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -3,13 +3,17 @@ set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE )
set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE )
+
set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
-string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
-string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
+# Set CMAKE_SYSTEM_PROCESSOR from the sysroot name (assuming processor-distro-os).
+if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+")
+ set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1})
+endif()
# Include the toolchain configuration subscripts
file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" )
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.4.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.4.3.bb
deleted file mode 100644
index 2f188f071..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.4.3.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-require cmake.inc
-
-inherit cmake
-
-DEPENDS += "curl expat zlib libarchive xz ncurses bzip2"
-
-SRC_URI_append_class-nativesdk = " \
- file://OEToolchainConfig.cmake \
- file://environment.d-cmake.sh"
-
-# Strip ${prefix} from ${docdir}, set result into docdir_stripped
-python () {
- prefix=d.getVar("prefix", True)
- docdir=d.getVar("docdir", True)
-
- if not docdir.startswith(prefix):
- raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
-
- docdir_stripped = docdir[len(prefix):]
- if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
- docdir_stripped = docdir_stripped[1:]
-
- d.setVar("docdir_stripped", docdir_stripped)
-}
-
-EXTRA_OECMAKE=" \
- -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
- -DCMAKE_USE_SYSTEM_LIBRARY_BZIP2=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_CURL=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_FORM=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_LIBLZMA=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_ZLIB=1 \
- -DKWSYS_CHAR_IS_SIGNED=1 \
- -DBUILD_CursesDialog=0 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
-"
-
-do_install_append_class-nativesdk() {
- mkdir -p ${D}${datadir}/cmake
- install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
-
- mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
- install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
-}
-
-FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
-
-FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
-FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.6.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.6.1.bb
new file mode 100644
index 000000000..850d6de23
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake_3.6.1.bb
@@ -0,0 +1,48 @@
+require cmake.inc
+
+inherit cmake
+
+DEPENDS += "curl expat zlib libarchive xz ncurses bzip2"
+
+SRC_URI_append_class-nativesdk = " \
+ file://OEToolchainConfig.cmake \
+ file://environment.d-cmake.sh"
+
+# Strip ${prefix} from ${docdir}, set result into docdir_stripped
+python () {
+ prefix=d.getVar("prefix", True)
+ docdir=d.getVar("docdir", True)
+
+ if not docdir.startswith(prefix):
+ bb.fatal('docdir must contain prefix as its prefix')
+
+ docdir_stripped = docdir[len(prefix):]
+ if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
+ docdir_stripped = docdir_stripped[1:]
+
+ d.setVar("docdir_stripped", docdir_stripped)
+}
+
+EXTRA_OECMAKE=" \
+ -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
+ -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
+ -DKWSYS_CHAR_IS_SIGNED=1 \
+ -DBUILD_CursesDialog=0 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
+"
+
+do_install_append_class-nativesdk() {
+ mkdir -p ${D}${datadir}/cmake
+ install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
+
+ mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
+ install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
+}
+
+FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
+
+FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
+FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
new file mode 100644
index 000000000..1baadea8e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
@@ -0,0 +1,54 @@
+SUMMARY = "cve-check-tool"
+DESCRIPTION = "cve-check-tool is a tool for checking known (public) CVEs.\
+The tool will identify potentially vunlnerable software packages within Linux distributions through version matching."
+HOMEPAGE = "https://github.com/ikeydoherty/cve-check-tool"
+SECTION = "Development/Tools"
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e8c1458438ead3c34974bc0be3a03ed6"
+
+SRC_URI = "https://github.com/ikeydoherty/${BPN}/releases/download/v${PV}/${BP}.tar.xz \
+ file://check-for-malloc_trim-before-using-it.patch \
+ file://0001-print-progress-in-percent-when-downloading-CVE-db.patch \
+ "
+
+SRC_URI[md5sum] = "c5f4247140fc9be3bf41491d31a34155"
+SRC_URI[sha256sum] = "b8f283be718af8d31232ac1bfc10a0378fb958aaaa49af39168f8acf501e6a5b"
+
+DEPENDS = "libcheck glib-2.0 json-glib curl libxml2 sqlite3 openssl ca-certificates"
+
+RDEPENDS_${PN} = "ca-certificates"
+
+inherit pkgconfig autotools
+
+EXTRA_OECONF = "--disable-coverage"
+CFLAGS_append = " -Wno-error=pedantic"
+
+do_populate_cve_db() {
+ if [ "${BB_NO_NETWORK}" = "1" ] ; then
+ bberror "BB_NO_NETWORK is set; Can't update cve-check-tool database, CVEs won't be checked"
+ return
+ fi
+
+ # In case we don't inherit cve-check class, use default values defined in the class.
+ cve_dir="${CVE_CHECK_DB_DIR}"
+ cve_file="${CVE_CHECK_TMP_FILE}"
+
+ [ -z "${cve_dir}" ] && cve_dir="${DL_DIR}/CVE_CHECK"
+ [ -z "${cve_file}" ] && cve_file="${TMPDIR}/cve_check"
+
+ bbdebug 2 "Updating cve-check-tool database located in $cve_dir"
+ if cve-check-update -d "$cve_dir" ; then
+ printf "CVE database was updated on %s UTC\n\n" "$(LANG=C date --utc +'%F %T')" > "$cve_file"
+ else
+ bbwarn "Error in executing cve-check-update"
+ if [ "${@'1' if bb.data.inherits_class('cve-check', d) else '0'}" -ne 0 ] ; then
+ bbwarn "Failed to update cve-check-tool database, CVEs won't be checked"
+ fi
+ fi
+}
+
+addtask populate_cve_db after do_populate_sysroot
+do_populate_cve_db[nostamp] = "1"
+do_populate_cve_db[progress] = "percent"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch
new file mode 100644
index 000000000..0510e3ae0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/0001-print-progress-in-percent-when-downloading-CVE-db.patch
@@ -0,0 +1,135 @@
+From e9ed26cde63f8ca7607a010a518329339f8c02d3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
+Date: Mon, 26 Sep 2016 12:12:41 +0100
+Subject: [PATCH] print progress in percent when downloading CVE db
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+Signed-off-by: André Draszik <git@andred.net>
+---
+ src/library/fetch.c | 28 +++++++++++++++++++++++++++-
+ src/library/fetch.h | 3 ++-
+ src/update.c | 16 ++++++++++++----
+ 3 files changed, 41 insertions(+), 6 deletions(-)
+
+diff --git a/src/library/fetch.c b/src/library/fetch.c
+index 06d4b30..0fe6d76 100644
+--- a/src/library/fetch.c
++++ b/src/library/fetch.c
+@@ -37,13 +37,37 @@ static size_t write_func(void *ptr, size_t size, size_t nmemb, struct fetch_t *f
+ return fwrite(ptr, size, nmemb, f->f);
+ }
+
+-FetchStatus fetch_uri(const char *uri, const char *target, bool verbose)
++struct percent_t {
++ unsigned int start;
++ unsigned int end;
++};
++
++static int progress_callback_new(void *ptr, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
++{
++ (void) ultotal;
++ (void) ulnow;
++
++ struct percent_t *percent = (struct percent_t *) ptr;
++
++ if (dltotal && percent && percent->end >= percent->start) {
++ unsigned int diff = percent->end - percent->start;
++ if (diff) {
++ fprintf(stderr,"completed: "CURL_FORMAT_OFF_T"%%\r", percent->start + (diff * dlnow / dltotal));
++ }
++ }
++
++ return 0;
++}
++
++FetchStatus fetch_uri(const char *uri, const char *target, bool verbose,
++ unsigned int start_percent, unsigned int end_percent)
+ {
+ FetchStatus ret = FETCH_STATUS_FAIL;
+ CURLcode res;
+ struct stat st;
+ CURL *curl = NULL;
+ struct fetch_t *f = NULL;
++ struct percent_t percent = { .start = start_percent, .end = end_percent };
+
+ curl = curl_easy_init();
+ if (!curl) {
+@@ -67,6 +91,8 @@ FetchStatus fetch_uri(const char *uri, const char *target, bool verbose)
+ }
+ if (verbose) {
+ (void)curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
++ (void)curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &percent);
++ (void)curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_callback_new);
+ }
+ res = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)write_func);
+ if (res != CURLE_OK) {
+diff --git a/src/library/fetch.h b/src/library/fetch.h
+index 70c3779..4cce5d1 100644
+--- a/src/library/fetch.h
++++ b/src/library/fetch.h
+@@ -28,7 +28,8 @@ typedef enum {
+ * @param verbose Whether to be verbose
+ * @return A FetchStatus, indicating the operation taken
+ */
+-FetchStatus fetch_uri(const char *uri, const char *target, bool verbose);
++FetchStatus fetch_uri(const char *uri, const char *target, bool verbose,
++ unsigned int this_percent, unsigned int next_percent);
+
+ /**
+ * Attempt to extract the given gzipped file
+diff --git a/src/update.c b/src/update.c
+index 30fbe96..eaeeefd 100644
+--- a/src/update.c
++++ b/src/update.c
+@@ -266,7 +266,8 @@ static inline void update_end(int fd, const char *update_fname, bool ok)
+ }
+
+ static int do_fetch_update(int year, const char *db_dir, CveDB *cve_db,
+- bool db_exist, bool verbose)
++ bool db_exist, bool verbose,
++ unsigned int this_percent, unsigned int next_percent)
+ {
+ const char nvd_uri[] = URI_PREFIX;
+ autofree(cve_string) *uri_meta = NULL;
+@@ -330,14 +331,14 @@ refetch:
+ }
+
+ /* Fetch NVD META file */
+- st = fetch_uri(uri_meta->str, nvdcve_meta->str, verbose);
++ st = fetch_uri(uri_meta->str, nvdcve_meta->str, verbose, this_percent, this_percent);
+ if (st == FETCH_STATUS_FAIL) {
+ fprintf(stderr, "Failed to fetch %s\n", uri_meta->str);
+ return -1;
+ }
+
+ /* Fetch NVD XML file */
+- st = fetch_uri(uri_data_gz->str, nvdcve_data_gz->str, verbose);
++ st = fetch_uri(uri_data_gz->str, nvdcve_data_gz->str, verbose, this_percent, next_percent);
+ switch (st) {
+ case FETCH_STATUS_FAIL:
+ fprintf(stderr, "Failed to fetch %s\n", uri_data_gz->str);
+@@ -459,10 +460,17 @@ bool update_db(bool quiet, const char *db_file)
+ for (int i = YEAR_START; i <= year+1; i++) {
+ int y = i > year ? -1 : i;
+ int rc;
++ unsigned int start_percent = ((i+0 - YEAR_START) * 100) / (year+2 - YEAR_START);
++ unsigned int end_percent = ((i+1 - YEAR_START) * 100) / (year+2 - YEAR_START);
+
+- rc = do_fetch_update(y, db_dir, cve_db, db_exist, !quiet);
++ if (!quiet)
++ fprintf(stderr, "completed: %u%%\r", start_percent);
++ rc = do_fetch_update(y, db_dir, cve_db, db_exist, !quiet,
++ start_percent, end_percent);
+ switch (rc) {
+ case 0:
++ if (!quiet)
++ fprintf(stderr,"completed: %u%%\r", end_percent);
+ continue;
+ case ENOMEM:
+ goto oom;
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch
new file mode 100644
index 000000000..0774ad946
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/cve-check-tool/files/check-for-malloc_trim-before-using-it.patch
@@ -0,0 +1,51 @@
+From ce64633b9733e962b8d8482244301f614d8b5845 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 Aug 2016 22:54:24 -0700
+Subject: [PATCH] Check for malloc_trim before using it
+
+malloc_trim is gnu specific and not all libc
+implement it, threfore write a configure check
+to poke for it first and use the define to
+guard its use.
+
+Helps in compiling on musl based systems
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted [https://github.com/ikeydoherty/cve-check-tool/pull/48]
+ configure.ac | 2 ++
+ src/core.c | 4 ++--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d3b66ce..79c3542 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,6 +19,8 @@ m4_define([json_required_version], [0.16.0])
+ m4_define([openssl_required_version],[1.0.0])
+ # TODO: Set minimum sqlite
+
++AC_CHECK_FUNCS_ONCE(malloc_trim)
++
+ PKG_CHECK_MODULES(CVE_CHECK_TOOL,
+ [
+ glib-2.0 >= glib_required_version,
+diff --git a/src/core.c b/src/core.c
+index 6263031..0d5df29 100644
+--- a/src/core.c
++++ b/src/core.c
+@@ -498,9 +498,9 @@ bool cve_db_load(CveDB *self, const char *fname)
+ }
+
+ b = true;
+-
++#ifdef HAVE_MALLOC_TRIM
+ malloc_trim(0);
+-
++#endif
+ xmlFreeTextReader(r);
+ if (fd) {
+ close(fd);
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.22.bb b/import-layers/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.22.bb
deleted file mode 100644
index f899cd2f1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.22.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SECTION = "console/utils"
-SUMMARY = "Command line utilities for working with *.desktop files"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/desktop-file-utils"
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-DEPENDS = "glib-2.0-native"
-
-SRC_URI = "http://freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "c6b9f9aac1ea143091178c23437e6cd0"
-SRC_URI[sha256sum] = "843532672692f98e9b2d6ae6cc8658da562dfde1606c7f33d9d227a344de56c5"
-
-inherit autotools native
-
-S = "${WORKDIR}/desktop-file-utils-${PV}"
-
-EXTRA_OECONF += "ac_cv_prog_EMACS=no"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb b/import-layers/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb
new file mode 100644
index 000000000..54daabef5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.23.bb
@@ -0,0 +1,18 @@
+SECTION = "console/utils"
+SUMMARY = "Command line utilities for working with *.desktop files"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/desktop-file-utils"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+DEPENDS = "glib-2.0-native"
+
+SRC_URI = "http://freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "599133d51cc9a41bfec186414906b6f1"
+SRC_URI[sha256sum] = "6c094031bdec46c9f621708f919084e1cb5294e2c5b1e4c883b3e70cb8903385"
+
+inherit autotools native
+
+S = "${WORKDIR}/desktop-file-utils-${PV}"
+
+EXTRA_OECONF += "ac_cv_prog_EMACS=no"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.1.bb
deleted file mode 100644
index f8879c87c..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.1.bb
+++ /dev/null
@@ -1,74 +0,0 @@
-SUMMARY = "A parallel build system"
-DESCRIPTION = "distcc is a parallel build system that distributes \
-compilation of C/C++/ObjC code across machines on a network."
-SECTION = "devel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "avahi"
-
-GTKCONFIG = "gtk"
-GTKCONFIG_libc-uclibc = ""
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${GTKCONFIG}', '', d)} popt"
-PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk --without-gnome,gtk+"
-# use system popt by default
-PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt"
-
-RRECOMMENDS_${PN} = "avahi-daemon"
-
-SRC_URI = "git://github.com/distcc/distcc.git \
- file://separatebuilddir.patch \
- file://0001-zeroconf-Include-fcntl.h.patch \
- file://default \
- file://distccmon-gnome.desktop \
- file://distcc \
- file://distcc.service"
-SRCREV = "9a172d3d20042754a30c0cd9a5d63fd1a8120c31"
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig update-rc.d useradd systemd
-
-EXTRA_OECONF += "--disable-Werror PYTHON=/dev/null"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system \
- --home /dev/null \
- --no-create-home \
- --gid nogroup \
- distcc"
-
-INITSCRIPT_NAME = "distcc"
-
-SYSTEMD_PACKAGES = "${PN}"
-SYSTEMD_SERVICE_${PN} = "distcc.service"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d/
- install -d ${D}${sysconfdir}/default
- install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
- install -d ${D}${systemd_unitdir}/system/
- install -m 0644 ${WORKDIR}/distcc.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distcc.service
- ${DESKTOPINSTALL}
-}
-DESKTOPINSTALL = ""
-DESKTOPINSTALL_libc-glibc () {
- install -d ${D}${datadir}/distcc/
- install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
-}
-PACKAGES += "distcc-distmon-gnome"
-
-FILES_${PN} = " ${sysconfdir} \
- ${bindir}/distcc \
- ${bindir}/lsdistcc \
- ${bindir}/distccd \
- ${bindir}/distccmon-text \
- ${systemd_unitdir}/system/distcc.service"
-FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \
- ${datadir}/distcc"
-
-pkg_postrm_${PN} () {
- deluser distcc || true
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
new file mode 100644
index 000000000..c084ad2b7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/distcc/distcc_3.2.bb
@@ -0,0 +1,71 @@
+SUMMARY = "A parallel build system"
+DESCRIPTION = "distcc is a parallel build system that distributes \
+compilation of C/C++/ObjC code across machines on a network."
+SECTION = "devel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+DEPENDS = "avahi binutils"
+
+PACKAGECONFIG ??= "popt"
+PACKAGECONFIG[gtk] = "--with-gtk,--without-gtk --without-gnome,gtk+"
+# use system popt by default
+PACKAGECONFIG[popt] = "--without-included-popt,--with-included-popt,popt"
+
+RRECOMMENDS_${PN} = "avahi-daemon"
+
+SRC_URI = "git://github.com/distcc/distcc.git;branch=${PV} \
+ file://separatebuilddir.patch \
+ file://0001-zeroconf-Include-fcntl.h.patch \
+ file://default \
+ file://distccmon-gnome.desktop \
+ file://distcc \
+ file://distcc.service"
+SRCREV = "d8b18df3e9dcbe4f092bed565835d3975e99432c"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig update-rc.d useradd systemd
+
+EXTRA_OECONF += "--disable-Werror PYTHON='' --disable-pump-mode"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system \
+ --home /dev/null \
+ --no-create-home \
+ --gid nogroup \
+ distcc"
+
+INITSCRIPT_NAME = "distcc"
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "distcc.service"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d/
+ install -d ${D}${sysconfdir}/default
+ install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/distcc
+ install -d ${D}${systemd_unitdir}/system/
+ install -m 0644 ${WORKDIR}/distcc.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/distcc.service
+ ${DESKTOPINSTALL}
+}
+DESKTOPINSTALL = ""
+DESKTOPINSTALL_libc-glibc () {
+ install -d ${D}${datadir}/distcc/
+ install -m 0644 ${WORKDIR}/distccmon-gnome.desktop ${D}${datadir}/distcc/
+}
+PACKAGES += "distcc-distmon-gnome"
+
+FILES_${PN} = " ${sysconfdir} \
+ ${bindir}/distcc \
+ ${bindir}/lsdistcc \
+ ${bindir}/distccd \
+ ${bindir}/distccmon-text \
+ ${systemd_unitdir}/system/distcc.service"
+FILES_distcc-distmon-gnome = " ${bindir}/distccmon-gnome \
+ ${datadir}/distcc"
+
+pkg_postrm_${PN} () {
+ deluser distcc || true
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/distcc/files/separatebuilddir.patch b/import-layers/yocto-poky/meta/recipes-devtools/distcc/files/separatebuilddir.patch
index b9e3e42dd..7580b5584 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/distcc/files/separatebuilddir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/distcc/files/separatebuilddir.patch
@@ -6,16 +6,16 @@ RP 2013/3/8
Upstream-Status: Pending
-Index: distcc-3.1/Makefile.in
+Index: git/Makefile.in
===================================================================
---- distcc-3.1.orig/Makefile.in 2008-12-02 21:50:31.000000000 +0000
-+++ distcc-3.1/Makefile.in 2013-03-08 10:49:24.224400937 +0000
-@@ -1088,7 +1088,7 @@
+--- git.orig/Makefile.in
++++ git/Makefile.in
+@@ -1117,7 +1117,7 @@ install-example: $(example_DOCS)
install-gnome-data: $(gnome_data)
$(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
- for p in $(gnome_data); do \
-- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
-+ $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ for p in $(gnome_data); do \
+- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
++ $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
done
install-conf: $(conf_files) $(default_files)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
index de1bc3970..2f13dba52 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e763
# Note: the upstream sources are not distributed with a license file.
# LICENSE-OASIS is included as a "patch" to workaround this. When
# upgrading this recipe, please verify whether this is still needed.
-SRC_URI = "${DEBIAN_MIRROR}/main/d/docbook-xml/docbook-xml_${PV}.orig.tar.gz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/d/docbook-xml/docbook-xml_${PV}.orig.tar.gz \
file://LICENSE-OASIS \
file://docbook-xml-update-catalog.xml.patch \
file://docbook-xml.xml \
@@ -20,6 +20,8 @@ SRC_URI = "${DEBIAN_MIRROR}/main/d/docbook-xml/docbook-xml_${PV}.orig.tar.gz \
SRC_URI[md5sum] = "487b4d44e15cffb1f4048af23f98208e"
SRC_URI[sha256sum] = "b0f8edcf697f5318e63dd98c9a931f3fee167af0805ba441db372e0f17b2a44f"
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/docbook-xml/"
+
S="${WORKDIR}/docbook-xml-4.5.c31424"
inherit allarch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml b/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
index a1a576a2e..c60555ae1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
+++ b/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets/docbook-xsl.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
-<delegateURI uriStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets-1.78.1/catalog.xml"/>
-<delegateSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets-1.78.1/catalog.xml"/>
+<delegateURI uriStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets/catalog.xml"/>
+<delegateSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/" catalog="file:///usr/share/xml/docbook/xsl-stylesheets/catalog.xml"/>
</catalog>
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb
deleted file mode 100644
index 52de3ab04..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb
+++ /dev/null
@@ -1,74 +0,0 @@
-SUMMARY = "XSL stylesheets for processing DocBook XML to various output formats"
-HOMEPAGE = "http://docbook.sourceforge.net"
-LICENSE = "XSL"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6eeeed43d498c22a835382533356462"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-xsl-${PV}.tar.bz2 \
- file://docbook-xsl.xml \
- file://docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch \
-"
-
-SRC_URI[md5sum] = "6dd0f89131cc35bf4f2ed105a1c17771"
-SRC_URI[sha256sum] = "c98f7296ab5c8ccd2e0bc07634976a37f50847df2d8a59bdb1e157664700b467"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/docbook/files/docbook-xsl/"
-# Reject versions ending in .0 as those are release candidates
-UPSTREAM_CHECK_REGEX = "/docbook-xsl/(?P<pver>(\d+[\.\-_]*)+(?!\.0)\.\d+)/"
-
-S = "${WORKDIR}/docbook-xsl-${PV}"
-
-inherit allarch
-BBCLASSEXTEND = "native"
-
-SSTATEPOSTINSTFUNCS_append_class-native = " docbook_xsl_stylesheets_sstate_postinst"
-SYSROOT_PREPROCESS_FUNCS_append_class-native = " docbook_xsl_stylesheets_sysroot_preprocess"
-
-do_configure (){
- :
-}
-
-do_compile (){
- :
-}
-
-do_install () {
- # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-xsl.html
- # for details.
- install -v -m755 -d ${D}${datadir}/xml/docbook/xsl-stylesheets-${PV}
- ln -s xsl-stylesheets-${PV} ${D}${datadir}/xml/docbook/xsl-stylesheets
-
- cp -v -R VERSION common eclipse epub extensions fo highlighting html \
- htmlhelp images javahelp lib manpages params profiling \
- roundtrip slides template tests tools webhelp website \
- xhtml xhtml-1_1 catalog.xml \
- ${D}${datadir}/xml/docbook/xsl-stylesheets-1.78.1
-
- ln -s VERSION ${D}/${datadir}/xml/docbook/xsl-stylesheets-1.78.1/VERSION.xsl
-
- install -v -m644 -D README \
- ${D}${datadir}/doc/docbook-xsl-1.78.1/README.txt
- install -v -m644 RELEASE-NOTES* NEWS* \
- ${D}${datadir}/doc/docbook-xsl-1.78.1
-
- install -d ${D}${sysconfdir}/xml/
- install -m 755 ${WORKDIR}/docbook-xsl.xml ${D}${sysconfdir}/xml/docbook-xsl.xml
-
-}
-
-docbook_xsl_stylesheets_sstate_postinst () {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is installed from sstate cache.
- sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml
- fi
-}
-
-docbook_xsl_stylesheets_sysroot_preprocess () {
- # Update the hardcode dir in docbook-xml.xml
- sed -i -e "s|file:///usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml
-}
-
-RDEPENDS_${PN} += "perl"
-FILES_${PN} = "${datadir}/xml/* ${sysconfdir}/xml/docbook-xsl.xml"
-FILES_${PN}-doc = "${datadir}/doc/*"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
new file mode 100644
index 000000000..aa03a82a2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb
@@ -0,0 +1,74 @@
+SUMMARY = "XSL stylesheets for processing DocBook XML to various output formats"
+HOMEPAGE = "http://docbook.sourceforge.net"
+LICENSE = "XSL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6beadd98f9c54ab0c387e14211ee4d0e"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-xsl-${PV}.tar.bz2 \
+ file://docbook-xsl.xml \
+ file://docbook-xsl-stylesheets-no-bashism-in-docbook-xsl-up.patch \
+"
+
+SRC_URI[md5sum] = "b48cbf929a2ad85e6672f710777ca7bc"
+SRC_URI[sha256sum] = "725f452e12b296956e8bfb876ccece71eeecdd14b94f667f3ed9091761a4a968"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/docbook/files/docbook-xsl/"
+# Reject versions ending in .0 as those are release candidates
+UPSTREAM_CHECK_REGEX = "/docbook-xsl/(?P<pver>(\d+[\.\-_]*)+(?!\.0)\.\d+)/"
+
+S = "${WORKDIR}/docbook-xsl-${PV}"
+
+inherit allarch
+BBCLASSEXTEND = "native"
+
+SSTATEPOSTINSTFUNCS_append_class-native = " docbook_xsl_stylesheets_sstate_postinst"
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " docbook_xsl_stylesheets_sysroot_preprocess"
+
+do_configure (){
+ :
+}
+
+do_compile (){
+ :
+}
+
+do_install () {
+ # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-xsl.html
+ # for details.
+ install -v -m755 -d ${D}${datadir}/xml/docbook/xsl-stylesheets-${PV}
+ ln -s xsl-stylesheets-${PV} ${D}${datadir}/xml/docbook/xsl-stylesheets
+
+ cp -v -R VERSION assembly common eclipse epub epub3 fo \
+ highlighting html htmlhelp images javahelp lib manpages \
+ params profiling roundtrip slides template webhelp website \
+ xhtml xhtml-1_1 xhtml5 catalog.xml \
+ ${D}${datadir}/xml/docbook/xsl-stylesheets-${PV}
+
+ ln -s VERSION ${D}/${datadir}/xml/docbook/xsl-stylesheets-${PV}/VERSION.xsl
+
+ install -v -m644 -D README \
+ ${D}${datadir}/doc/docbook-xsl-${PV}/README.txt
+ install -v -m644 RELEASE-NOTES* NEWS* \
+ ${D}${datadir}/doc/docbook-xsl-${PV}
+
+ install -d ${D}${sysconfdir}/xml/
+ install -m 755 ${WORKDIR}/docbook-xsl.xml ${D}${sysconfdir}/xml/docbook-xsl.xml
+
+}
+
+docbook_xsl_stylesheets_sstate_postinst () {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+ then
+ # Ensure that the catalog file sgml-docbook.cat is properly
+ # updated when the package is installed from sstate cache.
+ sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml
+ fi
+}
+
+docbook_xsl_stylesheets_sysroot_preprocess () {
+ # Update the hardcode dir in docbook-xml.xml
+ sed -i -e "s|file:///usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xsl.xml
+}
+
+RDEPENDS_${PN} += "perl"
+FILES_${PN} = "${datadir}/xml/* ${sysconfdir}/xml/docbook-xsl.xml"
+FILES_${PN}-doc = "${datadir}/doc/*"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch b/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch
deleted file mode 100644
index 3497ca540..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 3b95786af13e28157d889bd90a384ee255f2d91d Mon Sep 17 00:00:00 2001
-From: "Yann E. MORIN" <yann.morin.1998@free.fr>
-Date: Sun, 16 Aug 2015 15:55:43 +0200
-Subject: [PATCH] mkfs.fat: fix incorrect int type
-
-u_int32_t is not a stanard type, while uint32_t is. This fixes builds
-with the musl C library, which only defines so-called "clean" headers;
-build failures are like (back-quotes and elision manually added for
-readability):
-
- http://autobuild.buildroot.org/results/a09/a0923d7f6d4dbae02eba4c5024bbdae3a52aa85a/build-end.log
-
- /home/peko/autobuild/instance-1/output/host/usr/bin/x86_64-linux-gcc -D_LARGEFILE_SOURCE \
- -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_GNU_SOURCE -D_LARGEFILE_SOURCE \
- -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o mkfs.fat.o src/mkfs.fat.c
- src/mkfs.fat.c: In function 'main':
- src/mkfs.fat.c:1415:18: error: 'u_int32_t' undeclared (first use in this function)
- volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); [...]
- ^
- src/mkfs.fat.c:1415:18: note: each undeclared identifier is reported only once for each
- function it appears in
-
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-Signed-off-by: Andreas Bombe <aeb@debian.org>
----
-Upstream-Status: Backport
-
- src/mkfs.fat.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
-index b38d116..dddbe24 100644
---- a/src/mkfs.fat.c
-+++ b/src/mkfs.fat.c
-@@ -1412,7 +1412,7 @@ int main(int argc, char **argv)
-
- gettimeofday(&create_timeval, NULL);
- create_time = create_timeval.tv_sec;
-- volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); /* Default volume ID = creation time, fudged for more uniqueness */
-+ volume_id = (uint32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); /* Default volume ID = creation time, fudged for more uniqueness */
- check_atari();
-
- printf("mkfs.fat " VERSION " (" VERSION_DATE ")\n");
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/largefile.patch b/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/largefile.patch
deleted file mode 100644
index 7f7d8359d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/largefile.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-defer setting largefile flags to build makery
-in a cross build we can not do runtime config tests
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Inappropriate[Cross compile Specific]
-Index: dosfstools-3.0.28/Makefile
-===================================================================
---- dosfstools-3.0.28.orig/Makefile
-+++ dosfstools-3.0.28/Makefile
-@@ -27,8 +27,7 @@ SBINDIR = $(PREFIX)/sbin
- DOCDIR = $(PREFIX)/share/doc
- MANDIR = $(PREFIX)/share/man
-
--#OPTFLAGS = -O2 -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
--OPTFLAGS = -O2 -fomit-frame-pointer -D_GNU_SOURCE $(shell getconf LFS_CFLAGS)
-+OPTFLAGS = -O2 -fomit-frame-pointer
- #WARNFLAGS = -Wall -pedantic -std=c99
- WARNFLAGS = -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings
- DEBUGFLAGS = -g
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_3.0.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_3.0.28.bb
deleted file mode 100644
index 6fc3e41df..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_3.0.28.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-# dosfstools OE build file
-# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
-# Copyright (C) 2015, Sören Brinkmann <soeren.brinkmann@gmail> All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-SUMMARY = "DOS FAT Filesystem Utilities"
-HOMEPAGE = "https://github.com/dosfstools/dosfstools"
-
-SECTION = "base"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "https://github.com/dosfstools/dosfstools/releases/download/v3.0.28/dosfstools-3.0.28.tar.xz \
- file://largefile.patch \
- file://0001-mkfs.fat-fix-incorrect-int-type.patch \
- "
-SRC_URI[md5sum] = "6a047a6c65186b9ebb1853709adb36db"
-SRC_URI[sha256sum] = "ee95913044ecf2719b63ea11212917649709a6e53209a72d622135aaa8517ee2"
-
-UPSTREAM_CHECK_URI = "https://github.com/dosfstools/dosfstools/releases"
-
-CFLAGS += "-D_GNU_SOURCE ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', '', d)}"
-
-FILES_${PN} = "${base_sbindir}"
-FILES_${PN}-doc = "${mandir} ${docdir}"
-
-do_install () {
- oe_runmake "PREFIX=${D}${prefix}" "SBINDIR=${D}${base_sbindir}" \
- "MANDIR=${D}${mandir}" "DOCDIR=${D}${docdir}" install
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_4.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_4.0.bb
new file mode 100644
index 000000000..e7b1f6109
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_4.0.bb
@@ -0,0 +1,25 @@
+# dosfstools OE build file
+# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Copyright (C) 2015, Sören Brinkmann <soeren.brinkmann@gmail> All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+SUMMARY = "DOS FAT Filesystem Utilities"
+HOMEPAGE = "https://github.com/dosfstools/dosfstools"
+
+SECTION = "base"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "https://github.com/dosfstools/dosfstools/releases/download/v${PV}/${BP}.tar.xz \
+ "
+SRC_URI[md5sum] = "20f8388b99702f276c973d228c7cff45"
+SRC_URI[sha256sum] = "9037738953559d1efe04fc5408b6846216cc0138f7f9d32de80b6ec3c35e7daf"
+
+UPSTREAM_CHECK_URI = "https://github.com/dosfstools/dosfstools/releases"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--without-udev --enable-compat-symlinks"
+
+CFLAGS += "-D_GNU_SOURCE ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', '', d)}"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc
index 3d9e7e305..e8d8a9b4f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc
@@ -2,15 +2,13 @@ SUMMARY = "Package maintenance system from Debian"
LICENSE = "GPLv2.0+"
SECTION = "base"
-SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz"
-
-SRC_URI_append_class-native = " file://0001-When-running-do_package_write_deb-we-have-trees-of-h.patch"
-
DEPENDS = "zlib bzip2 perl ncurses"
DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl"
RDEPENDS_${PN}_class-native = "xz-native"
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
+
inherit autotools gettext perlnative pkgconfig systemd
python () {
@@ -35,6 +33,7 @@ EXTRA_OECONF = "\
"
EXTRA_OECONF += "TAR=tar"
+EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}"
do_configure () {
echo >> ${S}/m4/compiler.m4
@@ -74,6 +73,14 @@ RPROVIDES_update-alternatives-dpkg += "update-alternatives"
PACKAGES += "${PN}-perl"
FILES_${PN}-perl = "${libdir}/perl"
-BBCLASSEXTEND = "native"
+# Split out start-stop-daemon to its own package. Note that it
+# is installed in a different directory than the one used for
+# the bitbake version.
+#
+PACKAGES =+ "${PN}-start-stop"
+FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon"
+
+RDEPENDS_${PN} += "${PN}-start-stop"
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
deleted file mode 100644
index 49ef853ff..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From e391bdba238d1371fc5b67cdae08b06eb5ada5c2 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 26 Aug 2015 15:48:13 +0300
-Subject: [PATCH] When running do_package_write_deb, we have trees of
- hardlinked files such as the dbg source files in ${PN}-dbg. If something
- makes another copy of one of those files (or deletes one), the number of
- links a file has changes and tar can notice this, e.g.:
-
-| DEBUG: Executing python function do_package_deb
-| dpkg-deb: building package `sed-ptest' in `/media/build1/poky/build/tmp/work/i586-poky-linux/sed/4.2.2-r0/deploy-debs/i586/sed-ptest_4.2.2-r0.3_i386.deb'.
-| tar: ./usr/lib/sed/ptest/testsuite/tst-regex2: file changed as we read it
-| dpkg-deb: error: subprocess tar -cf returned error exit status 1
-
-Tar returns an error of 1 when files 'change' and other errors codes
-in other error cases. We tweak dpkg-deb here so that it ignores an exit
-code of 1 from tar. The files don't really change (and we have locking in
-place to avoid that kind of issue).
-
-Upstream-Status: Inappropriate
-RP 2015/3/27
----
- dpkg-deb/build.c | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
-index 2ddeec6..af363f0 100644
---- a/dpkg-deb/build.c
-+++ b/dpkg-deb/build.c
-@@ -452,7 +452,7 @@ static void
- tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
- struct compress_params *tar_compress_params, int fd_out)
- {
-- int pipe_filenames[2], pipe_tarball[2];
-+ int pipe_filenames[2], pipe_tarball[2], rc;
- pid_t pid_tar, pid_comp;
-
- /* Fork off a tar. We will feed it a list of filenames on stdin later. */
-@@ -493,7 +493,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
- /* All done, clean up wait for tar and <compress> to finish their job. */
- close(pipe_filenames[1]);
- subproc_reap(pid_comp, _("<compress> from tar -cf"), 0);
-- subproc_reap(pid_tar, "tar -cf", 0);
-+ rc = subproc_reap(pid_tar, "tar -cf", SUBPROC_RETERROR);
-+ if (rc && rc != 1)
-+ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
- }
-
- /**
-@@ -509,7 +511,7 @@ do_build(const char *const *argv)
- char *debar;
- char *tfbuf;
- int arfd;
-- int p1[2], gzfd;
-+ int p1[2], gzfd, rc;
- pid_t c1, c2;
-
- /* Decode our arguments. */
-@@ -590,7 +592,9 @@ do_build(const char *const *argv)
- }
- close(p1[0]);
- subproc_reap(c2, _("<compress> from tar -cf"), 0);
-- subproc_reap(c1, "tar -cf", 0);
-+ rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR);
-+ if (rc && rc != 1)
-+ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
-
- if (lseek(gzfd, 0, SEEK_SET))
- ohshite(_("failed to rewind temporary file (%s)"), _("control member"));
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
index 9f77c6c99..80504ce8b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
@@ -8,30 +8,41 @@ Subject: [PATCH 3/5] Our pre/postinsts expect $D to be set when running in a
Upstream-Status: Inappropriate [OE Specific]
RP 2011/12/07
+ALIMON 2016/05/26
+
---
- src/script.c | 31 ++-----------------------------
- 1 file changed, 2 insertions(+), 29 deletions(-)
+ src/script.c | 39 +++------------------------------------
+ 1 file changed, 3 insertions(+), 36 deletions(-)
diff --git a/src/script.c b/src/script.c
-index a958145..24c49f9 100644
+index 3c88be8..ce66a86 100644
--- a/src/script.c
+++ b/src/script.c
-@@ -100,36 +100,9 @@ maintscript_pre_exec(struct command *cmd)
- size_t instdirl = strlen(instdir);
-
- if (*instdir) {
+@@ -97,43 +97,10 @@ setexecute(const char *path, struct stat *stab)
+ static const char *
+ maintscript_pre_exec(struct command *cmd)
+ {
+- const char *admindir = dpkg_db_get_dir();
+- const char *changedir = fc_script_chrootless ? instdir : "/";
+- size_t instdirl = strlen(instdir);
+-
+- if (*instdir && !fc_script_chrootless) {
- if (strncmp(admindir, instdir, instdirl) != 0)
- ohshit(_("admindir must be inside instdir for dpkg to work properly"));
- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0)
- ohshite(_("unable to setenv for subprocesses"));
+- if (setenv("DPKG_ROOT", "", 1) < 0)
+- ohshite(_("unable to setenv for subprocesses"));
-
- if (chroot(instdir))
- ohshite(_("failed to chroot to '%.250s'"), instdir);
-- }
++ if (*instdir) {
++ setenv("D", instdir, 1);
+ }
- /* Switch to a known good directory to give the maintainer script
- * a saner environment, also needed after the chroot(). */
-- if (chdir("/"))
-- ohshite(_("failed to chdir to '%.255s'"), "/");
+- if (chdir(changedir))
+- ohshite(_("failed to chdir to '%.255s'"), changedir);
- if (debug_has_flag(dbg_scripts)) {
- struct varbuf args = VARBUF_INIT;
- const char **argv = cmd->argv;
@@ -44,9 +55,8 @@ index a958145..24c49f9 100644
- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename,
- args.buf);
- varbuf_destroy(&args);
-+ setenv("D", instdir, 1);
- }
-- if (!instdirl)
+- }
+- if (!instdirl || fc_script_chrootless)
- return cmd->filename;
-
- assert(strlen(cmd->filename) >= instdirl);
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
index af275dec1..dc69eb2d1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
@@ -25,14 +25,22 @@ Upstream-Status: Pending
Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
-diff -Naurp dpkg-1.17.21_org/triplettable dpkg-1.17.21/triplettable
---- dpkg-1.17.21_org/triplettable 2015-04-08 17:08:52.370759171 +0530
-+++ dpkg-1.17.21/triplettable 2015-04-08 17:09:12.406752081 +0530
-@@ -9,6 +9,7 @@ musleabihf-linux-arm musl-linux-armhf
- musl-linux-<cpu> musl-linux-<cpu>
- gnueabihf-linux-arm armhf
+---
+ triplettable | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/triplettable b/triplettable
+index abe4726..1e9c247 100644
+--- a/triplettable
++++ b/triplettable
+@@ -11,6 +11,7 @@ gnueabihf-linux-arm armhf
gnueabi-linux-arm armel
+ gnuabin32-linux-mips64r6el mipsn32r6el
+ gnuabin32-linux-mips64r6 mipsn32r6
+gnueabi-linux-armeb armeb
gnuabin32-linux-mips64el mipsn32el
gnuabin32-linux-mips64 mipsn32
- gnuabi64-linux-mips64el mips64el
+ gnuabi64-linux-mips64r6el mips64r6el
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch
deleted file mode 100644
index e73311c29..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Upstream-Status: Pending
-
-dpkg defines:
-#define DPKG_BEGIN_DECLS extern "C" {
-
-That makes header cstdlib included in a extern "C" block which is not supported
-by gcc 4.8. It fails on Fedora 19:
-
-/usr/include/c++/4.8.1/cstdlib: In function â€long long int std::abs(long long int)’:
-/usr/include/c++/4.8.1/cstdlib:174:20: error: declaration of C function â€long long int std::abs(long long int)’ conflicts with
- abs(long long __x) { return __builtin_llabs (__x); }
- ^
-/usr/include/c++/4.8.1/cstdlib:166:3: error: previous declaration â€long int std::abs(long int)’ here
- abs(long __i) { return __builtin_labs(__i); }
- ^
-
-Move include gettext.h out of the extern "C" block to fix this issue.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
---- dpkg-1.17.1/lib/dpkg/i18n.h.orig 2013-08-13 17:31:28.870935573 +0800
-+++ dpkg-1.17.1/lib/dpkg/i18n.h 2013-08-13 17:31:37.893065249 +0800
-@@ -23,8 +23,6 @@
-
- #include <dpkg/macros.h>
-
--DPKG_BEGIN_DECLS
--
- /**
- * @defgroup i18n Internationalization support
- * @ingroup dpkg-internal
-@@ -33,6 +31,8 @@
-
- #include <gettext.h>
-
-+DPKG_BEGIN_DECLS
-+
- /* We need to include this because pgettext() uses LC_MESSAGES, but libintl.h
- * which gets pulled by gettext.h only includes it if building optimized. */
- #include <locale.h>
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb
deleted file mode 100644
index 7876944d6..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require dpkg.inc
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI_append_class-native =" file://glibc2.5-sync_file_range.patch "
-SRC_URI += "file://noman.patch \
- file://remove-tar-no-timestamp.patch \
- file://fix-abs-redefine.patch \
- file://arch_pm.patch \
- file://dpkg-configure.service \
- file://add_armeb_triplet_entry.patch \
- file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
- file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \
- file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \
- file://0005-dpkg-compiler.m4-remove-Wvla.patch \
- file://0006-add-musleabi-to-known-target-tripets.patch \
- "
-
-SRC_URI[md5sum] = "e95b513c89693f6ec3ab53b6b1c3defd"
-SRC_URI[sha256sum] = "fe89243868888ce715bf45861f26264f767d4e4dbd0d6f1a26ce60bbbbf106da"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb
new file mode 100644
index 000000000..28fdc136a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb
@@ -0,0 +1,19 @@
+require dpkg.inc
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160509T100042Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz \
+ file://noman.patch \
+ file://remove-tar-no-timestamp.patch \
+ file://arch_pm.patch \
+ file://dpkg-configure.service \
+ file://add_armeb_triplet_entry.patch \
+ file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
+ file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \
+ file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \
+ file://0005-dpkg-compiler.m4-remove-Wvla.patch \
+ file://0006-add-musleabi-to-known-target-tripets.patch \
+ "
+SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch "
+
+SRC_URI[md5sum] = "073dbf2129a54b0fc627464bf8af4a1b"
+SRC_URI[sha256sum] = "ace36d3a6dc750a42baf797f9e75ec580a21f92bb9ff96b482100755d6d9b87b"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
index 09e4ea5bb..74e92f6b1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
@@ -9,7 +9,7 @@ LICENSE_e2fsprogs-mke2fs = "GPLv2"
LICENSE_e2fsprogs-fsck = "GPLv2"
LICENSE_e2fsprogs-tune2fs = "GPLv2"
LICENSE_e2fsprogs-badblocks = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b48f21d765b875bd10400975d12c1ca2 \
+LIC_FILES_CHKSUM = "file://NOTICE;md5=b48f21d765b875bd10400975d12c1ca2 \
file://lib/ext2fs/ext2fs.h;beginline=1;endline=9;md5=596a8dedcb4e731c6b21c7a46fba6bef \
file://lib/e2p/e2p.h;beginline=1;endline=7;md5=8a74ade8f9d65095d70ef2d4bf48e36a \
file://lib/uuid/uuid.h.in;beginline=1;endline=32;md5=dbb8079e114a5f841934b99e59c8820a \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
index 656fb6efb..e66cd4d1a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
@@ -9,26 +9,31 @@ don't want to enable features by default that are not supported by
the latest stable e2fsprogs release.
Upstream-Status: Inappropriate [configuration]
-
Signed-off-by: Jonathan Liu <net147@gmail.com>
+
+Rebase to 1.43:
+The upstream has disabled metadata_csum by default
+this rebase just revert 64bit feature.
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
misc/mke2fs.conf.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
-index a049d61..106ee80 100644
+index 78fe50a..6f1940e 100644
--- a/misc/mke2fs.conf.in
+++ b/misc/mke2fs.conf.in
-@@ -11,7 +11,8 @@
+@@ -11,8 +11,9 @@
features = has_journal
}
ext4 = {
-- features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
+- features = has_journal,extent,huge_file,flex_bg,64bit,dir_nlink,extra_isize
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
-+ auto_64-bit_support = 1
inode_size = 256
++ auto_64-bit_support = 1
}
ext4dev = {
+ features = has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_nlink,extra_isize
--
-2.7.2
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
new file mode 100644
index 000000000..33054c61f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-fix-missing-check-for-permission-denied.patch
@@ -0,0 +1,32 @@
+Subject: [PATCH] Fix missing check for permission denied.
+
+If the path to "ROOT_SYSCONFDIR/mke2fs.conf" has a permission denied problem,
+then the get_dirlist() call will return EACCES. But the code in profile_init
+will treat that as a fatal error and all executions will fail with:
+ Couldn't init profile successfully (error: 13).
+
+Upstream-Status: Pending
+
+Written-by: Henrik Wallin <henrik.b.wallin@ericsson.com>
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ lib/support/profile.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/support/profile.c b/lib/support/profile.c
+index 51a3314..1c1039f 100644
+--- a/lib/support/profile.c
++++ b/lib/support/profile.c
+@@ -335,7 +335,7 @@ profile_init(const char **files, profile_t *ret_profile)
+ *last = new_file;
+ last = &new_file->next;
+ }
+- } else if ((retval != ENOTDIR) &&
++ } else if ((retval != ENOTDIR) && (retval != EACCES) &&
+ strcmp(*fs, default_filename))
+ goto errout;
+
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch
deleted file mode 100644
index 782a7b187..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-From: "Darrick J. Wong" <darrick.wong@oracle.com>
-To: tytso@mit.edu, darrick.wong@oracle.com
-Cc: linux-ext4@vger.kernel.org, Darren Hart <dvhart@linux.intel.com>,
- Richard Purdie <richard.purdie@linuxfoundation.org>
-Date: Sat, 13 Feb 2016 14:38:24 -0800
-Message-ID: <20160213223824.25381.8002.stgit@birch.djwong.org>
-In-Reply-To: <20160213223725.25381.20929.stgit@birch.djwong.org>
-References: <20160213223725.25381.20929.stgit@birch.djwong.org>
-User-Agent: StGit/0.17.1-dirty
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-X-Source-IP: aserv0022.oracle.com [141.146.126.234]
-X-Evolution-Source: 1358860361.4566.33@ted
-Content-Transfer-Encoding: 8bit
-
-Richard Purdie reports that libext2fs doesn't sort attribute keys in
-the xattr block correctly, causing the kernel to return -ENODATA when
-querying attributes that should be there. Therefore, sort attributes
-so that whatever ends up in the xattr block is sorted according to
-what the kernel expects.
-
-Cc: Darren Hart <dvhart@linux.intel.com>
-Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
----
- lib/ext2fs/ext_attr.c | 24 +++++++++++-
- tests/d_xattr_sorting/expect | 29 ++++++++++++++
- tests/d_xattr_sorting/name | 1
- tests/d_xattr_sorting/script | 86 ++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 139 insertions(+), 1 deletion(-)
- create mode 100644 tests/d_xattr_sorting/expect
- create mode 100644 tests/d_xattr_sorting/name
- create mode 100644 tests/d_xattr_sorting/script
-
-Upstream-Status: Submitted
-
-
-diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
-index 0a4f8c0..b121837 100644
---- a/lib/ext2fs/ext_attr.c
-+++ b/lib/ext2fs/ext_attr.c
-@@ -254,10 +254,15 @@ static struct ea_name_index ea_names[] = {
- {0, NULL},
- };
-
-+static int find_ea_index(char *fullname, char **name, int *index);
-+
- /* Push empty attributes to the end and inlinedata to the front. */
- static int attr_compare(const void *a, const void *b)
- {
- const struct ext2_xattr *xa = a, *xb = b;
-+ char *xa_suffix, *xb_suffix;
-+ int xa_idx, xb_idx;
-+ int cmp;
-
- if (xa->name == NULL)
- return +1;
-@@ -267,7 +272,24 @@ static int attr_compare(const void *a, const void *b)
- return -1;
- else if (!strcmp(xb->name, "system.data"))
- return +1;
-- return 0;
-+
-+ /*
-+ * Duplicate the kernel's sorting algorithm because xattr blocks
-+ * require sorted keys.
-+ */
-+ xa_suffix = xa->name;
-+ xb_suffix = xb->name;
-+ xa_idx = xb_idx = 0;
-+ find_ea_index(xa->name, &xa_suffix, &xa_idx);
-+ find_ea_index(xb->name, &xb_suffix, &xb_idx);
-+ cmp = xa_idx - xb_idx;
-+ if (cmp)
-+ return cmp;
-+ cmp = strlen(xa_suffix) - strlen(xb_suffix);
-+ if (cmp)
-+ return cmp;
-+ cmp = strcmp(xa_suffix, xb_suffix);
-+ return cmp;
- }
-
- static const char *find_ea_prefix(int index)
-diff --git a/tests/d_xattr_sorting/expect b/tests/d_xattr_sorting/expect
-new file mode 100644
-index 0000000..17da663
---- /dev/null
-+++ b/tests/d_xattr_sorting/expect
-@@ -0,0 +1,29 @@
-+debugfs sort extended attributes
-+mke2fs -Fq -b 1024 test.img 512
-+Exit status is 0
-+ea_set / security.SMEG64 -f /tmp/b
-+Exit status is 0
-+ea_set / security.imb -f /tmp/b
-+Exit status is 0
-+ea_set / user.moo cow
-+Exit status is 0
-+ea_list /
-+Extended attributes:
-+ user.moo = "cow" (3)
-+ security.imb = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (256)
-+ security.SMEG64 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (256)
-+Exit status is 0
-+ea_get / security.imb
-+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-+Exit status is 0
-+ea_get / nosuchea
-+ea_get: Extended attribute key not found while getting extended attribute
-+Exit status is 0
-+e2fsck -yf -N test_filesys
-+Pass 1: Checking inodes, blocks, and sizes
-+Pass 2: Checking directory structure
-+Pass 3: Checking directory connectivity
-+Pass 4: Checking reference counts
-+Pass 5: Checking group summary information
-+test_filesys: 11/64 files (0.0% non-contiguous), 29/512 blocks
-+Exit status is 0
-diff --git a/tests/d_xattr_sorting/name b/tests/d_xattr_sorting/name
-new file mode 100644
-index 0000000..dde8926
---- /dev/null
-+++ b/tests/d_xattr_sorting/name
-@@ -0,0 +1 @@
-+sort extended attributes in debugfs
-diff --git a/tests/d_xattr_sorting/script b/tests/d_xattr_sorting/script
-new file mode 100644
-index 0000000..30c189a
---- /dev/null
-+++ b/tests/d_xattr_sorting/script
-@@ -0,0 +1,86 @@
-+if test -x $DEBUGFS_EXE; then
-+
-+OUT=$test_name.log
-+EXP=$test_dir/expect
-+VERIFY_FSCK_OPT=-yf
-+
-+TEST_DATA=$test_name.tmp
-+VERIFY_DATA=$test_name.ver.tmp
-+
-+echo "debugfs sort extended attributes" > $OUT
-+
-+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
-+
-+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT
-+
-+$MKE2FS -Fq $TMPFILE 512 > /dev/null 2>&1
-+status=$?
-+echo Exit status is $status >> $OUT
-+
-+perl -e 'print "x" x 256;' > /tmp/b
-+
-+echo "ea_set / security.SMEG64 -f /tmp/b" > $OUT.new
-+$DEBUGFS -w -R "ea_set / security.SMEG64 -f /tmp/b" $TMPFILE >> $OUT.new 2>&1
-+status=$?
-+echo Exit status is $status >> $OUT.new
-+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
-+
-+echo "ea_set / security.imb -f /tmp/b" > $OUT.new
-+$DEBUGFS -w -R "ea_set / security.imb -f /tmp/b" $TMPFILE >> $OUT.new 2>&1
-+status=$?
-+echo Exit status is $status >> $OUT.new
-+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
-+
-+echo "ea_set / user.moo cow" > $OUT.new
-+$DEBUGFS -w -R "ea_set / user.moo cow" $TMPFILE >> $OUT.new 2>&1
-+status=$?
-+echo Exit status is $status >> $OUT.new
-+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
-+
-+rm -rf /tmp/b
-+
-+echo "ea_list /" > $OUT.new
-+$DEBUGFS -w -R "ea_list /" $TMPFILE >> $OUT.new 2>&1
-+status=$?
-+echo Exit status is $status >> $OUT.new
-+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
-+
-+echo "ea_get / security.imb" > $OUT.new
-+$DEBUGFS -w -R "ea_get / security.imb" $TMPFILE >> $OUT.new 2>&1
-+status=$?
-+echo Exit status is $status >> $OUT.new
-+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
-+
-+echo "ea_get / nosuchea" > $OUT.new
-+$DEBUGFS -w -R "ea_get / nosuchea" $TMPFILE >> $OUT.new 2>&1
-+status=$?
-+echo Exit status is $status >> $OUT.new
-+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
-+
-+echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
-+$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
-+status=$?
-+echo Exit status is $status >> $OUT.new
-+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
-+
-+#
-+# Do the verification
-+#
-+
-+rm -f $TMPFILE $OUT.new
-+cmp -s $OUT $EXP
-+status=$?
-+
-+if [ "$status" = 0 ] ; then
-+ echo "$test_name: $test_description: ok"
-+ touch $test_name.ok
-+else
-+ echo "$test_name: $test_description: failed"
-+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
-+fi
-+
-+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
-+
-+else #if test -x $DEBUGFS_EXE; then
-+ echo "$test_name: $test_description: skipped"
-+fi
-
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb
new file mode 100644
index 000000000..f4855bc43
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.bb
@@ -0,0 +1,111 @@
+require e2fsprogs.inc
+
+PR = "r1"
+
+SRC_URI += "file://acinclude.m4 \
+ file://remove.ldconfig.call.patch \
+ file://quiet-debugfs.patch \
+ file://run-ptest \
+ file://ptest.patch \
+ file://mkdir.patch \
+ file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
+"
+
+SRC_URI_append_class-native = " file://e2fsprogs-fix-missing-check-for-permission-denied.patch"
+
+SRCREV = "d6adf070b0e85f209c0d7f310188b134b5cb7180"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
+
+EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
+ --enable-elf-shlibs --disable-libuuid --disable-uuidd \
+ --disable-libblkid --enable-verbose-makecmds"
+
+EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
+
+do_configure_prepend () {
+ cp ${WORKDIR}/acinclude.m4 ${S}/
+}
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' install
+ oe_runmake 'DESTDIR=${D}' install-libs
+ # We use blkid from util-linux now so remove from here
+ rm -f ${D}${base_libdir}/libblkid*
+ rm -rf ${D}${includedir}/blkid
+ rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
+ rm -f ${D}${base_sbindir}/blkid
+ rm -f ${D}${base_sbindir}/fsck
+ rm -f ${D}${base_sbindir}/findfs
+
+ # e2initrd_helper and the pkgconfig files belong in libdir
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ install -d ${D}${libdir}
+ mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
+ mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+ fi
+
+ oe_multilib_header ext2fs/ext2_types.h
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
+
+ install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
+
+ # Clean host path (build directory) in compile_et, mk_cmds
+ sed -i -e "s,\(ET_DIR=.*\)${S}/lib/et\(.*\),\1${datadir}/et\2,g" ${D}${bindir}/compile_et
+ sed -i -e "s,\(SS_DIR=.*\)${S}/lib/ss\(.*\),\1${datadir}/ss\2,g" ${D}${bindir}/mk_cmds
+}
+
+# Need to find the right mke2fs.conf file
+e2fsprogs_conf_fixup () {
+ for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.ext4dev; do
+ create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
+ done
+}
+
+do_install_append_class-native() {
+ e2fsprogs_conf_fixup
+}
+
+do_install_append_class-nativesdk() {
+ e2fsprogs_conf_fixup
+}
+
+RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
+RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
+
+PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
+PACKAGES =+ "libcomerr libss libe2p libext2fs"
+
+FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
+FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
+FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
+FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
+FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
+FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
+FILES_libss = "${base_libdir}/libss.so.*"
+FILES_libe2p = "${base_libdir}/libe2p.so.*"
+FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
+FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds"
+
+ALTERNATIVE_${PN} = "chattr"
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
+ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
+
+ALTERNATIVE_${PN}-doc = "fsck.8"
+ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
+
+RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
+
+do_compile_ptest() {
+ oe_runmake -C ${B}/tests
+}
+
+do_install_ptest() {
+ cp -a ${B}/tests ${D}${PTEST_PATH}/test
+ cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
+ sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
deleted file mode 100644
index 9cde8e46b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
+++ /dev/null
@@ -1,111 +0,0 @@
-require e2fsprogs.inc
-
-SRC_URI += "file://acinclude.m4 \
- file://remove.ldconfig.call.patch \
- file://quiet-debugfs.patch \
- file://run-ptest \
- file://ptest.patch \
- file://mkdir.patch \
- file://xattr_ordering.patch \
- file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
-"
-
-SRCREV = "0f26747167cc9d82df849b0aad387bf824f04544"
-PV = "1.42.99+1.43+git${SRCPV}"
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
-
-EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
- --enable-elf-shlibs --disable-libuuid --disable-uuidd \
- --disable-libblkid --enable-verbose-makecmds"
-
-EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
-
-do_configure_prepend () {
- cp ${WORKDIR}/acinclude.m4 ${S}/
-}
-
-do_install () {
- oe_runmake 'DESTDIR=${D}' install
- oe_runmake 'DESTDIR=${D}' install-libs
- # We use blkid from util-linux now so remove from here
- rm -f ${D}${base_libdir}/libblkid*
- rm -rf ${D}${includedir}/blkid
- rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
- rm -f ${D}${base_sbindir}/blkid
- rm -f ${D}${base_sbindir}/fsck
- rm -f ${D}${base_sbindir}/findfs
-
- # e2initrd_helper and the pkgconfig files belong in libdir
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- install -d ${D}${libdir}
- mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
- mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
- fi
-
- oe_multilib_header ext2fs/ext2_types.h
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
-
- install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
-}
-
-# Need to find the right mke2fs.conf file
-e2fsprogs_conf_fixup () {
- for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.ext4dev; do
- create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
- done
-}
-
-do_install_append_class-target() {
- # Clean host path in compile_et, mk_cmds
- sed -i -e "s,ET_DIR=\"${S}/lib/et\",ET_DIR=\"${datadir}/et\",g" ${D}${bindir}/compile_et
- sed -i -e "s,SS_DIR=\"${S}/lib/ss\",SS_DIR=\"${datadir}/ss\",g" ${D}${bindir}/mk_cmds
-}
-
-do_install_append_class-native() {
- e2fsprogs_conf_fixup
-}
-
-do_install_append_class-nativesdk() {
- e2fsprogs_conf_fixup
-}
-
-RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
-RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
-
-PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
-PACKAGES =+ "libcomerr libss libe2p libext2fs"
-
-FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
-FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
-FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
-FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
-FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
-FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
-FILES_libss = "${base_libdir}/libss.so.*"
-FILES_libe2p = "${base_libdir}/libe2p.so.*"
-FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
-FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so"
-
-ALTERNATIVE_${PN} = "chattr"
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
-ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
-
-ALTERNATIVE_${PN}-doc = "fsck.8"
-ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
-
-RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
-
-do_compile_ptest() {
- oe_runmake -C ${B}/tests
-}
-
-do_install_ptest() {
- cp -a ${B}/tests ${D}${PTEST_PATH}/test
- cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
- sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
index bd634b441..c78f95d69 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/fix_for_gcc-4.7.patch
@@ -2,7 +2,7 @@ Upstream-Status: pending
gcc 4.7 does not like pointer conversion, so have a void * tmp var to work
around following compilation issue.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011/07/07
| md5.c: In function 'md5_finish_ctx':
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/gcc6.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/gcc6.patch
new file mode 100644
index 000000000..b56a754f8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/gcc6.patch
@@ -0,0 +1,23 @@
+Fix warnings found with gcc6
+
+| ../../elfutils-0.148/libdw/dwarf_siblingof.c: In function 'dwarf_siblingof':
+| ../../elfutils-0.148/libdw/dwarf_siblingof.c:69:6: error: nonnull argument 'result' compared to NULL [-Werror=nonnull-compare]
+| if (result == NULL)
+| ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate [ unmaintained ]
+Index: elfutils-0.148/libdw/dwarf_siblingof.c
+===================================================================
+--- elfutils-0.148.orig/libdw/dwarf_siblingof.c
++++ elfutils-0.148/libdw/dwarf_siblingof.c
+@@ -66,9 +66,6 @@ dwarf_siblingof (die, result)
+ if (die == NULL)
+ return -1;
+
+- if (result == NULL)
+- return -1;
+-
+ if (result != die)
+ result->addr = NULL;
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
deleted file mode 100644
index c8d1c8990..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
+++ /dev/null
@@ -1,1163 +0,0 @@
-From 4b0fe80b3951f044c1c1b14d1d7f5f0b8ab67507 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 06:35:34 +0000
-Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
- compiling it on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile.am | 2 +-
- lib/color.c | 2 +-
- lib/crc32_file.c | 4 +++-
- lib/fixedsizehash.h | 4 ++--
- lib/system.h | 11 +++++++++++
- lib/xmalloc.c | 2 +-
- libasm/asm_end.c | 2 +-
- libasm/asm_newscn.c | 2 +-
- libcpu/i386_gendis.c | 2 +-
- libcpu/i386_lex.c | 2 +-
- libcpu/i386_parse.c | 2 +-
- libdw/Makefile.am | 2 +-
- libdw/libdw_alloc.c | 3 ++-
- libdwfl/Makefile.am | 2 ++
- libdwfl/dwfl_build_id_find_elf.c | 3 ++-
- libdwfl/dwfl_error.c | 4 +++-
- libdwfl/dwfl_module_getdwarf.c | 1 +
- libdwfl/find-debuginfo.c | 2 +-
- libdwfl/libdwfl_crc32_file.c | 10 ++++++++++
- libdwfl/linux-kernel-modules.c | 1 +
- libebl/eblopenbackend.c | 2 +-
- libebl/eblwstrtab.c | 2 +-
- libelf/elf.h | 9 ++++++---
- libelf/libelf.h | 1 +
- libelf/libelfP.h | 1 +
- src/addr2line.c | 2 +-
- src/ar.c | 2 +-
- src/arlib.c | 2 +-
- src/arlib2.c | 2 +-
- src/elfcmp.c | 2 +-
- src/elflint.c | 2 +-
- src/findtextrel.c | 2 +-
- src/i386_ld.c | 2 +-
- src/ld.c | 2 +-
- src/ldgeneric.c | 2 +-
- src/ldlex.c | 2 +-
- src/ldscript.c | 2 +-
- src/nm.c | 2 +-
- src/objdump.c | 2 +-
- src/ranlib.c | 2 +-
- src/readelf.c | 2 +-
- src/size.c | 2 +-
- src/stack.c | 2 +-
- src/strings.c | 2 +-
- src/strip.c | 2 +-
- src/unstrip.c | 2 +-
- tests/addrscopes.c | 2 +-
- tests/allregs.c | 2 +-
- tests/backtrace-data.c | 2 +-
- tests/backtrace-dwarf.c | 2 +-
- tests/backtrace.c | 2 +-
- tests/buildid.c | 2 +-
- tests/debugaltlink.c | 2 +-
- tests/debuglink.c | 2 +-
- tests/deleted.c | 2 +-
- tests/dwfl-addr-sect.c | 2 +-
- tests/dwfl-bug-addr-overflow.c | 2 +-
- tests/dwfl-bug-fd-leak.c | 2 +-
- tests/dwfl-bug-getmodules.c | 2 +-
- tests/dwfl-report-elf-align.c | 2 +-
- tests/dwfllines.c | 2 +-
- tests/dwflmodtest.c | 2 +-
- tests/dwflsyms.c | 2 +-
- tests/early-offscn.c | 2 +-
- tests/ecp.c | 2 +-
- tests/find-prologues.c | 2 +-
- tests/funcretval.c | 2 +-
- tests/funcscopes.c | 2 +-
- tests/getsrc_die.c | 2 +-
- tests/line2addr.c | 2 +-
- tests/low_high_pc.c | 2 +-
- tests/md5-sha1-test.c | 2 +-
- tests/rdwrmmap.c | 2 +-
- tests/saridx.c | 2 +-
- tests/sectiondump.c | 2 +-
- tests/varlocs.c | 2 +-
- tests/vdsosyms.c | 2 +-
- 77 files changed, 109 insertions(+), 73 deletions(-)
-
-Index: elfutils-0.164/Makefile.am
-===================================================================
---- elfutils-0.164.orig/Makefile.am
-+++ elfutils-0.164/Makefile.am
-@@ -24,7 +24,7 @@ pkginclude_HEADERS = version.h
-
- # Add doc back when we have some real content.
- SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
-- backends src po tests
-+ backends po tests
-
- EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
- COPYING COPYING-GPLV2 COPYING-LGPLV3
-Index: elfutils-0.164/lib/color.c
-===================================================================
---- elfutils-0.164.orig/lib/color.c
-+++ elfutils-0.164/lib/color.c
-@@ -32,7 +32,7 @@
- #endif
-
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdlib.h>
- #include <string.h>
-Index: elfutils-0.164/lib/crc32_file.c
-===================================================================
---- elfutils-0.164.orig/lib/crc32_file.c
-+++ elfutils-0.164/lib/crc32_file.c
-@@ -30,12 +30,14 @@
- # include <config.h>
- #endif
-
--#include "system.h"
- #include <errno.h>
- #include <unistd.h>
-+#include <stdint.h>
- #include <sys/stat.h>
- #include <sys/mman.h>
-
-+#include "system.h"
-+
- int
- crc32_file (int fd, uint32_t *resp)
- {
-Index: elfutils-0.164/lib/fixedsizehash.h
-===================================================================
---- elfutils-0.164.orig/lib/fixedsizehash.h
-+++ elfutils-0.164/lib/fixedsizehash.h
-@@ -30,12 +30,12 @@
- #include <errno.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/cdefs.h>
- #include <sys/param.h>
-
- #include <system.h>
-
--#define CONCAT(t1,t2) __CONCAT (t1,t2)
-+#define CONCAT1(x,y) x##y
-+#define CONCAT(x,y) CONCAT1(x,y)
-
- /* Before including this file the following macros must be defined:
-
-Index: elfutils-0.164/lib/system.h
-===================================================================
---- elfutils-0.164.orig/lib/system.h
-+++ elfutils-0.164/lib/system.h
-@@ -49,6 +49,16 @@
- #else
- # error "Unknown byte order"
- #endif
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+ (__extension__ \
-+ ({ long int __result; \
-+ do __result = (long int) (expression); \
-+ while (__result == -1L && errno == EINTR); \
-+ __result; }))
-+#endif
-+
-+#define error(status, errno, ...) err(status, __VA_ARGS__)
-
- extern void *xmalloc (size_t) __attribute__ ((__malloc__));
- extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
-Index: elfutils-0.164/lib/xmalloc.c
-===================================================================
---- elfutils-0.164.orig/lib/xmalloc.c
-+++ elfutils-0.164/lib/xmalloc.c
-@@ -30,7 +30,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stddef.h>
- #include <stdlib.h>
-Index: elfutils-0.164/libasm/asm_end.c
-===================================================================
---- elfutils-0.164.orig/libasm/asm_end.c
-+++ elfutils-0.164/libasm/asm_end.c
-@@ -32,7 +32,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdio.h>
- #include <stdlib.h>
-Index: elfutils-0.164/libasm/asm_newscn.c
-===================================================================
---- elfutils-0.164.orig/libasm/asm_newscn.c
-+++ elfutils-0.164/libasm/asm_newscn.c
-@@ -32,7 +32,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdlib.h>
- #include <string.h>
-Index: elfutils-0.164/libcpu/i386_gendis.c
-===================================================================
---- elfutils-0.164.orig/libcpu/i386_gendis.c
-+++ elfutils-0.164/libcpu/i386_gendis.c
-@@ -31,7 +31,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <errno.h>
- #include <stdio.h>
- #include <stdlib.h>
-Index: elfutils-0.164/libcpu/i386_lex.c
-===================================================================
---- elfutils-0.164.orig/libcpu/i386_lex.c
-+++ elfutils-0.164/libcpu/i386_lex.c
-@@ -571,7 +571,7 @@ char *i386_text;
- #endif
-
- #include <ctype.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
-
- #include <system.h>
-Index: elfutils-0.164/libcpu/i386_parse.c
-===================================================================
---- elfutils-0.164.orig/libcpu/i386_parse.c
-+++ elfutils-0.164/libcpu/i386_parse.c
-@@ -107,7 +107,7 @@
- #include <assert.h>
- #include <ctype.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <inttypes.h>
- #include <libintl.h>
- #include <math.h>
-Index: elfutils-0.164/libdw/Makefile.am
-===================================================================
---- elfutils-0.164.orig/libdw/Makefile.am
-+++ elfutils-0.164/libdw/Makefile.am
-@@ -117,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
- -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
- -Wl,--version-script,$<,--no-undefined \
- -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
-- -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
-+ -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) -lfts -largp
- @$(textrel_check)
- $(AM_V_at)ln -fs $@ $@.$(VERSION)
-
-Index: elfutils-0.164/libdw/libdw_alloc.c
-===================================================================
---- elfutils-0.164.orig/libdw/libdw_alloc.c
-+++ elfutils-0.164/libdw/libdw_alloc.c
-@@ -31,11 +31,12 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <errno.h>
- #include <stdlib.h>
- #include <sys/param.h>
- #include "libdwP.h"
-+#include "system.h"
-
-
- void *
-Index: elfutils-0.164/libdwfl/Makefile.am
-===================================================================
---- elfutils-0.164.orig/libdwfl/Makefile.am
-+++ elfutils-0.164/libdwfl/Makefile.am
-@@ -86,6 +86,8 @@ libelf = ../libelf/libelf.so
- libebl = ../libebl/libebl.a
- libeu = ../lib/libeu.a
-
-+LDADD = -lfts
-+
- libdwfl_pic_a_SOURCES =
- am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os)
-
-Index: elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c
-===================================================================
---- elfutils-0.164.orig/libdwfl/dwfl_build_id_find_elf.c
-+++ elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c
-@@ -27,6 +27,7 @@
- not, see <http://www.gnu.org/licenses/>. */
-
- #include "libdwflP.h"
-+#include "system.h"
- #include <inttypes.h>
- #include <fcntl.h>
- #include <unistd.h>
-@@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module
- {
- if (*file_name != NULL)
- free (*file_name);
-- *file_name = canonicalize_file_name (name);
-+ *file_name = realpath (name, NULL);
- if (*file_name == NULL)
- {
- *file_name = name;
-Index: elfutils-0.164/libdwfl/dwfl_error.c
-===================================================================
---- elfutils-0.164.orig/libdwfl/dwfl_error.c
-+++ elfutils-0.164/libdwfl/dwfl_error.c
-@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
- const char *
- dwfl_errmsg (int error)
- {
-+ static __thread char s[64] = "";
- if (error == 0 || error == -1)
- {
- int last_error = global_error;
-@@ -154,7 +155,8 @@ dwfl_errmsg (int error)
- switch (error &~ 0xffff)
- {
- case OTHER_ERROR (ERRNO):
-- return strerror_r (error & 0xffff, "bad", 0);
-+ strerror_r (error & 0xffff, s, sizeof(s));
-+ return s;
- case OTHER_ERROR (LIBELF):
- return elf_errmsg (error & 0xffff);
- case OTHER_ERROR (LIBDW):
-Index: elfutils-0.164/libdwfl/dwfl_module_getdwarf.c
-===================================================================
---- elfutils-0.164.orig/libdwfl/dwfl_module_getdwarf.c
-+++ elfutils-0.164/libdwfl/dwfl_module_getdwarf.c
-@@ -31,6 +31,7 @@
- #include <fcntl.h>
- #include <string.h>
- #include <unistd.h>
-+#include "system.h"
- #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
- #include "../libelf/libelfP.h"
-
-Index: elfutils-0.164/libdwfl/find-debuginfo.c
-===================================================================
---- elfutils-0.164.orig/libdwfl/find-debuginfo.c
-+++ elfutils-0.164/libdwfl/find-debuginfo.c
-@@ -372,7 +372,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul
- /* If FILE_NAME is a symlink, the debug file might be associated
- with the symlink target name instead. */
-
-- char *canon = canonicalize_file_name (file_name);
-+ char *canon = realpath (file_name, NULL);
- if (canon != NULL && strcmp (file_name, canon))
- fd = find_debuginfo_in_path (mod, canon,
- debuglink_file, debuglink_crc,
-Index: elfutils-0.164/libdwfl/libdwfl_crc32_file.c
-===================================================================
---- elfutils-0.164.orig/libdwfl/libdwfl_crc32_file.c
-+++ elfutils-0.164/libdwfl/libdwfl_crc32_file.c
-@@ -31,6 +31,16 @@
-
- #define crc32_file attribute_hidden __libdwfl_crc32_file
- #define crc32 __libdwfl_crc32
-+
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+ (__extension__ \
-+ ({ long int __result; \
-+ do __result = (long int) (expression); \
-+ while (__result == -1L && errno == EINTR); \
-+ __result; }))
-+#endif
-+
- #define LIB_SYSTEM_H 1
- #include <libdwflP.h>
- #include "../lib/crc32_file.c"
-Index: elfutils-0.164/libdwfl/linux-kernel-modules.c
-===================================================================
---- elfutils-0.164.orig/libdwfl/linux-kernel-modules.c
-+++ elfutils-0.164/libdwfl/linux-kernel-modules.c
-@@ -34,6 +34,7 @@
- #include <config.h>
-
- #include "libdwflP.h"
-+#include "system.h"
- #include <inttypes.h>
- #include <errno.h>
- #include <stdio.h>
-Index: elfutils-0.164/libebl/eblopenbackend.c
-===================================================================
---- elfutils-0.164.orig/libebl/eblopenbackend.c
-+++ elfutils-0.164/libebl/eblopenbackend.c
-@@ -32,7 +32,7 @@
-
- #include <assert.h>
- #include <dlfcn.h>
--#include <error.h>
-+#include <err.h>
- #include <libelfP.h>
- #include <dwarf.h>
- #include <stdlib.h>
-Index: elfutils-0.164/libebl/eblwstrtab.c
-===================================================================
---- elfutils-0.164.orig/libebl/eblwstrtab.c
-+++ elfutils-0.164/libebl/eblwstrtab.c
-@@ -305,7 +305,7 @@ copystrings (struct Ebl_WStrent *nodep,
-
- /* Process the current node. */
- nodep->offset = *offsetp;
-- *freep = wmempcpy (*freep, nodep->string, nodep->len);
-+ *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len;
- *offsetp += nodep->len * sizeof (wchar_t);
-
- for (subs = nodep->next; subs != NULL; subs = subs->next)
-Index: elfutils-0.164/libelf/elf.h
-===================================================================
---- elfutils-0.164.orig/libelf/elf.h
-+++ elfutils-0.164/libelf/elf.h
-@@ -21,7 +21,9 @@
-
- #include <features.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Standard ELF types. */
-
-@@ -3552,7 +3554,8 @@ enum
-
- #define R_TILEGX_NUM 130
-
--
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-
- #endif /* elf.h */
-Index: elfutils-0.164/libelf/libelf.h
-===================================================================
---- elfutils-0.164.orig/libelf/libelf.h
-+++ elfutils-0.164/libelf/libelf.h
-@@ -29,6 +29,7 @@
- #ifndef _LIBELF_H
- #define _LIBELF_H 1
-
-+#include <fcntl.h>
- #include <stdint.h>
- #include <sys/types.h>
-
-Index: elfutils-0.164/libelf/libelfP.h
-===================================================================
---- elfutils-0.164.orig/libelf/libelfP.h
-+++ elfutils-0.164/libelf/libelfP.h
-@@ -36,6 +36,7 @@
-
- #include <ar.h>
- #include <gelf.h>
-+#include <libelf.h>
-
- #include <errno.h>
- #include <stdint.h>
-Index: elfutils-0.164/src/addr2line.c
-===================================================================
---- elfutils-0.164.orig/src/addr2line.c
-+++ elfutils-0.164/src/addr2line.c
-@@ -23,7 +23,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <inttypes.h>
- #include <libdwfl.h>
-Index: elfutils-0.164/src/ar.c
-===================================================================
---- elfutils-0.164.orig/src/ar.c
-+++ elfutils-0.164/src/ar.c
-@@ -22,7 +22,7 @@
-
- #include <argp.h>
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libintl.h>
-Index: elfutils-0.164/src/arlib.c
-===================================================================
---- elfutils-0.164.orig/src/arlib.c
-+++ elfutils-0.164/src/arlib.c
-@@ -21,7 +21,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <gelf.h>
- #include <libintl.h>
- #include <stdio.h>
-Index: elfutils-0.164/src/arlib2.c
-===================================================================
---- elfutils-0.164.orig/src/arlib2.c
-+++ elfutils-0.164/src/arlib2.c
-@@ -20,7 +20,7 @@
- # include <config.h>
- #endif
-
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <limits.h>
- #include <string.h>
-Index: elfutils-0.164/src/elfcmp.c
-===================================================================
---- elfutils-0.164.orig/src/elfcmp.c
-+++ elfutils-0.164/src/elfcmp.c
-@@ -23,7 +23,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <locale.h>
- #include <libintl.h>
-Index: elfutils-0.164/src/elflint.c
-===================================================================
---- elfutils-0.164.orig/src/elflint.c
-+++ elfutils-0.164/src/elflint.c
-@@ -24,7 +24,7 @@
- #include <assert.h>
- #include <byteswap.h>
- #include <endian.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.164/src/findtextrel.c
-===================================================================
---- elfutils-0.164.orig/src/findtextrel.c
-+++ elfutils-0.164/src/findtextrel.c
-@@ -23,7 +23,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libdw.h>
-Index: elfutils-0.164/src/i386_ld.c
-===================================================================
---- elfutils-0.164.orig/src/i386_ld.c
-+++ elfutils-0.164/src/i386_ld.c
-@@ -20,7 +20,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdlib.h>
- #include <string.h>
-Index: elfutils-0.164/src/ld.c
-===================================================================
---- elfutils-0.164.orig/src/ld.c
-+++ elfutils-0.164/src/ld.c
-@@ -21,7 +21,7 @@
-
- #include <argp.h>
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <libelf.h>
- #include <libintl.h>
-Index: elfutils-0.164/src/ldgeneric.c
-===================================================================
---- elfutils-0.164.orig/src/ldgeneric.c
-+++ elfutils-0.164/src/ldgeneric.c
-@@ -23,7 +23,7 @@
- #include <ctype.h>
- #include <dlfcn.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <fnmatch.h>
- #include <gelf.h>
-Index: elfutils-0.164/src/ldlex.c
-===================================================================
---- elfutils-0.164.orig/src/ldlex.c
-+++ elfutils-0.164/src/ldlex.c
-@@ -1099,7 +1099,7 @@ char *ldtext;
- #include <assert.h>
- #include <ctype.h>
- #include <elf.h>
--#include <error.h>
-+#include <err.h>
- #include <inttypes.h>
- #include <libintl.h>
- #include <stdbool.h>
-Index: elfutils-0.164/src/ldscript.c
-===================================================================
---- elfutils-0.164.orig/src/ldscript.c
-+++ elfutils-0.164/src/ldscript.c
-@@ -95,7 +95,7 @@
- #endif
-
- #include <assert.h>
--#include <error.h>
-+#include <err.h>
- #include <libintl.h>
- #include <stdbool.h>
- #include <stdint.h>
-Index: elfutils-0.164/src/nm.c
-===================================================================
---- elfutils-0.164.orig/src/nm.c
-+++ elfutils-0.164/src/nm.c
-@@ -26,7 +26,7 @@
- #include <ctype.h>
- #include <dwarf.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.164/src/objdump.c
-===================================================================
---- elfutils-0.164.orig/src/objdump.c
-+++ elfutils-0.164/src/objdump.c
-@@ -21,7 +21,7 @@
- #endif
-
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <inttypes.h>
- #include <libintl.h>
-Index: elfutils-0.164/src/ranlib.c
-===================================================================
---- elfutils-0.164.orig/src/ranlib.c
-+++ elfutils-0.164/src/ranlib.c
-@@ -24,7 +24,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libintl.h>
-Index: elfutils-0.164/src/readelf.c
-===================================================================
---- elfutils-0.164.orig/src/readelf.c
-+++ elfutils-0.164/src/readelf.c
-@@ -25,7 +25,7 @@
- #include <ctype.h>
- #include <dwarf.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.164/src/size.c
-===================================================================
---- elfutils-0.164.orig/src/size.c
-+++ elfutils-0.164/src/size.c
-@@ -21,7 +21,7 @@
- #endif
-
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.164/src/stack.c
-===================================================================
---- elfutils-0.164.orig/src/stack.c
-+++ elfutils-0.164/src/stack.c
-@@ -18,7 +18,7 @@
- #include <config.h>
- #include <assert.h>
- #include <argp.h>
--#include <error.h>
-+#include <err.h>
- #include <stdlib.h>
- #include <inttypes.h>
- #include <stdio.h>
-Index: elfutils-0.164/src/strings.c
-===================================================================
---- elfutils-0.164.orig/src/strings.c
-+++ elfutils-0.164/src/strings.c
-@@ -25,7 +25,7 @@
- #include <ctype.h>
- #include <endian.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.164/src/strip.c
-===================================================================
---- elfutils-0.164.orig/src/strip.c
-+++ elfutils-0.164/src/strip.c
-@@ -24,7 +24,7 @@
- #include <assert.h>
- #include <byteswap.h>
- #include <endian.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <libelf.h>
-Index: elfutils-0.164/src/unstrip.c
-===================================================================
---- elfutils-0.164.orig/src/unstrip.c
-+++ elfutils-0.164/src/unstrip.c
-@@ -31,7 +31,7 @@
- #include <argp.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <fnmatch.h>
- #include <libintl.h>
-Index: elfutils-0.164/tests/addrscopes.c
-===================================================================
---- elfutils-0.164.orig/tests/addrscopes.c
-+++ elfutils-0.164/tests/addrscopes.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
-
-
-Index: elfutils-0.164/tests/allregs.c
-===================================================================
---- elfutils-0.164.orig/tests/allregs.c
-+++ elfutils-0.164/tests/allregs.c
-@@ -21,7 +21,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <argp.h>
- #include <assert.h>
-Index: elfutils-0.164/tests/backtrace-data.c
-===================================================================
---- elfutils-0.164.orig/tests/backtrace-data.c
-+++ elfutils-0.164/tests/backtrace-data.c
-@@ -27,7 +27,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <dwarf.h>
- #if defined(__x86_64__) && defined(__linux__)
-Index: elfutils-0.164/tests/backtrace-dwarf.c
-===================================================================
---- elfutils-0.164.orig/tests/backtrace-dwarf.c
-+++ elfutils-0.164/tests/backtrace-dwarf.c
-@@ -22,7 +22,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <sys/ptrace.h>
- #include <sys/types.h>
-Index: elfutils-0.164/tests/backtrace.c
-===================================================================
---- elfutils-0.164.orig/tests/backtrace.c
-+++ elfutils-0.164/tests/backtrace.c
-@@ -24,7 +24,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <dwarf.h>
- #ifdef __linux__
-Index: elfutils-0.164/tests/buildid.c
-===================================================================
---- elfutils-0.164.orig/tests/buildid.c
-+++ elfutils-0.164/tests/buildid.c
-@@ -23,7 +23,7 @@
- #include ELFUTILS_HEADER(elf)
- #include ELFUTILS_HEADER(dwelf)
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-Index: elfutils-0.164/tests/debugaltlink.c
-===================================================================
---- elfutils-0.164.orig/tests/debugaltlink.c
-+++ elfutils-0.164/tests/debugaltlink.c
-@@ -23,7 +23,7 @@
- #include ELFUTILS_HEADER(dw)
- #include ELFUTILS_HEADER(dwelf)
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-Index: elfutils-0.164/tests/debuglink.c
-===================================================================
---- elfutils-0.164.orig/tests/debuglink.c
-+++ elfutils-0.164/tests/debuglink.c
-@@ -21,7 +21,7 @@
- #include <errno.h>
- #include ELFUTILS_HEADER(dwelf)
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/types.h>
-Index: elfutils-0.164/tests/deleted.c
-===================================================================
---- elfutils-0.164.orig/tests/deleted.c
-+++ elfutils-0.164/tests/deleted.c
-@@ -21,7 +21,7 @@
- #include <unistd.h>
- #include <assert.h>
- #include <stdio.h>
--#include <error.h>
-+#include <err.h>
- #include <errno.h>
- #ifdef __linux__
- #include <sys/prctl.h>
-Index: elfutils-0.164/tests/dwfl-addr-sect.c
-===================================================================
---- elfutils-0.164.orig/tests/dwfl-addr-sect.c
-+++ elfutils-0.164/tests/dwfl-addr-sect.c
-@@ -23,7 +23,7 @@
- #include <stdio_ext.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <argp.h>
- #include ELFUTILS_HEADER(dwfl)
-Index: elfutils-0.164/tests/dwfl-bug-addr-overflow.c
-===================================================================
---- elfutils-0.164.orig/tests/dwfl-bug-addr-overflow.c
-+++ elfutils-0.164/tests/dwfl-bug-addr-overflow.c
-@@ -20,7 +20,7 @@
- #include <inttypes.h>
- #include <stdio.h>
- #include <stdio_ext.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include ELFUTILS_HEADER(dwfl)
-
-Index: elfutils-0.164/tests/dwfl-bug-fd-leak.c
-===================================================================
---- elfutils-0.164.orig/tests/dwfl-bug-fd-leak.c
-+++ elfutils-0.164/tests/dwfl-bug-fd-leak.c
-@@ -24,7 +24,7 @@
- #include <dirent.h>
- #include <stdlib.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <unistd.h>
- #include <dwarf.h>
- #include <sys/resource.h>
-Index: elfutils-0.164/tests/dwfl-bug-getmodules.c
-===================================================================
---- elfutils-0.164.orig/tests/dwfl-bug-getmodules.c
-+++ elfutils-0.164/tests/dwfl-bug-getmodules.c
-@@ -18,7 +18,7 @@
- #include <config.h>
- #include ELFUTILS_HEADER(dwfl)
-
--#include <error.h>
-+#include <err.h>
-
- static const Dwfl_Callbacks callbacks =
- {
-Index: elfutils-0.164/tests/dwfl-report-elf-align.c
-===================================================================
---- elfutils-0.164.orig/tests/dwfl-report-elf-align.c
-+++ elfutils-0.164/tests/dwfl-report-elf-align.c
-@@ -20,7 +20,7 @@
- #include <inttypes.h>
- #include <stdio.h>
- #include <stdio_ext.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <string.h>
- #include <stdlib.h>
-Index: elfutils-0.164/tests/dwfllines.c
-===================================================================
---- elfutils-0.164.orig/tests/dwfllines.c
-+++ elfutils-0.164/tests/dwfllines.c
-@@ -27,7 +27,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
-
- int
- main (int argc, char *argv[])
-Index: elfutils-0.164/tests/dwflmodtest.c
-===================================================================
---- elfutils-0.164.orig/tests/dwflmodtest.c
-+++ elfutils-0.164/tests/dwflmodtest.c
-@@ -23,7 +23,7 @@
- #include <stdio_ext.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
- #include <locale.h>
- #include <argp.h>
- #include ELFUTILS_HEADER(dwfl)
-Index: elfutils-0.164/tests/dwflsyms.c
-===================================================================
---- elfutils-0.164.orig/tests/dwflsyms.c
-+++ elfutils-0.164/tests/dwflsyms.c
-@@ -25,7 +25,7 @@
- #include <stdio.h>
- #include <stdio_ext.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
-
- static const char *
-Index: elfutils-0.164/tests/early-offscn.c
-===================================================================
---- elfutils-0.164.orig/tests/early-offscn.c
-+++ elfutils-0.164/tests/early-offscn.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <stdio.h>
-Index: elfutils-0.164/tests/ecp.c
-===================================================================
---- elfutils-0.164.orig/tests/ecp.c
-+++ elfutils-0.164/tests/ecp.c
-@@ -20,7 +20,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <stdlib.h>
-Index: elfutils-0.164/tests/find-prologues.c
-===================================================================
---- elfutils-0.164.orig/tests/find-prologues.c
-+++ elfutils-0.164/tests/find-prologues.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-Index: elfutils-0.164/tests/funcretval.c
-===================================================================
---- elfutils-0.164.orig/tests/funcretval.c
-+++ elfutils-0.164/tests/funcretval.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-Index: elfutils-0.164/tests/funcscopes.c
-===================================================================
---- elfutils-0.164.orig/tests/funcscopes.c
-+++ elfutils-0.164/tests/funcscopes.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-Index: elfutils-0.164/tests/getsrc_die.c
-===================================================================
---- elfutils-0.164.orig/tests/getsrc_die.c
-+++ elfutils-0.164/tests/getsrc_die.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <inttypes.h>
- #include <libelf.h>
-Index: elfutils-0.164/tests/line2addr.c
-===================================================================
---- elfutils-0.164.orig/tests/line2addr.c
-+++ elfutils-0.164/tests/line2addr.c
-@@ -26,7 +26,7 @@
- #include <locale.h>
- #include <stdlib.h>
- #include <string.h>
--#include <error.h>
-+#include <err.h>
-
-
- static void
-Index: elfutils-0.164/tests/low_high_pc.c
-===================================================================
---- elfutils-0.164.orig/tests/low_high_pc.c
-+++ elfutils-0.164/tests/low_high_pc.c
-@@ -25,7 +25,7 @@
- #include <stdio_ext.h>
- #include <locale.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <fnmatch.h>
-
-Index: elfutils-0.164/tests/md5-sha1-test.c
-===================================================================
---- elfutils-0.164.orig/tests/md5-sha1-test.c
-+++ elfutils-0.164/tests/md5-sha1-test.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <string.h>
--#include <error.h>
-+#include <err.h>
-
- #include "md5.h"
- #include "sha1.h"
-Index: elfutils-0.164/tests/rdwrmmap.c
-===================================================================
---- elfutils-0.164.orig/tests/rdwrmmap.c
-+++ elfutils-0.164/tests/rdwrmmap.c
-@@ -19,7 +19,7 @@
- #endif
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <stdio.h>
- #include <fcntl.h>
- #include <unistd.h>
-Index: elfutils-0.164/tests/saridx.c
-===================================================================
---- elfutils-0.164.orig/tests/saridx.c
-+++ elfutils-0.164/tests/saridx.c
-@@ -17,7 +17,7 @@
-
- #include <config.h>
-
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <stdio.h>
-Index: elfutils-0.164/tests/sectiondump.c
-===================================================================
---- elfutils-0.164.orig/tests/sectiondump.c
-+++ elfutils-0.164/tests/sectiondump.c
-@@ -18,7 +18,7 @@
- #include <config.h>
-
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <fcntl.h>
- #include <gelf.h>
- #include <inttypes.h>
-Index: elfutils-0.164/tests/varlocs.c
-===================================================================
---- elfutils-0.164.orig/tests/varlocs.c
-+++ elfutils-0.164/tests/varlocs.c
-@@ -25,7 +25,7 @@
- #include <dwarf.h>
- #include <stdio.h>
- #include <stdlib.h>
--#include <error.h>
-+#include <err.h>
- #include <string.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-Index: elfutils-0.164/tests/vdsosyms.c
-===================================================================
---- elfutils-0.164.orig/tests/vdsosyms.c
-+++ elfutils-0.164/tests/vdsosyms.c
-@@ -18,7 +18,7 @@
- #include <config.h>
- #include <assert.h>
- #include <errno.h>
--#include <error.h>
-+#include <err.h>
- #include <inttypes.h>
- #include <stdio.h>
- #include <string.h>
-Index: elfutils-0.164/libelf/elf_getarsym.c
-===================================================================
---- elfutils-0.164.orig/libelf/elf_getarsym.c
-+++ elfutils-0.164/libelf/elf_getarsym.c
-@@ -302,7 +302,7 @@ elf_getarsym (Elf *elf, size_t *ptr)
- arsym[cnt].as_off = (*u32)[cnt];
-
- arsym[cnt].as_hash = _dl_elf_hash (str_data);
-- str_data = rawmemchr (str_data, '\0') + 1;
-+ str_data = memchr (str_data, '\0', SIZE_MAX) + 1;
- }
-
- /* At the end a special entry. */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
deleted file mode 100644
index 966b70fcc..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-From 3daec2dd11a04955f95e8f65a48820103d84dbec Mon Sep 17 00:00:00 2001
-From: Junling Zheng <zhengjunling@huawei.com>
-Date: Thu, 9 Apr 2015 12:12:49 +0000
-Subject: [PATCH] uclibc support for elfutils 0.161
-
-on uclibc systems libintl and libuargp are separate from libc.
-so they need to be specified on commandline when we use proxy-libintl
-then libintl is a static archive so it should be listed last since
-elfutils does not respect disable-nls we need to link in libintl
-
-We add a new option --enable-uclibc which will be used to control
-the uclibc specific configurations during build.
-
-Upstream-Status: Inappropriate [uclibc specific]
-
-Signed-off-by: Khem Raj <raj.khem>
-Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
-[Junling Zheng:
- - adjust context
-]
----
- configure.ac | 8 ++++++++
- libcpu/Makefile.am | 4 ++++
- libdw/Makefile.am | 7 ++++++-
- libelf/Makefile.am | 5 +++++
- 4 files changed, 23 insertions(+), 1 deletion(-)
-
-Index: elfutils-0.164/configure.ac
-===================================================================
---- elfutils-0.164.orig/configure.ac
-+++ elfutils-0.164/configure.ac
-@@ -66,6 +66,14 @@ AS_IF([test "$use_locks" = yes],
-
- AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
-
-+AC_ARG_ENABLE([uclibc],
-+AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
-+use_uclibc=yes, use_uclibc=no)
-+AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes)
-+AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)])
-+
-+AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
-+
- AC_PROG_CC
- AC_PROG_RANLIB
- AC_PROG_YACC
-@@ -291,18 +299,13 @@ AC_LINK_IFELSE(
- )
-
- dnl If our libc doesn't provide argp, then test for libargp
--if test "$libc_has_argp" = "false" ; then
-- AC_MSG_WARN("libc does not have argp")
-- AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
--
-- if test "$have_argp" = "false"; then
-- AC_MSG_ERROR("no libargp found")
-- else
-- argp_LDADD="-largp"
-- fi
--else
-- argp_LDADD=""
--fi
-+AS_IF([test "x$libc_has_argp" = "xfalse"],
-+ [AC_MSG_WARN("libc does not have argp")
-+ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true" argp_LDADD="-largp"], [have_argp="false"])], [argp_LDADD=""])
-+
-+AS_IF([test "x$libc_has_argp" = "xfalse" -a "x$have_argp" = "xfalse"],
-+ AC_CHECK_LIB([uargp], [argp_parse], [have_uargp="true" argp_LDADD="-luargp"], [have_uargp="false"])], [argp_LDADD=""])
-+
- AC_SUBST([argp_LDADD])
-
- dnl The directories with content.
-Index: elfutils-0.164/libcpu/Makefile.am
-===================================================================
---- elfutils-0.164.orig/libcpu/Makefile.am
-+++ elfutils-0.164/libcpu/Makefile.am
-@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3
- i386_lex.o: i386_parse.h
- i386_gendis_LDADD = $(libeu) -lm
-
-+if USE_UCLIBC
-+i386_gendis_LDADD += -lintl
-+endif
-+
- i386_parse.h: i386_parse.c ;
-
- EXTRA_DIST = defs/i386
-Index: elfutils-0.164/libdw/Makefile.am
-===================================================================
---- elfutils-0.164.orig/libdw/Makefile.am
-+++ elfutils-0.164/libdw/Makefile.am
-@@ -102,6 +102,11 @@ endif
- libdw_pic_a_SOURCES =
- am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
-
-+libdw_so_LDLIBS =
-+if USE_UCLIBC
-+libdw_so_LDLIBS += -lintl
-+endif
-+
- libdw_so_SOURCES =
- libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
- ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
-@@ -112,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
- -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
- -Wl,--version-script,$<,--no-undefined \
- -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
-- -ldl $(argp_LDADD) $(zip_LIBS)
-+ -ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
- @$(textrel_check)
- $(AM_V_at)ln -fs $@ $@.$(VERSION)
-
-Index: elfutils-0.164/libelf/Makefile.am
-===================================================================
---- elfutils-0.164.orig/libelf/Makefile.am
-+++ elfutils-0.164/libelf/Makefile.am
-@@ -93,7 +93,12 @@ libelf_a_SOURCES = elf_version.c elf_has
- libelf_pic_a_SOURCES =
- am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
-
-+
- libelf_so_LDLIBS =
-+if USE_UCLIBC
-+libelf_so_LDLIBS += -lintl
-+endif
-+
- if USE_LOCKS
- libelf_so_LDLIBS += -lpthread
- endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-Ignore-differences-between-mips-machine-identifiers.patch
index 3f110f98f..3f110f98f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-Ignore-differences-between-mips-machine-identifiers.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
new file mode 100644
index 000000000..38b31f6a8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
@@ -0,0 +1,1163 @@
+From 4b0fe80b3951f044c1c1b14d1d7f5f0b8ab67507 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 06:35:34 +0000
+Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
+ compiling it on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ Makefile.am | 2 +-
+ lib/color.c | 2 +-
+ lib/crc32_file.c | 4 +++-
+ lib/fixedsizehash.h | 4 ++--
+ lib/system.h | 11 +++++++++++
+ lib/xmalloc.c | 2 +-
+ libasm/asm_end.c | 2 +-
+ libasm/asm_newscn.c | 2 +-
+ libcpu/i386_gendis.c | 2 +-
+ libcpu/i386_lex.c | 2 +-
+ libcpu/i386_parse.c | 2 +-
+ libdw/Makefile.am | 2 +-
+ libdw/libdw_alloc.c | 3 ++-
+ libdwfl/Makefile.am | 2 ++
+ libdwfl/dwfl_build_id_find_elf.c | 3 ++-
+ libdwfl/dwfl_error.c | 4 +++-
+ libdwfl/dwfl_module_getdwarf.c | 1 +
+ libdwfl/find-debuginfo.c | 2 +-
+ libdwfl/libdwfl_crc32_file.c | 10 ++++++++++
+ libdwfl/linux-kernel-modules.c | 1 +
+ libebl/eblopenbackend.c | 2 +-
+ libebl/eblwstrtab.c | 2 +-
+ libelf/elf.h | 9 ++++++---
+ libelf/libelf.h | 1 +
+ libelf/libelfP.h | 1 +
+ src/addr2line.c | 2 +-
+ src/ar.c | 2 +-
+ src/arlib.c | 2 +-
+ src/arlib2.c | 2 +-
+ src/elfcmp.c | 2 +-
+ src/elflint.c | 2 +-
+ src/findtextrel.c | 2 +-
+ src/i386_ld.c | 2 +-
+ src/ld.c | 2 +-
+ src/ldgeneric.c | 2 +-
+ src/ldlex.c | 2 +-
+ src/ldscript.c | 2 +-
+ src/nm.c | 2 +-
+ src/objdump.c | 2 +-
+ src/ranlib.c | 2 +-
+ src/readelf.c | 2 +-
+ src/size.c | 2 +-
+ src/stack.c | 2 +-
+ src/strings.c | 2 +-
+ src/strip.c | 2 +-
+ src/unstrip.c | 2 +-
+ tests/addrscopes.c | 2 +-
+ tests/allregs.c | 2 +-
+ tests/backtrace-data.c | 2 +-
+ tests/backtrace-dwarf.c | 2 +-
+ tests/backtrace.c | 2 +-
+ tests/buildid.c | 2 +-
+ tests/debugaltlink.c | 2 +-
+ tests/debuglink.c | 2 +-
+ tests/deleted.c | 2 +-
+ tests/dwfl-addr-sect.c | 2 +-
+ tests/dwfl-bug-addr-overflow.c | 2 +-
+ tests/dwfl-bug-fd-leak.c | 2 +-
+ tests/dwfl-bug-getmodules.c | 2 +-
+ tests/dwfl-report-elf-align.c | 2 +-
+ tests/dwfllines.c | 2 +-
+ tests/dwflmodtest.c | 2 +-
+ tests/dwflsyms.c | 2 +-
+ tests/early-offscn.c | 2 +-
+ tests/ecp.c | 2 +-
+ tests/find-prologues.c | 2 +-
+ tests/funcretval.c | 2 +-
+ tests/funcscopes.c | 2 +-
+ tests/getsrc_die.c | 2 +-
+ tests/line2addr.c | 2 +-
+ tests/low_high_pc.c | 2 +-
+ tests/md5-sha1-test.c | 2 +-
+ tests/rdwrmmap.c | 2 +-
+ tests/saridx.c | 2 +-
+ tests/sectiondump.c | 2 +-
+ tests/varlocs.c | 2 +-
+ tests/vdsosyms.c | 2 +-
+ 77 files changed, 109 insertions(+), 73 deletions(-)
+
+Index: elfutils-0.166/Makefile.am
+===================================================================
+--- elfutils-0.166.orig/Makefile.am
++++ elfutils-0.166/Makefile.am
+@@ -28,7 +28,7 @@ pkginclude_HEADERS = version.h
+
+ # Add doc back when we have some real content.
+ SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
+- backends src po tests
++ backends po tests
+
+ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
+ COPYING COPYING-GPLV2 COPYING-LGPLV3
+Index: elfutils-0.166/lib/color.c
+===================================================================
+--- elfutils-0.166.orig/lib/color.c
++++ elfutils-0.166/lib/color.c
+@@ -32,7 +32,7 @@
+ #endif
+
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: elfutils-0.166/lib/crc32_file.c
+===================================================================
+--- elfutils-0.166.orig/lib/crc32_file.c
++++ elfutils-0.166/lib/crc32_file.c
+@@ -30,12 +30,14 @@
+ # include <config.h>
+ #endif
+
+-#include "system.h"
+ #include <errno.h>
+ #include <unistd.h>
++#include <stdint.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+
++#include "system.h"
++
+ int
+ crc32_file (int fd, uint32_t *resp)
+ {
+Index: elfutils-0.166/lib/fixedsizehash.h
+===================================================================
+--- elfutils-0.166.orig/lib/fixedsizehash.h
++++ elfutils-0.166/lib/fixedsizehash.h
+@@ -30,12 +30,12 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <sys/cdefs.h>
+ #include <sys/param.h>
+
+ #include <system.h>
+
+-#define CONCAT(t1,t2) __CONCAT (t1,t2)
++#define CONCAT1(x,y) x##y
++#define CONCAT(x,y) CONCAT1(x,y)
+
+ /* Before including this file the following macros must be defined:
+
+Index: elfutils-0.166/lib/system.h
+===================================================================
+--- elfutils-0.166.orig/lib/system.h
++++ elfutils-0.166/lib/system.h
+@@ -49,6 +49,16 @@
+ #else
+ # error "Unknown byte order"
+ #endif
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++ (__extension__ \
++ ({ long int __result; \
++ do __result = (long int) (expression); \
++ while (__result == -1L && errno == EINTR); \
++ __result; }))
++#endif
++
++#define error(status, errno, ...) err(status, __VA_ARGS__)
+
+ extern void *xmalloc (size_t) __attribute__ ((__malloc__));
+ extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
+Index: elfutils-0.166/lib/xmalloc.c
+===================================================================
+--- elfutils-0.166.orig/lib/xmalloc.c
++++ elfutils-0.166/lib/xmalloc.c
+@@ -30,7 +30,7 @@
+ # include <config.h>
+ #endif
+
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stddef.h>
+ #include <stdlib.h>
+Index: elfutils-0.166/libasm/asm_end.c
+===================================================================
+--- elfutils-0.166.orig/libasm/asm_end.c
++++ elfutils-0.166/libasm/asm_end.c
+@@ -32,7 +32,7 @@
+ #endif
+
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+Index: elfutils-0.166/libasm/asm_newscn.c
+===================================================================
+--- elfutils-0.166.orig/libasm/asm_newscn.c
++++ elfutils-0.166/libasm/asm_newscn.c
+@@ -32,7 +32,7 @@
+ #endif
+
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: elfutils-0.166/libcpu/i386_gendis.c
+===================================================================
+--- elfutils-0.166.orig/libcpu/i386_gendis.c
++++ elfutils-0.166/libcpu/i386_gendis.c
+@@ -31,7 +31,7 @@
+ # include <config.h>
+ #endif
+
+-#include <error.h>
++#include <err.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+Index: elfutils-0.166/libcpu/i386_lex.c
+===================================================================
+--- elfutils-0.166.orig/libcpu/i386_lex.c
++++ elfutils-0.166/libcpu/i386_lex.c
+@@ -578,7 +578,7 @@ char *i386_text;
+ #endif
+
+ #include <ctype.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+
+ #include <system.h>
+Index: elfutils-0.166/libcpu/i386_parse.c
+===================================================================
+--- elfutils-0.166.orig/libcpu/i386_parse.c
++++ elfutils-0.166/libcpu/i386_parse.c
+@@ -107,7 +107,7 @@
+ #include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <inttypes.h>
+ #include <libintl.h>
+ #include <math.h>
+Index: elfutils-0.166/libdw/Makefile.am
+===================================================================
+--- elfutils-0.166.orig/libdw/Makefile.am
++++ elfutils-0.166/libdw/Makefile.am
+@@ -117,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
+ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
+ -Wl,--version-script,$<,--no-undefined \
+ -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+- -ldl -lz $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
++ -ldl -lz $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) -lfts -largp
+ @$(textrel_check)
+ $(AM_V_at)ln -fs $@ $@.$(VERSION)
+
+Index: elfutils-0.166/libdw/libdw_alloc.c
+===================================================================
+--- elfutils-0.166.orig/libdw/libdw_alloc.c
++++ elfutils-0.166/libdw/libdw_alloc.c
+@@ -31,11 +31,12 @@
+ # include <config.h>
+ #endif
+
+-#include <error.h>
++#include <err.h>
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <sys/param.h>
+ #include "libdwP.h"
++#include "system.h"
+
+
+ void *
+Index: elfutils-0.166/libdwfl/Makefile.am
+===================================================================
+--- elfutils-0.166.orig/libdwfl/Makefile.am
++++ elfutils-0.166/libdwfl/Makefile.am
+@@ -84,6 +84,8 @@ libelf = ../libelf/libelf.so
+ libebl = ../libebl/libebl.a
+ libeu = ../lib/libeu.a
+
++LDADD = -lfts
++
+ libdwfl_pic_a_SOURCES =
+ am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os)
+
+Index: elfutils-0.166/libdwfl/dwfl_build_id_find_elf.c
+===================================================================
+--- elfutils-0.166.orig/libdwfl/dwfl_build_id_find_elf.c
++++ elfutils-0.166/libdwfl/dwfl_build_id_find_elf.c
+@@ -27,6 +27,7 @@
+ not, see <http://www.gnu.org/licenses/>. */
+
+ #include "libdwflP.h"
++#include "system.h"
+ #include <inttypes.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module
+ {
+ if (*file_name != NULL)
+ free (*file_name);
+- *file_name = canonicalize_file_name (name);
++ *file_name = realpath (name, NULL);
+ if (*file_name == NULL)
+ {
+ *file_name = name;
+Index: elfutils-0.166/libdwfl/dwfl_error.c
+===================================================================
+--- elfutils-0.166.orig/libdwfl/dwfl_error.c
++++ elfutils-0.166/libdwfl/dwfl_error.c
+@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
+ const char *
+ dwfl_errmsg (int error)
+ {
++ static __thread char s[64] = "";
+ if (error == 0 || error == -1)
+ {
+ int last_error = global_error;
+@@ -154,7 +155,8 @@ dwfl_errmsg (int error)
+ switch (error &~ 0xffff)
+ {
+ case OTHER_ERROR (ERRNO):
+- return strerror_r (error & 0xffff, "bad", 0);
++ strerror_r (error & 0xffff, s, sizeof(s));
++ return s;
+ case OTHER_ERROR (LIBELF):
+ return elf_errmsg (error & 0xffff);
+ case OTHER_ERROR (LIBDW):
+Index: elfutils-0.166/libdwfl/dwfl_module_getdwarf.c
+===================================================================
+--- elfutils-0.166.orig/libdwfl/dwfl_module_getdwarf.c
++++ elfutils-0.166/libdwfl/dwfl_module_getdwarf.c
+@@ -31,6 +31,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <unistd.h>
++#include "system.h"
+ #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
+ #include "../libelf/libelfP.h"
+
+Index: elfutils-0.166/libdwfl/find-debuginfo.c
+===================================================================
+--- elfutils-0.166.orig/libdwfl/find-debuginfo.c
++++ elfutils-0.166/libdwfl/find-debuginfo.c
+@@ -385,7 +385,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul
+ /* If FILE_NAME is a symlink, the debug file might be associated
+ with the symlink target name instead. */
+
+- char *canon = canonicalize_file_name (file_name);
++ char *canon = realpath (file_name, NULL);
+ if (canon != NULL && strcmp (file_name, canon))
+ fd = find_debuginfo_in_path (mod, canon,
+ debuglink_file, debuglink_crc,
+Index: elfutils-0.166/libdwfl/libdwfl_crc32_file.c
+===================================================================
+--- elfutils-0.166.orig/libdwfl/libdwfl_crc32_file.c
++++ elfutils-0.166/libdwfl/libdwfl_crc32_file.c
+@@ -31,6 +31,16 @@
+
+ #define crc32_file attribute_hidden __libdwfl_crc32_file
+ #define crc32 __libdwfl_crc32
++
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++ (__extension__ \
++ ({ long int __result; \
++ do __result = (long int) (expression); \
++ while (__result == -1L && errno == EINTR); \
++ __result; }))
++#endif
++
+ #define LIB_SYSTEM_H 1
+ #include <libdwflP.h>
+ #include "../lib/crc32_file.c"
+Index: elfutils-0.166/libdwfl/linux-kernel-modules.c
+===================================================================
+--- elfutils-0.166.orig/libdwfl/linux-kernel-modules.c
++++ elfutils-0.166/libdwfl/linux-kernel-modules.c
+@@ -34,6 +34,7 @@
+ #include <config.h>
+
+ #include "libdwflP.h"
++#include "system.h"
+ #include <inttypes.h>
+ #include <errno.h>
+ #include <stdio.h>
+Index: elfutils-0.166/libebl/eblopenbackend.c
+===================================================================
+--- elfutils-0.166.orig/libebl/eblopenbackend.c
++++ elfutils-0.166/libebl/eblopenbackend.c
+@@ -32,7 +32,7 @@
+
+ #include <assert.h>
+ #include <dlfcn.h>
+-#include <error.h>
++#include <err.h>
+ #include <libelfP.h>
+ #include <dwarf.h>
+ #include <stdlib.h>
+Index: elfutils-0.166/libebl/eblwstrtab.c
+===================================================================
+--- elfutils-0.166.orig/libebl/eblwstrtab.c
++++ elfutils-0.166/libebl/eblwstrtab.c
+@@ -305,7 +305,7 @@ copystrings (struct Ebl_WStrent *nodep,
+
+ /* Process the current node. */
+ nodep->offset = *offsetp;
+- *freep = wmempcpy (*freep, nodep->string, nodep->len);
++ *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len;
+ *offsetp += nodep->len * sizeof (wchar_t);
+
+ for (subs = nodep->next; subs != NULL; subs = subs->next)
+Index: elfutils-0.166/libelf/elf.h
+===================================================================
+--- elfutils-0.166.orig/libelf/elf.h
++++ elfutils-0.166/libelf/elf.h
+@@ -21,7 +21,9 @@
+
+ #include <features.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Standard ELF types. */
+
+@@ -3591,7 +3593,8 @@ enum
+
+ #define R_TILEGX_NUM 130
+
+-
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* elf.h */
+Index: elfutils-0.166/libelf/libelf.h
+===================================================================
+--- elfutils-0.166.orig/libelf/libelf.h
++++ elfutils-0.166/libelf/libelf.h
+@@ -29,6 +29,7 @@
+ #ifndef _LIBELF_H
+ #define _LIBELF_H 1
+
++#include <fcntl.h>
+ #include <stdint.h>
+ #include <sys/types.h>
+
+Index: elfutils-0.166/libelf/libelfP.h
+===================================================================
+--- elfutils-0.166.orig/libelf/libelfP.h
++++ elfutils-0.166/libelf/libelfP.h
+@@ -36,6 +36,7 @@
+
+ #include <ar.h>
+ #include <gelf.h>
++#include <libelf.h>
+
+ #include <errno.h>
+ #include <stdbool.h>
+Index: elfutils-0.166/src/addr2line.c
+===================================================================
+--- elfutils-0.166.orig/src/addr2line.c
++++ elfutils-0.166/src/addr2line.c
+@@ -23,7 +23,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <libdwfl.h>
+Index: elfutils-0.166/src/ar.c
+===================================================================
+--- elfutils-0.166.orig/src/ar.c
++++ elfutils-0.166/src/ar.c
+@@ -22,7 +22,7 @@
+
+ #include <argp.h>
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libintl.h>
+Index: elfutils-0.166/src/arlib.c
+===================================================================
+--- elfutils-0.166.orig/src/arlib.c
++++ elfutils-0.166/src/arlib.c
+@@ -21,7 +21,7 @@
+ #endif
+
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <gelf.h>
+ #include <libintl.h>
+ #include <stdio.h>
+Index: elfutils-0.166/src/arlib2.c
+===================================================================
+--- elfutils-0.166.orig/src/arlib2.c
++++ elfutils-0.166/src/arlib2.c
+@@ -20,7 +20,7 @@
+ # include <config.h>
+ #endif
+
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <limits.h>
+ #include <string.h>
+Index: elfutils-0.166/src/elfcmp.c
+===================================================================
+--- elfutils-0.166.orig/src/elfcmp.c
++++ elfutils-0.166/src/elfcmp.c
+@@ -23,7 +23,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <locale.h>
+ #include <libintl.h>
+Index: elfutils-0.166/src/elflint.c
+===================================================================
+--- elfutils-0.166.orig/src/elflint.c
++++ elfutils-0.166/src/elflint.c
+@@ -24,7 +24,7 @@
+ #include <assert.h>
+ #include <byteswap.h>
+ #include <endian.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.166/src/findtextrel.c
+===================================================================
+--- elfutils-0.166.orig/src/findtextrel.c
++++ elfutils-0.166/src/findtextrel.c
+@@ -23,7 +23,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libdw.h>
+Index: elfutils-0.166/src/i386_ld.c
+===================================================================
+--- elfutils-0.166.orig/src/i386_ld.c
++++ elfutils-0.166/src/i386_ld.c
+@@ -20,7 +20,7 @@
+ #endif
+
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: elfutils-0.166/src/ld.c
+===================================================================
+--- elfutils-0.166.orig/src/ld.c
++++ elfutils-0.166/src/ld.c
+@@ -21,7 +21,7 @@
+
+ #include <argp.h>
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <libelf.h>
+ #include <libintl.h>
+Index: elfutils-0.166/src/ldgeneric.c
+===================================================================
+--- elfutils-0.166.orig/src/ldgeneric.c
++++ elfutils-0.166/src/ldgeneric.c
+@@ -23,7 +23,7 @@
+ #include <ctype.h>
+ #include <dlfcn.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+ #include <gelf.h>
+Index: elfutils-0.166/src/ldlex.c
+===================================================================
+--- elfutils-0.166.orig/src/ldlex.c
++++ elfutils-0.166/src/ldlex.c
+@@ -1106,7 +1106,7 @@ char *ldtext;
+ #include <assert.h>
+ #include <ctype.h>
+ #include <elf.h>
+-#include <error.h>
++#include <err.h>
+ #include <inttypes.h>
+ #include <libintl.h>
+ #include <stdbool.h>
+Index: elfutils-0.166/src/ldscript.c
+===================================================================
+--- elfutils-0.166.orig/src/ldscript.c
++++ elfutils-0.166/src/ldscript.c
+@@ -95,7 +95,7 @@
+ #endif
+
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdbool.h>
+ #include <stdint.h>
+Index: elfutils-0.166/src/nm.c
+===================================================================
+--- elfutils-0.166.orig/src/nm.c
++++ elfutils-0.166/src/nm.c
+@@ -26,7 +26,7 @@
+ #include <ctype.h>
+ #include <dwarf.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.166/src/objdump.c
+===================================================================
+--- elfutils-0.166.orig/src/objdump.c
++++ elfutils-0.166/src/objdump.c
+@@ -21,7 +21,7 @@
+ #endif
+
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <libintl.h>
+Index: elfutils-0.166/src/ranlib.c
+===================================================================
+--- elfutils-0.166.orig/src/ranlib.c
++++ elfutils-0.166/src/ranlib.c
+@@ -24,7 +24,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libintl.h>
+Index: elfutils-0.166/src/readelf.c
+===================================================================
+--- elfutils-0.166.orig/src/readelf.c
++++ elfutils-0.166/src/readelf.c
+@@ -25,7 +25,7 @@
+ #include <ctype.h>
+ #include <dwarf.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.166/src/size.c
+===================================================================
+--- elfutils-0.166.orig/src/size.c
++++ elfutils-0.166/src/size.c
+@@ -21,7 +21,7 @@
+ #endif
+
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.166/src/stack.c
+===================================================================
+--- elfutils-0.166.orig/src/stack.c
++++ elfutils-0.166/src/stack.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ #include <assert.h>
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <stdlib.h>
+ #include <inttypes.h>
+ #include <stdio.h>
+Index: elfutils-0.166/src/strings.c
+===================================================================
+--- elfutils-0.166.orig/src/strings.c
++++ elfutils-0.166/src/strings.c
+@@ -25,7 +25,7 @@
+ #include <ctype.h>
+ #include <endian.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.166/src/strip.c
+===================================================================
+--- elfutils-0.166.orig/src/strip.c
++++ elfutils-0.166/src/strip.c
+@@ -24,7 +24,7 @@
+ #include <assert.h>
+ #include <byteswap.h>
+ #include <endian.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libelf.h>
+Index: elfutils-0.166/src/unstrip.c
+===================================================================
+--- elfutils-0.166.orig/src/unstrip.c
++++ elfutils-0.166/src/unstrip.c
+@@ -31,7 +31,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+ #include <libintl.h>
+Index: elfutils-0.166/tests/addrscopes.c
+===================================================================
+--- elfutils-0.166.orig/tests/addrscopes.c
++++ elfutils-0.166/tests/addrscopes.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+
+
+Index: elfutils-0.166/tests/allregs.c
+===================================================================
+--- elfutils-0.166.orig/tests/allregs.c
++++ elfutils-0.166/tests/allregs.c
+@@ -21,7 +21,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <argp.h>
+ #include <assert.h>
+Index: elfutils-0.166/tests/backtrace-data.c
+===================================================================
+--- elfutils-0.166.orig/tests/backtrace-data.c
++++ elfutils-0.166/tests/backtrace-data.c
+@@ -27,7 +27,7 @@
+ #include <dirent.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <dwarf.h>
+ #if defined(__x86_64__) && defined(__linux__)
+Index: elfutils-0.166/tests/backtrace-dwarf.c
+===================================================================
+--- elfutils-0.166.orig/tests/backtrace-dwarf.c
++++ elfutils-0.166/tests/backtrace-dwarf.c
+@@ -22,7 +22,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <sys/ptrace.h>
+ #include <sys/types.h>
+Index: elfutils-0.166/tests/backtrace.c
+===================================================================
+--- elfutils-0.166.orig/tests/backtrace.c
++++ elfutils-0.166/tests/backtrace.c
+@@ -24,7 +24,7 @@
+ #include <dirent.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <dwarf.h>
+ #ifdef __linux__
+Index: elfutils-0.166/tests/buildid.c
+===================================================================
+--- elfutils-0.166.orig/tests/buildid.c
++++ elfutils-0.166/tests/buildid.c
+@@ -23,7 +23,7 @@
+ #include ELFUTILS_HEADER(elf)
+ #include ELFUTILS_HEADER(dwelf)
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+Index: elfutils-0.166/tests/debugaltlink.c
+===================================================================
+--- elfutils-0.166.orig/tests/debugaltlink.c
++++ elfutils-0.166/tests/debugaltlink.c
+@@ -23,7 +23,7 @@
+ #include ELFUTILS_HEADER(dw)
+ #include ELFUTILS_HEADER(dwelf)
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+Index: elfutils-0.166/tests/debuglink.c
+===================================================================
+--- elfutils-0.166.orig/tests/debuglink.c
++++ elfutils-0.166/tests/debuglink.c
+@@ -21,7 +21,7 @@
+ #include <errno.h>
+ #include ELFUTILS_HEADER(dwelf)
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+Index: elfutils-0.166/tests/deleted.c
+===================================================================
+--- elfutils-0.166.orig/tests/deleted.c
++++ elfutils-0.166/tests/deleted.c
+@@ -21,7 +21,7 @@
+ #include <unistd.h>
+ #include <assert.h>
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <errno.h>
+ #ifdef __linux__
+ #include <sys/prctl.h>
+Index: elfutils-0.166/tests/dwfl-addr-sect.c
+===================================================================
+--- elfutils-0.166.orig/tests/dwfl-addr-sect.c
++++ elfutils-0.166/tests/dwfl-addr-sect.c
+@@ -23,7 +23,7 @@
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <argp.h>
+ #include ELFUTILS_HEADER(dwfl)
+Index: elfutils-0.166/tests/dwfl-bug-addr-overflow.c
+===================================================================
+--- elfutils-0.166.orig/tests/dwfl-bug-addr-overflow.c
++++ elfutils-0.166/tests/dwfl-bug-addr-overflow.c
+@@ -20,7 +20,7 @@
+ #include <inttypes.h>
+ #include <stdio.h>
+ #include <stdio_ext.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include ELFUTILS_HEADER(dwfl)
+
+Index: elfutils-0.166/tests/dwfl-bug-fd-leak.c
+===================================================================
+--- elfutils-0.166.orig/tests/dwfl-bug-fd-leak.c
++++ elfutils-0.166/tests/dwfl-bug-fd-leak.c
+@@ -24,7 +24,7 @@
+ #include <dirent.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <dwarf.h>
+
+Index: elfutils-0.166/tests/dwfl-bug-getmodules.c
+===================================================================
+--- elfutils-0.166.orig/tests/dwfl-bug-getmodules.c
++++ elfutils-0.166/tests/dwfl-bug-getmodules.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ #include ELFUTILS_HEADER(dwfl)
+
+-#include <error.h>
++#include <err.h>
+
+ static const Dwfl_Callbacks callbacks =
+ {
+Index: elfutils-0.166/tests/dwfl-report-elf-align.c
+===================================================================
+--- elfutils-0.166.orig/tests/dwfl-report-elf-align.c
++++ elfutils-0.166/tests/dwfl-report-elf-align.c
+@@ -20,7 +20,7 @@
+ #include <inttypes.h>
+ #include <stdio.h>
+ #include <stdio_ext.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <string.h>
+ #include <stdlib.h>
+Index: elfutils-0.166/tests/dwfllines.c
+===================================================================
+--- elfutils-0.166.orig/tests/dwfllines.c
++++ elfutils-0.166/tests/dwfllines.c
+@@ -27,7 +27,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+
+ int
+ main (int argc, char *argv[])
+Index: elfutils-0.166/tests/dwflmodtest.c
+===================================================================
+--- elfutils-0.166.orig/tests/dwflmodtest.c
++++ elfutils-0.166/tests/dwflmodtest.c
+@@ -23,7 +23,7 @@
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <argp.h>
+ #include ELFUTILS_HEADER(dwfl)
+Index: elfutils-0.166/tests/dwflsyms.c
+===================================================================
+--- elfutils-0.166.orig/tests/dwflsyms.c
++++ elfutils-0.166/tests/dwflsyms.c
+@@ -25,7 +25,7 @@
+ #include <stdio.h>
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+
+ static const char *
+Index: elfutils-0.166/tests/early-offscn.c
+===================================================================
+--- elfutils-0.166.orig/tests/early-offscn.c
++++ elfutils-0.166/tests/early-offscn.c
+@@ -19,7 +19,7 @@
+ #endif
+
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <stdio.h>
+Index: elfutils-0.166/tests/ecp.c
+===================================================================
+--- elfutils-0.166.orig/tests/ecp.c
++++ elfutils-0.166/tests/ecp.c
+@@ -20,7 +20,7 @@
+ #endif
+
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <stdlib.h>
+Index: elfutils-0.166/tests/find-prologues.c
+===================================================================
+--- elfutils-0.166.orig/tests/find-prologues.c
++++ elfutils-0.166/tests/find-prologues.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+
+Index: elfutils-0.166/tests/funcretval.c
+===================================================================
+--- elfutils-0.166.orig/tests/funcretval.c
++++ elfutils-0.166/tests/funcretval.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+
+Index: elfutils-0.166/tests/funcscopes.c
+===================================================================
+--- elfutils-0.166.orig/tests/funcscopes.c
++++ elfutils-0.166/tests/funcscopes.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+
+Index: elfutils-0.166/tests/getsrc_die.c
+===================================================================
+--- elfutils-0.166.orig/tests/getsrc_die.c
++++ elfutils-0.166/tests/getsrc_die.c
+@@ -19,7 +19,7 @@
+ #endif
+
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <libelf.h>
+Index: elfutils-0.166/tests/line2addr.c
+===================================================================
+--- elfutils-0.166.orig/tests/line2addr.c
++++ elfutils-0.166/tests/line2addr.c
+@@ -26,7 +26,7 @@
+ #include <locale.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+
+
+ static void
+Index: elfutils-0.166/tests/low_high_pc.c
+===================================================================
+--- elfutils-0.166.orig/tests/low_high_pc.c
++++ elfutils-0.166/tests/low_high_pc.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+
+Index: elfutils-0.166/tests/md5-sha1-test.c
+===================================================================
+--- elfutils-0.166.orig/tests/md5-sha1-test.c
++++ elfutils-0.166/tests/md5-sha1-test.c
+@@ -19,7 +19,7 @@
+ #endif
+
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+
+ #include "md5.h"
+ #include "sha1.h"
+Index: elfutils-0.166/tests/rdwrmmap.c
+===================================================================
+--- elfutils-0.166.orig/tests/rdwrmmap.c
++++ elfutils-0.166/tests/rdwrmmap.c
+@@ -19,7 +19,7 @@
+ #endif
+
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+Index: elfutils-0.166/tests/saridx.c
+===================================================================
+--- elfutils-0.166.orig/tests/saridx.c
++++ elfutils-0.166/tests/saridx.c
+@@ -17,7 +17,7 @@
+
+ #include <config.h>
+
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <stdio.h>
+Index: elfutils-0.166/tests/sectiondump.c
+===================================================================
+--- elfutils-0.166.orig/tests/sectiondump.c
++++ elfutils-0.166/tests/sectiondump.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.166/tests/varlocs.c
+===================================================================
+--- elfutils-0.166.orig/tests/varlocs.c
++++ elfutils-0.166/tests/varlocs.c
+@@ -25,7 +25,7 @@
+ #include <dwarf.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+Index: elfutils-0.166/tests/vdsosyms.c
+===================================================================
+--- elfutils-0.166.orig/tests/vdsosyms.c
++++ elfutils-0.166/tests/vdsosyms.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <inttypes.h>
+ #include <stdio.h>
+ #include <string.h>
+Index: elfutils-0.166/libelf/elf_getarsym.c
+===================================================================
+--- elfutils-0.166.orig/libelf/elf_getarsym.c
++++ elfutils-0.166/libelf/elf_getarsym.c
+@@ -302,7 +302,7 @@ elf_getarsym (Elf *elf, size_t *ptr)
+ arsym[cnt].as_off = (*u32)[cnt];
+
+ arsym[cnt].as_hash = _dl_elf_hash (str_data);
+- str_data = rawmemchr (str_data, '\0') + 1;
++ str_data = memchr (str_data, '\0', SIZE_MAX) + 1;
+ }
+
+ /* At the end a special entry. */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
index 3754c1c36..3754c1c36 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-fix-a-stack-usage-warning.patch
index 6923bf705..6923bf705 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-fix-a-stack-usage-warning.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-remove-the-unneed-checking.patch
index 5be92d705..5be92d705 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0001-remove-the-unneed-checking.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
index 72125c9ff..72125c9ff 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0003-Add-mips-n64-relocation-format-hack.patch
index 14b7985ce..14b7985ce 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/0003-Add-mips-n64-relocation-format-hack.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/aarch64_uio.patch
index 38dc57bef..38dc57bef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/aarch64_uio.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/arm_backend.diff
index 9d47f95f2..9d47f95f2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/arm_backend.diff
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/elfcmp-fix-self-comparision.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/elfcmp-fix-self-comparision.patch
new file mode 100644
index 000000000..6c150bb54
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/elfcmp-fix-self-comparision.patch
@@ -0,0 +1,41 @@
+From 836a16fe5b5bab4a3afe2c991c104652775ce3a3 Mon Sep 17 00:00:00 2001
+From: David Abdurachmanov <davidlt@cern.ch>
+Date: Mon, 11 Apr 2016 16:00:57 +0200
+Subject: elfcmp: fix self-comparison error with GCC 6
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Noticed with Fedora 24 Alpha, gcc (GCC) 6.0.0 20160406
+(Red Hat 6.0.0-0.20).
+
+elfcmp.c: In function â€main’:
+elfcmp.c:364:199: error: self-comparison always evaluates
+to false [-Werror=tautological-compare]
+ if (unlikely (name1 == NULL || name2 == NULL
+
+Signed-off-by: David Abdurachmanov <davidlt@cern.ch>
+---
+
+Upstream-Status: Backport
+
+ src/ChangeLog | 4 ++++
+ src/elfcmp.c | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/elfcmp.c b/src/elfcmp.c
+index 852b92f..7b5d39c 100644
+--- a/src/elfcmp.c
++++ b/src/elfcmp.c
+@@ -368,7 +368,7 @@ main (int argc, char *argv[])
+ && sym1->st_shndx != SHN_UNDEF)
+ || sym1->st_info != sym2->st_info
+ || sym1->st_other != sym2->st_other
+- || sym1->st_shndx != sym1->st_shndx))
++ || sym1->st_shndx != sym2->st_shndx))
+ {
+ // XXX Do we want to allow reordered symbol tables?
+ symtab_mismatch:
+--
+cgit v0.12
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/fixheadercheck.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/fixheadercheck.patch
index 5de3b24c8..5de3b24c8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/fixheadercheck.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/fixheadercheck.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/hppa_backend.diff
index 45456715a..45456715a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/hppa_backend.diff
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/kfreebsd_path.patch
index ba454ee77..ba454ee77 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/kfreebsd_path.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/m68k_backend.diff
index d73855b60..d73855b60 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/m68k_backend.diff
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/mips_backend.diff
index de1237be0..de1237be0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/mips_backend.diff
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/mips_readelf_w.patch
index 930d6f664..930d6f664 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/mips_readelf_w.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/shadow.patch
index d31961f94..d31961f94 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/shadow.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/testsuite-ignore-elflint.diff b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/testsuite-ignore-elflint.diff
index eae5796de..eae5796de 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/testsuite-ignore-elflint.diff
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/testsuite-ignore-elflint.diff
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/uclibc-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/uclibc-support.patch
new file mode 100644
index 000000000..62999985c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.166/uclibc-support.patch
@@ -0,0 +1,128 @@
+From 3daec2dd11a04955f95e8f65a48820103d84dbec Mon Sep 17 00:00:00 2001
+From: Junling Zheng <zhengjunling@huawei.com>
+Date: Thu, 9 Apr 2015 12:12:49 +0000
+Subject: [PATCH] uclibc support for elfutils 0.161
+
+on uclibc systems libintl and libuargp are separate from libc.
+so they need to be specified on commandline when we use proxy-libintl
+then libintl is a static archive so it should be listed last since
+elfutils does not respect disable-nls we need to link in libintl
+
+We add a new option --enable-uclibc which will be used to control
+the uclibc specific configurations during build.
+
+Upstream-Status: Inappropriate [uclibc specific]
+
+Signed-off-by: Khem Raj <raj.khem>
+Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
+[Junling Zheng:
+ - adjust context
+]
+---
+ configure.ac | 8 ++++++++
+ libcpu/Makefile.am | 4 ++++
+ libdw/Makefile.am | 7 ++++++-
+ libelf/Makefile.am | 5 +++++
+ 4 files changed, 23 insertions(+), 1 deletion(-)
+
+Index: elfutils-0.166/configure.ac
+===================================================================
+--- elfutils-0.166.orig/configure.ac
++++ elfutils-0.166/configure.ac
+@@ -79,6 +79,14 @@ AS_IF([test "$use_locks" = yes],
+
+ AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
+
++AC_ARG_ENABLE([uclibc],
++AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
++use_uclibc=yes, use_uclibc=no)
++AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes)
++AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)])
++
++AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
++
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_PROG_YACC
+@@ -347,18 +355,13 @@ AC_LINK_IFELSE(
+ )
+
+ dnl If our libc doesn't provide argp, then test for libargp
+-if test "$libc_has_argp" = "false" ; then
+- AC_MSG_WARN("libc does not have argp")
+- AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
+-
+- if test "$have_argp" = "false"; then
+- AC_MSG_ERROR("no libargp found")
+- else
+- argp_LDADD="-largp"
+- fi
+-else
+- argp_LDADD=""
+-fi
++AS_IF([test "x$libc_has_argp" = "xfalse"],
++ [AC_MSG_WARN("libc does not have argp")
++ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true" argp_LDADD="-largp"], [have_argp="false"])], [argp_LDADD=""])
++
++AS_IF([test "x$libc_has_argp" = "xfalse" -a "x$have_argp" = "xfalse"],
++ AC_CHECK_LIB([uargp], [argp_parse], [have_uargp="true" argp_LDADD="-luargp"], [have_uargp="false"])], [argp_LDADD=""])
++
+ AC_SUBST([argp_LDADD])
+
+ dnl The directories with content.
+Index: elfutils-0.166/libcpu/Makefile.am
+===================================================================
+--- elfutils-0.166.orig/libcpu/Makefile.am
++++ elfutils-0.166/libcpu/Makefile.am
+@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3
+ i386_lex.o: i386_parse.h
+ i386_gendis_LDADD = $(libeu) -lm
+
++if USE_UCLIBC
++i386_gendis_LDADD += -lintl
++endif
++
+ i386_parse.h: i386_parse.c ;
+
+ EXTRA_DIST = defs/i386
+Index: elfutils-0.166/libdw/Makefile.am
+===================================================================
+--- elfutils-0.166.orig/libdw/Makefile.am
++++ elfutils-0.166/libdw/Makefile.am
+@@ -102,6 +102,11 @@ endif
+ libdw_pic_a_SOURCES =
+ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
+
++libdw_so_LDLIBS =
++if USE_UCLIBC
++libdw_so_LDLIBS += -lintl
++endif
++
+ libdw_so_SOURCES =
+ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
+ ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
+@@ -112,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
+ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
+ -Wl,--version-script,$<,--no-undefined \
+ -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+- -ldl -lz $(argp_LDADD) $(zip_LIBS)
++ -ldl -lz $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
+ @$(textrel_check)
+ $(AM_V_at)ln -fs $@ $@.$(VERSION)
+
+Index: elfutils-0.166/libelf/Makefile.am
+===================================================================
+--- elfutils-0.166.orig/libelf/Makefile.am
++++ elfutils-0.166/libelf/Makefile.am
+@@ -96,6 +96,11 @@ libelf_pic_a_SOURCES =
+ am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
+
+ libelf_so_LDLIBS = -lz
++
++if USE_UCLIBC
++libelf_so_LDLIBS += -lintl
++endif
++
+ if USE_LOCKS
+ libelf_so_LDLIBS += -lpthread
+ endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb
index ff5325734..6080c179f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -34,6 +34,7 @@ SRC_URI += "\
file://Fix_elf_cvt_gunhash.patch \
file://elf_begin.c-CVE-2014-9447-fix.patch \
file://fix-build-gcc-4.8.patch \
+ file://gcc6.patch \
"
# Only apply when building uclibc based target recipe
SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.148.patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.164.bb b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.164.bb
deleted file mode 100644
index 4964c0507..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.164.bb
+++ /dev/null
@@ -1,89 +0,0 @@
-SUMMARY = "Utilities and libraries for handling compiled object files"
-HOMEPAGE = "https://fedorahosted.org/elfutils"
-SECTION = "base"
-LICENSE = "(GPLv3 & Elfutils-Exception)"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "libtool bzip2 zlib virtual/libintl"
-DEPENDS_append_libc-musl = " argp-standalone fts "
-
-SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "2e4536c1c48034f188a80789a59114d8"
-SRC_URI[sha256sum] = "9683c025928a12d06b7fe812928aa6235249e22d197d086f7084606a48165900"
-
-SRC_URI += "\
- file://dso-link-change.patch \
- file://Fix_elf_cvt_gunhash.patch \
- file://fixheadercheck.patch \
- file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
- file://0001-remove-the-unneed-checking.patch \
- file://0001-fix-a-stack-usage-warning.patch \
- file://aarch64_uio.patch \
- file://shadow.patch \
-"
-
-# pick the patch from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.164-1.debian.tar.xz
-SRC_URI += "\
- file://hppa_backend.diff \
- file://arm_backend.diff \
- file://mips_backend.diff \
- file://m68k_backend.diff \
- file://testsuite-ignore-elflint.diff \
- file://mips_readelf_w.patch \
- file://kfreebsd_path.patch \
- file://0001-Ignore-differences-between-mips-machine-identifiers.patch \
- file://0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
- file://0003-Add-mips-n64-relocation-format-hack.patch \
- file://uclibc-support.patch \
-"
-SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch "
-
-# The buildsystem wants to generate 2 .h files from source using a binary it just built,
-# which can not pass the cross compiling, so let's work around it by adding 2 .h files
-# along with the do_configure_prepend()
-
-inherit autotools gettext
-
-EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
-EXTRA_OECONF_append_class-native = " --without-bzlib"
-EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
-
-do_install_append() {
- if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
- rm -f ${D}${bindir}/eu-objdump
- fi
-}
-
-# we can not build complete elfutils when using uclibc
-# but some recipes e.g. gcc 4.5 depends on libelf so we
-# build only libelf for uclibc case
-
-EXTRA_OEMAKE_libc-uclibc = "-C libelf"
-EXTRA_OEMAKE_class-native = ""
-EXTRA_OEMAKE_class-nativesdk = ""
-
-ALLOW_EMPTY_${PN}_libc-musl = "1"
-
-BBCLASSEXTEND = "native nativesdk"
-
-# Package utilities separately
-PACKAGES =+ "${PN}-binutils libelf libasm libdw"
-FILES_${PN}-binutils = "\
- ${bindir}/eu-addr2line \
- ${bindir}/eu-ld \
- ${bindir}/eu-nm \
- ${bindir}/eu-readelf \
- ${bindir}/eu-size \
- ${bindir}/eu-strip"
-
-FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
-FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
-FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
-# Some packages have the version preceeding the .so instead properly
-# versioned .so.<version>, so we need to reorder and repackage.
-#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
-#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
-
-# The package contains symlinks that trip up insane
-INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.166.bb b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.166.bb
new file mode 100644
index 000000000..5c436d386
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.166.bb
@@ -0,0 +1,89 @@
+SUMMARY = "Utilities and libraries for handling compiled object files"
+HOMEPAGE = "https://fedorahosted.org/elfutils"
+SECTION = "base"
+LICENSE = "(GPLv3 & Elfutils-Exception)"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "libtool bzip2 zlib virtual/libintl"
+DEPENDS_append_libc-musl = " argp-standalone fts "
+
+SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2"
+SRC_URI[md5sum] = "d4e462b7891915dc5326bccefa2024ff"
+SRC_URI[sha256sum] = "3c056914c8a438b210be0d790463b960fc79d234c3f05ce707cbff80e94cba30"
+
+SRC_URI += "\
+ file://dso-link-change.patch \
+ file://Fix_elf_cvt_gunhash.patch \
+ file://fixheadercheck.patch \
+ file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
+ file://0001-remove-the-unneed-checking.patch \
+ file://0001-fix-a-stack-usage-warning.patch \
+ file://aarch64_uio.patch \
+ file://shadow.patch \
+"
+
+# pick the patch from debian
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.164-1.debian.tar.xz
+SRC_URI += "\
+ file://hppa_backend.diff \
+ file://arm_backend.diff \
+ file://mips_backend.diff \
+ file://m68k_backend.diff \
+ file://testsuite-ignore-elflint.diff \
+ file://mips_readelf_w.patch \
+ file://kfreebsd_path.patch \
+ file://0001-Ignore-differences-between-mips-machine-identifiers.patch \
+ file://0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
+ file://0003-Add-mips-n64-relocation-format-hack.patch \
+ file://uclibc-support.patch \
+ file://elfcmp-fix-self-comparision.patch \
+"
+SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch "
+
+# The buildsystem wants to generate 2 .h files from source using a binary it just built,
+# which can not pass the cross compiling, so let's work around it by adding 2 .h files
+# along with the do_configure_prepend()
+
+inherit autotools gettext
+
+EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
+EXTRA_OECONF_append_class-native = " --without-bzlib"
+EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
+
+do_install_append() {
+ if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
+ rm -f ${D}${bindir}/eu-objdump
+ fi
+}
+
+# we can not build complete elfutils when using uclibc
+# but some recipes e.g. gcc 4.5 depends on libelf so we
+# build only libelf for uclibc case
+
+EXTRA_OEMAKE_libc-uclibc = "-C libelf"
+EXTRA_OEMAKE_class-native = ""
+EXTRA_OEMAKE_class-nativesdk = ""
+
+ALLOW_EMPTY_${PN}_libc-musl = "1"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Package utilities separately
+PACKAGES =+ "${PN}-binutils libelf libasm libdw"
+FILES_${PN}-binutils = "\
+ ${bindir}/eu-addr2line \
+ ${bindir}/eu-ld \
+ ${bindir}/eu-nm \
+ ${bindir}/eu-readelf \
+ ${bindir}/eu-size \
+ ${bindir}/eu-strip"
+
+FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
+FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
+FILES_libdw = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
+# Some packages have the version preceeding the .so instead properly
+# versioned .so.<version>, so we need to reorder and repackage.
+#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
+#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
+
+# The package contains symlinks that trip up insane
+INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file/host-file.patch b/import-layers/yocto-poky/meta/recipes-devtools/file/file/host-file.patch
deleted file mode 100644
index a7efbdcbc..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/file/file/host-file.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Submitted (http://bugs.gw.com/view.php?id=485)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 3cde199d03b39632361c275cd30fa0612a03138b Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Mon, 19 Oct 2015 10:30:57 +0100
-Subject: [PATCH 2/2] When using the host file, respect FILE_COMPILE
-
-If we're cross-compiling and not using the file binary that was just built,
-execute the binary that we've been told to use (via FILE_COMPILE) when checking
-the version instead of assuming that "file" is correct as the actual compile
-uses FILE_COMPILE so different binaries may be used.
----
- magic/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/magic/Makefile.am b/magic/Makefile.am
-index 89ac844..67067fe 100644
---- a/magic/Makefile.am
-+++ b/magic/Makefile.am
-@@ -293,7 +293,7 @@ ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
- @(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \
- echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \
- else \
-- v=$$(file --version | sed -e s/file-// -e q); \
-+ v=$$(${FILE_COMPILE} --version | sed -e s/file-// -e q); \
- if [ "$$v" != "${PACKAGE_VERSION}" ]; then \
- echo "Cannot use the installed version of file ($$v) to"; \
- echo "cross-compile file ${PACKAGE_VERSION}"; \
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.25.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.25.bb
deleted file mode 100644
index 68bad69b4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.25.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "File classification tool"
-DESCRIPTION = "File attempts to classify files depending \
-on their contents and prints a description if a match is found."
-HOMEPAGE = "http://www.darwinsys.com/file/"
-SECTION = "console/utils"
-
-# two clause BSD
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
-
-DEPENDS = "zlib file-replacement-native"
-DEPENDS_class-native = "zlib-native"
-
-# Blacklist a bogus tag in upstream check
-UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)"
-
-SRC_URI = "git://github.com/file/file.git \
- file://debian-742262.patch \
- file://0001-Add-P-prompt-into-Usage-info.patch \
- file://host-file.patch \
- "
-
-SRCREV = "f45db89ddc91692b662fffbabbdafc7bc4c00f5e"
-S = "${WORKDIR}/git"
-
-inherit autotools
-
-EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-
-FILES_${PN} += "${datadir}/misc/*.mgc"
-
-do_install_append_class-native() {
- create_cmdline_wrapper ${D}/${bindir}/file \
- --magic-file ${datadir}/misc/magic.mgc
-}
-
-do_install_append_class-nativesdk() {
- create_cmdline_wrapper ${D}/${bindir}/file \
- --magic-file ${datadir}/misc/magic.mgc
-}
-
-BBCLASSEXTEND = "native nativesdk"
-PROVIDES_append_class-native = " file-replacement-native"
-# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
-# depends on file-replacement-native.
-bindir_append_class-native = "/file-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.28.bb
new file mode 100644
index 000000000..e64a89c80
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/file/file_5.28.bb
@@ -0,0 +1,48 @@
+SUMMARY = "File classification tool"
+DESCRIPTION = "File attempts to classify files depending \
+on their contents and prints a description if a match is found."
+HOMEPAGE = "http://www.darwinsys.com/file/"
+SECTION = "console/utils"
+
+# two clause BSD
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
+
+DEPENDS = "zlib file-replacement-native"
+DEPENDS_class-native = "zlib-native"
+
+# Blacklist a bogus tag in upstream check
+UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)"
+
+SRC_URI = "git://github.com/file/file.git \
+ file://debian-742262.patch \
+ file://0001-Add-P-prompt-into-Usage-info.patch \
+ "
+
+SRCREV = "3c521817322a6bf5160cfeb09b9145ccde587b2a"
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+
+CFLAGS_append = " -std=c99"
+
+FILES_${PN} += "${datadir}/misc/*.mgc"
+
+do_install_append_class-native() {
+ create_cmdline_wrapper ${D}/${bindir}/file \
+ --magic-file ${datadir}/misc/magic.mgc
+}
+
+do_install_append_class-nativesdk() {
+ create_cmdline_wrapper ${D}/${bindir}/file \
+ --magic-file ${datadir}/misc/magic.mgc
+}
+
+BBCLASSEXTEND = "native nativesdk"
+PROVIDES_append_class-native = " file-replacement-native"
+# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
+# depends on file-replacement-native.
+bindir_append_class-native = "/file-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
new file mode 100644
index 000000000..438ca5f52
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
@@ -0,0 +1,64 @@
+From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Tue, 30 Aug 2016 14:25:32 +0200
+Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fixes:
+
+| error: C++ style comments are not allowed in ISO C90
+| num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas MĂĽller <schnitzeltony@googlemail.com>
+---
+ src/flex.skl | 2 +-
+ src/scan.c | 2 +-
+ src/skel.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/flex.skl b/src/flex.skl
+index 73a0b9e..ed71627 100644
+--- a/src/flex.skl
++++ b/src/flex.skl
+@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+- num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
++ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ M4_YY_CALL_LAST_ARG);
+diff --git a/src/scan.c b/src/scan.c
+index b55df2d..f1dce75 100644
+--- a/src/scan.c
++++ b/src/scan.c
+@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void)
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+- num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
++ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways...*/
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+diff --git a/src/skel.c b/src/skel.c
+index ef657d3..26cc889 100644
+--- a/src/skel.c
++++ b/src/skel.c
+@@ -2561,7 +2561,7 @@ const char *skel[] = {
+ " * scanner will even need a stack. We use 2 instead of 1 to avoid an",
+ " * immediate realloc on the next call.",
+ " */",
+- " num_to_alloc = 1; // After all that talk, this was set to 1 anyways...",
++ " num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */",
+ " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
+ " (num_to_alloc * sizeof(struct yy_buffer_state*)",
+ " M4_YY_CALL_LAST_ARG);",
+--
+2.5.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
new file mode 100644
index 000000000..216ac7ae1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
@@ -0,0 +1,59 @@
+From 3939eccdff598f47e5b37b05d58bf1b44d3796e7 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 7 Oct 2016 14:15:38 +0300
+Subject: [PATCH] Prevent buffer overflow in yy_get_next_buffer
+
+This is upstream commit a5cbe929ac3255d371e698f62dc256afe7006466
+with some additional backporting to make binutils build again.
+
+Upstream-Status: Backport
+CVE: CVE-2016-6354
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ src/flex.skl | 2 +-
+ src/scan.c | 2 +-
+ src/skel.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/flex.skl b/src/flex.skl
+index ed71627..814d562 100644
+--- a/src/flex.skl
++++ b/src/flex.skl
+@@ -1718,7 +1718,7 @@ int yyFlexLexer::yy_get_next_buffer()
+
+ else
+ {
+- yy_size_t num_to_read =
++ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+diff --git a/src/scan.c b/src/scan.c
+index f1dce75..1949872 100644
+--- a/src/scan.c
++++ b/src/scan.c
+@@ -4181,7 +4181,7 @@ static int yy_get_next_buffer (void)
+
+ else
+ {
+- yy_size_t num_to_read =
++ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+diff --git a/src/skel.c b/src/skel.c
+index 26cc889..0344d18 100644
+--- a/src/skel.c
++++ b/src/skel.c
+@@ -1929,7 +1929,7 @@ const char *skel[] = {
+ "",
+ " else",
+ " {",
+- " yy_size_t num_to_read =",
++ " int num_to_read =",
+ " YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;",
+ "",
+ " while ( num_to_read <= 0 )",
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
index 8285426d4..ab35b09f9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
@@ -14,12 +14,16 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
file://run-ptest \
file://do_not_create_pdf_doc.patch \
file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
+ file://0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch \
+ file://CVE-2016-6354.patch \
${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
"
SRC_URI[md5sum] = "266270f13c48ed043d95648075084d59"
SRC_URI[sha256sum] = "24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9"
+# Flex has moved to github from 2.6.1 onwards
+UPSTREAM_CHECK_URI = "https://github.com/westes/flex/releases"
UPSTREAM_CHECK_REGEX = "flex-(?P<pver>\d+(\.\d+)+)\.tar"
inherit autotools gettext texinfo ptest
@@ -51,5 +55,8 @@ do_install_ptest() {
cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
cp -r ${S}/tests/* ${D}${PTEST_PATH}
cp -r ${B}/tests/* ${D}${PTEST_PATH}
- sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' -i ${D}${PTEST_PATH}/Makefile
+ sed -e 's/^Makefile:/_Makefile:/' \
+ -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
+ -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
+ -i ${D}${PTEST_PATH}/Makefile
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9.inc
deleted file mode 100644
index 7e03f3121..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9.inc
+++ /dev/null
@@ -1,139 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "4.9.3"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "4.9.3"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-4.9:"
-
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
-
-LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
-"
-
-SRC_URI = "\
- ${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
- file://0002-uclibc-conf.patch \
- file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
- file://0004-uclibc-locale.patch \
- file://0005-uclibc-locale-no__x.patch \
- file://0006-uclibc-locale-wchar_fix.patch \
- file://0007-uclibc-locale-update.patch \
- file://0008-missing-execinfo_h.patch \
- file://0009-c99-snprintf.patch \
- file://0010-c99-complex-ugly-hack.patch \
- file://0011-index_macro.patch \
- file://0013-libstdc-namespace.patch \
- file://0014-sh-pr24836.patch \
- file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
- file://0016-gcc-poison-system-directories.patch \
- file://0017-gcc-poison-dir-extend.patch \
- file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0019-64-bit-multilib-hack.patch \
- file://0020-optional-libstdc.patch \
- file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0022-COLLECT_GCC_OPTIONS.patch \
- file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0025-fortran-cross-compile-hack.patch \
- file://0026-libgcc-sjlj-check.patch \
- file://0027-cpp-honor-sysroot.patch \
- file://0028-MIPS64-Default-to-N64-ABI.patch \
- file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0030-gcc-Fix-argument-list-too-long-error.patch \
- file://0031-Disable-sdt.patch \
- file://0032-libtool.patch \
- file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0040-fix-g++-sysroot.patch \
- file://0041-libtool-avoid-libdir.patch \
- file://0043-cpp.patch \
- file://0044-gengtypes.patch \
- file://0046-libatomic-deptracking.patch \
- file://0047-repomembug.patch \
- file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch \
- file://0051-eabispe.patch \
- file://0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch \
- file://0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch \
- file://0054-gcc-Makefile.in-fix-parallel-building-failure.patch \
- file://0055-dwarf-reg-processing-helper.patch \
- file://0056-define-default-cfa-register-mapping.patch \
- file://0057-aarch64-config.patch \
- file://0058-gcc-r212171.patch \
- file://0059-gcc-PR-rtl-optimization-63348.patch \
- file://0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch \
- file://0061-target-gcc-includedir.patch \
- file://0062-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
- file://0063-nativesdk-gcc-support.patch \
- file://0064-handle-target-sysroot-multilib.patch \
- file://0065-gcc-483-universal-initializer-no-warning.patch \
- file://0066-cxxflags-for-build.patch \
- file://0067-fix-arm-thumb.patch \
- file://0067-gcc-musl-support.patch \
- file://0068-musl-dynamic-linker.patch \
- file://0069-musl-no-fixincludes.patch \
- file://0070-libstdc-musl.patch \
- file://0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \
- file://0072-support-ffile-prefix-map.patch \
- file://0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
- file://0074-fdebug-prefix-map-support-to-remap-relative-path.patch \
-"
-SRC_URI[md5sum] = "6f831b4d251872736e8e9cc09746f327"
-SRC_URI[sha256sum] = "2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e"
-
-UPSTREAM_CHECK_REGEX = "gcc-(?P<pver>4\.9\.\d+).tar"
-
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-
-# Language Overrides
-FORTRAN = ""
-JAVA = ""
-
-LTO = "--enable-lto"
-
-EXTRA_OECONF_BASE = "\
- ${LTO} \
- --enable-libssp \
- --disable-bootstrap \
- --disable-libmudflap \
- --with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
- --enable-linker-build-id \
- --with-ppl=no \
- --with-cloog=no \
- --enable-checking=release \
- --enable-cheaders=c_global \
-"
-
-EXTRA_OECONF_INITIAL = "\
- --disable-libmudflap \
- --disable-libgomp \
- --disable-libssp \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no \
-"
-
-EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-
-EXTRA_OECONF_PATHS = "\
- --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
- --with-sysroot=/not/exist \
- --with-build-sysroot=${STAGING_DIR_TARGET} \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
deleted file mode 100644
index e58801167..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From bf3d96ae58fa180b8b468d25dc2e0209daca2751 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:37:11 +0400
-Subject: [PATCH 01/35] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- configure | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index d809535..1b76c90 100755
---- a/configure
-+++ b/configure
-@@ -7439,7 +7439,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
-diff --git a/configure.ac b/configure.ac
-index 48ec1aa..89d1d3f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2873,7 +2873,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
-
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
- *" newlib "*)
- case " $target_configargs " in
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0002-uclibc-conf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0002-uclibc-conf.patch
deleted file mode 100644
index dda3b1041..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0002-uclibc-conf.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From d030973c872c00d916921d84deee0af2c0d38081 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:38:25 +0400
-Subject: [PATCH 02/35] uclibc-conf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- contrib/regression/objs-gcc.sh | 4 ++++
- libjava/classpath/ltconfig | 4 ++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
-index 60b0497..6dc7ead 100755
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
-diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
-index 743d951..ae4ea60 100755
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
-
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- ;;
-
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0003-gcc-uclibc-locale-ctype_touplow_t.patch
deleted file mode 100644
index 7098e9950..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0003-gcc-uclibc-locale-ctype_touplow_t.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From d2d9dd756c4356d14dd7ae003856344cb4f37985 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:40:12 +0400
-Subject: [PATCH 03/35] gcc-uclibc-locale-ctype_touplow_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
- libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++
- libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++
- 3 files changed, 23 insertions(+)
-
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
-index 0d309a5..f2f1e1f 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.cc
-+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
-@@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
- #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
- #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
- extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
-+#ifdef __UCLIBC__
-+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
-+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
-+#else
- _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
-+#endif
- #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
-index b5fd989..3da9a5d 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -40,13 +40,22 @@
-
- #include <clocale>
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- #define _GLIBCXX_NUM_CATEGORIES 0
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
-+#ifdef __UCLIBC__
-+ typedef __ctype_touplow_t* __c_locale;
-+#else
- typedef int* __c_locale;
-+#endif
-
- // Convert numeric value of type double and long double to string and
- // return length of string. If vsnprintf is available use it, otherwise
-diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-index 2d8e978..14eb08f 100644
---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-@@ -33,6 +33,11 @@
-
- // Information as gleaned from /usr/include/ctype.h
-
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- struct ctype_base
- {
- // Non-standard typedefs.
-+#ifdef __UCLIBC__
-+ typedef const __ctype_touplow_t* __to_type;
-+#else
- typedef const int* __to_type;
-+#endif
-
- // NB: Offsets into ctype<char>::_M_table force a particular size
- // on the mask type. Because of this, we don't use an enum.
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0004-uclibc-locale.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0004-uclibc-locale.patch
deleted file mode 100644
index 49f5f338e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0004-uclibc-locale.patch
+++ /dev/null
@@ -1,2862 +0,0 @@
-From a55c751a449c2cbf0b3fcc07aab1b86bf9661510 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:41:39 +0400
-Subject: [PATCH 04/35] uclibc-locale
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/acinclude.m4 | 37 ++
- .../config/locale/uclibc/c++locale_internal.h | 63 ++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++
- .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++
- .../config/locale/uclibc/collate_members.cc | 80 +++
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++
- .../config/locale/uclibc/messages_members.cc | 100 +++
- .../config/locale/uclibc/messages_members.h | 118 ++++
- .../config/locale/uclibc/monetary_members.cc | 692 ++++++++++++++++++++
- .../config/locale/uclibc/numeric_members.cc | 160 +++++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++
- libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++
- libstdc++-v3/configure | 75 +++
- libstdc++-v3/include/c_compatibility/wchar.h | 2 +
- libstdc++-v3/include/c_std/cwchar | 2 +
- 16 files changed, 2688 insertions(+)
- create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
-
-diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
-index 0871a6a..326d7ef 100644
---- a/libstdc++-v3/acinclude.m4
-+++ b/libstdc++-v3/acinclude.m4
-@@ -1905,6 +1905,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -2069,6 +2072,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ AC_MSG_RESULT(uclibc)
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+ AC_SUBST(glibcxx_MOFILES)
-+ AC_SUBST(glibcxx_POFILES)
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-new file mode 100644
-index 0000000..2ae3e4a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -0,0 +1,63 @@
-+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-+
-+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+// Written by Jakub Jelinek <jakub@redhat.com>
-+
-+#include <bits/c++config.h>
-+#include <clocale>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning clean this up
-+#endif
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+
-+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
-+extern "C" __typeof(strcoll_l) __strcoll_l;
-+extern "C" __typeof(strftime_l) __strftime_l;
-+extern "C" __typeof(strtod_l) __strtod_l;
-+extern "C" __typeof(strtof_l) __strtof_l;
-+extern "C" __typeof(strtold_l) __strtold_l;
-+extern "C" __typeof(strxfrm_l) __strxfrm_l;
-+extern "C" __typeof(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+extern "C" __typeof(iswctype_l) __iswctype_l;
-+extern "C" __typeof(towlower_l) __towlower_l;
-+extern "C" __typeof(towupper_l) __towupper_l;
-+extern "C" __typeof(wcscoll_l) __wcscoll_l;
-+extern "C" __typeof(wcsftime_l) __wcsftime_l;
-+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
-+extern "C" __typeof(wctype_l) __wctype_l;
-+#endif
-+
-+#endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-new file mode 100644
-index 0000000..5081dc1
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -0,0 +1,160 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <cerrno> // For errno
-+#include <locale>
-+#include <stdexcept>
-+#include <langinfo.h>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
-+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
-+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
-+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
-+#define __strtof_l(S, E, L) strtof((S), (E))
-+#define __strtod_l(S, E, L) strtod((S), (E))
-+#define __strtold_l(S, E, L) strtold((S), (E))
-+#warning should dummy __newlocale check for C|POSIX ?
-+#define __newlocale(a, b, c) NULL
-+#define __freelocale(a) ((void)0)
-+#define __duplocale(a) __c_locale()
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ template<>
-+ void
-+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
-+ const __c_locale& __cloc)
-+ {
-+ if (!(__err & ios_base::failbit))
-+ {
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
-+ }
-+ }
-+
-+ void
-+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
-+ __c_locale __old)
-+ {
-+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ if (!__cloc)
-+ {
-+ // This named locale is not supported by the underlying OS.
-+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
-+ "name not valid"));
-+ }
-+#endif
-+ }
-+
-+ void
-+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-+ {
-+ if (_S_get_c_locale() != __cloc)
-+ __freelocale(__cloc);
-+ }
-+
-+ __c_locale
-+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-+ { return __duplocale(__cloc); }
-+} // namespace std
-+
-+namespace __gnu_cxx
-+{
-+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-+ {
-+ "LC_CTYPE",
-+ "LC_NUMERIC",
-+ "LC_TIME",
-+ "LC_COLLATE",
-+ "LC_MONETARY",
-+ "LC_MESSAGES",
-+#if _GLIBCXX_NUM_CATEGORIES != 0
-+ "LC_PAPER",
-+ "LC_NAME",
-+ "LC_ADDRESS",
-+ "LC_TELEPHONE",
-+ "LC_MEASUREMENT",
-+ "LC_IDENTIFICATION"
-+#endif
-+ };
-+}
-+
-+namespace std
-+{
-+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-+} // namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-new file mode 100644
-index 0000000..da07c1f
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -0,0 +1,117 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8 Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifndef _C_LOCALE_H
-+#define _C_LOCALE_H 1
-+
-+#pragma GCC system_header
-+
-+#include <cstring> // get std::strlen
-+#include <cstdio> // get std::snprintf or std::sprintf
-+#include <clocale>
-+#include <langinfo.h> // For codecvt
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC_HAS_LOCALE__
-+#include <iconv.h> // For codecvt using iconv, iconv_t
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#include <libintl.h> // For messages
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning what is _GLIBCXX_C_LOCALE_GNU for
-+#endif
-+#define _GLIBCXX_C_LOCALE_GNU 1
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix categories
-+#endif
-+// #define _GLIBCXX_NUM_CATEGORIES 6
-+#define _GLIBCXX_NUM_CATEGORIES 0
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+namespace __gnu_cxx
-+{
-+ extern "C" __typeof(uselocale) __uselocale;
-+}
-+#endif
-+
-+namespace std
-+{
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ typedef __locale_t __c_locale;
-+#else
-+ typedef int* __c_locale;
-+#endif
-+
-+ // Convert numeric value of type _Tv to string and return length of
-+ // string. If snprintf is available use it, otherwise fall back to
-+ // the unsafe sprintf which, in general, can be dangerous and should
-+ // be avoided.
-+ template<typename _Tv>
-+ int
-+ __convert_from_v(char* __out,
-+ const int __size __attribute__ ((__unused__)),
-+ const char* __fmt,
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ _Tv __v, const __c_locale& __cloc, int __prec)
-+ {
-+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
-+#else
-+ _Tv __v, const __c_locale&, int __prec)
-+ {
-+# ifdef __UCLIBC_HAS_LOCALE__
-+ char* __old = std::setlocale(LC_ALL, NULL);
-+ char* __sav = new char[std::strlen(__old) + 1];
-+ std::strcpy(__sav, __old);
-+ std::setlocale(LC_ALL, "C");
-+# endif
-+#endif
-+
-+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+ __gnu_cxx::__uselocale(__old);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ std::setlocale(LC_ALL, __sav);
-+ delete [] __sav;
-+#endif
-+ return __ret;
-+ }
-+}
-+
-+#endif
-diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-new file mode 100644
-index 0000000..64aa962
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-@@ -0,0 +1,308 @@
-+// std::codecvt implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <cstdlib> // For MB_CUR_MAX
-+#include <climits> // For MB_LEN_MAX
-+#include <bits/c++locale_internal.h>
-+
-+namespace std
-+{
-+ // Specializations.
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_out(state_type& __state, const intern_type* __from,
-+ const intern_type* __from_end, const intern_type*& __from_next,
-+ extern_type* __to, extern_type* __to_end,
-+ extern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
-+ // in case we fall back to wcrtomb and then continue, in a loop.
-+ // NB: wcsnrtombs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
-+ __from_end - __from_next);
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // wcrtomb.
-+ for (; __from < __from_next; ++__from)
-+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ extern_type __buf[MB_LEN_MAX];
-+ __tmp_state = __state;
-+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
-+ if (__conv > static_cast<size_t>(__to_end - __to_next))
-+ __ret = partial;
-+ else
-+ {
-+ memcpy(__to_next, __buf, __conv);
-+ __state = __tmp_state;
-+ __to_next += __conv;
-+ ++__from_next;
-+ }
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ codecvt_base::result
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_in(state_type& __state, const extern_type* __from,
-+ const extern_type* __from_end, const extern_type*& __from_next,
-+ intern_type* __to, intern_type* __to_end,
-+ intern_type*& __to_next) const
-+ {
-+ result __ret = ok;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we store a L'\0' and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+ for (__from_next = __from, __to_next = __to;
-+ __from_next < __from_end && __to_next < __to_end
-+ && __ret == ok;)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
-+ __from_end
-+ - __from_next));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __from_end;
-+
-+ __from = __from_next;
-+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
-+ __from_chunk_end - __from_next,
-+ __to_end - __to_next, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (;; ++__to_next, __from += __conv)
-+ {
-+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __from_next = __from;
-+ __state = __tmp_state;
-+ __ret = error;
-+ }
-+ else if (__from_next && __from_next < __from_chunk_end)
-+ {
-+ // It is unclear what to return in this case (see DR 382).
-+ __to_next += __conv;
-+ __ret = partial;
-+ }
-+ else
-+ {
-+ __from_next = __from_chunk_end;
-+ __to_next += __conv;
-+ }
-+
-+ if (__from_next < __from_end && __ret == ok)
-+ {
-+ if (__to_next < __to_end)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from_next;
-+ *__to_next++ = L'\0';
-+ }
-+ else
-+ __ret = partial;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_encoding() const throw()
-+ {
-+ // XXX This implementation assumes that the encoding is
-+ // stateless and is either single-byte or variable-width.
-+ int __ret = 0;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ if (MB_CUR_MAX == 1)
-+ __ret = 1;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_max_length() const throw()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+ // XXX Probably wrong for stateful encodings.
-+ int __ret = MB_CUR_MAX;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __ret;
-+ }
-+
-+ int
-+ codecvt<wchar_t, char, mbstate_t>::
-+ do_length(state_type& __state, const extern_type* __from,
-+ const extern_type* __end, size_t __max) const
-+ {
-+ int __ret = 0;
-+ state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+ // in case we advance past it and then continue, in a loop.
-+ // NB: mbsnrtowcs is a GNU extension
-+
-+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
-+ // its fourth parameter (it wouldn't with NULL as first parameter).
-+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
-+ * __max));
-+ while (__from < __end && __max)
-+ {
-+ const extern_type* __from_chunk_end;
-+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
-+ __end
-+ - __from));
-+ if (!__from_chunk_end)
-+ __from_chunk_end = __end;
-+
-+ const extern_type* __tmp_from = __from;
-+ size_t __conv = mbsnrtowcs(__to, &__from,
-+ __from_chunk_end - __from,
-+ __max, &__state);
-+ if (__conv == static_cast<size_t>(-1))
-+ {
-+ // In case of error, in order to stop at the exact place we
-+ // have to start again from the beginning with a series of
-+ // mbrtowc.
-+ for (__from = __tmp_from;; __from += __conv)
-+ {
-+ __conv = mbrtowc(NULL, __from, __end - __from,
-+ &__tmp_state);
-+ if (__conv == static_cast<size_t>(-1)
-+ || __conv == static_cast<size_t>(-2))
-+ break;
-+ }
-+ __state = __tmp_state;
-+ __ret += __from - __tmp_from;
-+ break;
-+ }
-+ if (!__from)
-+ __from = __from_chunk_end;
-+
-+ __ret += __from - __tmp_from;
-+ __max -= __conv;
-+
-+ if (__from < __end && __max)
-+ {
-+ // XXX Probably wrong for stateful encodings
-+ __tmp_state = __state;
-+ ++__from;
-+ ++__ret;
-+ --__max;
-+ }
-+ }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+
-+ return __ret;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-new file mode 100644
-index 0000000..c2664a7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -0,0 +1,80 @@
-+// std::collate implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+#endif
-+
-+namespace std
-+{
-+ // These are basically extensions to char_traits, and perhaps should
-+ // be put there instead of here.
-+ template<>
-+ int
-+ collate<char>::_M_compare(const char* __one, const char* __two) const
-+ {
-+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<char>::_M_transform(char* __to, const char* __from,
-+ size_t __n) const
-+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ int
-+ collate<wchar_t>::_M_compare(const wchar_t* __one,
-+ const wchar_t* __two) const
-+ {
-+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
-+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+ }
-+
-+ template<>
-+ size_t
-+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
-+ size_t __n) const
-+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-new file mode 100644
-index 0000000..7294e3a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -0,0 +1,300 @@
-+// std::ctype implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __wctype_l(S, L) wctype((S))
-+#define __towupper_l(C, L) towupper((C))
-+#define __towlower_l(C, L) towlower((C))
-+#define __iswctype_l(C, M, L) iswctype((C), (M))
-+#endif
-+
-+namespace std
-+{
-+ // NB: The other ctype<char> specializations are in src/locale.cc and
-+ // various /config/os/* files.
-+ template<>
-+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+ : ctype<char>(0, false, __refs)
-+ {
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
-+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
-+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
-+#endif
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ ctype<wchar_t>::__wmask_type
-+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
-+ {
-+ __wmask_type __ret;
-+ switch (__m)
-+ {
-+ case space:
-+ __ret = __wctype_l("space", _M_c_locale_ctype);
-+ break;
-+ case print:
-+ __ret = __wctype_l("print", _M_c_locale_ctype);
-+ break;
-+ case cntrl:
-+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
-+ break;
-+ case upper:
-+ __ret = __wctype_l("upper", _M_c_locale_ctype);
-+ break;
-+ case lower:
-+ __ret = __wctype_l("lower", _M_c_locale_ctype);
-+ break;
-+ case alpha:
-+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
-+ break;
-+ case digit:
-+ __ret = __wctype_l("digit", _M_c_locale_ctype);
-+ break;
-+ case punct:
-+ __ret = __wctype_l("punct", _M_c_locale_ctype);
-+ break;
-+ case xdigit:
-+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
-+ break;
-+ case alnum:
-+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
-+ break;
-+ case graph:
-+ __ret = __wctype_l("graph", _M_c_locale_ctype);
-+ break;
-+ default:
-+ __ret = __wmask_type();
-+ }
-+ return __ret;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_toupper(wchar_t __c) const
-+ { return __towupper_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::do_tolower(wchar_t __c) const
-+ { return __towlower_l(__c, _M_c_locale_ctype); }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
-+ ++__lo;
-+ }
-+ return __hi;
-+ }
-+
-+ bool
-+ ctype<wchar_t>::
-+ do_is(mask __m, wchar_t __c) const
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ bool __ret = false;
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur]
-+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ return __ret;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
-+ {
-+ for (; __lo < __hi; ++__vec, ++__lo)
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ mask __m = 0;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ __m |= _M_bit[__bitcur];
-+ *__vec = __m;
-+ }
-+ return __hi;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
-+ {
-+ while (__lo < __hi && !this->do_is(__m, *__lo))
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
-+ {
-+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
-+ ++__lo;
-+ return __lo;
-+ }
-+
-+ wchar_t
-+ ctype<wchar_t>::
-+ do_widen(char __c) const
-+ { return _M_widen[static_cast<unsigned char>(__c)]; }
-+
-+ const char*
-+ ctype<wchar_t>::
-+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
-+ {
-+ while (__lo < __hi)
-+ {
-+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
-+ ++__lo;
-+ ++__dest;
-+ }
-+ return __hi;
-+ }
-+
-+ char
-+ ctype<wchar_t>::
-+ do_narrow(wchar_t __wc, char __dfault) const
-+ {
-+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
-+ return _M_narrow[__wc];
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ const int __c = wctob(__wc);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+
-+ const wchar_t*
-+ ctype<wchar_t>::
-+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
-+ char* __dest) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ if (_M_narrow_ok)
-+ while (__lo < __hi)
-+ {
-+ if (*__lo >= 0 && *__lo < 128)
-+ *__dest = _M_narrow[*__lo];
-+ else
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ }
-+ ++__lo;
-+ ++__dest;
-+ }
-+ else
-+ while (__lo < __hi)
-+ {
-+ const int __c = wctob(*__lo);
-+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+ ++__lo;
-+ ++__dest;
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ return __hi;
-+ }
-+
-+ void
-+ ctype<wchar_t>::_M_initialize_ctype()
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+ wint_t __i;
-+ for (__i = 0; __i < 128; ++__i)
-+ {
-+ const int __c = wctob(__i);
-+ if (__c == EOF)
-+ break;
-+ else
-+ _M_narrow[__i] = static_cast<char>(__c);
-+ }
-+ if (__i == 128)
-+ _M_narrow_ok = true;
-+ else
-+ _M_narrow_ok = false;
-+ for (size_t __j = 0;
-+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
-+ _M_widen[__j] = btowc(__j);
-+
-+ for (size_t __k = 0; __k <= 11; ++__k)
-+ {
-+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
-+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
-+ }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#endif
-+ }
-+#endif // _GLIBCXX_USE_WCHAR_T
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-new file mode 100644
-index 0000000..13594d9
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -0,0 +1,100 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix gettext stuff
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__dcgettext(const char *domainname,
-+ const char *msgid, int category);
-+#undef gettext
-+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#else
-+#undef gettext
-+#define gettext(msgid) (msgid)
-+#endif
-+
-+namespace std
-+{
-+ // Specializations.
-+ template<>
-+ string
-+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
-+ __uselocale(__old);
-+ return string(__msg);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ const char* __msg = gettext(__dfault.c_str());
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return string(__msg);
-+#else
-+ const char* __msg = gettext(__dfault.c_str());
-+ return string(__msg);
-+#endif
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ wstring
-+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
-+ {
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(_M_c_locale_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ __uselocale(__old);
-+ return _M_convert_from_char(__msg);
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_messages);
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+ return _M_convert_from_char(__msg);
-+# else
-+ char* __msg = gettext(_M_convert_to_char(__dfault));
-+ return _M_convert_from_char(__msg);
-+# endif
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-new file mode 100644
-index 0000000..1424078
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -0,0 +1,118 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2 messages functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix prototypes for *textdomain funcs
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__textdomain(const char *domainname);
-+extern "C" char *__bindtextdomain(const char *domainname,
-+ const char *dirname);
-+#else
-+#undef __textdomain
-+#undef __bindtextdomain
-+#define __textdomain(D) ((void)0)
-+#define __bindtextdomain(D,P) ((void)0)
-+#endif
-+
-+ // Non-virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::messages(size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
-+ _M_name_messages(_S_get_c_name())
-+ { }
-+
-+ template<typename _CharT>
-+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-+ _M_name_messages(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_messages = __tmp;
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
-+ const char* __dir) const
-+ {
-+ __bindtextdomain(__s.c_str(), __dir);
-+ return this->do_open(__s, __loc);
-+ }
-+
-+ // Virtual member functions.
-+ template<typename _CharT>
-+ messages<_CharT>::~messages()
-+ {
-+ if (_M_name_messages != _S_get_c_name())
-+ delete [] _M_name_messages;
-+ _S_destroy_c_locale(_M_c_locale_messages);
-+ }
-+
-+ template<typename _CharT>
-+ typename messages<_CharT>::catalog
-+ messages<_CharT>::do_open(const basic_string<char>& __s,
-+ const locale&) const
-+ {
-+ // No error checking is done, assume the catalog exists and can
-+ // be used.
-+ __textdomain(__s.c_str());
-+ return 0;
-+ }
-+
-+ template<typename _CharT>
-+ void
-+ messages<_CharT>::do_close(catalog) const
-+ { }
-+
-+ // messages_byname
-+ template<typename _CharT>
-+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
-+ : messages<_CharT>(__refs)
-+ {
-+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
-+ delete [] this->_M_name_messages;
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ this->_M_name_messages = __tmp;
-+
-+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+ {
-+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
-+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
-+ }
-+ }
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-new file mode 100644
-index 0000000..aa52731
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -0,0 +1,692 @@
-+// std::moneypunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning optimize this for uclibc
-+#warning tailor for stub locale support
-+#endif
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ // Construct and return valid pattern consisting of some combination of:
-+ // space none symbol sign value
-+ money_base::pattern
-+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
-+ {
-+ pattern __ret;
-+
-+ // This insanely complicated routine attempts to construct a valid
-+ // pattern for use with monyepunct. A couple of invariants:
-+
-+ // if (__precedes) symbol -> value
-+ // else value -> symbol
-+
-+ // if (__space) space
-+ // else none
-+
-+ // none == never first
-+ // space never first or last
-+
-+ // Any elegant implementations of this are welcome.
-+ switch (__posn)
-+ {
-+ case 0:
-+ case 1:
-+ // 1 The sign precedes the value and symbol.
-+ __ret.field[0] = sign;
-+ if (__space)
-+ {
-+ // Pattern starts with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[3] = symbol;
-+ }
-+ __ret.field[2] = space;
-+ }
-+ else
-+ {
-+ // Pattern starts with sign and ends with none.
-+ if (__precedes)
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[1] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 2:
-+ // 2 The sign follows the value and symbol.
-+ if (__space)
-+ {
-+ // Pattern either ends with sign.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[2] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[2] = symbol;
-+ }
-+ __ret.field[1] = space;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ // Pattern ends with sign then none.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = value;
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ __ret.field[1] = symbol;
-+ }
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ break;
-+ case 3:
-+ // 3 The sign immediately precedes the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = sign;
-+ __ret.field[1] = symbol;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = symbol;
-+ }
-+ else
-+ {
-+ __ret.field[1] = sign;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ case 4:
-+ // 4 The sign immediately follows the symbol.
-+ if (__precedes)
-+ {
-+ __ret.field[0] = symbol;
-+ __ret.field[1] = sign;
-+ if (__space)
-+ {
-+ __ret.field[2] = space;
-+ __ret.field[3] = value;
-+ }
-+ else
-+ {
-+ __ret.field[2] = value;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ else
-+ {
-+ __ret.field[0] = value;
-+ if (__space)
-+ {
-+ __ret.field[1] = space;
-+ __ret.field[2] = symbol;
-+ __ret.field[3] = sign;
-+ }
-+ else
-+ {
-+ __ret.field[1] = symbol;
-+ __ret.field[2] = sign;
-+ __ret.field[3] = none;
-+ }
-+ }
-+ break;
-+ default:
-+ ;
-+ }
-+ return __ret;
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+ const char*)
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<char, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = "";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = "";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = "";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+ __cloc));
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = "()";
-+ else
-+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+ __cloc);
-+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+ // _Intl == false
-+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<char, true>::~moneypunct()
-+ { delete _M_data; }
-+
-+ template<>
-+ moneypunct<char, false>::~moneypunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, true>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+ __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ void
-+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const char*)
-+#else
-+ const char* __name)
-+#endif
-+ {
-+ if (!_M_data)
-+ _M_data = new __moneypunct_cache<wchar_t, false>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = 0;
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = 0;
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = 0;
-+ _M_data->_M_frac_digits = 0;
-+ _M_data->_M_pos_format = money_base::_S_default_pattern;
-+ _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+ _M_data->_M_atoms[__i] =
-+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __c_locale __old = __uselocale(__cloc);
-+#else
-+ // Switch to named locale so that mbsrtowcs will work.
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+
-+ wchar_t* __wcs_ps = 0;
-+ wchar_t* __wcs_ns = 0;
-+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+ try
-+ {
-+ mbstate_t __state;
-+ size_t __len;
-+ __len = strlen(__cpossign);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ps = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+ _M_data->_M_positive_sign = __wcs_ps;
-+ }
-+ else
-+ _M_data->_M_positive_sign = L"";
-+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+ __len = strlen(__cnegsign);
-+ if (!__nposn)
-+ _M_data->_M_negative_sign = L"()";
-+ else if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ __wcs_ns = new wchar_t[__len];
-+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+ _M_data->_M_negative_sign = __wcs_ns;
-+ }
-+ else
-+ _M_data->_M_negative_sign = L"";
-+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+ // _Intl == true.
-+ __len = strlen(__ccurr);
-+ if (__len)
-+ {
-+ ++__len;
-+ memset(&__state, 0, sizeof(mbstate_t));
-+ wchar_t* __wcs = new wchar_t[__len];
-+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+ _M_data->_M_curr_symbol = __wcs;
-+ }
-+ else
-+ _M_data->_M_curr_symbol = L"";
-+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+ }
-+ catch (...)
-+ {
-+ delete _M_data;
-+ _M_data = 0;
-+ delete __wcs_ps;
-+ delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ __throw_exception_again;
-+ }
-+
-+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+ __pposn);
-+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+ __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __uselocale(__old);
-+#else
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ }
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, true>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+
-+ template<>
-+ moneypunct<wchar_t, false>::~moneypunct()
-+ {
-+ if (_M_data->_M_positive_sign_size)
-+ delete [] _M_data->_M_positive_sign;
-+ if (_M_data->_M_negative_sign_size
-+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+ delete [] _M_data->_M_negative_sign;
-+ if (_M_data->_M_curr_symbol_size)
-+ delete [] _M_data->_M_curr_symbol;
-+ delete _M_data;
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-new file mode 100644
-index 0000000..883ec1a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -0,0 +1,160 @@
-+// std::numpunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = '.';
-+ _M_data->_M_thousands_sep = ',';
-+
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
-+ }
-+ else
-+ {
-+ // Named locale.
-+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
-+ __cloc));
-+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
-+ __cloc));
-+
-+ // Check for NULL, which implies no grouping.
-+ if (_M_data->_M_thousands_sep == '\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = "true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = "false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<char>::~numpunct()
-+ { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __numpunct_cache<wchar_t>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_data->_M_grouping = "";
-+ _M_data->_M_grouping_size = 0;
-+ _M_data->_M_use_grouping = false;
-+
-+ _M_data->_M_decimal_point = L'.';
-+ _M_data->_M_thousands_sep = L',';
-+
-+ // Use ctype::widen code without the facet...
-+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+ _M_data->_M_atoms_out[__i] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
-+
-+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+ _M_data->_M_atoms_in[__j] =
-+ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
-+ }
-+ else
-+ {
-+ // Named locale.
-+ // NB: In the GNU model wchar_t is always 32 bit wide.
-+ union { char *__s; wchar_t __w; } __u;
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
-+ _M_data->_M_decimal_point = __u.__w;
-+
-+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
-+ _M_data->_M_thousands_sep = __u.__w;
-+
-+ if (_M_data->_M_thousands_sep == L'\0')
-+ _M_data->_M_grouping = "";
-+ else
-+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+ }
-+
-+ // NB: There is no way to extact this info from posix locales.
-+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+ _M_data->_M_truename = L"true";
-+ _M_data->_M_truename_size = 4;
-+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+ _M_data->_M_falsename = L"false";
-+ _M_data->_M_falsename_size = 5;
-+ }
-+
-+ template<>
-+ numpunct<wchar_t>::~numpunct()
-+ { delete _M_data; }
-+ #endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-new file mode 100644
-index 0000000..e0707d7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -0,0 +1,406 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L) nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+ template<>
-+ void
-+ __timepunct<char>::
-+ _M_put(char* __s, size_t __maxlen, const char* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = '\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<char>;
-+
-+ if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = "%m/%d/%y";
-+ _M_data->_M_date_era_format = "%m/%d/%y";
-+ _M_data->_M_time_format = "%H:%M:%S";
-+ _M_data->_M_time_era_format = "%H:%M:%S";
-+ _M_data->_M_date_time_format = "";
-+ _M_data->_M_date_time_era_format = "";
-+ _M_data->_M_am = "AM";
-+ _M_data->_M_pm = "PM";
-+ _M_data->_M_am_pm_format = "";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = "Sunday";
-+ _M_data->_M_day2 = "Monday";
-+ _M_data->_M_day3 = "Tuesday";
-+ _M_data->_M_day4 = "Wednesday";
-+ _M_data->_M_day5 = "Thursday";
-+ _M_data->_M_day6 = "Friday";
-+ _M_data->_M_day7 = "Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = "Sun";
-+ _M_data->_M_aday2 = "Mon";
-+ _M_data->_M_aday3 = "Tue";
-+ _M_data->_M_aday4 = "Wed";
-+ _M_data->_M_aday5 = "Thu";
-+ _M_data->_M_aday6 = "Fri";
-+ _M_data->_M_aday7 = "Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = "January";
-+ _M_data->_M_month02 = "February";
-+ _M_data->_M_month03 = "March";
-+ _M_data->_M_month04 = "April";
-+ _M_data->_M_month05 = "May";
-+ _M_data->_M_month06 = "June";
-+ _M_data->_M_month07 = "July";
-+ _M_data->_M_month08 = "August";
-+ _M_data->_M_month09 = "September";
-+ _M_data->_M_month10 = "October";
-+ _M_data->_M_month11 = "November";
-+ _M_data->_M_month12 = "December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = "Jan";
-+ _M_data->_M_amonth02 = "Feb";
-+ _M_data->_M_amonth03 = "Mar";
-+ _M_data->_M_amonth04 = "Apr";
-+ _M_data->_M_amonth05 = "May";
-+ _M_data->_M_amonth06 = "Jun";
-+ _M_data->_M_amonth07 = "Jul";
-+ _M_data->_M_amonth08 = "Aug";
-+ _M_data->_M_amonth09 = "Sep";
-+ _M_data->_M_amonth10 = "Oct";
-+ _M_data->_M_amonth11 = "Nov";
-+ _M_data->_M_amonth12 = "Dec";
-+ }
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
-+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
-+ __cloc);
-+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
-+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
-+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
-+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
-+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
-+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
-+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
-+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
-+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
-+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
-+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
-+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
-+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
-+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
-+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
-+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
-+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
-+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
-+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
-+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
-+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
-+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
-+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
-+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
-+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
-+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
-+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
-+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
-+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
-+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
-+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
-+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
-+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
-+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
-+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
-+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
-+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
-+ }
-+ }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+ template<>
-+ void
-+ __timepunct<wchar_t>::
-+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
-+ const tm* __tm) const
-+ {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
-+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
-+ _M_c_locale_timepunct);
-+#else
-+ char* __old = strdup(setlocale(LC_ALL, NULL));
-+ setlocale(LC_ALL, _M_name_timepunct);
-+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-+ setlocale(LC_ALL, __old);
-+ free(__old);
-+#endif
-+ // Make sure __s is null terminated.
-+ if (__len == 0)
-+ __s[0] = L'\0';
-+ }
-+
-+ template<>
-+ void
-+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
-+ {
-+ if (!_M_data)
-+ _M_data = new __timepunct_cache<wchar_t>;
-+
-+#warning wide time stuff
-+// if (!__cloc)
-+ {
-+ // "C" locale
-+ _M_c_locale_timepunct = _S_get_c_locale();
-+
-+ _M_data->_M_date_format = L"%m/%d/%y";
-+ _M_data->_M_date_era_format = L"%m/%d/%y";
-+ _M_data->_M_time_format = L"%H:%M:%S";
-+ _M_data->_M_time_era_format = L"%H:%M:%S";
-+ _M_data->_M_date_time_format = L"";
-+ _M_data->_M_date_time_era_format = L"";
-+ _M_data->_M_am = L"AM";
-+ _M_data->_M_pm = L"PM";
-+ _M_data->_M_am_pm_format = L"";
-+
-+ // Day names, starting with "C"'s Sunday.
-+ _M_data->_M_day1 = L"Sunday";
-+ _M_data->_M_day2 = L"Monday";
-+ _M_data->_M_day3 = L"Tuesday";
-+ _M_data->_M_day4 = L"Wednesday";
-+ _M_data->_M_day5 = L"Thursday";
-+ _M_data->_M_day6 = L"Friday";
-+ _M_data->_M_day7 = L"Saturday";
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ _M_data->_M_aday1 = L"Sun";
-+ _M_data->_M_aday2 = L"Mon";
-+ _M_data->_M_aday3 = L"Tue";
-+ _M_data->_M_aday4 = L"Wed";
-+ _M_data->_M_aday5 = L"Thu";
-+ _M_data->_M_aday6 = L"Fri";
-+ _M_data->_M_aday7 = L"Sat";
-+
-+ // Month names, starting with "C"'s January.
-+ _M_data->_M_month01 = L"January";
-+ _M_data->_M_month02 = L"February";
-+ _M_data->_M_month03 = L"March";
-+ _M_data->_M_month04 = L"April";
-+ _M_data->_M_month05 = L"May";
-+ _M_data->_M_month06 = L"June";
-+ _M_data->_M_month07 = L"July";
-+ _M_data->_M_month08 = L"August";
-+ _M_data->_M_month09 = L"September";
-+ _M_data->_M_month10 = L"October";
-+ _M_data->_M_month11 = L"November";
-+ _M_data->_M_month12 = L"December";
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ _M_data->_M_amonth01 = L"Jan";
-+ _M_data->_M_amonth02 = L"Feb";
-+ _M_data->_M_amonth03 = L"Mar";
-+ _M_data->_M_amonth04 = L"Apr";
-+ _M_data->_M_amonth05 = L"May";
-+ _M_data->_M_amonth06 = L"Jun";
-+ _M_data->_M_amonth07 = L"Jul";
-+ _M_data->_M_amonth08 = L"Aug";
-+ _M_data->_M_amonth09 = L"Sep";
-+ _M_data->_M_amonth10 = L"Oct";
-+ _M_data->_M_amonth11 = L"Nov";
-+ _M_data->_M_amonth12 = L"Dec";
-+ }
-+#if 0
-+ else
-+ {
-+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+ union { char *__s; wchar_t *__w; } __u;
-+
-+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
-+ _M_data->_M_date_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
-+ _M_data->_M_date_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
-+ _M_data->_M_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
-+ _M_data->_M_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
-+ _M_data->_M_date_time_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
-+ _M_data->_M_date_time_era_format = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
-+ _M_data->_M_am = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
-+ _M_data->_M_pm = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
-+ _M_data->_M_am_pm_format = __u.__w;
-+
-+ // Day names, starting with "C"'s Sunday.
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
-+ _M_data->_M_day1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
-+ _M_data->_M_day2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
-+ _M_data->_M_day3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
-+ _M_data->_M_day4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
-+ _M_data->_M_day5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
-+ _M_data->_M_day6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
-+ _M_data->_M_day7 = __u.__w;
-+
-+ // Abbreviated day names, starting with "C"'s Sun.
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
-+ _M_data->_M_aday1 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
-+ _M_data->_M_aday2 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
-+ _M_data->_M_aday3 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
-+ _M_data->_M_aday4 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
-+ _M_data->_M_aday5 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
-+ _M_data->_M_aday6 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
-+ _M_data->_M_aday7 = __u.__w;
-+
-+ // Month names, starting with "C"'s January.
-+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
-+ _M_data->_M_month01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
-+ _M_data->_M_month02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
-+ _M_data->_M_month03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
-+ _M_data->_M_month04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
-+ _M_data->_M_month05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
-+ _M_data->_M_month06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
-+ _M_data->_M_month07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
-+ _M_data->_M_month08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
-+ _M_data->_M_month09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
-+ _M_data->_M_month10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
-+ _M_data->_M_month11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
-+ _M_data->_M_month12 = __u.__w;
-+
-+ // Abbreviated month names, starting with "C"'s Jan.
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
-+ _M_data->_M_amonth01 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
-+ _M_data->_M_amonth02 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
-+ _M_data->_M_amonth03 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
-+ _M_data->_M_amonth04 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
-+ _M_data->_M_amonth05 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
-+ _M_data->_M_amonth06 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
-+ _M_data->_M_amonth07 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
-+ _M_data->_M_amonth08 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
-+ _M_data->_M_amonth09 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
-+ _M_data->_M_amonth10 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
-+ _M_data->_M_amonth11 = __u.__w;
-+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
-+ _M_data->_M_amonth12 = __u.__w;
-+ }
-+#endif // 0
-+ }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-new file mode 100644
-index 0000000..ba8e858
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -0,0 +1,68 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library. This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING. If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction. Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License. This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
-+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(_S_get_c_name())
-+ { _M_initialize_timepunct(); }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
-+ size_t __refs)
-+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+ _M_name_timepunct(__s)
-+ {
-+ char* __tmp = new char[std::strlen(__s) + 1];
-+ std::strcpy(__tmp, __s);
-+ _M_name_timepunct = __tmp;
-+ _M_initialize_timepunct(__cloc);
-+ }
-+
-+ template<typename _CharT>
-+ __timepunct<_CharT>::~__timepunct()
-+ {
-+ if (_M_name_timepunct != _S_get_c_name())
-+ delete [] _M_name_timepunct;
-+ delete _M_data;
-+ _S_destroy_c_locale(_M_c_locale_timepunct);
-+ }
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index f40ddcf..c57a751 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -15822,6 +15822,9 @@ fi
- # Default to "generic".
- if test $enable_clocale_flag = auto; then
- case ${target_os} in
-+ *-uclibc*)
-+ enable_clocale_flag=uclibc
-+ ;;
- linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- enable_clocale_flag=gnu
- ;;
-@@ -16079,6 +16082,78 @@ $as_echo "newlib" >&6; }
- CTIME_CC=config/locale/generic/time_members.cc
- CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
- ;;
-+ uclibc)
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5
-+$as_echo "uclibc" >&6; }
-+
-+ # Declare intention to use gettext, and add support for specific
-+ # languages.
-+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+ ALL_LINGUAS="de fr"
-+
-+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+ # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_check_msgfmt+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -n "$check_msgfmt"; then
-+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+ ac_cv_prog_check_msgfmt="yes"
-+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+ done
-+IFS=$as_save_IFS
-+
-+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
-+fi
-+fi
-+check_msgfmt=$ac_cv_prog_check_msgfmt
-+if test -n "$check_msgfmt"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5
-+$as_echo "$check_msgfmt" >&6; }
-+else
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+ USE_NLS=yes
-+ fi
-+ # Export the build objects.
-+ for ling in $ALL_LINGUAS; do \
-+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+ done
-+
-+
-+
-+ CLOCALE_H=config/locale/uclibc/c_locale.h
-+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+ CMESSAGES_H=config/locale/uclibc/messages_members.h
-+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+ CTIME_H=config/locale/uclibc/time_members.h
-+ CTIME_CC=config/locale/uclibc/time_members.cc
-+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+ ;;
- esac
-
- # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
-index 580d725..3fe61b8 100644
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -101,7 +101,9 @@ using std::wmemcmp;
- using std::wmemcpy;
- using std::wmemmove;
- using std::wmemset;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using std::wcsftime;
-+#endif
-
- #if _GLIBCXX_USE_C99
- using std::wcstold;
-diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
-index 0e6b1fc..405aee2 100644
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- using ::wcscoll;
- using ::wcscpy;
- using ::wcscspn;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using ::wcsftime;
-+#endif
- using ::wcslen;
- using ::wcsncat;
- using ::wcsncmp;
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0005-uclibc-locale-no__x.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0005-uclibc-locale-no__x.patch
deleted file mode 100644
index dcbbfe454..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0005-uclibc-locale-no__x.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From 6a3e8506a12c12728d8b29901defd738be43757f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:42:36 +0400
-Subject: [PATCH 05/35] uclibc-locale-no__x
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 ------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 1 +
- .../config/locale/uclibc/collate_members.cc | 7 ---
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 ---
- .../config/locale/uclibc/messages_members.cc | 7 +--
- .../config/locale/uclibc/messages_members.h | 18 +++-----
- .../config/locale/uclibc/monetary_members.cc | 4 --
- .../config/locale/uclibc/numeric_members.cc | 3 --
- libstdc++-v3/config/locale/uclibc/time_members.cc | 3 --
- 10 files changed, 55 insertions(+), 54 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index 2ae3e4a..e74fddf 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
- extern "C" __typeof(wctype_l) __wctype_l;
- #endif
-
-+# define __nl_langinfo_l nl_langinfo_l
-+# define __strcoll_l strcoll_l
-+# define __strftime_l strftime_l
-+# define __strtod_l strtod_l
-+# define __strtof_l strtof_l
-+# define __strtold_l strtold_l
-+# define __strxfrm_l strxfrm_l
-+# define __newlocale newlocale
-+# define __freelocale freelocale
-+# define __duplocale duplocale
-+# define __uselocale uselocale
-+
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l iswctype_l
-+# define __towlower_l towlower_l
-+# define __towupper_l towupper_l
-+# define __wcscoll_l wcscoll_l
-+# define __wcsftime_l wcsftime_l
-+# define __wcsxfrm_l wcsxfrm_l
-+# define __wctype_l wctype_l
-+# endif
-+
-+#else
-+# define __nl_langinfo_l(N, L) nl_langinfo((N))
-+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
-+# define __strtod_l(S, E, L) strtod((S), (E))
-+# define __strtof_l(S, E, L) strtof((S), (E))
-+# define __strtold_l(S, E, L) strtold((S), (E))
-+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
-+# warning should dummy __newlocale check for C|POSIX ?
-+# define __newlocale(a, b, c) NULL
-+# define __freelocale(a) ((void)0)
-+# define __duplocale(a) __c_locale()
-+//# define __uselocale ?
-+//
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+# define __iswctype_l(C, M, L) iswctype((C), (M))
-+# define __towlower_l(C, L) towlower((C))
-+# define __towupper_l(C, L) towupper((C))
-+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
-+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
-+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
-+# define __wctype_l(S, L) wctype((S))
-+# endif
-+
- #endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 5081dc1..21430d0 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,20 +39,6 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
--#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
--#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
--#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
--#define __strtof_l(S, E, L) strtof((S), (E))
--#define __strtod_l(S, E, L) strtod((S), (E))
--#define __strtold_l(S, E, L) strtold((S), (E))
--#warning should dummy __newlocale check for C|POSIX ?
--#define __newlocale(a, b, c) NULL
--#define __freelocale(a) ((void)0)
--#define __duplocale(a) __c_locale()
--#endif
--
- namespace std
- {
- template<>
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index da07c1f..4bca5f1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -68,6 +68,7 @@ namespace __gnu_cxx
- {
- extern "C" __typeof(uselocale) __uselocale;
- }
-+#define __uselocale uselocale
- #endif
-
- namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-index c2664a7..ec5c329 100644
---- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -36,13 +36,6 @@
- #include <locale>
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
--#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
--#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
--#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
--#endif
--
- namespace std
- {
- // These are basically extensions to char_traits, and perhaps should
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7294e3a..7b12861 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -38,13 +38,6 @@
- #undef _LIBC
- #include <bits/c++locale_internal.h>
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __wctype_l(S, L) wctype((S))
--#define __towupper_l(C, L) towupper((C))
--#define __towlower_l(C, L) towlower((C))
--#define __iswctype_l(C, M, L) iswctype((C), (M))
--#endif
--
- namespace std
- {
- // NB: The other ctype<char> specializations are in src/locale.cc and
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-index 13594d9..d7693b4 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -39,13 +39,10 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix gettext stuff
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__dcgettext(const char *domainname,
-- const char *msgid, int category);
- #undef gettext
--#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
- #else
--#undef gettext
- #define gettext(msgid) (msgid)
- #endif
-
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index 1424078..d89da33 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -36,15 +36,11 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix prototypes for *textdomain funcs
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__textdomain(const char *domainname);
--extern "C" char *__bindtextdomain(const char *domainname,
-- const char *dirname);
--#else
--#undef __textdomain
--#undef __bindtextdomain
--#define __textdomain(D) ((void)0)
--#define __bindtextdomain(D,P) ((void)0)
-+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#undef textdomain
-+#undef bindtextdomain
-+#define textdomain(D) ((void)0)
-+#define bindtextdomain(D,P) ((void)0)
- #endif
-
- // Non-virtual member functions.
-@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
- const char* __dir) const
- {
-- __bindtextdomain(__s.c_str(), __dir);
-+ bindtextdomain(__s.c_str(), __dir);
- return this->do_open(__s, __loc);
- }
-
-@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
- {
- // No error checking is done, assume the catalog exists and can
- // be used.
-- __textdomain(__s.c_str());
-+ textdomain(__s.c_str());
- return 0;
- }
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index aa52731..2e6f80a 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -43,10 +43,6 @@
- #warning tailor for stub locale support
- #endif
-
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
--
- namespace std
- {
- // Construct and return valid pattern consisting of some combination of:
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 883ec1a..2c70642 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -41,9 +41,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index e0707d7..d848ed5 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -40,9 +40,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L) nl_langinfo((N))
--#endif
-
- namespace std
- {
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0006-uclibc-locale-wchar_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0006-uclibc-locale-wchar_fix.patch
deleted file mode 100644
index 3406859e1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0006-uclibc-locale-wchar_fix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 225511a3aeb193a916b3999f0b640a392caa67cd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:45:57 +0400
-Subject: [PATCH 06/35] uclibc-locale-wchar_fix
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++--
- libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 2e6f80a..31ebb9f 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -401,7 +401,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-@@ -556,7 +556,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 2c70642..d5c8961 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -127,12 +127,25 @@ namespace std
- {
- // Named locale.
- // NB: In the GNU model wchar_t is always 32 bit wide.
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be numeric
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
- union { char *__s; wchar_t __w; } __u;
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
- _M_data->_M_decimal_point = __u.__w;
-
- __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
- _M_data->_M_thousands_sep = __u.__w;
-+#endif
-
- if (_M_data->_M_thousands_sep == L'\0')
- _M_data->_M_grouping = "";
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0007-uclibc-locale-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0007-uclibc-locale-update.patch
deleted file mode 100644
index 58511233d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0007-uclibc-locale-update.patch
+++ /dev/null
@@ -1,542 +0,0 @@
-From 6ffe7c46f52d27864c3df3663e16ec9ddee71e8f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:46:58 +0400
-Subject: [PATCH 07/35] uclibc-locale-update
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h | 3 +
- libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 +++++++++-----------
- libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++-----
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 ++++++++++----
- .../config/locale/uclibc/messages_members.h | 12 ++--
- .../config/locale/uclibc/monetary_members.cc | 34 +++++----
- .../config/locale/uclibc/numeric_members.cc | 5 ++
- libstdc++-v3/config/locale/uclibc/time_members.cc | 18 +++--
- libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++--
- 9 files changed, 158 insertions(+), 98 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index e74fddf..971a6b4 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -31,6 +31,9 @@
-
- #include <bits/c++config.h>
- #include <clocale>
-+#include <cstdlib>
-+#include <cstring>
-+#include <cstddef>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning clean this up
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 21430d0..1b9d8e1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,23 +39,20 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- template<>
- void
- __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- float __f = __strtof_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __f;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ float __f = __strtof_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __f;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -63,16 +60,13 @@ namespace std
- __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- double __d = __strtod_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __d;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ double __d = __strtod_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __d;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- template<>
-@@ -80,16 +74,13 @@ namespace std
- __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
- const __c_locale& __cloc)
- {
-- if (!(__err & ios_base::failbit))
-- {
-- char* __sanity;
-- errno = 0;
-- long double __ld = __strtold_l(__s, &__sanity, __cloc);
-- if (__sanity != __s && errno != ERANGE)
-- __v = __ld;
-- else
-- __err |= ios_base::failbit;
-- }
-+ char* __sanity;
-+ errno = 0;
-+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+ if (__sanity != __s && errno != ERANGE)
-+ __v = __ld;
-+ else
-+ __err |= ios_base::failbit;
- }
-
- void
-@@ -110,17 +101,18 @@ namespace std
- void
- locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
- {
-- if (_S_get_c_locale() != __cloc)
-+ if (__cloc && _S_get_c_locale() != __cloc)
- __freelocale(__cloc);
- }
-
- __c_locale
- locale::facet::_S_clone_c_locale(__c_locale& __cloc)
- { return __duplocale(__cloc); }
--} // namespace std
-
--namespace __gnu_cxx
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-+
- const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
- {
- "LC_CTYPE",
-@@ -138,9 +130,11 @@ namespace __gnu_cxx
- "LC_IDENTIFICATION"
- #endif
- };
--}
-
--namespace std
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- const char* const* const locale::_S_categories = __gnu_cxx::category_names;
--} // namespace std
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index 4bca5f1..64a6d46 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -39,21 +39,23 @@
- #pragma GCC system_header
-
- #include <cstring> // get std::strlen
--#include <cstdio> // get std::snprintf or std::sprintf
-+#include <cstdio> // get std::vsnprintf or std::vsprintf
- #include <clocale>
- #include <langinfo.h> // For codecvt
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix this
- #endif
--#ifdef __UCLIBC_HAS_LOCALE__
-+#ifdef _GLIBCXX_USE_ICONV
- #include <iconv.h> // For codecvt using iconv, iconv_t
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--#include <libintl.h> // For messages
-+#ifdef HAVE_LIBINTL_H
-+#include <libintl.h> // For messages
- #endif
-+#include <cstdarg>
-
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning what is _GLIBCXX_C_LOCALE_GNU for
-+// psm: used in os/gnu-linux/ctype_noninline.h
- #endif
- #define _GLIBCXX_C_LOCALE_GNU 1
-
-@@ -78,23 +80,25 @@ namespace std
- #else
- typedef int* __c_locale;
- #endif
--
-- // Convert numeric value of type _Tv to string and return length of
-- // string. If snprintf is available use it, otherwise fall back to
-- // the unsafe sprintf which, in general, can be dangerous and should
-+ // Convert numeric value of type double to string and return length of
-+ // string. If vsnprintf is available use it, otherwise fall back to
-+ // the unsafe vsprintf which, in general, can be dangerous and should
- // be avoided.
-- template<typename _Tv>
-- int
-- __convert_from_v(char* __out,
-- const int __size __attribute__ ((__unused__)),
-- const char* __fmt,
--#ifdef __UCLIBC_HAS_XCLOCALE__
-- _Tv __v, const __c_locale& __cloc, int __prec)
-+ inline int
-+ __convert_from_v(const __c_locale&
-+#ifndef __UCLIBC_HAS_XCLOCALE__
-+ __cloc __attribute__ ((__unused__))
-+#endif
-+ ,
-+ char* __out,
-+ const int __size,
-+ const char* __fmt, ...)
- {
-+ va_list __args;
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+
- __c_locale __old = __gnu_cxx::__uselocale(__cloc);
- #else
-- _Tv __v, const __c_locale&, int __prec)
-- {
- # ifdef __UCLIBC_HAS_LOCALE__
- char* __old = std::setlocale(LC_ALL, NULL);
- char* __sav = new char[std::strlen(__old) + 1];
-@@ -103,7 +107,9 @@ namespace std
- # endif
- #endif
-
-- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+ va_start(__args, __fmt);
-+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
-+ va_end(__args);
-
- #ifdef __UCLIBC_HAS_XCLOCALE__
- __gnu_cxx::__uselocale(__old);
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7b12861..13e011d 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -33,16 +33,20 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
- // NB: The other ctype<char> specializations are in src/locale.cc and
- // various /config/os/* files.
-- template<>
- ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
- : ctype<char>(0, false, __refs)
- {
-@@ -57,6 +61,8 @@ namespace std
- #endif
- }
- }
-+ ctype_byname<char>::~ctype_byname()
-+ { }
-
- #ifdef _GLIBCXX_USE_WCHAR_T
- ctype<wchar_t>::__wmask_type
-@@ -138,17 +144,33 @@ namespace std
- ctype<wchar_t>::
- do_is(mask __m, wchar_t __c) const
- {
-- // Highest bitmask in ctype_base == 10, but extra in "C"
-- // library for blank.
-+ // The case of __m == ctype_base::space is particularly important,
-+ // due to its use in many istream functions. Therefore we deal with
-+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
-+ // is the mask corresponding to ctype_base::space. NB: an encoding
-+ // change would not affect correctness!
-+
- bool __ret = false;
-- const size_t __bitmasksize = 11;
-- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-- if (__m & _M_bit[__bitcur]
-- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-- {
-- __ret = true;
-- break;
-- }
-+ if (__m == _M_bit[5])
-+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
-+ else
-+ {
-+ // Highest bitmask in ctype_base == 10, but extra in "C"
-+ // library for blank.
-+ const size_t __bitmasksize = 11;
-+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+ if (__m & _M_bit[__bitcur])
-+ {
-+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+ {
-+ __ret = true;
-+ break;
-+ }
-+ else if (__m == _M_bit[__bitcur])
-+ break;
-+ }
-+ }
-+
- return __ret;
- }
-
-@@ -290,4 +312,5 @@ namespace std
- #endif
- }
- #endif // _GLIBCXX_USE_WCHAR_T
--}
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index d89da33..067657a 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -53,12 +53,16 @@
- template<typename _CharT>
- messages<_CharT>::messages(__c_locale __cloc, const char* __s,
- size_t __refs)
-- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-- _M_name_messages(__s)
-+ : facet(__refs), _M_c_locale_messages(NULL),
-+ _M_name_messages(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_messages = __tmp;
-+
-+ // Last to avoid leaking memory if new throws.
-+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
- }
-
- template<typename _CharT>
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 31ebb9f..7679b9c 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -206,7 +211,7 @@ namespace std
- }
- break;
- default:
-- ;
-+ __ret = pattern();
- }
- return __ret;
- }
-@@ -390,7 +395,9 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
- setlocale(LC_ALL, __name);
- #endif
-
-@@ -477,8 +484,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -498,8 +505,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-@@ -545,8 +552,11 @@ namespace std
- __c_locale __old = __uselocale(__cloc);
- #else
- // Switch to named locale so that mbsrtowcs will work.
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-- setlocale(LC_ALL, __name);
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
-+ setlocale(LC_ALL, __name);
- #endif
-
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -633,8 +643,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- __throw_exception_again;
- }
-@@ -653,8 +663,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- __uselocale(__old);
- #else
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- }
- }
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index d5c8961..8ae8969 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -33,9 +33,14 @@
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
-
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
-
- #ifdef __UCLIBC_MJN3_ONLY__
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index d848ed5..f24d53e 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -53,11 +53,14 @@ namespace std
- const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = strftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-@@ -207,11 +210,14 @@ namespace std
- const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
- _M_c_locale_timepunct);
- #else
-- char* __old = strdup(setlocale(LC_ALL, NULL));
-+ char* __old = setlocale(LC_ALL, NULL);
-+ const size_t __llen = strlen(__old) + 1;
-+ char* __sav = new char[__llen];
-+ memcpy(__sav, __old, __llen);
- setlocale(LC_ALL, _M_name_timepunct);
- const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-- setlocale(LC_ALL, __old);
-- free(__old);
-+ setlocale(LC_ALL, __sav);
-+ delete [] __sav;
- #endif
- // Make sure __s is null terminated.
- if (__len == 0)
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-index ba8e858..1665dde 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -50,12 +50,21 @@
- __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
- size_t __refs)
- : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-- _M_name_timepunct(__s)
-+ _M_name_timepunct(NULL)
- {
-- char* __tmp = new char[std::strlen(__s) + 1];
-- std::strcpy(__tmp, __s);
-+ const size_t __len = std::strlen(__s) + 1;
-+ char* __tmp = new char[__len];
-+ std::memcpy(__tmp, __s, __len);
- _M_name_timepunct = __tmp;
-- _M_initialize_timepunct(__cloc);
-+
-+ try
-+ { _M_initialize_timepunct(__cloc); }
-+ catch(...)
-+ {
-+ delete [] _M_name_timepunct;
-+ __throw_exception_again;
-+ }
-+
- }
-
- template<typename _CharT>
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0008-missing-execinfo_h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0008-missing-execinfo_h.patch
deleted file mode 100644
index 282380934..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0008-missing-execinfo_h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 9f2158451981cf0a80cfabdc79ae31bb6976a801 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:48:10 +0400
-Subject: [PATCH 08/35] missing-execinfo_h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- boehm-gc/include/gc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
-index c51e017..a7ba8dc 100644
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0009-c99-snprintf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0009-c99-snprintf.patch
deleted file mode 100644
index 7168778df..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0009-c99-snprintf.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From e393e076f1ab82d25e1aa04d6edea27b41d3eb06 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:03 +0400
-Subject: [PATCH 09/35] c99-snprintf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/c_std/cstdio | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
-index e85bd83..6af839a 100644
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -139,7 +139,7 @@ namespace std
- using ::vsprintf;
- } // namespace std
-
--#if _GLIBCXX_USE_C99
-+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0010-c99-complex-ugly-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0010-c99-complex-ugly-hack.patch
deleted file mode 100644
index b628571e5..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0010-c99-complex-ugly-hack.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 73f69d806e2c9561a54995223431a1076cfd6164 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:57 +0400
-Subject: [PATCH 10/35] c99-complex-ugly-hack
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libstdc++-v3/configure | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index c57a751..a1333e2 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -18734,6 +18734,9 @@ $as_echo_n "checking for ISO C99 support to TR1 in <complex.h>... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <complex.h>
-+#ifdef __UCLIBC__
-+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
-+#endif
- int
- main ()
- {
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0011-index_macro.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0011-index_macro.patch
deleted file mode 100644
index 8ee79b09b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0011-index_macro.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From b037953e40312b45ab84ed0a3ad882bb5e413101 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:51:02 +0400
-Subject: [PATCH 11/35] index_macro
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/ext/rope | 3 +++
- libstdc++-v3/include/ext/ropeimpl.h | 3 +++
- 2 files changed, 6 insertions(+)
-
-diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope
-index 38eb1e8..158d21a 100644
---- a/libstdc++-v3/include/ext/rope
-+++ b/libstdc++-v3/include/ext/rope
-@@ -55,6 +55,9 @@
- #include <bits/gthr.h>
- #include <tr1/functional>
-
-+/* cope w/ index defined as macro, SuSv3 proposal */
-+#undef index
-+
- # ifdef __GC
- # define __GC_CONST const
- # else
-diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h
-index d7b5cbd..b9b3acb 100644
---- a/libstdc++-v3/include/ext/ropeimpl.h
-+++ b/libstdc++-v3/include/ext/ropeimpl.h
-@@ -48,6 +48,9 @@
- #include <ext/memory> // For uninitialized_copy_n
- #include <ext/numeric> // For power
-
-+/* cope w/ index defined as macro, SuSv3 proposal */
-+#undef index
-+
- namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0013-libstdc-namespace.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0013-libstdc-namespace.patch
deleted file mode 100644
index 4a3efdebd..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0013-libstdc-namespace.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 104e4d66208f2726b14d2f5eebce90700cbc83c8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:54:02 +0400
-Subject: [PATCH 13/35] libstdc++-namespace
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/uclibc/messages_members.h | 4 +++-
- libstdc++-v3/config/locale/uclibc/time_members.h | 4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index 067657a..dd76a6c 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -32,7 +32,8 @@
- //
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
--
-+namespace std
-+{
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix prototypes for *textdomain funcs
- #endif
-@@ -116,3 +117,4 @@
- this->_S_create_c_locale(this->_M_c_locale_messages, __s);
- }
- }
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-index 1665dde..905c433 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -33,7 +33,8 @@
- //
-
- // Written by Benjamin Kosnik <bkoz@redhat.com>
--
-+namespace std
-+{
- template<typename _CharT>
- __timepunct<_CharT>::__timepunct(size_t __refs)
- : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-@@ -75,3 +76,4 @@
- delete _M_data;
- _S_destroy_c_locale(_M_c_locale_timepunct);
- }
-+}
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0014-sh-pr24836.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0014-sh-pr24836.patch
deleted file mode 100644
index cb8fd525b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0014-sh-pr24836.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From edc9acb181810f234b6b9f7d2820b0e4f6a1eeaf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:54:48 +0400
-Subject: [PATCH 14/35] sh-pr24836
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
----
- gcc/configure | 2 +-
- gcc/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index e12a180..135bbf5 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -23378,7 +23378,7 @@ foo: .long 25
- tls_first_minor=14
- tls_as_opt="-m64 -Aesame --fatal-warnings"
- ;;
-- sh-*-* | sh[34]-*-*)
-+ sh-*-* | sh[34]*-*-*)
- conftest_s='
- .section ".tdata","awT",@progbits
- foo: .long 25
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index eba3577..6363a21 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -3141,7 +3141,7 @@ foo: .long 25
- tls_first_minor=14
- tls_as_opt="-m64 -Aesame --fatal-warnings"
- ;;
-- sh-*-* | sh[34]-*-*)
-+ sh-*-* | sh[34]*-*-*)
- conftest_s='
- .section ".tdata","awT",@progbits
- foo: .long 25
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
deleted file mode 100644
index 37c46fc2e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 50e5366005b0f6af27378e2a5c3cb9f9936a7e62 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:58:36 +0400
-Subject: [PATCH 15/35] arm: Use TARGET_ENDIAN_OPTION for determining
- MULTILIB_DEFAULTS
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-elf.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: gcc-4.9.2/gcc/config/arm/coff.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/arm/coff.h
-+++ gcc-4.9.2/gcc/config/arm/coff.h
-@@ -32,8 +32,11 @@
- #define TARGET_DEFAULT (MASK_APCS_FRAME)
-
- #ifndef MULTILIB_DEFAULTS
-+#ifndef TARGET_ENDIAN_OPTION
-+#define TARGET_ENDIAN_OPTION "mlittle-endian"
-+#endif
- #define MULTILIB_DEFAULTS \
-- { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }
-+ { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=soft", "mno-thumb-interwork" }
- #endif
-
- /* This is COFF, but prefer stabs. */
-Index: gcc-4.9.2/gcc/config/arm/elf.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/arm/elf.h
-+++ gcc-4.9.2/gcc/config/arm/elf.h
-@@ -116,8 +116,11 @@
- #endif
-
- #ifndef MULTILIB_DEFAULTS
-+#ifndef TARGET_ENDIAN_OPTION
-+#define TARGET_ENDIAN_OPTION "mlittle-endian"
-+#endif
- #define MULTILIB_DEFAULTS \
-- { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" }
-+ { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" }
- #endif
-
- #define TARGET_ASM_FILE_START_APP_OFF true
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0016-gcc-poison-system-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0016-gcc-poison-system-directories.patch
deleted file mode 100644
index 475ef96b9..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0016-gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 16/35] gcc: poison-system-directories
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
----
- gcc/Makefile.in | 2 +-
- gcc/common.opt | 4 ++++
- gcc/config.in | 6 ++++++
- gcc/configure | 20 ++++++++++++++++++--
- gcc/configure.ac | 10 ++++++++++
- gcc/doc/invoke.texi | 9 +++++++++
- gcc/gcc.c | 2 ++
- gcc/incpath.c | 19 +++++++++++++++++++
- 8 files changed, 69 insertions(+), 3 deletions(-)
-
-Index: gcc-4.9-20140316/gcc/common.opt
-===================================================================
---- gcc-4.9-20140316.orig/gcc/common.opt
-+++ gcc-4.9-20140316/gcc/common.opt
-@@ -603,6 +603,10 @@ Wpedantic
- Common Var(pedantic) Warning
- Issue warnings needed for strict compliance to the standard
-
-+Wpoison-system-directories
-+Common Var(flag_poison_system_directories) Init(1) Warning
-+Warn for -I and -L options using system directories if cross compiling
-+
- Wshadow
- Common Var(warn_shadow) Warning
- Warn when one local variable shadows another
-Index: gcc-4.9-20140316/gcc/config.in
-===================================================================
---- gcc-4.9-20140316.orig/gcc/config.in
-+++ gcc-4.9-20140316/gcc/config.in
-@@ -138,6 +138,12 @@
- #endif
-
-
-+/* Define to warn for use of native system header directories */
-+#ifndef USED_FOR_TARGET
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+#endif
-+
-+
- /* Define if you want all operations on RTL (the basic data structure of the
- optimizer and back end) to be checked for dynamic type safety at runtime.
- This is quite expensive. */
-Index: gcc-4.9-20140316/gcc/configure
-===================================================================
---- gcc-4.9-20140316.orig/gcc/configure
-+++ gcc-4.9-20140316/gcc/configure
-@@ -928,6 +928,7 @@ with_system_zlib
- enable_maintainer_mode
- enable_link_mutex
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_host_shared
- enable_libquadmath_support
-@@ -1648,6 +1649,8 @@ Optional Features:
- --enable-version-specific-runtime-libs
- specify that runtime libraries should be installed
- in a compiler-specific directory
-+ --enable-poison-system-directories
-+ warn for use of native system header directories
- --enable-plugin enable plugin support
- --enable-host-shared build host code as shared libraries
- --disable-libquadmath-support
-@@ -27702,6 +27705,19 @@ if test "${enable_version_specific_runti
- fi
-
-
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+ enableval=$enable_poison_system_directories;
-+else
-+ enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-+
- # Substitute configuration variables
-
-
-Index: gcc-4.9-20140316/gcc/configure.ac
-===================================================================
---- gcc-4.9-20140316.orig/gcc/configure.ac
-+++ gcc-4.9-20140316/gcc/configure.ac
-@@ -5366,6 +5366,16 @@ AC_ARG_ENABLE(version-specific-runtime-l
- [specify that runtime libraries should be
- installed in a compiler-specific directory])])
-
-+AC_ARG_ENABLE([poison-system-directories],
-+ AS_HELP_STRING([--enable-poison-system-directories],
-+ [warn for use of native system header directories]),,
-+ [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+ [1],
-+ [Define to warn for use of native system header directories])
-+fi
-+
- # Substitute configuration variables
- AC_SUBST(subdirs)
- AC_SUBST(srcdir)
-Index: gcc-4.9-20140316/gcc/doc/invoke.texi
-===================================================================
---- gcc-4.9-20140316.orig/gcc/doc/invoke.texi
-+++ gcc-4.9-20140316/gcc/doc/invoke.texi
-@@ -260,6 +260,7 @@ Objective-C and Objective-C++ Dialects}.
- -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
- -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
- -Wpointer-arith -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wredundant-decls -Wno-return-local-addr @gol
- -Wreturn-type -Wsequence-point -Wshadow @gol
- -Wsign-compare -Wsign-conversion -Wfloat-conversion @gol
-@@ -4230,6 +4231,14 @@ headers---for that, @option{-Wunknown-pr
- for most targets, it is made up of code and thus requires the stack
- to be made executable in order for the program to work properly.
-
-+@item -Wno-poison-system-directories
-+@opindex Wno-poison-system-directories
-+Do not warn for @option{-I} or @option{-L} options using system
-+directories such as @file{/usr/include} when cross compiling. This
-+option is intended for use in chroot environments when such
-+directories contain the correct headers and libraries for the target
-+system rather than the host.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
-Index: gcc-4.9-20140316/gcc/gcc.c
-===================================================================
---- gcc-4.9-20140316.orig/gcc/gcc.c
-+++ gcc-4.9-20140316/gcc/gcc.c
-@@ -764,6 +764,8 @@ proper position among the other output f
- "%{fuse-ld=*:-fuse-ld=%*}\
- %X %{o*} %{e*} %{N} %{n} %{r}\
- %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \
-+ %{Wno-poison-system-directories:--no-poison-system-directories}\
-+ %{Werror=poison-system-directories:--error-poison-system-directories}\
- %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
- %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
- %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
-Index: gcc-4.9-20140316/gcc/incpath.c
-===================================================================
---- gcc-4.9-20140316.orig/gcc/incpath.c
-+++ gcc-4.9-20140316/gcc/incpath.c
-@@ -28,6 +28,7 @@
- #include "intl.h"
- #include "incpath.h"
- #include "cppdefault.h"
-+#include "diagnostic-core.h"
-
- /* Microsoft Windows does not natively support inodes.
- VMS has non-numeric inodes. */
-@@ -382,6 +383,24 @@ merge_include_chains (const char *sysroo
- }
- fprintf (stderr, _("End of search list.\n"));
- }
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+ if (flag_poison_system_directories)
-+ {
-+ struct cpp_dir *p;
-+
-+ for (p = heads[QUOTE]; p; p = p->next)
-+ {
-+ if ((!strncmp (p->name, "/usr/include", 12))
-+ || (!strncmp (p->name, "/usr/local/include", 18))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ warning (OPT_Wpoison_system_directories,
-+ "include location \"%s\" is unsafe for "
-+ "cross-compilation",
-+ p->name);
-+ }
-+ }
-+#endif
- }
-
- /* Use given -I paths for #include "..." but not #include <...>, and
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0017-gcc-poison-dir-extend.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0017-gcc-poison-dir-extend.patch
deleted file mode 100644
index 9e81efd4d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0017-gcc-poison-dir-extend.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From e99c9c97266d6d3e8cac798aa91408250c4d60cf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:00:34 +0400
-Subject: [PATCH 17/35] gcc-poison-dir-extend
-
-Add /sw/include and /opt/include based on the original
-zecke-no-host-includes.patch patch. The original patch checked for
-/usr/include, /sw/include and /opt/include and then triggered a failure and
-aborted.
-
-Instead, we add the two missing items to the current scan. If the user
-wants this to be a failure, they can add "-Werror=poison-system-directories".
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/incpath.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index cd41c78..eac4a92 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -393,7 +393,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- {
- if ((!strncmp (p->name, "/usr/include", 12))
- || (!strncmp (p->name, "/usr/local/include", 18))
-- || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
-+ || (!strncmp (p->name, "/sw/include", 11))
-+ || (!strncmp (p->name, "/opt/include", 12)))
- warning (OPT_Wpoison_system_directories,
- "include location \"%s\" is unsafe for "
- "cross-compilation",
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
deleted file mode 100644
index a28cafdf9..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 56207fa2923e8edf774e98ffac82666091076be3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:08:31 +0400
-Subject: [PATCH 18/35] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
-
-Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
-
-This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
-
-Other changes I had to do include:
-
-- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
-
-- passing the right CFLAGS to configure scripts as exported environment variables
-
-I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
-
-Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
-
-Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- configure | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/configure b/configure
-index 1b76c90..e4dce7c 100755
---- a/configure
-+++ b/configure
-@@ -6772,6 +6772,38 @@ fi
-
-
-
-+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
-+# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
-+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
-+# We want to ensure that TARGET libraries (which we know are built with
-+# gcc) are built with "-O2 -g", so include those options when setting
-+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
-+if test "x$CFLAGS_FOR_TARGET" = x; then
-+ CFLAGS_FOR_TARGET=$CFLAGS
-+ case " $CFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
-+ esac
-+ case " $CFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
-+ esac
-+fi
-+
-+
-+if test "x$CXXFLAGS_FOR_TARGET" = x; then
-+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
-+ case " $CXXFLAGS " in
-+ *" -O2 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
-+ esac
-+ case " $CXXFLAGS " in
-+ *" -g "* | *" -g3 "*) ;;
-+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
-+ esac
-+fi
-+
-+
- # Handle --with-headers=XXX. If the value is not "yes", the contents of
- # the named directory are copied to $(tooldir)/sys-include.
- if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0019-64-bit-multilib-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0019-64-bit-multilib-hack.patch
deleted file mode 100644
index 058be0c40..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0019-64-bit-multilib-hack.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 18fde5740b09324dfb9cf41e9849672573ff5fa0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:10:06 +0400
-Subject: [PATCH 19/35] 64-bit multilib hack.
-
-GCC has internal multilib handling code but it assumes a very specific rigid directory
-layout. The build system implementation of multilib layout is very generic and allows
-complete customisation of the library directories.
-
-This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
-directory, "."). We need to do this for each multilib that is configured as we don't
-know which compiler options may be being passed into the compiler. Since we have a compiler
-per mulitlib at this point that isn't an issue.
-
-The one problem is the target compiler is only going to work for the default multlilib at
-this point. Ideally we'd figure out which multilibs were being enabled with which paths
-and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
-and override these platform defaults in its build config.
-
-RP 15/8/11
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/i386/t-linux64 | 6 ++----
- gcc/config/mips/t-linux64 | 10 +++-------
- gcc/config/rs6000/t-linux64 | 5 ++---
- 3 files changed, 7 insertions(+), 14 deletions(-)
-
-Index: gcc-4.9-20140316/gcc/config/i386/t-linux64
-===================================================================
---- gcc-4.9-20140316.orig/gcc/config/i386/t-linux64
-+++ gcc-4.9-20140316/gcc/config/i386/t-linux64
-@@ -32,7 +32,5 @@
- #
- comma=,
- MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
--MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
--MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
-+MULTILIB_DIRNAMES = . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-Index: gcc-4.9-20140316/gcc/config/mips/t-linux64
-===================================================================
---- gcc-4.9-20140316.orig/gcc/config/mips/t-linux64
-+++ gcc-4.9-20140316/gcc/config/mips/t-linux64
-@@ -17,10 +17,6 @@
- # <http://www.gnu.org/licenses/>.
-
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
--MULTILIB_DIRNAMES = n32 32 64
--MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
--MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
--MULTILIB_OSDIRNAMES = \
-- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
-- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
-- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+MULTILIB_DIRNAMES = . . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-+
-Index: gcc-4.9-20140316/gcc/config/rs6000/t-linux64
-===================================================================
---- gcc-4.9-20140316.orig/gcc/config/rs6000/t-linux64
-+++ gcc-4.9-20140316/gcc/config/rs6000/t-linux64
-@@ -26,10 +26,9 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
-
- MULTILIB_OPTIONS := m64/m32
--MULTILIB_DIRNAMES := 64 32
-+MULTILIB_DIRNAMES := . .
- MULTILIB_EXTRA_OPTS :=
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- $(COMPILE) $<
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0020-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0020-optional-libstdc.patch
deleted file mode 100644
index 5b466140d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0020-optional-libstdc.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 307c8ff3ef666b7bd5ac733863f2fbb27a9d521e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:12:56 +0400
-Subject: [PATCH 20/35] optional libstdc
-
-gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
-will not run correctly since by default the linker will try to link against libstdc++
-which shouldn't exist yet. We need an option to disable -lstdc++
-option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
-driver. This patch adds such an option which only disables the -lstdc++.
-
-A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
-do this officially, the likely answer is don't build libstdc++ separately.
-
-RP 29/6/10
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- gcc/c-family/c.opt | 4 ++++
- gcc/cp/g++spec.c | 1 +
- gcc/doc/invoke.texi | 9 +++++++--
- gcc/gcc.c | 1 +
- 4 files changed, 13 insertions(+), 2 deletions(-)
-
-Index: gcc-4.9-20140316/gcc/c-family/c.opt
-===================================================================
---- gcc-4.9-20140316.orig/gcc/c-family/c.opt
-+++ gcc-4.9-20140316/gcc/c-family/c.opt
-@@ -1323,6 +1323,10 @@ nostdinc++
- C++ ObjC++
- Do not search standard system include directories for C++
-
-+nostdlib++
-+Driver
-+Do not link standard C++ runtime library
-+
- o
- C ObjC C++ ObjC++ Joined Separate
- ; Documented in common.opt
-Index: gcc-4.9-20140316/gcc/cp/g++spec.c
-===================================================================
---- gcc-4.9-20140316.orig/gcc/cp/g++spec.c
-+++ gcc-4.9-20140316/gcc/cp/g++spec.c
-@@ -138,6 +138,7 @@ lang_specific_driver (struct cl_decoded_
- switch (decoded_options[i].opt_index)
- {
- case OPT_nostdlib:
-+ case OPT_nostdlib__:
- case OPT_nodefaultlibs:
- library = -1;
- break;
-Index: gcc-4.9-20140316/gcc/doc/invoke.texi
-===================================================================
---- gcc-4.9-20140316.orig/gcc/doc/invoke.texi
-+++ gcc-4.9-20140316/gcc/doc/invoke.texi
-@@ -193,6 +193,7 @@ in the following sections.
- -fvisibility-inlines-hidden @gol
- -fvtable-verify=@var{std|preinit|none} @gol
- -fvtv-counts -fvtv-debug @gol
-+-nostdlib++ @gol
- -fvisibility-ms-compat @gol
- -fext-numeric-literals @gol
- -Wabi -Wconversion-null -Wctor-dtor-privacy @gol
-@@ -457,7 +458,7 @@ Objective-C and Objective-C++ Dialects}.
- -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol
- -s -static -static-libgcc -static-libstdc++ @gol
- -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
---shared -shared-libgcc -symbolic @gol
-+-shared -shared-libgcc -symbolic -nostdlib++ @gol
- -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
- -u @var{symbol}}
-
-@@ -10285,6 +10286,11 @@ These entries are usually resolved by en
- libc. These entry points should be supplied through some other
- mechanism when this option is specified.
-
-+@item -nostdlib++
-+@opindex nostdlib++
-+Do not use the standard system C++ runtime libraries when linking.
-+Only the libraries you specify will be passed to the linker.
-+
- @cindex @option{-lgcc}, use with @option{-nostdlib}
- @cindex @option{-nostdlib} and unresolved references
- @cindex unresolved references and @option{-nostdlib}
-Index: gcc-4.9-20140316/gcc/gcc.c
-===================================================================
---- gcc-4.9-20140316.orig/gcc/gcc.c
-+++ gcc-4.9-20140316/gcc/gcc.c
-@@ -772,6 +772,7 @@ proper position among the other output f
- %(mflib) " STACK_SPLIT_SPEC "\
- %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
-+ %{!nostdlib++:}\
- %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
- #endif
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index eb3c61f12..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 004696e054ae9dc71d512cc755ccc4074fc62b2d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:14:20 +0400
-Subject: [PATCH 21/35] gcc: disable MASK_RELAX_PIC_CALLS bit
-
-The new feature added after 4.3.3
-"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
-will cause cc1plus eat up all the system memory when build webkit-gtk.
-The function mips_get_pic_call_symbol keeps on recursively calling itself.
-Disable this feature to walk aside the bug.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 7 -------
- gcc/configure.ac | 7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index b65d21d..bdab45a 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -25829,13 +25829,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
- $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index e226b85..5f5c909 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4099,13 +4099,6 @@ x:
- rm -f conftest.*
- fi
- fi
-- if test $gcc_cv_as_ld_jalr_reloc = yes; then
-- if test x$target_cpu_default = x; then
-- target_cpu_default=MASK_RELAX_PIC_CALLS
-- else
-- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
-- fi
-- fi
- AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
-
- AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0022-COLLECT_GCC_OPTIONS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0022-COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index 40c8abffa..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0022-COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 7f5c9dcc71c8b83a0b5596266cc4bdf0936e8e00 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:16:28 +0400
-Subject: [PATCH 22/35] COLLECT_GCC_OPTIONS
-
-This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
-invoke collect2.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/gcc.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 477752f..51062aa 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -4098,6 +4098,15 @@ set_collect_gcc_options (void)
- sizeof ("COLLECT_GCC_OPTIONS=") - 1);
-
- first_time = TRUE;
-+#ifdef HAVE_LD_SYSROOT
-+ if (target_system_root_changed && target_system_root)
-+ {
-+ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
-+ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
-+ obstack_grow (&collect_obstack, "'", 1);
-+ first_time = FALSE;
-+ }
-+#endif
- for (i = 0; (int) i < n_switches; i++)
- {
- const char *const *args;
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
deleted file mode 100644
index fddfe9e5e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From f7d49ca445e60faa1b5256c6b4f96c1ee5c0e353 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:17:25 +0400
-Subject: [PATCH 23/35] Use the defaults.h in ${B} instead of ${S}, and t-oe
- in ${B}
-
-Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
-the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-While compiling gcc-crosssdk-initial-x86_64 on some host, there is
-occasionally failure that test the existance of default.h doesn't
-work, the reason is tm_include_list='** defaults.h' rather than
-tm_include_list='** ./defaults.h'
-
-So we add the test condition for this situation.
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/Makefile.in | 2 +-
- gcc/configure | 4 ++--
- gcc/configure.ac | 4 ++--
- gcc/mkconfig.sh | 4 ++--
- 4 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index d1ab22f..15fe4b6 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -483,7 +483,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
- TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
-
- xmake_file=@xmake_file@
--tmake_file=@tmake_file@
-+tmake_file=@tmake_file@ ./t-oe
- TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
- TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
- TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
-diff --git a/gcc/configure b/gcc/configure
-index 5399b2b..60a04bd 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11631,8 +11631,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index f87c3b6..460e0d9 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1740,8 +1740,8 @@ for f in $tm_file; do
- tm_include_list="${tm_include_list} $f"
- ;;
- defaults.h )
-- tm_file_list="${tm_file_list} \$(srcdir)/$f"
-- tm_include_list="${tm_include_list} $f"
-+ tm_file_list="${tm_file_list} ./$f"
-+ tm_include_list="${tm_include_list} ./$f"
- ;;
- * )
- tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index c7146ed..b153f45 100644
---- a/gcc/mkconfig.sh
-+++ b/gcc/mkconfig.sh
-@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
- if [ $# -ge 1 ]; then
- echo '#ifdef IN_GCC' >> ${output}T
- for file in "$@"; do
-- if test x"$file" = x"defaults.h"; then
-+ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
- postpone_defaults_h="yes"
- else
- echo "# include \"$file\"" >> ${output}T
-@@ -106,7 +106,7 @@ esac
-
- # If we postponed including defaults.h, add the #include now.
- if test x"$postpone_defaults_h" = x"yes"; then
-- echo "# include \"defaults.h\"" >> ${output}T
-+ echo "# include \"./defaults.h\"" >> ${output}T
- fi
-
- # Add multiple inclusion protection guard, part two.
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0025-fortran-cross-compile-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0025-fortran-cross-compile-hack.patch
deleted file mode 100644
index 0e7914d5c..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0025-fortran-cross-compile-hack.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From af8a56ea4e17b2909eff2c57704ab43ef24f28d3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:01 +0400
-Subject: [PATCH 25/35] fortran cross-compile hack.
-
-* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
-used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
-directory.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libgfortran/configure | 2 +-
- libgfortran/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/configure b/libgfortran/configure
-index 8385e96..b8f7a92 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -12704,7 +12704,7 @@ esac
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- ac_ext=${ac_fc_srcext-f}
- ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
-index 7d97fed..3f9f484 100644
---- a/libgfortran/configure.ac
-+++ b/libgfortran/configure.ac
-@@ -227,7 +227,7 @@ AC_SUBST(enable_static)
-
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- AC_PROG_FC(gfortran)
-
- # extra LD Flags which are required for targets
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0026-libgcc-sjlj-check.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0026-libgcc-sjlj-check.patch
deleted file mode 100644
index d4efab956..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0026-libgcc-sjlj-check.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 08c2398445e6cac282488f64ae6bf29cbcd8db23 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:50 +0400
-Subject: [PATCH 26/35] libgcc-sjlj-check
-
-ac_fn_c_try_compile doesnt seem to keep the intermediate files
-which are needed for sjlj test to pass since it greps into the
-generated file. So we run the compiler command using AC_TRY_COMMAND
-which then generates the needed .s file
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libgcc/configure | 10 ++++++----
- libgcc/configure.ac | 10 ++++------
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/libgcc/configure b/libgcc/configure
-index 1425df6..d18e3cb 100644
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -4208,17 +4208,19 @@ void foo ()
- }
-
- _ACEOF
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--if ac_fn_c_try_compile; then :
-+if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5'
-+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; }; then
- if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=yes
- elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=no
- fi
- fi
--CFLAGS=$CFLAGS_hold
- rm -f conftest*
-
- fi
-diff --git a/libgcc/configure.ac b/libgcc/configure.ac
-index 8b7aba5..c7c9644 100644
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -216,16 +216,14 @@ void foo ()
- bar();
- }
- ])])
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--AS_IF([ac_fn_c_try_compile],
-- [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-+if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
-+ if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=yes
- elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
- libgcc_cv_lib_sjlj_exceptions=no
-- fi])
--CFLAGS=$CFLAGS_hold
-+ fi
-+fi
- rm -f conftest*
- ])
-
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0027-cpp-honor-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0027-cpp-honor-sysroot.patch
deleted file mode 100644
index 05e95219f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0027-cpp-honor-sysroot.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From a0f9bd09c816ad29ecf7c29d6c27f7df97710364 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:22:00 +0400
-Subject: [PATCH 27/35] cpp: honor sysroot.
-
-Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
-preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
-rather than the --sysroot option specified on the commandline. If access to that directory is
-permission denied (unreadable), gcc will error.
-
-This happens when ccache is in use due to the fact it uses preprocessed source files.
-
-The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
--isystem, -isysroot happen and the correct sysroot is used.
-
-[YOCTO #2074]
-
-RP 2012/04/13
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/cp/lang-specs.h | 2 +-
- gcc/gcc.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index a001c3e..1aae1e4 100644
---- a/gcc/cp/lang-specs.h
-+++ b/gcc/cp/lang-specs.h
-@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3. If not see
- {".ii", "@c++-cpp-output", 0, 0, 0},
- {"@c++-cpp-output",
- "%{!M:%{!MM:%{!E:\
-- cc1plus -fpreprocessed %i %(cc1_options) %2\
-+ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
- %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 51062aa..cf6b99e 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1042,7 +1042,7 @@ static const struct compiler default_compilers[] =
- %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
- {".i", "@cpp-output", 0, 0, 0},
- {"@cpp-output",
-- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
- {".s", "@assembler", 0, 0, 0},
- {"@assembler",
- "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0028-MIPS64-Default-to-N64-ABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0028-MIPS64-Default-to-N64-ABI.patch
deleted file mode 100644
index 263872069..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0028-MIPS64-Default-to-N64-ABI.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 301e18d4711db5925e767fad08dffa9cfe0a2f1f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:23:08 +0400
-Subject: [PATCH 28/35] MIPS64: Default to N64 ABI
-
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE config specific]
----
- gcc/config.gcc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 1a0be50..989c2fb 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -1797,7 +1797,7 @@ mips*-mti-linux*)
- mips64*-*-linux* | mipsisa64*-*-linux*)
- tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h"
- tmake_file="${tmake_file} mips/t-linux64"
-- tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
-+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64"
- case ${target} in
- mips64el-st-linux-gnu)
- tm_file="${tm_file} mips/st.h"
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
deleted file mode 100644
index 969d290ad..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ /dev/null
@@ -1,228 +0,0 @@
-From 29d12344fb682a053de53eb08b95704cf3b67af2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:24:50 +0400
-Subject: [PATCH 29/35] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
- relative to SYSTEMLIBS_DIR
-
-This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
-relative to SYSTEMLIBS_DIR which can be set in generated headers
-This breaks the assumption of hardcoded multilib in gcc
-Change is only for the supported architectures in OE including
-SH, sparc, alpha for possible future support (if any)
-
-Removes the do_headerfix task in metadata
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE configuration]
----
- gcc/config/alpha/linux-elf.h | 4 ++--
- gcc/config/arm/linux-eabi.h | 4 ++--
- gcc/config/arm/linux-elf.h | 2 +-
- gcc/config/i386/linux.h | 2 +-
- gcc/config/i386/linux64.h | 6 +++---
- gcc/config/mips/linux.h | 2 +-
- gcc/config/mips/linux64.h | 8 ++++----
- gcc/config/rs6000/linux64.h | 8 ++++----
- gcc/config/sh/linux.h | 2 +-
- gcc/config/sparc/linux.h | 2 +-
- gcc/config/sparc/linux64.h | 4 ++--
- 11 files changed, 22 insertions(+), 22 deletions(-)
-
-Index: gcc-4.9.0/gcc/config/alpha/linux-elf.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/alpha/linux-elf.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/alpha/linux-elf.h 2014-05-07 16:43:50.605106535 +0000
-@@ -23,8 +23,8 @@
- #define EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-Index: gcc-4.9.0/gcc/config/arm/linux-eabi.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/arm/linux-eabi.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/arm/linux-eabi.h 2014-05-07 16:43:50.605106535 +0000
-@@ -68,8 +68,8 @@
- GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
-
- #undef GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
--#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
-+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
- #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
-
- #define GLIBC_DYNAMIC_LINKER \
-Index: gcc-4.9.0/gcc/config/arm/linux-elf.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/arm/linux-elf.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/arm/linux-elf.h 2014-05-07 16:43:50.605106535 +0000
-@@ -57,7 +57,7 @@
-
- #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #define LINUX_TARGET_LINK_SPEC "%{h*} \
- %{static:-Bstatic} \
-Index: gcc-4.9.0/gcc/config/i386/linux.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/i386/linux.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/i386/linux.h 2014-05-07 16:43:50.605106535 +0000
-@@ -20,4 +20,4 @@
- <http://www.gnu.org/licenses/>. */
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-Index: gcc-4.9.0/gcc/config/i386/linux64.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/i386/linux64.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/i386/linux64.h 2014-05-07 16:43:50.605106535 +0000
-@@ -27,6 +27,6 @@
- #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
- #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
--#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-Index: gcc-4.9.0/gcc/config/mips/linux.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/mips/linux.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/mips/linux.h 2014-05-07 16:43:50.605106535 +0000
-@@ -18,8 +18,8 @@
- <http://www.gnu.org/licenses/>. */
-
- #define GLIBC_DYNAMIC_LINKER \
-- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
-
- #undef UCLIBC_DYNAMIC_LINKER
- #define UCLIBC_DYNAMIC_LINKER \
-- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
-Index: gcc-4.9.0/gcc/config/mips/linux64.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/mips/linux64.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/mips/linux64.h 2014-05-07 16:43:50.605106535 +0000
-@@ -23,20 +23,20 @@
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
-
- #define GLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
-
- #undef UCLIBC_DYNAMIC_LINKER32
- #define UCLIBC_DYNAMIC_LINKER32 \
-- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
- #undef UCLIBC_DYNAMIC_LINKER64
- #define UCLIBC_DYNAMIC_LINKER64 \
-- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
- #define UCLIBC_DYNAMIC_LINKERN32 \
-- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-+ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
-
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
-Index: gcc-4.9.0/gcc/config/rs6000/linux64.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/rs6000/linux64.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/rs6000/linux64.h 2014-05-07 16:43:50.605106535 +0000
-@@ -367,14 +367,14 @@
- #undef LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
- #ifdef LINUX64_DEFAULT_ABI_ELFv2
--#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
- #else
--#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
- #endif
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-Index: gcc-4.9.0/gcc/config/sh/linux.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/sh/linux.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/sh/linux.h 2014-05-07 16:43:50.605106535 +0000
-@@ -43,7 +43,7 @@
-
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-Index: gcc-4.9.0/gcc/config/sparc/linux.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/sparc/linux.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/sparc/linux.h 2014-05-07 16:43:50.605106535 +0000
-@@ -83,7 +83,7 @@
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #undef LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
-Index: gcc-4.9.0/gcc/config/sparc/linux64.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/sparc/linux64.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/sparc/linux64.h 2014-05-07 16:43:50.605106535 +0000
-@@ -92,8 +92,8 @@
- When the -shared link option is used a final link is not being
- done. */
-
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
-
- #ifdef SPARC_BI_ARCH
-
-Index: gcc-4.9.0/gcc/config/linux.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/linux.h 2014-05-07 16:43:50.609106535 +0000
-+++ gcc-4.9.0/gcc/config/linux.h 2014-05-07 16:43:50.605106535 +0000
-@@ -73,10 +73,10 @@
- GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
- GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
- supporting both 32-bit and 64-bit compilation. */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0030-gcc-Fix-argument-list-too-long-error.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0030-gcc-Fix-argument-list-too-long-error.patch
deleted file mode 100644
index 2ceaff64f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0030-gcc-Fix-argument-list-too-long-error.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From c1816c160156f99c34e6a0a0311bb0219326804e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:26:37 +0400
-Subject: [PATCH 30/35] gcc: Fix argument list too long error.
-
-There would be an "Argument list too long" error when the
-build directory is longer than 200, this is caused by:
-
-headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
-
-The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
-it, use the $(sort list) of GNU make which can handle the too long list
-would fix the problem, the header would be short enough after sorted.
-The "tr ' ' '\012'" was used for translating the space to "\n", the
-$(sort list) doesn't need this.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 2320497..8562a62 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -4627,7 +4627,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
- # We keep the directory structure for files in config or c-family and .def
- # files. All other files are flattened to a single directory.
- $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
-- headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \
-+ headers="$(sort $(PLUGIN_HEADERS))"; \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
- for file in $$headers; do \
- if [ -f $$file ] ; then \
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0031-Disable-sdt.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0031-Disable-sdt.patch
deleted file mode 100644
index 2c1d5e086..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0031-Disable-sdt.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From b85265bc94ec1beaf1d3b697c03db62991553467 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:28:10 +0400
-Subject: [PATCH 31/35] Disable sdt.
-
-We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
-It may or may not exist from preivous builds though. To be determinstic, disable
-sdt.h usage always. This avoids build failures if the header is removed after configure
-but before libgcc is compiled for example.
-
-RP 2012/8/7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Disable sdt for libstdc++-v3.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [hack]
----
- gcc/configure | 12 ++++++------
- gcc/configure.ac | 18 +++++++++---------
- libstdc++-v3/configure | 6 +++---
- libstdc++-v3/configure.ac | 2 +-
- 4 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 3c550a6..01c7626 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -26812,12 +26812,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
- $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
- have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
--
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
--
--fi
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+#
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#
-+#fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
- $as_echo "$have_sys_sdt_h" >&6; }
-
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 3601ab6..06e501f 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4779,15 +4779,15 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
- fi
-
- # Test for <sys/sdt.h> on the target.
--GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
--AC_MSG_CHECKING(sys/sdt.h in the target C library)
--have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
-- have_sys_sdt_h=yes
-- AC_DEFINE(HAVE_SYS_SDT_H, 1,
-- [Define if your target C library provides sys/sdt.h])
--fi
--AC_MSG_RESULT($have_sys_sdt_h)
-+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
-+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
-+#have_sys_sdt_h=no
-+#if test -f $target_header_dir/sys/sdt.h; then
-+# have_sys_sdt_h=yes
-+# AC_DEFINE(HAVE_SYS_SDT_H, 1,
-+# [Define if your target C library provides sys/sdt.h])
-+#fi
-+#AC_MSG_RESULT($have_sys_sdt_h)
-
- # Check if TFmode long double should be used by default or not.
- # Some glibc targets used DFmode long double, but with glibc 2.4
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 4953c9f..53a1145 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -20578,11 +20578,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-- if test $glibcxx_cv_sys_sdt_h = yes; then
-+# if test $glibcxx_cv_sys_sdt_h = yes; then
-
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-
-- fi
-+# fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
- $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
-
-diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 73d430a..f2135e2 100644
---- a/libstdc++-v3/configure.ac
-+++ b/libstdc++-v3/configure.ac
-@@ -211,7 +211,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
- GLIBCXX_CHECK_SC_NPROC_ONLN
- GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
- GLIBCXX_CHECK_SYSCTL_HW_NCPU
--GLIBCXX_CHECK_SDT_H
-+#GLIBCXX_CHECK_SDT_H
-
- # Check for available headers.
- AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0032-libtool.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0032-libtool.patch
deleted file mode 100644
index 3b3d1b621..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0032-libtool.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6c715fcfa262adadca81c68a1f3f69aa3187a501 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:29:11 +0400
-Subject: [PATCH 32/35] libtool
-
-libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
-when running on am x86_64 build host.
-
-This patch stops this speading to libdir in the libstdc++.la file within libtool.
-Arguably, it shouldn't be passing this into libtool in the first place but
-for now this resolves the nastiest problems this causes.
-
-func_normal_abspath would resolve an empty path to `pwd` so we need
-to filter the zero case.
-
-RP 2012/8/24
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- ltmain.sh | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index a03433f..46f47c2 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6359,6 +6359,10 @@ func_mode_link ()
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-+ if test -n "$install_libdir"; then
-+ func_normal_abspath "$install_libdir"
-+ install_libdir=$func_normal_abspath_result
-+ fi
-
- oldlibs=
- if test -z "$rpath"; then
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
deleted file mode 100644
index b236c37a5..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 97e4591c20310425e7aca0e6712a8d9480e7744c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:30:32 +0400
-Subject: [PATCH 33/35] gcc: armv4: pass fix-v4bx to linker to support EABI.
-
-The LINK_SPEC for linux gets overwritten by linux-eabi.h which
-means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
-the option is not passed to linker when chosing march=armv4
-This patch redefines this in linux-eabi.h and reinserts it
-for eabi defaulting toolchains.
-
-We might want to send it upstream.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-eabi.h | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-Index: gcc-4.9-20140316/gcc/config/arm/linux-eabi.h
-===================================================================
---- gcc-4.9-20140316.orig/gcc/config/arm/linux-eabi.h
-+++ gcc-4.9-20140316/gcc/config/arm/linux-eabi.h
-@@ -77,10 +77,14 @@
- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
-
-+/* For armv4 we pass --fix-v4bx to linker to support EABI */
-+#undef TARGET_FIX_V4BX_SPEC
-+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
--#define LINK_SPEC EABI_LINK_SPEC \
-+#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \
- LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
- LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch
deleted file mode 100644
index 66b9f89a1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From fc5e4beaea856a2b486c770ad3addc0f5bb3100e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:33:04 +0400
-Subject: [PATCH 34/35] Use the multilib config files from ${B} instead of
- using the ones from ${S}
-
-Use the multilib config files from ${B} instead of using the ones from ${S}
-so that the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure | 22 ++++++++++++++++++----
- gcc/configure.ac | 22 ++++++++++++++++++----
- 2 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 8bc0c98..3cd0817 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11519,10 +11519,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -11533,6 +11543,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 5e5e84f..415a6df 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1700,10 +1700,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
-- if test -f ${srcdir}/config/$f
-- then
-- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-- fi
-+ case $f in
-+ */t-linux64 )
-+ if test -f ./config/$f
-+ then
-+ tmake_file_="${tmake_file_} ./config/$f"
-+ fi
-+ ;;
-+ * )
-+ if test -f ${srcdir}/config/$f
-+ then
-+ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+ fi
-+ ;;
-+ esac
- done
- tmake_file="${tmake_file_}"
-
-@@ -1714,6 +1724,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
- case $f in
-+ */linux64.h )
-+ tm_file_list="${tm_file_list} ./config/$f"
-+ tm_include_list="${tm_include_list} ./config/$f"
-+ ;;
- ./* )
- f=`echo $f | sed 's/^..//'`
- tm_file_list="${tm_file_list} $f"
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0040-fix-g++-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0040-fix-g++-sysroot.patch
deleted file mode 100644
index d50aa5c9b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0040-fix-g++-sysroot.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Portions of
-
-http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html
-
-are not upstreamed yet. So lets keep missing pieces.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: gcc-4.8.1/gcc/configure.ac
-===================================================================
---- gcc-4.8.1.orig/gcc/configure.ac 2013-07-15 15:55:49.488399132 -0700
-+++ gcc-4.8.1/gcc/configure.ac 2013-07-15 16:02:31.772406679 -0700
-@@ -148,7 +148,9 @@
- if test "${with_sysroot+set}" = set; then
- gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
- if test "${gcc_gxx_without_sysroot}"; then
-- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ if test x${with_sysroot} != x/; then
-+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ fi
- gcc_gxx_include_dir_add_sysroot=1
- fi
- fi
-Index: gcc-4.8.1/gcc/configure
-===================================================================
---- gcc-4.8.1.orig/gcc/configure 2013-07-15 15:55:49.472399132 -0700
-+++ gcc-4.8.1/gcc/configure 2013-07-15 16:02:31.780406680 -0700
-@@ -3325,7 +3325,9 @@
- if test "${with_sysroot+set}" = set; then
- gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
- if test "${gcc_gxx_without_sysroot}"; then
-- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ if test x${with_sysroot} != x/; then
-+ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+ fi
- gcc_gxx_include_dir_add_sysroot=1
- fi
- fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0041-libtool-avoid-libdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0041-libtool-avoid-libdir.patch
deleted file mode 100644
index 2dd9610a2..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0041-libtool-avoid-libdir.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Avoid using libdir from .la which usually points to a host path
-
-Upstream-Status: Inappropriate [embedded specific]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-diff --git a/ltmain.sh b/ltmain.sh
-index a03433f..1902a90 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -5628,6 +5628,9 @@ func_mode_link ()
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
-+ # Instead of using libdir from .la which usually points to a host path,
-+ # use the path the .la is contained in.
-+ libdir="$abs_ladir"
- dir="$libdir"
- absdir="$libdir"
- fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0043-cpp.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0043-cpp.patch
deleted file mode 100644
index eaf8646f9..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0043-cpp.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-The OE environment sets and exports CPP as being the target gcc. When building
-gcc-cross-canadian for a mingw targetted sdk, the following can be found in
-build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
-
-configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
-configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5
-configure:3666: $? = 0
-configure:3698: result: no
-configure:3786: checking how to run the C preprocessor
-configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
-configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
-configure:3876: $? = 0
-
-Note this is a *build* target (in build-x86_64-linux) so it should be using
-the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32 headers are
-very different, using the wrong cpp is a real problem. It is leaking into
-configure through the CPP variable. Ultimately this leads to build failures
-related to not being able to include a process.h file for pem-unix.c.
-
-The fix is to ensure we export a sane CPP value into the build environment when
-using build targets. We could define a CPP_FOR_BUILD value which may be the version
-which needs to be upstreamed but for now, this fix is good enough to avoid the
-problem.
-
-RP 22/08/2013
-
-Upstream-Status: Pending
-
-Index: gcc-4.8.1/Makefile.in
-===================================================================
---- gcc-4.8.1.orig/Makefile.in 2013-03-30 11:25:03.000000000 +0000
-+++ gcc-4.8.1/Makefile.in 2013-08-13 12:03:17.151988882 +0000
-@@ -149,6 +149,7 @@
- AR="$(AR_FOR_BUILD)"; export AR; \
- AS="$(AS_FOR_BUILD)"; export AS; \
- CC="$(CC_FOR_BUILD)"; export CC; \
-+ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch
deleted file mode 100644
index e38761d4c..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0044-gengtypes.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-gengtype is generated for both the build system and the target. -DGENERATOR_FILE
-was added in the patch http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00273.html
-and was applied to both versions of gengtype.
-
-Unfortunately the presence of this flag triggers the build configuration (bconfig.h)
-to be included for the target build of gengtype. Compiling gengtype with the target
-compiler and bconfig.h can result in errors if the build and target systems are
-dissimilar. An example case this fails is cross compiling gcc on linux for a darwin
-target system:
-
-In file included from /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c:25:0:
-| /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c: In function 'void parse_error(const char*, ...)':
-| /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/system.h:93:53: error: 'fputc_unlocked' was not declared in this scope
-| # define fputc(C, Stream) fputc_unlocked (C, Stream)
-
-which occurs since auto-build.h and auto-host.h have differnet values of
-HAVE_FPUTC_UNLOCKED:
-
-#define HAVE_FPUTC_UNLOCKED 1
-/* #undef HAVE_FPUTS_UNLOCKED */
-
-The obvious fix is to only include the flag on build/ targets which this patch does, however
-this also leads to compile errors due to const_tree being undefined but used in double_int.h
-
-I added a GENERATOR_FILE2 flag to workaround those in the
-target case and allow the build to succeed.
-
-Only the build/gengtypes should have the -DGENERATOR_FILE
-
-RP 22/8/2013
-
-Upstream-Status: Pending
-
-Index: gcc-4.8.1/gcc/Makefile.in
-===================================================================
---- gcc-4.8.1.orig/gcc/Makefile.in 2013-08-19 11:40:36.844014424 +0000
-+++ gcc-4.8.1/gcc/Makefile.in 2013-08-19 11:40:37.784014402 +0000
-@@ -3903,27 +3903,29 @@
-
- gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H)
- gengtype-lex.o: $(CONFIG_H) $(BCONFIG_H)
--CFLAGS-gengtype-lex.o += -DGENERATOR_FILE
-+CFLAGS-build/gengtype-lex.o += -DGENERATOR_FILE
- build/gengtype-lex.o: $(BCONFIG_H)
-
- gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \
- $(SYSTEM_H)
- gengtype-parse.o: $(CONFIG_H)
--CFLAGS-gengtype-parse.o += -DGENERATOR_FILE
-+CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE
- build/gengtype-parse.o: $(BCONFIG_H)
-
- gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
- gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
- $(XREGEX_H)
- gengtype-state.o: $(CONFIG_H)
--CFLAGS-gengtype-state.o += -DGENERATOR_FILE
-+CFLAGS-gengtype-state.o += -DGENERATOR_FILE2
-+CFLAGS-build/gengtype-state.o += -DGENERATOR_FILE
- build/gengtype-state.o: $(BCONFIG_H)
-
- gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h \
- rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \
- $(OBSTACK_H) $(XREGEX_H)
- gengtype.o: $(CONFIG_H)
--CFLAGS-gengtype.o += -DGENERATOR_FILE
-+CFLAGS-gengtype.o += -DGENERATOR_FILE2
-+CFLAGS-build/gengtype.o += -DGENERATOR_FILE
- build/gengtype.o: $(BCONFIG_H)
-
- build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \
-@@ -3988,7 +3990,7 @@
- # any system header is included.
- gengtype-lex.c : gengtype-lex.l
- -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \
-- echo '#include "bconfig.h"' > $@.tmp; \
-+ echo '' > $@.tmp; \
- cat $@ >> $@.tmp; \
- mv $@.tmp $@; \
- }
-Index: gcc-4.8.1/gcc/double-int.h
-===================================================================
---- gcc-4.8.1.orig/gcc/double-int.h 2013-01-30 11:04:30.000000000 +0000
-+++ gcc-4.8.1/gcc/double-int.h 2013-08-19 11:41:51.564012719 +0000
-@@ -448,10 +448,12 @@
-
-
- #ifndef GENERATOR_FILE
-+#ifndef GENERATOR_FILE2
- /* Conversion to and from GMP integer representations. */
-
- void mpz_set_double_int (mpz_t, double_int, bool);
- double_int mpz_get_double_int (const_tree, mpz_t, bool);
- #endif
-+#endif
-
- #endif /* DOUBLE_INT_H */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0046-libatomic-deptracking.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0046-libatomic-deptracking.patch
deleted file mode 100644
index 6ea4f4276..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0046-libatomic-deptracking.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-gcc 4.8 won't build with --disable-dependency-tracking since the *.Ppo files
-don't get created unless --enable-dependency-tracking is true.
-
-This patch ensures we only use those compiler options when its enabled.
-
-Upstream-Status: Submitted
-
-(Problem was already reported upstream, attached this patch there
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
-
-RP
-2012/09/22
-
-Index: gcc-4.8.1/libatomic/Makefile.am
-===================================================================
---- gcc-4.8.1.orig/libatomic/Makefile.am 2013-01-14 18:16:23.000000000 +0000
-+++ gcc-4.8.1/libatomic/Makefile.am 2013-09-22 10:38:18.904064750 +0000
-@@ -100,7 +100,8 @@
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
-
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
-Index: gcc-4.8.1/libatomic/Makefile.in
-===================================================================
---- gcc-4.8.1.orig/libatomic/Makefile.in 2013-05-31 09:09:26.000000000 +0000
-+++ gcc-4.8.1/libatomic/Makefile.in 2013-09-22 10:40:42.520059917 +0000
-@@ -298,7 +298,8 @@
- PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0047-repomembug.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0047-repomembug.patch
deleted file mode 100644
index 9afd55cbd..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0047-repomembug.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-When compiling a project using -frepo, .rpo files are written alongside
-the .o file, the symbols either have O or C against them. During final linking,
-the objects can be recompiled with some of the entries tweaked/chosen by the
-tlink.c code (visible with TLINK_VERBOSE=3), it does this by changing O -> C
-in the .rpo files.
-
-My tests showed that init_repo (cp/repo.c) was correctly calling
-IDENTIFIER_REPO_CHOSEN against the right identifers and setting the
-chosen bit.
-
-By the time finish_repo() or emit_repo_p() were called, the pointer returned
-by get_identifier() for the symbol marked during init_repo had changed and
-the chosen bit was no longer set. This lead to linking bugs like:
-
-collect: relinking
-collect2: error: '_ZNK6sudoku5ClearINS_8SequenceEEclERS1_' was assigned to 'board.rpo', but was not defined during recompilation, or vice versa
-
-The problem is that the garbage collection is getting called before
-finish_repo() is called and ggc_protect_identifiers is set to false
-so the identifiers are not preserved. They are recreated but the
-chosen bits get wiped out which is why the pointer changes and the
-chosen bit is not set.
-
-The fix is to change ggc_protect_identifiers *after* the finish_repo
-calls are made.
-
-Reproduction is tricky since you need to trigger the garbage collector at
-just the right moment.
-
-RP 2013/10/9
-
-[YOCTO #5133]
-
-Upstream-Status: Pending
-
-Index: gcc-4.8.1/gcc/toplev.c
-===================================================================
---- gcc-4.8.1.orig/gcc/toplev.c 2013-03-28 08:29:51.000000000 +0000
-+++ gcc-4.8.1/gcc/toplev.c 2013-10-09 20:27:17.089228023 +0000
-@@ -551,11 +551,11 @@
- if (flag_syntax_only || flag_wpa)
- return;
-
-- ggc_protect_identifiers = false;
--
- /* This must also call finalize_compilation_unit. */
- lang_hooks.decls.final_write_globals ();
-
-+ ggc_protect_identifiers = false;
-+
- if (seen_error ())
- return;
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
deleted file mode 100644
index b98f8ff01..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 9e0e19eac2562f73858602fe26e2044eb8b20c47 Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
-Date: Wed, 5 Feb 2014 16:52:31 +0200
-Subject: [PATCH] Enable SPE & AltiVec generation on powepc*linux target
-
-When is configured with --target=powerpc-linux, the resulting GCC will
-not be able to generate code for SPE targets (e500v1/v2).
-GCC configured with --target=powerpc-linuxspe will not be able to
-generate AltiVec instructions (for e6500).
-This patch modifies the configured file such that SPE or AltiVec code
-can be generated when gcc is configured with --target=powerpc-linux.
-The ABI and speciffic instructions can be selected through the
-"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
----
- gcc/config.gcc | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index cb7a94e..d392c2b 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2068,7 +2068,12 @@ powerpc-*-rtems*)
- tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm"
- ;;
- powerpc*-*-linux*)
-- tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
-+ case ${target} in
-+ powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
-+ tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" ;;
-+ *)
-+ tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h" ;;
-+ esac
- extra_options="${extra_options} rs6000/sysv4.opt"
- tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
- case ${target} in
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch
deleted file mode 100644
index aead6f67b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0050-Revert-Use-dbx_reg_number-for-spanning-registers.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-Upstream-Status: Pending
-
-From cb9b1c041b634a4c128896e3d3eed4082608c797 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 3 May 2014 19:25:17 -0700
-Subject: [PATCH] Revert "2013-05-21 Christian Bruel
- <christian.bruel@st.com>"
-
-This reverts commit 3983036a8b6b2710c57777194f21507819a73553.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Conflicts:
- gcc/ChangeLog
----
- gcc/ChangeLog | 219 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
- gcc/dwarf2out.c | 33 +++++----
- 2 files changed, 234 insertions(+), 18 deletions(-)
-
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 1272326..6ac2b28 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -10870,27 +10870,25 @@ static dw_loc_descr_ref
- multiple_reg_loc_descriptor (rtx rtl, rtx regs,
- enum var_init_status initialized)
- {
-- int size, i;
-+ int nregs, size, i;
-+ unsigned reg;
- dw_loc_descr_ref loc_result = NULL;
-
-- /* Simple, contiguous registers. */
-- if (regs == NULL_RTX)
-- {
-- unsigned reg = REGNO (rtl);
-- int nregs;
--
-+ reg = REGNO (rtl);
- #ifdef LEAF_REG_REMAP
-- if (crtl->uses_only_leaf_regs)
-- {
-- int leaf_reg = LEAF_REG_REMAP (reg);
-- if (leaf_reg != -1)
-- reg = (unsigned) leaf_reg;
-- }
-+ if (crtl->uses_only_leaf_regs)
-+ {
-+ int leaf_reg = LEAF_REG_REMAP (reg);
-+ if (leaf_reg != -1)
-+ reg = (unsigned) leaf_reg;
-+ }
- #endif
-+ gcc_assert ((unsigned) DBX_REGISTER_NUMBER (reg) == dbx_reg_number (rtl));
-+ nregs = hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)];
-
-- gcc_assert ((unsigned) DBX_REGISTER_NUMBER (reg) == dbx_reg_number (rtl));
-- nregs = hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)];
--
-+ /* Simple, contiguous registers. */
-+ if (regs == NULL_RTX)
-+ {
- size = GET_MODE_SIZE (GET_MODE (rtl)) / nregs;
-
- loc_result = NULL;
-@@ -10918,9 +10916,10 @@ multiple_reg_loc_descriptor (rtx rtl, rtx regs,
- {
- dw_loc_descr_ref t;
-
-- t = one_reg_loc_descriptor (dbx_reg_number (XVECEXP (regs, 0, i)),
-+ t = one_reg_loc_descriptor (REGNO (XVECEXP (regs, 0, i)),
- VAR_INIT_STATUS_INITIALIZED);
- add_loc_descr (&loc_result, t);
-+ size = GET_MODE_SIZE (GET_MODE (XVECEXP (regs, 0, 0)));
- add_loc_descr_op_piece (&loc_result, size);
- }
-
---
-1.9.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0051-eabispe.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0051-eabispe.patch
deleted file mode 100644
index 55e38903f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0051-eabispe.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Pending
-
-Taken from http://gcc.gnu.org/ml/gcc-patches/2014-04/msg02064.html
-
-2014-04-30 Cesar Philippidis <cesar@codesourcery.com>
-
- gcc/
- * dwarf2cfi.c (dwf_regno): Don't assert reg is a pseudo
- register.
-
-
-diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
-index 4180890..40ef0e2 100644
---- a/gcc/dwarf2cfi.c
-+++ b/gcc/dwarf2cfi.c
-@@ -906,7 +906,6 @@ notice_eh_throw (rtx insn)
- static inline unsigned
- dwf_regno (const_rtx reg)
- {
-- gcc_assert (REGNO (reg) < FIRST_PSEUDO_REGISTER);
- return DWARF_FRAME_REGNUM (REGNO (reg));
- }
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch
deleted file mode 100644
index f6958b32c..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0052-Add-target-hook-to-override-DWARF2-frame-register-si.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From d626297e87e19251a284ea1e9360e831b48999ca Mon Sep 17 00:00:00 2001
-From: mpf <mpf@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 4 Sep 2014 08:32:05 +0000
-Subject: [PATCH] Add target hook to override DWARF2 frame register size
-
-gcc/
-
- * target.def (TARGET_DWARF_FRAME_REG_MODE): New target hook.
- * targhooks.c (default_dwarf_frame_reg_mode): New function.
- * targhooks.h (default_dwarf_frame_reg_mode): New prototype.
- * doc/tm.texi.in (TARGET_DWARF_FRAME_REG_MODE): Document.
- * doc/tm.texi: Regenerate.
- * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Abstract mode
- selection logic to default_dwarf_frame_reg_mode.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214898 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport [gcc 5.0]
-
----
- gcc/ChangeLog | 10 ++++++++++
- gcc/doc/tm.texi | 7 +++++++
- gcc/doc/tm.texi.in | 2 ++
- gcc/dwarf2cfi.c | 4 +---
- gcc/target.def | 11 +++++++++++
- gcc/targhooks.c | 13 +++++++++++++
- gcc/targhooks.h | 1 +
- 7 files changed, 45 insertions(+), 3 deletions(-)
-
-Index: gcc-4.9.2/gcc/doc/tm.texi
-===================================================================
---- gcc-4.9.2.orig/gcc/doc/tm.texi
-+++ gcc-4.9.2/gcc/doc/tm.texi
-@@ -9017,6 +9017,13 @@ register in Dwarf. Otherwise, this hook
- If not defined, the default is to return @code{NULL_RTX}.
- @end deftypefn
-
-+@deftypefn {Target Hook} {enum machine_mode} TARGET_DWARF_FRAME_REG_MODE (int @var{regno})
-+Given a register, this hook should return the mode which the
-+corresponding Dwarf frame register should have. This is normally
-+used to return a smaller mode than the raw mode to prevent call
-+clobbered parts of a register altering the frame register size
-+@end deftypefn
-+
- @deftypefn {Target Hook} void TARGET_INIT_DWARF_REG_SIZES_EXTRA (tree @var{address})
- If some registers are represented in Dwarf-2 unwind information in
- multiple pieces, define this hook to fill in information about the
-Index: gcc-4.9.2/gcc/doc/tm.texi.in
-===================================================================
---- gcc-4.9.2.orig/gcc/doc/tm.texi.in
-+++ gcc-4.9.2/gcc/doc/tm.texi.in
-@@ -6745,6 +6745,8 @@ the target supports DWARF 2 frame unwind
-
- @hook TARGET_DWARF_REGISTER_SPAN
-
-+@hook TARGET_DWARF_FRAME_REG_MODE
-+
- @hook TARGET_INIT_DWARF_REG_SIZES_EXTRA
-
- @hook TARGET_ASM_TTYPE
-Index: gcc-4.9.2/gcc/dwarf2cfi.c
-===================================================================
---- gcc-4.9.2.orig/gcc/dwarf2cfi.c
-+++ gcc-4.9.2/gcc/dwarf2cfi.c
-@@ -271,11 +271,9 @@ expand_builtin_init_dwarf_reg_sizes (tre
- if (rnum < DWARF_FRAME_REGISTERS)
- {
- HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
-- enum machine_mode save_mode = reg_raw_mode[i];
- HOST_WIDE_INT size;
-+ enum machine_mode save_mode = targetm.dwarf_frame_reg_mode (i);
-
-- if (HARD_REGNO_CALL_PART_CLOBBERED (i, save_mode))
-- save_mode = choose_hard_reg_mode (i, 1, true);
- if (dnum == DWARF_FRAME_RETURN_COLUMN)
- {
- if (save_mode == VOIDmode)
-Index: gcc-4.9.2/gcc/target.def
-===================================================================
---- gcc-4.9.2.orig/gcc/target.def
-+++ gcc-4.9.2/gcc/target.def
-@@ -3218,6 +3218,17 @@ If not defined, the default is to return
- rtx, (rtx reg),
- hook_rtx_rtx_null)
-
-+/* Given a register return the mode of the corresponding DWARF frame
-+ register. */
-+DEFHOOK
-+(dwarf_frame_reg_mode,
-+ "Given a register, this hook should return the mode which the\n\
-+corresponding Dwarf frame register should have. This is normally\n\
-+used to return a smaller mode than the raw mode to prevent call\n\
-+clobbered parts of a register altering the frame register size",
-+ enum machine_mode, (int regno),
-+ default_dwarf_frame_reg_mode)
-+
- /* If expand_builtin_init_dwarf_reg_sizes needs to fill in table
- entries not corresponding directly to registers below
- FIRST_PSEUDO_REGISTER, this hook should generate the necessary
-Index: gcc-4.9.2/gcc/targhooks.c
-===================================================================
---- gcc-4.9.2.orig/gcc/targhooks.c
-+++ gcc-4.9.2/gcc/targhooks.c
-@@ -1438,6 +1438,19 @@ default_debug_unwind_info (void)
- return UI_NONE;
- }
-
-+/* Determine the correct mode for a Dwarf frame register that represents
-+ register REGNO. */
-+
-+enum machine_mode
-+default_dwarf_frame_reg_mode (int regno)
-+{
-+ enum machine_mode save_mode = reg_raw_mode[regno];
-+
-+ if (HARD_REGNO_CALL_PART_CLOBBERED (regno, save_mode))
-+ save_mode = choose_hard_reg_mode (regno, 1, true);
-+ return save_mode;
-+}
-+
- /* To be used by targets where reg_raw_mode doesn't return the right
- mode for registers used in apply_builtin_return and apply_builtin_arg. */
-
-Index: gcc-4.9.2/gcc/targhooks.h
-===================================================================
---- gcc-4.9.2.orig/gcc/targhooks.h
-+++ gcc-4.9.2/gcc/targhooks.h
-@@ -194,6 +194,7 @@ extern int default_label_align_max_skip
- extern int default_jump_align_max_skip (rtx);
- extern section * default_function_section(tree decl, enum node_frequency freq,
- bool startup, bool exit);
-+extern enum machine_mode default_dwarf_frame_reg_mode (int);
- extern enum machine_mode default_get_reg_raw_mode (int);
-
- extern void *default_get_pch_validity (size_t *);
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch
deleted file mode 100644
index 23b445c9e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0053-gcc-fix-segfault-from-calling-free-on-non-malloc-d-a.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From a22a222c8f9299f6c07a0274388ade7d4ab8c28d Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Fri, 20 Jun 2014 16:41:08 -0400
-Subject: [PATCH] gcc: fix segfault from calling free on non-malloc'd area
-
-We see the following on a 32bit gcc installed on 64 bit host:
-
- Reading symbols from ./i586-pokymllib32-linux-gcc...done.
- (gdb) run
- Starting program: x86-pokymllib32-linux/lib32-gcc/4.9.0-r0/image/usr/bin/i586-pokymllib32-linux-gcc
-
- Program received signal SIGSEGV, Segmentation fault.
- 0xf7e957e0 in free () from /lib/i386-linux-gnu/libc.so.6
- (gdb) bt
- #0 0xf7e957e0 in free () from /lib/i386-linux-gnu/libc.so.6
- #1 0x0804b73c in set_multilib_dir () at gcc-4.9.0/gcc/gcc.c:7827
- #2 main (argc=1, argv=0xffffd504) at gcc-4.9.0/gcc/gcc.c:6688
- (gdb)
-
-The problem arises because we conditionally assign the pointer we
-eventually free, and the conditional may assign the pointer to the
-non-malloc'd internal string "." which fails when we free it here:
-
- if (multilib_dir == NULL && multilib_os_dir != NULL
- && strcmp (multilib_os_dir, ".") == 0)
- {
- free (CONST_CAST (char *, multilib_os_dir));
- ...
-
-As suggested by Jakub, ensure the "." case is also malloc'd via
-xstrdup() and hence the pointer for the "." case can be freed.
-
-Cc: Jakub Jelinek <jakub@redhat.com>
-Cc: Jeff Law <law@redhat.com>
-Cc: Matthias Klose <doko@ubuntu.com>
-CC: Tobias Burnus <burnus@net-b.de>
-Upstream-Status: Accepted [ https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02069.html ]
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 9ac18e60d801..168acf7eb0c9 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -7790,10 +7790,15 @@ set_multilib_dir (void)
- q2++;
- if (*q2 == ':')
- ml_end = q2;
-- new_multilib_os_dir = XNEWVEC (char, ml_end - q);
-- memcpy (new_multilib_os_dir, q + 1, ml_end - q - 1);
-- new_multilib_os_dir[ml_end - q - 1] = '\0';
-- multilib_os_dir = *new_multilib_os_dir ? new_multilib_os_dir : ".";
-+ if (ml_end - q == 1)
-+ multilib_os_dir = xstrdup (".");
-+ else
-+ {
-+ new_multilib_os_dir = XNEWVEC (char, ml_end - q);
-+ memcpy (new_multilib_os_dir, q + 1, ml_end - q - 1);
-+ new_multilib_os_dir[ml_end - q - 1] = '\0';
-+ multilib_os_dir = new_multilib_os_dir;
-+ }
-
- if (q2 < end && *q2 == ':')
- {
---
-1.9.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch
deleted file mode 100644
index 7e8efa1e8..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0054-gcc-Makefile.in-fix-parallel-building-failure.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-gcc/Makefile.in: fix parallel building failure
-
-The gcc-ar.o, gcc-nm.o, gcc-ranlib.o and errors.o included
-config.h which was a generated file. But no explicity rule
-to clarify the dependency. There was potential building
-failure while parallel make.
-
-For gcc-ar.o, gcc-nm.o and gcc-ranlib.o, they were compiled from one C
-source file gcc-ar.c, we add them to ALL_HOST_BACKEND_OBJS, so the
-'$(ALL_HOST_OBJS) : | $(generated_files)' rule could work for these
-objects.
-
-For errors.o, it is part of gengtype, and the gengtype generator program
-is special: Two versions are built. One is for the build machine, and one
-is for the host. We refered what gengtype-parse.o did (which also is part
-of gengtype).
-
-[GCC #61899]
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899
-
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/Makefile.in | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 6475cba..56e50bb 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -1481,13 +1481,16 @@ OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
- opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
- hash-table.o file-find.o
-
-+# Objects compiled from one C source file gcc-ar.c
-+OBJS-gcc-ar = gcc-ar.o gcc-nm.o gcc-ranlib.o
-+
- # This lists all host objects for the front ends.
- ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
-
- ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
- $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
- $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
-- lto-wrapper.o
-+ lto-wrapper.o $(OBJS-gcc-ar)
-
- # This lists all host object files, whether they are included in this
- # compilation or not.
-@@ -2437,6 +2440,8 @@ gengtype-parse.o: $(CONFIG_H)
- CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE
- build/gengtype-parse.o: $(BCONFIG_H)
-
-+errors.o : $(CONFIG_H)
-+
- gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
- gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
- $(XREGEX_H)
---
-1.8.1.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0055-dwarf-reg-processing-helper.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0055-dwarf-reg-processing-helper.patch
deleted file mode 100644
index 557dab0f3..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0055-dwarf-reg-processing-helper.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From 4fd39f1329379e00f958394adde6be96f0caf21f Mon Sep 17 00:00:00 2001
-From: hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 5 Dec 2014 16:53:22 +0000
-Subject: [PATCH] 2014-12-05 Olivier Hainque <hainque@adacore.com>
-
- * dwarf2cfi.c (init_one_dwarf_reg_size): New helper, processing
- one particular reg for expand_builtin_init_dwarf_reg_sizes.
- (expand_builtin_init_dwarf_reg_sizes): Rework to use helper and
- account for dwarf register spans.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218428 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport [gcc 5.0]
-
----
- gcc/ChangeLog | 7 +++++
- gcc/dwarf2cfi.c | 98 +++++++++++++++++++++++++++++++++++++++++++++------------
- 2 files changed, 85 insertions(+), 20 deletions(-)
-
-Index: gcc-4.9.2/gcc/dwarf2cfi.c
-===================================================================
---- gcc-4.9.2.orig/gcc/dwarf2cfi.c
-+++ gcc-4.9.2/gcc/dwarf2cfi.c
-@@ -252,7 +252,59 @@ init_return_column_size (enum machine_mo
- gen_int_mode (size, mode));
- }
-
--/* Generate code to initialize the register size table. */
-+/* Datastructure used by expand_builtin_init_dwarf_reg_sizes and
-+ init_one_dwarf_reg_size to communicate on what has been done by the
-+ latter. */
-+
-+typedef struct
-+{
-+ /* Whether the dwarf return column was initialized. */
-+ bool wrote_return_column;
-+
-+ /* For each hard register REGNO, whether init_one_dwarf_reg_size
-+ was given REGNO to process already. */
-+ bool processed_regno [FIRST_PSEUDO_REGISTER];
-+
-+} init_one_dwarf_reg_state;
-+
-+/* Helper for expand_builtin_init_dwarf_reg_sizes. Generate code to
-+ initialize the dwarf register size table entry corresponding to register
-+ REGNO in REGMODE. TABLE is the table base address, SLOTMODE is the mode to
-+ use for the size entry to initialize, and INIT_STATE is the communication
-+ datastructure conveying what we're doing to our caller. */
-+
-+static
-+void init_one_dwarf_reg_size (int regno, machine_mode regmode,
-+ rtx table, machine_mode slotmode,
-+ init_one_dwarf_reg_state *init_state)
-+{
-+ const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
-+ const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
-+
-+ const HOST_WIDE_INT slotoffset = rnum * GET_MODE_SIZE (slotmode);
-+ const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
-+
-+ init_state->processed_regno[regno] = true;
-+
-+ if (rnum >= DWARF_FRAME_REGISTERS)
-+ return;
-+
-+ if (dnum == DWARF_FRAME_RETURN_COLUMN)
-+ {
-+ if (regmode == VOIDmode)
-+ return;
-+ init_state->wrote_return_column = true;
-+ }
-+
-+ if (slotoffset < 0)
-+ return;
-+
-+ emit_move_insn (adjust_address (table, slotmode, slotoffset),
-+ gen_int_mode (regsize, slotmode));
-+}
-+
-+/* Generate code to initialize the dwarf register size table located
-+ at the provided ADDRESS. */
-
- void
- expand_builtin_init_dwarf_reg_sizes (tree address)
-@@ -261,35 +313,40 @@ expand_builtin_init_dwarf_reg_sizes (tre
- enum machine_mode mode = TYPE_MODE (char_type_node);
- rtx addr = expand_normal (address);
- rtx mem = gen_rtx_MEM (BLKmode, addr);
-- bool wrote_return_column = false;
-+
-+ init_one_dwarf_reg_state init_state;
-+
-+ memset ((char *)&init_state, 0, sizeof (init_state));
-
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- {
-- unsigned int dnum = DWARF_FRAME_REGNUM (i);
-- unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
--
-- if (rnum < DWARF_FRAME_REGISTERS)
-- {
-- HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
-- HOST_WIDE_INT size;
-- enum machine_mode save_mode = targetm.dwarf_frame_reg_mode (i);
-+ machine_mode save_mode;
-+ rtx span;
-
-- if (dnum == DWARF_FRAME_RETURN_COLUMN)
-+ /* No point in processing a register multiple times. This could happen
-+ with register spans, e.g. when a reg is first processed as a piece of
-+ a span, then as a register on its own later on. */
-+
-+ if (init_state.processed_regno[i])
-+ continue;
-+
-+ save_mode = targetm.dwarf_frame_reg_mode (i);
-+ span = targetm.dwarf_register_span (gen_rtx_REG (save_mode, i));
-+ if (!span)
-+ init_one_dwarf_reg_size (i, save_mode, mem, mode, &init_state);
-+ else
-+ {
-+ for (int si = 0; si < XVECLEN (span, 0); si++)
- {
-- if (save_mode == VOIDmode)
-- continue;
-- wrote_return_column = true;
-- }
-- size = GET_MODE_SIZE (save_mode);
-- if (offset < 0)
-- continue;
-+ rtx reg = XVECEXP (span, 0, si);
-+ init_one_dwarf_reg_size
-+ (REGNO (reg), GET_MODE (reg), mem, mode, &init_state);
-+ }
-
-- emit_move_insn (adjust_address (mem, mode, offset),
-- gen_int_mode (size, mode));
- }
- }
-
-- if (!wrote_return_column)
-+ if (!init_state.wrote_return_column)
- init_return_column_size (mode, mem, DWARF_FRAME_RETURN_COLUMN);
-
- #ifdef DWARF_ALT_FRAME_RETURN_COLUMN
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0056-define-default-cfa-register-mapping.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0056-define-default-cfa-register-mapping.patch
deleted file mode 100644
index 3b6c94c49..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0056-define-default-cfa-register-mapping.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From c0235a33de8c4f78cce35b2a8c2035c83fe1bd14 Mon Sep 17 00:00:00 2001
-From: hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 5 Dec 2014 17:01:42 +0000
-Subject: [PATCH] 2014-12-05 Olivier Hainque <hainque@adacore.com>
-
- gcc/
- * defaults.h: (DWARF_REG_TO_UNWIND_COLUMN): Define default.
- * dwarf2cfi.c (init_one_dwarf_reg_size): Honor
- DWARF_REG_TO_UNWIND_COLUMN.
-
- libgcc/
- * unwind-dw2.c (DWARF_REG_TO_UNWIND_COLUMN): Remove default def,
- now provided by defaults.h.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218429 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport [gcc 5.0]
-
----
- gcc/ChangeLog | 6 ++++++
- gcc/defaults.h | 5 +++++
- gcc/dwarf2cfi.c | 3 ++-
- libgcc/ChangeLog | 5 +++++
- libgcc/unwind-dw2.c | 4 ----
- 5 files changed, 18 insertions(+), 5 deletions(-)
-
-Index: gcc-4.9.2/gcc/defaults.h
-===================================================================
---- gcc-4.9.2.orig/gcc/defaults.h
-+++ gcc-4.9.2/gcc/defaults.h
-@@ -438,6 +438,11 @@ see the files COPYING3 and COPYING.RUNTI
- #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
- #endif
-
-+/* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
-+#ifndef DWARF_REG_TO_UNWIND_COLUMN
-+#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
-+#endif
-+
- /* Map register numbers held in the call frame info that gcc has
- collected using DWARF_FRAME_REGNUM to those that should be output in
- .debug_frame and .eh_frame. */
-Index: gcc-4.9.2/gcc/dwarf2cfi.c
-===================================================================
---- gcc-4.9.2.orig/gcc/dwarf2cfi.c
-+++ gcc-4.9.2/gcc/dwarf2cfi.c
-@@ -280,8 +280,9 @@ void init_one_dwarf_reg_size (int regno,
- {
- const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
- const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
-+ const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum);
-
-- const HOST_WIDE_INT slotoffset = rnum * GET_MODE_SIZE (slotmode);
-+ const HOST_WIDE_INT slotoffset = dcol * GET_MODE_SIZE (slotmode);
- const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
-
- init_state->processed_regno[regno] = true;
-Index: gcc-4.9.2/libgcc/unwind-dw2.c
-===================================================================
---- gcc-4.9.2.orig/libgcc/unwind-dw2.c
-+++ gcc-4.9.2/libgcc/unwind-dw2.c
-@@ -55,10 +55,6 @@
- #define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
- #endif
-
--#ifndef DWARF_REG_TO_UNWIND_COLUMN
--#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
--#endif
--
- /* ??? For the public function interfaces, we tend to gcc_assert that the
- column numbers are in range. For the dwarf2 unwind info this does happen,
- although so far in a case that doesn't actually matter.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch
deleted file mode 100644
index f29559698..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0057-aarch64-config.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Disable the MULTILIB_OSDIRNAMES and other multilib options.
-
-Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
-systems where the libdir is NOT set to /lib64. This is allowed by the ABI, as
-long as the dynamic loader is present in /lib.
-
-We simply want to use the default rules in gcc to find and configure the
-normal libdir.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux
-===================================================================
---- gcc-4.9.1.orig/gcc/config/aarch64/t-aarch64-linux
-+++ gcc-4.9.1/gcc/config/aarch64/t-aarch64-linux
-@@ -21,11 +21,11 @@
- LIB1ASMSRC = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
-
--AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
--MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-+#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
-+#MULTILIB_OSDIRNAMES = .=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-
- # Disable the multilib for linux-gnu targets for the time being; focus
- # on the baremetal targets.
--MULTILIB_OPTIONS =
--MULTILIB_DIRNAMES =
-+#MULTILIB_OPTIONS =
-+#MULTILIB_DIRNAMES =
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch
deleted file mode 100644
index d442ba8a8..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0058-gcc-r212171.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From ca03cf1b133d66eb978c68f6dbc345e9aabcba88 Mon Sep 17 00:00:00 2001
-From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 30 Jun 2014 19:30:52 +0000
-Subject: [PATCH] r212171
-
-* except.c (emit_note_eh_region_end): New helper
- function. (convert_to_eh_region_ranges): Use
- emit_note_eh_region_end to emit EH_REGION_END note.
- * jump.c (cleanup_barriers): Do not split a call and its
- corresponding CALL_ARG_LOCATION note.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212171 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport [https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=212171]
-Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
----
- gcc/except.c | 23 ++++++++++++++++++-----
- gcc/jump.c | 19 +++++++++++++++----
- 2 files changed, 33 insertions(+), 9 deletions(-)
-
-diff --git a/gcc/except.c b/gcc/except.c
-index dc5c1d2..7ac114f 100644
---- a/gcc/except.c
-+++ b/gcc/except.c
-@@ -2466,6 +2466,20 @@ add_call_site (rtx landing_pad, int action, int section)
- return call_site_base + crtl->eh.call_site_record_v[section]->length () - 1;
- }
-
-+static rtx
-+emit_note_eh_region_end (rtx insn)
-+{
-+ rtx next = NEXT_INSN (insn);
-+
-+ /* Make sure we do not split a call and its corresponding
-+ CALL_ARG_LOCATION note. */
-+ if (next && NOTE_P (next)
-+ && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
-+ insn = next;
-+
-+ return emit_note_after (NOTE_INSN_EH_REGION_END, insn);
-+}
-+
- /* Turn REG_EH_REGION notes back into NOTE_INSN_EH_REGION notes.
- The new note numbers will not refer to region numbers, but
- instead to call site entries. */
-@@ -2544,8 +2558,8 @@ convert_to_eh_region_ranges (void)
- note = emit_note_before (NOTE_INSN_EH_REGION_BEG,
- first_no_action_insn_before_switch);
- NOTE_EH_HANDLER (note) = call_site;
-- note = emit_note_after (NOTE_INSN_EH_REGION_END,
-- last_no_action_insn_before_switch);
-+ note
-+ = emit_note_eh_region_end (last_no_action_insn_before_switch);
- NOTE_EH_HANDLER (note) = call_site;
- gcc_assert (last_action != -3
- || (last_action_insn
-@@ -2569,8 +2583,7 @@ convert_to_eh_region_ranges (void)
- first_no_action_insn = NULL_RTX;
- }
-
-- note = emit_note_after (NOTE_INSN_EH_REGION_END,
-- last_action_insn);
-+ note = emit_note_eh_region_end (last_action_insn);
- NOTE_EH_HANDLER (note) = call_site;
- }
-
-@@ -2617,7 +2630,7 @@ convert_to_eh_region_ranges (void)
-
- if (last_action >= -1 && ! first_no_action_insn)
- {
-- note = emit_note_after (NOTE_INSN_EH_REGION_END, last_action_insn);
-+ note = emit_note_eh_region_end (last_action_insn);
- NOTE_EH_HANDLER (note) = call_site;
- }
-
-diff --git a/gcc/jump.c b/gcc/jump.c
-index 9418f65..a5e5f52 100644
---- a/gcc/jump.c
-+++ b/gcc/jump.c
-@@ -121,15 +121,26 @@ rebuild_jump_labels_chain (rtx chain)
- static unsigned int
- cleanup_barriers (void)
- {
-- rtx insn, next, prev;
-- for (insn = get_insns (); insn; insn = next)
-+ rtx insn;
-+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
- {
-- next = NEXT_INSN (insn);
- if (BARRIER_P (insn))
- {
-- prev = prev_nonnote_insn (insn);
-+ rtx prev = prev_nonnote_insn (insn);
- if (!prev)
- continue;
-+
-+ if (CALL_P (prev))
-+ {
-+ /* Make sure we do not split a call and its corresponding
-+ CALL_ARG_LOCATION note. */
-+ rtx next = NEXT_INSN (prev);
-+
-+ if (NOTE_P (next)
-+ && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
-+ prev = next;
-+ }
-+
- if (BARRIER_P (prev))
- delete_insn (insn);
- else if (prev != PREV_INSN (insn))
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch
deleted file mode 100644
index de827cbda..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0059-gcc-PR-rtl-optimization-63348.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 6eae3e637fcc22d21b51d44d61e3a9cb4825e776 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Thu, 30 Oct 2014 20:37:14 -0700
-Subject: [PATCH]PR rtl-optimization/63348
-
-PR rtl-optimization/63348
-* emit-rtl.c (try_split): Do not emit extra barrier.
-
-Note: this patch is to fix the side effect introduced by r212171 which was reported at:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63348
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215613 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport [https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=215613]
-Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- gcc/emit-rtl.c | 11 -----------
- 1 files changed, 0 insertions(+), 11 deletions(-)
-
-diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
-index 4736f8d..ae69dbd 100644
---- a/gcc/emit-rtl.c
-+++ b/gcc/emit-rtl.c
-@@ -3422,7 +3422,6 @@ try_split (rtx pat, rtx trial, int last)
- {
- rtx before = PREV_INSN (trial);
- rtx after = NEXT_INSN (trial);
-- int has_barrier = 0;
- rtx note, seq, tem;
- int probability;
- rtx insn_last, insn;
-@@ -3441,14 +3440,6 @@ try_split (rtx pat, rtx trial, int last)
-
- split_branch_probability = -1;
-
-- /* If we are splitting a JUMP_INSN, it might be followed by a BARRIER.
-- We may need to handle this specially. */
-- if (after && BARRIER_P (after))
-- {
-- has_barrier = 1;
-- after = NEXT_INSN (after);
-- }
--
- if (!seq)
- return trial;
-
-@@ -3594,8 +3585,6 @@ try_split (rtx pat, rtx trial, int last)
- tem = emit_insn_after_setloc (seq, trial, INSN_LOCATION (trial));
-
- delete_insn (trial);
-- if (has_barrier)
-- emit_barrier_after (tem);
-
- /* Recursively call try_split for each new insn created; by the
- time control returns here that insn will be fully split, so
---
-1.7.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch
deleted file mode 100644
index 75a9fdd44..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0060-Only-allow-e500-double-in-SPE_SIMD_REGNO_P-registers.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 5c0092070253113cf0d9c45eacc884b3ecc34d81 Mon Sep 17 00:00:00 2001
-From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Sat, 25 Oct 2014 00:23:17 +0000
-Subject: [PATCH] Only allow e500 double in SPE_SIMD_REGNO_P registers.
-
-rs6000_hard_regno_nregs_internal allows SPE vectors in single
-registers satisfying SPE_SIMD_REGNO_P (i.e. register numbers 0 to
-31). However, the corresponding test for e500 double treats all
-registers as being able to store a 64-bit value, rather than just
-those GPRs.
-
-Logically this inconsistency is wrong; in addition, it causes problems
-unwinding from signal handlers. linux-unwind.h uses
-ARG_POINTER_REGNUM as a place to store the return address from a
-signal handler, but this logic in rs6000_hard_regno_nregs_internal
-results in that being considered an 8-byte register, resulting in
-assertion failures.
-(<https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02625.html> first
-needs to be applied for unwinding to work in general on e500.) This
-patch makes rs6000_hard_regno_nregs_internal handle the e500 double
-case consistently with SPE vectors.
-
-Tested with no regressions with cross to powerpc-linux-gnuspe (given
-the aforementioned patch applied). Failures of signal handling
-unwinding tests such as gcc.dg/cleanup-{8,9,10,11}.c are fixed by this
-patch.
-
- * config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Do
- not allow e500 double in registers not satisyfing
- SPE_SIMD_REGNO_P.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216688 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport [gcc 5.0]
-
----
- gcc/ChangeLog | 6 ++++++
- gcc/config/rs6000/rs6000.c | 2 +-
- 2 files changed, 7 insertions(+), 1 deletion(-)
-
-Index: gcc-4.9.2/gcc/config/rs6000/rs6000.c
-===================================================================
---- gcc-4.9.2.orig/gcc/config/rs6000/rs6000.c
-+++ gcc-4.9.2/gcc/config/rs6000/rs6000.c
-@@ -1703,7 +1703,7 @@ rs6000_hard_regno_nregs_internal (int re
- SCmode so as to pass the value correctly in a pair of
- registers. */
- else if (TARGET_E500_DOUBLE && FLOAT_MODE_P (mode) && mode != SCmode
-- && !DECIMAL_FLOAT_MODE_P (mode))
-+ && !DECIMAL_FLOAT_MODE_P (mode) && SPE_SIMD_REGNO_P (regno))
- reg_size = UNITS_PER_FP_WORD;
-
- else
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0061-target-gcc-includedir.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0061-target-gcc-includedir.patch
deleted file mode 100644
index f48c66dca..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0061-target-gcc-includedir.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Ensure target gcc headers can be included
-
-There are a few headers installed as part of the OpenEmbedded
-gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
-built for the target architecture, these are within the target
-sysroot and not cross/nativesdk; thus they weren't able to be
-found by gcc with the existing search paths. Add support for
-picking up these headers under the sysroot supplied on the gcc
-command line in order to resolve this.
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-Upstream-Status: Pending
-
---- a/gcc/Makefile.in 2014-12-23 11:57:33.327873331 +0000
-+++ b/gcc/Makefile.in 2015-01-21 11:32:35.447305394 +0000
-@@ -587,6 +587,7 @@
-
- # Directory in which the compiler finds libraries etc.
- libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
-+libsubdir_target = gcc/$(target_noncanonical)/$(version)
- # Directory in which the compiler finds executables
- libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
- # Directory in which all plugin resources are installed
-@@ -2534,6 +2535,7 @@
-
- PREPROCESSOR_DEFINES = \
- -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-+ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
- -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
- -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
---- a/gcc/cppdefault.c 2015-01-13 17:40:26.131012725 +0000
-+++ b/gcc/cppdefault.c 2015-01-21 11:30:08.928426492 +0000
-@@ -59,6 +59,10 @@
- /* This is the dir for gcc's private headers. */
- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
- #endif
-+#ifdef GCC_INCLUDE_SUBDIR_TARGET
-+ /* This is the dir for gcc's private headers under the specified sysroot. */
-+ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+#endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-diff --git a/gcc/defaults.h b/gcc/defaults.h
-index f94ae17..d98b40b 100644
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -1390,4 +1390,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-
- #endif /* GCC_INSN_FLAGS_H */
-
-+/* Default prefixes to attach to command names. */
-+
-+#ifndef STANDARD_STARTFILE_PREFIX_1
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#endif
-+#ifndef STANDARD_STARTFILE_PREFIX_2
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#endif
-+
- #endif /* ! GCC_DEFAULTS_H */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 9f0b781..174fca8 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1189,13 +1189,6 @@ static const char *gcc_libexec_prefix;
-
- /* Default prefixes to attach to command names. */
-
--#ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
--#endif
--#ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
--#endif
--
- #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
- #undef MD_EXEC_PREFIX
- #undef MD_STARTFILE_PREFIX
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0062-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0062-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
deleted file mode 100644
index c48bd4847..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0062-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 861bcfd4ae814f351e0c668ee26d01d1331e0422 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:15:27 -0700
-Subject: [PATCH 36/37] Use SYSTEMLIBS_DIR replacement instead of hardcoding
- base_libdir
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: gcc-4.9.2/gcc/config/aarch64/aarch64-linux.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/aarch64/aarch64-linux.h
-+++ gcc-4.9.2/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,7 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}.so.1"
-
- #define CPP_SPEC "%{pthread:-D_REENTRANT}"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0063-nativesdk-gcc-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0063-nativesdk-gcc-support.patch
deleted file mode 100644
index f9efa4537..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0063-nativesdk-gcc-support.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-Being able to build a nativesdk gcc is useful, particularly in cases
-where the host compiler may be of an incompatible version (or a 32
-bit compiler is needed).
-
-Sadly, building nativesdk-gcc is not straight forward. We install
-nativesdk-gcc into a relocatable location and this means that its
-library locations can change. "Normal" sysroot support doesn't help
-in this case since the values of paths like "libdir" change, not just
-base root directory of the system.
-
-In order to handle this we do two things:
-
-a) Add %r into spec file markup which can be used for injected paths
- such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
-b) Add other paths which need relocation into a .gccrelocprefix section
- which the relocation code will notice and adjust automatically.
-
-Upstream-Status: Inappropriate
-RP 2015/7/28
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 5fd3d0a..2de29aa 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -120,6 +120,8 @@ static const char *target_system_root = TARGET_SYSTEM_ROOT;
- #else
- static const char *target_system_root = 0;
- #endif
-+
-+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
-
- /* Nonzero means pass the updated target_system_root to the compiler. */
-
-@@ -384,6 +386,7 @@ or with constant text in a single argument.
- %G process LIBGCC_SPEC as a spec.
- %R Output the concatenation of target_system_root and
- target_sysroot_suffix.
-+ %r Output the base path target_relocatable_prefix
- %S process STARTFILE_SPEC as a spec. A capital S is actually used here.
- %E process ENDFILE_SPEC as a spec. A capital E is actually used here.
- %C process CPP_SPEC as a spec.
-@@ -1218,10 +1221,10 @@ static const char *gcc_libexec_prefix;
- gcc_exec_prefix is set because, in that case, we know where the
- compiler has been installed, and use paths relative to that
- location instead. */
--static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
--static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
--static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
--static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-+static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
-+static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
-+static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
-+static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-
- /* For native compilers, these are well-known paths containing
- components that may be provided by the system. For cross
-@@ -1229,9 +1232,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- static const char *md_exec_prefix = MD_EXEC_PREFIX;
- static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
- static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_1
-+static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_2
-+static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
- = STANDARD_STARTFILE_PREFIX_2;
-
- /* A relative path to be used in finding the location of tools
-@@ -5305,6 +5308,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
- }
- break;
-
-+ case 'r':
-+ obstack_grow (&obstack, target_relocatable_prefix,
-+ strlen (target_relocatable_prefix));
-+ break;
-+
- case 'S':
- value = do_spec_1 (startfile_spec, 0, NULL);
- if (value != 0)
-
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index dad69e6..cf43f28 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -35,6 +35,30 @@
- # undef CROSS_INCLUDE_DIR
- #endif
-
-+static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
-+static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
-+static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
-+static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
-+static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
-+#ifdef LOCAL_INCLUDE_DIR
-+static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
-+#endif
-+#ifdef PREFIX_INCLUDE_DIR
-+static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
-+#endif
-+#ifdef FIXED_INCLUDE_DIR
-+static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
-+#endif
-+#ifdef CROSS_INCLUDE_DIR
-+static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
-+#endif
-+#ifdef TOOL_INCLUDE_DIR
-+static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
-+#endif
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
-+#endif
-+
- const struct default_include cpp_include_defaults[]
- #ifdef INCLUDE_DEFAULTS
- = INCLUDE_DEFAULTS;
-@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
- = {
- #ifdef GPLUSPLUS_INCLUDE_DIR
- /* Pick up GNU C++ generic include files. */
-- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
- /* Pick up GNU C++ target-dependent include files. */
-- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
- #endif
- #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
- /* Pick up GNU C++ backward and deprecated include files. */
-- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
- GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GCC_INCLUDE_DIR
- /* This is the dir for gcc's private headers. */
-- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef GCC_INCLUDE_SUBDIR_TARGET
- /* This is the dir for gcc's private headers under the specified sysroot. */
-- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
- #endif
- #ifdef LOCAL_INCLUDE_DIR
- /* /usr/local/include comes before the fixincluded header files. */
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
-+ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
- #endif
- #ifdef PREFIX_INCLUDE_DIR
-- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
-+ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
- #endif
- #ifdef FIXED_INCLUDE_DIR
- /* This is the dir for fixincludes. */
-- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
-+ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
- /* A multilib suffix needs adding if different multilibs use
- different headers. */
- #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
-@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
- #endif
- #ifdef CROSS_INCLUDE_DIR
- /* One place the target system's headers might be. */
-- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef TOOL_INCLUDE_DIR
- /* Another place the target system's headers might be. */
-- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
-+ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
- #endif
- #ifdef NATIVE_SYSTEM_HEADER_DIR
- /* /usr/include comes dead last. */
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-+ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
- #endif
- { 0, 0, 0, 0, 0, 0 }
- };
-diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
-index 30b6fed..2ef96b7 100644
---- a/gcc/cppdefault.h
-+++ b/gcc/cppdefault.h
-@@ -33,7 +33,8 @@
-
- struct default_include
- {
-- const char *const fname; /* The name of the directory. */
-+ const char *fname; /* The name of the directory. */
-+
- const char *const component; /* The component containing the directory
- (see update_path in prefix.c) */
- const char cplusplus; /* Only look here if we're compiling C++. */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0064-handle-target-sysroot-multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0064-handle-target-sysroot-multilib.patch
deleted file mode 100644
index 53569847f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0064-handle-target-sysroot-multilib.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-Search target sysroot gcc version specific dirs with multilib.
-
-We install the gcc libraries (such as crtbegin.p) into
-<sysroot><libdir>/<target-sys>/5.2.0/
-which is a default search path for GCC (aka multi_suffix in the
-code below). <target-sys> is 'machine' in gcc's terminology. We use
-these directories so that multiple gcc versions could in theory
-co-exist on target.
-
-We only want to build one gcc-cross-canadian per arch and have this work
-for all multilibs. <target-sys> can be handled by mapping the multilib
-<target-sys> to the one used by gcc-cross-canadian, e.g. mips64-polkmllib32-linux
-is symlinked to by mips64-poky-linux.
-
-The default gcc search path in the target sysroot for a "lib64" mutlilib is:
-
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-which means that the lib32 crtbegin.o will be found and the lib64 ones
-will not which leads to compiler failures.
-
-This patch injects a multilib version of that path first so the lib64
-binaries can be found first. With this change the search path becomes:
-
-<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-Upstream-Status: Pending
-RP 2015/7/31
-
-Index: gcc-5.2.0/gcc/gcc.c
-===================================================================
---- gcc-5.2.0.orig/gcc/gcc.c
-+++ gcc-5.2.0/gcc/gcc.c
-@@ -2305,7 +2305,7 @@ for_each_path (const struct path_prefix
- if (path == NULL)
- {
- len = paths->max_len + extra_space + 1;
-- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
-+ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
- path = XNEWVEC (char, len);
- }
-
-@@ -2317,6 +2317,33 @@ for_each_path (const struct path_prefix
- /* Look first in MACHINE/VERSION subdirectory. */
- if (!skip_multi_dir)
- {
-+ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
-+ {
-+ const char *this_multi;
-+ size_t this_multi_len;
-+
-+ if (pl->os_multilib)
-+ {
-+ this_multi = multi_os_dir;
-+ this_multi_len = multi_os_dir_len;
-+ }
-+ else
-+ {
-+ this_multi = multi_dir;
-+ this_multi_len = multi_dir_len;
-+ }
-+
-+ /* Look in multilib MACHINE/VERSION subdirectory first */
-+ if (this_multi_len)
-+ {
-+ memcpy (path + len, this_multi, this_multi_len + 1);
-+ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
-+ ret = callback (path, callback_info);
-+ if (ret)
-+ break;
-+ }
-+ }
-+
- memcpy (path + len, multi_suffix, suffix_len + 1);
- ret = callback (path, callback_info);
- if (ret)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0065-gcc-483-universal-initializer-no-warning.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0065-gcc-483-universal-initializer-no-warning.patch
deleted file mode 100644
index fde227b8a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0065-gcc-483-universal-initializer-no-warning.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-Fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
-wrong warning when using the universal zero initializer {0}
-
-Backported to GCC 4.8.3
-
-Subject: 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
-X-Git-Url: http://repo.or.cz/w/official-gcc.git/commitdiff_plain/95cdf3fdf2d440eb7775def8e35ab970651c33d9?hp=14a3093e9943937cbc63dfbf4d51ca60f8325b29
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211289 138bc75d-0d04-0410-961f-82ee72b054a4
-
---- gcc-4.8.3.org/gcc/c/c-typeck.c 2014-08-03 20:52:09.257042137 +0200
-+++ gcc-4.8.3/gcc/c/c-typeck.c 2014-08-03 20:57:10.645042614 +0200
-@@ -62,9 +62,9 @@
- if expr.original_code == SIZEOF_EXPR. */
- tree c_last_sizeof_arg;
-
--/* Nonzero if we've already printed a "missing braces around initializer"
-- message within this initializer. */
--static int missing_braces_mentioned;
-+/* Nonzero if we might need to print a "missing braces around
-+ initializer" message within this initializer. */
-+static int found_missing_braces;
-
- static int require_constant_value;
- static int require_constant_elements;
-@@ -6379,6 +6379,9 @@
- /* 1 if this constructor is erroneous so far. */
- static int constructor_erroneous;
-
-+/* 1 if this constructor is the universal zero initializer { 0 }. */
-+static int constructor_zeroinit;
-+
- /* Structure for managing pending initializer elements, organized as an
- AVL tree. */
-
-@@ -6540,7 +6543,7 @@
- constructor_stack = 0;
- constructor_range_stack = 0;
-
-- missing_braces_mentioned = 0;
-+ found_missing_braces = 0;
-
- spelling_base = 0;
- spelling_size = 0;
-@@ -6635,6 +6638,7 @@
- constructor_type = type;
- constructor_incremental = 1;
- constructor_designated = 0;
-+ constructor_zeroinit = 1;
- designator_depth = 0;
- designator_erroneous = 0;
-
-@@ -6832,11 +6836,8 @@
- set_nonincremental_init (braced_init_obstack);
- }
-
-- if (implicit == 1 && warn_missing_braces && !missing_braces_mentioned)
-- {
-- missing_braces_mentioned = 1;
-- warning_init (OPT_Wmissing_braces, "missing braces around initializer");
-- }
-+ if (implicit == 1)
-+ found_missing_braces = 1;
-
- if (TREE_CODE (constructor_type) == RECORD_TYPE
- || TREE_CODE (constructor_type) == UNION_TYPE)
-@@ -6969,16 +6970,23 @@
- }
- }
-
-+ if (vec_safe_length (constructor_elements) != 1)
-+ constructor_zeroinit = 0;
-+
-+ /* Warn when some structs are initialized with direct aggregation. */
-+ if (!implicit && found_missing_braces && warn_missing_braces
-+ && !constructor_zeroinit)
-+ {
-+ warning_init (OPT_Wmissing_braces,
-+ "missing braces around initializer");
-+ }
-+
- /* Warn when some struct elements are implicitly initialized to zero. */
- if (warn_missing_field_initializers
- && constructor_type
- && TREE_CODE (constructor_type) == RECORD_TYPE
- && constructor_unfilled_fields)
- {
-- bool constructor_zeroinit =
-- (vec_safe_length (constructor_elements) == 1
-- && integer_zerop ((*constructor_elements)[0].value));
--
- /* Do not warn for flexible array members or zero-length arrays. */
- while (constructor_unfilled_fields
- && (!DECL_SIZE (constructor_unfilled_fields)
-@@ -8093,6 +8101,9 @@
- designator_depth = 0;
- designator_erroneous = 0;
-
-+ if (!implicit && value.value && !integer_zerop (value.value))
-+ constructor_zeroinit = 0;
-+
- /* Handle superfluous braces around string cst as in
- char x[] = {"foo"}; */
- if (string_flag
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0066-cxxflags-for-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0066-cxxflags-for-build.patch
deleted file mode 100644
index 1105e29f6..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0066-cxxflags-for-build.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-Fix various _FOR_BUILD and related variables
-
-When doing a FOR_BUILD thing, you have to override CFLAGS with
-CFLAGS_FOR_BUILD. And if you use C++, you also have to override
-CXXFLAGS with CXXFLAGS_FOR_BUILD.
-Without this, when building for mingw, you end up trying to use
-the mingw headers for a host build.
-
-The same goes for other variables as well, such as CPPFLAGS,
-CPP, and GMPINC.
-
-Upstream-Status: Pending
-
-Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff --git a/Makefile.in b/Makefile.in
-index 9370174..011c29a 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
- CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -170,6 +171,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-@@ -711,6 +715,7 @@ BASE_FLAGS_TO_PASS = \
- "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
- "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
-+ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
- "EXPECT=$(EXPECT)" \
- "FLEX=$(FLEX)" \
- "INSTALL=$(INSTALL)" \
-diff --git a/Makefile.tpl b/Makefile.tpl
-index 1ea1954..78a59c3 100644
---- a/Makefile.tpl
-+++ b/Makefile.tpl
-@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
- CC="$(CC_FOR_BUILD)"; export CC; \
- CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
- CXX="$(CXX_FOR_BUILD)"; export CXX; \
- CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
- GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
-@@ -172,6 +173,9 @@ BUILD_EXPORTS = \
- # built for the build system to override those in BASE_FLAGS_TO_PASS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
-+ CPP="$(CC_FOR_BUILD) -E" \
-+ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
-@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@
- HOST_EXPORTS = \
- $(BASE_EXPORTS) \
- CC="$(CC)"; export CC; \
-+ CPP="$(CC) -E"; export CPP; \
- ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
- CFLAGS="$(CFLAGS)"; export CFLAGS; \
- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index cd5bc4a..98ae4f4 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -762,7 +762,7 @@ BUILD_LINKERFLAGS = $(BUILD_CXXFLAGS)
- # Native linker and preprocessor flags. For x-fragment overrides.
- BUILD_LDFLAGS=@BUILD_LDFLAGS@
- BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
-+ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
-
- # Actual name to use when installing a native compiler.
- GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
-diff --git a/gcc/configure b/gcc/configure
-index c7ac14b..5ac63e4 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11521,7 +11521,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 50856e6..17a4dfd 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1633,7 +1633,7 @@ else
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
- CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
- LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
-- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
-+ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
- ${realsrcdir}/configure \
- --enable-languages=${enable_languages-all} \
- --target=$target_alias --host=$build_alias --build=$build_alias
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-fix-arm-thumb.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-fix-arm-thumb.patch
deleted file mode 100644
index 2f262e3a3..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-fix-arm-thumb.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Upstream-Status: Accepted
-
-Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
----
-
-2015-11-25 Vladimir Makarov <vmakarov@redhat.com>
-
- PR rtl-optimization/67954
- * lra-constraints.c (curr_insn_transform): Add check on scratch
- pseudo when change class to NO_REGS. Add an assert.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230894 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
-index 4670e81..c62bf6a 100644
---- a/gcc/lra-constraints.c
-+++ b/gcc/lra-constraints.c
-@@ -3725,7 +3725,8 @@ curr_insn_transform (bool check_only_p)
- assigment pass and the scratch pseudo will be
- spilled. Spilled scratch pseudos are transformed
- back to scratches at the LRA end. */
-- && lra_former_scratch_operand_p (curr_insn, i))
-+ && lra_former_scratch_operand_p (curr_insn, i)
-+ && lra_former_scratch_p (REGNO (op)))
- {
- int regno = REGNO (op);
- lra_change_class (regno, NO_REGS, " Change to", true);
-@@ -3734,6 +3735,8 @@ curr_insn_transform (bool check_only_p)
- spilled pseudo as there is only one such insn, the
- current one. */
- reg_renumber[regno] = -1;
-+ lra_assert (bitmap_single_bit_set_p
-+ (&lra_reg_info[REGNO (op)].insn_bitmap));
- }
- /* We can do an optional reload. If the pseudo got a hard
- reg, we might improve the code through inheritance. If
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-gcc-musl-support.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-gcc-musl-support.patch
deleted file mode 100644
index 9a0b5ade4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-gcc-musl-support.patch
+++ /dev/null
@@ -1,267 +0,0 @@
-# HG changeset patch
-# Parent e5b4564f249f8634194bdabef4b3057d0e54ee97
-Adding -mmusl as a musl libc specifier, and the necessary hacks for it to know how to find musl's dynamic linker.
-Upstream-Status: backport [partial]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-
-Index: gcc-4.9.0/gcc/config.gcc
-===================================================================
---- gcc-4.9.0.orig/gcc/config.gcc 2014-04-22 22:44:17.153567150 -0700
-+++ gcc-4.9.0/gcc/config.gcc 2014-04-23 23:54:31.427357051 -0700
-@@ -594,7 +594,7 @@
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # 32-bit x86 processors supported by --with-arch=. Each processor
- # MUST be separated by exactly one space.
-@@ -719,6 +719,9 @@
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-@@ -2328,6 +2331,11 @@
- powerpc*-*-linux*paired*)
- tm_file="${tm_file} rs6000/750cl.h" ;;
- esac
-+ case ${target} in
-+ *-linux*-musl*)
-+ enable_secureplt=yes ;;
-+ esac
-+
- if test x${enable_secureplt} = xyes; then
- tm_file="rs6000/secureplt.h ${tm_file}"
- fi
-Index: gcc-4.9.0/gcc/config/linux.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/linux.h 2014-01-02 14:23:26.000000000 -0800
-+++ gcc-4.9.0/gcc/config/linux.h 2014-04-24 00:11:29.034028895 -0700
-@@ -32,10 +32,12 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -53,18 +55,21 @@
- uClibc or Bionic is the default C library and whether
- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -84,16 +89,16 @@
-
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
-
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
-@@ -127,3 +132,74 @@
- # define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
-
- #endif
-+
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-Index: gcc-4.9.0/gcc/config/linux.opt
-===================================================================
---- gcc-4.9.0.orig/gcc/config/linux.opt 2014-01-02 14:23:26.000000000 -0800
-+++ gcc-4.9.0/gcc/config/linux.opt 2014-04-22 22:44:17.280233817 -0700
-@@ -30,3 +30,7 @@
- muclibc
- Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
-+Use musl C library
-Index: gcc-4.9.0/gcc/ginclude/stddef.h
-===================================================================
---- gcc-4.9.0.orig/gcc/ginclude/stddef.h 2014-01-02 14:23:26.000000000 -0800
-+++ gcc-4.9.0/gcc/ginclude/stddef.h 2014-04-22 22:44:17.280233817 -0700
-@@ -181,6 +181,7 @@
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__ /* BeOS */
- #define __SIZE_T__ /* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -197,6 +198,7 @@
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- || defined(__FreeBSD_kernel__)
- /* __size_t is a typedef on FreeBSD 5, must not trash it. */
-@@ -214,6 +216,7 @@
- typedef long ssize_t;
- #endif /* __BEOS__ */
- #endif /* !(defined (__GNUG__) && defined (size_t)) */
-+#endif /* __DEFINED_size_t */
- #endif /* __size_t */
- #endif /* _SIZET_ */
- #endif /* _GCC_SIZE_T */
-Index: gcc-4.9.0/gcc/config/rs6000/secureplt.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/rs6000/secureplt.h 2014-01-02 14:23:26.000000000 -0800
-+++ gcc-4.9.0/gcc/config/rs6000/secureplt.h 2014-04-23 23:55:15.114024175 -0700
-@@ -18,3 +18,4 @@
- <http://www.gnu.org/licenses/>. */
-
- #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
-+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
-Index: gcc-4.9.0/gcc/config/rs6000/sysv4.h
-===================================================================
---- gcc-4.9.0.orig/gcc/config/rs6000/sysv4.h 2014-04-23 23:52:13.854023015 -0700
-+++ gcc-4.9.0/gcc/config/rs6000/sysv4.h 2014-04-24 00:10:55.550695334 -0700
-@@ -538,6 +538,10 @@
- #define CC1_SECURE_PLT_DEFAULT_SPEC ""
- #endif
-
-+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
-+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
-+#endif
-+
- /* Pass -G xxx to the compiler. */
- #define CC1_SPEC "%{G*} %(cc1_cpu)" \
- "%{meabi: %{!mcall-*: -mcall-sysv }} \
-@@ -585,7 +589,8 @@
-
- /* Override the default target of the linker. */
- #define LINK_TARGET_SPEC \
-- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "")
-+ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \
-+ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}"
-
- /* Any specific OS flags. */
- #define LINK_OS_SPEC "\
-@@ -894,6 +899,7 @@
- { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
- { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
- { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
-+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \
- { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
- { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
- { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0068-musl-dynamic-linker.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0068-musl-dynamic-linker.patch
deleted file mode 100644
index 605ac6675..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0068-musl-dynamic-linker.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-# HG changeset patch
-# Parent 6738fd6f6fcc2a72f2ba527bda3325642af26885
-Support for arm-linux-musl.
-Upstream-Status: Backport [partial]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-
-Index: gcc-4.9.2/gcc/config/arm/linux-eabi.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/arm/linux-eabi.h
-+++ gcc-4.9.2/gcc/config/arm/linux-eabi.h
-@@ -81,6 +81,23 @@
- #undef TARGET_FIX_V4BX_SPEC
- #define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-
-+/* For ARM musl currently supports four dynamic linkers:
-+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
-+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
-+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
-+ musl does not support the legacy OABI mode.
-+ All the dynamic linkers live in /lib.
-+ We default to soft-float, EL. */
-+#undef MUSL_DYNAMIC_LINKER
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
-+#endif
-+#define MUSL_DYNAMIC_LINKER \
-+ SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
-Index: gcc-4.9.2/libitm/config/arm/hwcap.cc
-===================================================================
---- gcc-4.9.2.orig/libitm/config/arm/hwcap.cc
-+++ gcc-4.9.2/libitm/config/arm/hwcap.cc
-@@ -40,7 +40,11 @@ int GTM_hwcap HIDDEN = 0
-
- #ifdef __linux__
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <sys/fcntl.h>
-+#else
-+#include <fcntl.h>
-+#endif
- #include <elf.h>
-
- static void __attribute__((constructor))
-Index: gcc-4.9.2/gcc/config/i386/linux.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/i386/linux.h
-+++ gcc-4.9.2/gcc/config/i386/linux.h
-@@ -21,3 +21,4 @@ along with GCC; see the file COPYING3.
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1"
-Index: gcc-4.9.2/gcc/config/i386/linux64.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/i386/linux64.h
-+++ gcc-4.9.2/gcc/config/i386/linux64.h
-@@ -30,3 +30,8 @@ see the files COPYING3 and COPYING.RUNTI
- #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-+
-+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1"
-+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1"
-+#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1"
-+
-Index: gcc-4.9.2/gcc/config/mips/linux.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/mips/linux.h
-+++ gcc-4.9.2/gcc/config/mips/linux.h
-@@ -23,3 +23,6 @@ along with GCC; see the file COPYING3.
- #undef UCLIBC_DYNAMIC_LINKER
- #define UCLIBC_DYNAMIC_LINKER \
- "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
-+
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-mips.so.1"
-+
-Index: gcc-4.9.2/gcc/config/mips/linux64.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/mips/linux64.h
-+++ gcc-4.9.2/gcc/config/mips/linux64.h
-@@ -39,6 +39,11 @@ along with GCC; see the file COPYING3.
- "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
-
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
-+
-+#define MUSL_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-musl-mips.so.1"
-+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-mips.so.1"
-+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-mips.so.1"
-+
- #define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-- BIONIC_DYNAMIC_LINKERN32)
-+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
-Index: gcc-4.9.2/gcc/config/rs6000/linux64.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/rs6000/linux64.h
-+++ gcc-4.9.2/gcc/config/rs6000/linux64.h
-@@ -375,17 +375,22 @@ extern int dot_symbols;
- #endif
- #define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-powerpc.so.1"
-+#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-powerpc64.so.1"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER32 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
-
- #undef DEFAULT_ASM_ENDIAN
- #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
-Index: gcc-4.9.2/gcc/config/rs6000/sysv4.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/rs6000/sysv4.h
-+++ gcc-4.9.2/gcc/config/rs6000/sysv4.h
-@@ -768,15 +768,19 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
-+
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
-
- #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-Index: gcc-4.9.2/libitm/config/linux/x86/tls.h
-===================================================================
---- gcc-4.9.2.orig/libitm/config/linux/x86/tls.h
-+++ gcc-4.9.2/libitm/config/linux/x86/tls.h
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
-
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
-
- #endif // LIBITM_X86_TLS_H
-Index: gcc-4.9.2/gcc/config/aarch64/aarch64-linux.h
-===================================================================
---- gcc-4.9.2.orig/gcc/config/aarch64/aarch64-linux.h
-+++ gcc-4.9.2/gcc/config/aarch64/aarch64-linux.h
-@@ -25,6 +25,8 @@
-
- #define CPP_SPEC "%{pthread:-D_REENTRANT}"
-
-+#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
-+
- #define LINUX_TARGET_LINK_SPEC "%{h*} \
- %{static:-Bstatic} \
- %{shared:-shared} \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0069-musl-no-fixincludes.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0069-musl-no-fixincludes.patch
deleted file mode 100644
index e2b18a402..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0069-musl-no-fixincludes.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-# HG changeset patch
-# Parent 600a8a422ccaf5627ad1f5a138e7398df2b9e9d8
-Get rid of ever-broken fixincludes on musl.
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-
-Index: gcc-4.9-20140316/fixincludes/mkfixinc.sh
-===================================================================
---- gcc-4.9-20140316.orig/fixincludes/mkfixinc.sh
-+++ gcc-4.9-20140316/fixincludes/mkfixinc.sh
-@@ -19,7 +19,8 @@ case $machine in
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
-- powerpcle-*-eabi* )
-+ powerpcle-*-eabi* | \
-+ *-musl* )
- # IF there is no include fixing,
- # THEN create a no-op fixer and exit
- (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0070-libstdc-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0070-libstdc-musl.patch
deleted file mode 100644
index 048e481dc..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0070-libstdc-musl.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: gcc-4.9-20140316/libstdc++-v3/configure.host
-===================================================================
---- gcc-4.9-20140316.orig/libstdc++-v3/configure.host 2014-03-26 01:12:19.466008193 -0700
-+++ gcc-4.9-20140316/libstdc++-v3/configure.host 2014-03-26 01:43:48.222684357 -0700
-@@ -264,14 +264,24 @@
- os_include_dir="os/bsd/freebsd"
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
-+ # check for musl by target
-+ case "${host_os}" in
-+ *-musl*)
-+ os_include_dir="os/generic"
-+ ;;
-+ *)
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
- elif [ "$bionic" = "yes" ]; then
- os_include_dir="os/bionic"
-+ elif [ "$musl" = "yes" ]; then
-+ os_include_dir="os/generic"
- else
- os_include_dir="os/gnu-linux"
- fi
- ;;
-+ esac
-+ ;;
- hpux*)
- os_include_dir="os/hpux"
- ;;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
deleted file mode 100644
index e8f79b590..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 32593b38082ea65f4c82159254adf1e0dc2423be Mon Sep 17 00:00:00 2001
-From: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 16 Feb 2016 03:15:15 -0500
-Subject: [PATCH] Ignore -fdebug-prefix-map in producer string (by Daniel Kahn
- Gillmor)
-
-* dwarf2out.c (gen_producer_string): Ignore -fdebug-prefix-map.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231835 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/dwarf2out.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 3614c10..526f114 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -19670,6 +19670,7 @@ gen_producer_string (void)
- case OPT_fpreprocessed:
- case OPT_fltrans_output_list_:
- case OPT_fresolution_:
-+ case OPT_fdebug_prefix_map_:
- /* Ignore these. */
- continue;
- default:
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0072-support-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0072-support-ffile-prefix-map.patch
deleted file mode 100644
index 9809a6a22..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0072-support-ffile-prefix-map.patch
+++ /dev/null
@@ -1,284 +0,0 @@
-From e863be798ed13312a0faf0b961275f211a8123ab Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 17 Mar 2016 00:32:17 -0400
-Subject: [PATCH] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
-
-Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one
-directory name (old) to another (new) in __FILE__, __BASE_FILE__ and
-__builtin_FILE ().
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
-
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/c-family/c-opts.c | 6 ++++
- gcc/c-family/c.opt | 4 +++
- gcc/dwarf2out.c | 1 +
- gcc/gimplify.c | 2 ++
- libcpp/Makefile.in | 10 +++---
- libcpp/file-map.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++
- libcpp/include/file-map.h | 30 ++++++++++++++++
- libcpp/macro.c | 2 ++
- 8 files changed, 142 insertions(+), 5 deletions(-)
- create mode 100644 libcpp/file-map.c
- create mode 100644 libcpp/include/file-map.h
-
-diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
-index dd5fd23..9c004a1 100644
---- a/gcc/c-family/c-opts.c
-+++ b/gcc/c-family/c-opts.c
-@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
- #include "options.h"
- #include "plugin.h" /* For PLUGIN_INCLUDE_FILE event. */
- #include "mkdeps.h"
-+#include "file-map.h"
- #include "c-target.h"
- #include "tm.h" /* For BYTES_BIG_ENDIAN,
- DOLLARS_IN_IDENTIFIERS,
-@@ -553,6 +554,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
- cpp_opts->narrow_charset = arg;
- break;
-
-+ case OPT_ffile_prefix_map_:
-+ if (add_file_prefix_map (arg) < 0)
-+ error ("invalid argument %qs to -ffile-prefix-map", arg);
-+ break;
-+
- case OPT_fwide_exec_charset_:
- cpp_opts->wide_charset = arg;
- break;
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index f295805..3a99662 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -928,6 +928,10 @@ fexec-charset=
- C ObjC C++ ObjC++ Joined RejectNegative
- -fexec-charset=<cset> Convert all strings and character constants to character set <cset>
-
-+ffile-prefix-map=
-+C ObjC C++ ObjC++ Joined RejectNegative
-+-ffile-prefix-map=<old=new> Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE ()
-+
- fextended-identifiers
- C ObjC C++ ObjC++
- Permit universal character names (\\u and \\U) in identifiers
-diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
-index 99bf6e2..3e58cfd 100644
---- a/gcc/dwarf2out.c
-+++ b/gcc/dwarf2out.c
-@@ -19199,6 +19199,7 @@ gen_producer_string (void)
- case OPT_fltrans_output_list_:
- case OPT_fresolution_:
- case OPT_fdebug_prefix_map_:
-+ case OPT_ffile_prefix_map_:
- /* Ignore these. */
- continue;
- default:
-diff --git a/gcc/gimplify.c b/gcc/gimplify.c
-index 89e7334..a7a97c0 100644
---- a/gcc/gimplify.c
-+++ b/gcc/gimplify.c
-@@ -59,6 +59,7 @@ along with GCC; see the file COPYING3. If not see
- #include "omp-low.h"
- #include "gimple-low.h"
- #include "cilk.h"
-+#include "file-map.h"
-
- #include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */
- #include "tree-pass.h" /* FIXME: only for PROP_gimple_any */
-@@ -2288,6 +2289,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
- case BUILT_IN_FILE:
- {
- expanded_location loc = expand_location (EXPR_LOCATION (*expr_p));
-+ loc.file = remap_file_filename (loc.file);
- *expr_p = build_string_literal (strlen (loc.file) + 1, loc.file);
- return GS_OK;
- }
-diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
-index 5561c97..5017256 100644
---- a/libcpp/Makefile.in
-+++ b/libcpp/Makefile.in
-@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
-
-
- libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
-- expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
-- mkdeps.o pch.o symtab.o traditional.o
-+ expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \
-+ macro.o mkdeps.o pch.o symtab.o traditional.o
-
- libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
-- expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
-- mkdeps.c pch.c symtab.c traditional.c
-+ expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \
-+ macro.c mkdeps.c pch.c symtab.c traditional.c
-
- all: libcpp.a $(USED_CATALOGS)
-
-@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
-
- TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
- include/line-map.h include/symtab.h include/cpp-id-data.h \
-- include/cpplib.h include/mkdeps.h system.h
-+ include/cpplib.h include/mkdeps.h system.h include/file-map.h
-
- TAGS: $(TAGS_SOURCES)
- cd $(srcdir) && etags $(TAGS_SOURCES)
-diff --git a/libcpp/file-map.c b/libcpp/file-map.c
-new file mode 100644
-index 0000000..04e851b
---- /dev/null
-+++ b/libcpp/file-map.c
-@@ -0,0 +1,92 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#include "config.h"
-+#include "system.h"
-+#include "file-map.h"
-+
-+/* Structure recording the mapping from source file and directory
-+ names at compile time to __FILE__ */
-+typedef struct file_prefix_map
-+{
-+ const char *old_prefix;
-+ const char *new_prefix;
-+ size_t old_len;
-+ size_t new_len;
-+ struct file_prefix_map *next;
-+} file_prefix_map;
-+
-+/* Linked list of such structures. */
-+static file_prefix_map *file_prefix_maps;
-+
-+/* Record prefix mapping of __FILE__. ARG is the argument to
-+ -ffile-prefix-map and must be of the form OLD=NEW. */
-+int
-+add_file_prefix_map (const char *arg)
-+{
-+ file_prefix_map *map;
-+ const char *p;
-+
-+ p = strchr (arg, '=');
-+ if (!p)
-+ {
-+ fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg);
-+ return -1;
-+ }
-+ map = XNEW (file_prefix_map);
-+ map->old_prefix = xstrndup (arg, p - arg);
-+ map->old_len = p - arg;
-+ p++;
-+ map->new_prefix = xstrdup (p);
-+ map->new_len = strlen (p);
-+ map->next = file_prefix_maps;
-+ file_prefix_maps = map;
-+
-+ return 0;
-+}
-+
-+/* Perform user-specified mapping of __FILE__ prefixes. Return
-+ the new name corresponding to filename. */
-+
-+const char *
-+remap_file_filename (const char *filename)
-+{
-+ file_prefix_map *map;
-+ char *s;
-+ const char *name;
-+ size_t name_len;
-+
-+ for (map = file_prefix_maps; map; map = map->next)
-+ if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ break;
-+ if (!map)
-+ return filename;
-+ name = filename + map->old_len;
-+ name_len = strlen (name) + 1;
-+ s = (char *) alloca (name_len + map->new_len);
-+ memcpy (s, map->new_prefix, map->new_len);
-+ memcpy (s + map->new_len, name, name_len);
-+
-+ return xstrdup (s);
-+}
-+
-+
-diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
-new file mode 100644
-index 0000000..e6f8cbf
---- /dev/null
-+++ b/libcpp/include/file-map.h
-@@ -0,0 +1,30 @@
-+/* Map one directory name to another in __FILE__, __BASE_FILE__
-+ and __builtin_FILE ().
-+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
-+
-+This program is free software; you can redistribute it and/or modify it
-+under the terms of the GNU General Public License as published by the
-+Free Software Foundation; either version 3, or (at your option) any
-+later version.
-+
-+This program is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>.
-+
-+ In other words, you are welcome to use, share and improve this program.
-+ You are forbidden to forbid anyone else to use, share and improve
-+ what you give them. Help stamp out software-hoarding! */
-+
-+#ifndef LIBCPP_FILE_MAP_H
-+#define LIBCPP_FILE_MAP_H
-+
-+const char * remap_file_filename (const char *filename);
-+
-+int add_file_prefix_map (const char *arg);
-+
-+#endif /* !LIBCPP_FILE_MAP_H */
-diff --git a/libcpp/macro.c b/libcpp/macro.c
-index 11e50f4..5c6f90e 100644
---- a/libcpp/macro.c
-+++ b/libcpp/macro.c
-@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see
- #include "system.h"
- #include "cpplib.h"
- #include "internal.h"
-+#include "file-map.h"
-
- typedef struct macro_arg macro_arg;
- /* This structure represents the tokens of a macro argument. These
-@@ -288,6 +289,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
- if (!name)
- abort ();
- }
-+ name = remap_file_filename (name);
- len = strlen (name);
- buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
- result = buf;
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
deleted file mode 100644
index 94e45ed0a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 5e10baff84038d26dc3d59b2412ba1db92cb8274 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 17 Mar 2016 00:34:01 -0400
-Subject: [PATCH 2/2] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
-
-The oe-core may use external toolchain to compile,
-which may not support -ffile-prefix-map.
-
-Since we use -fdebug-prefix-map to do the same thing,
-so we could reuse it to replace -ffile-prefix-map.
-
-Upstream-Status: Inappropriate[oe-core specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/opts-global.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/gcc/opts-global.c b/gcc/opts-global.c
-index 111884b..037f6c8 100644
---- a/gcc/opts-global.c
-+++ b/gcc/opts-global.c
-@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
- #include "toplev.h"
- #include "tree-pass.h"
- #include "context.h"
-+#include "file-map.h"
-
- typedef const char *const_char_p; /* For DEF_VEC_P. */
-
-@@ -354,6 +355,9 @@ handle_common_deferred_options (void)
-
- case OPT_fdebug_prefix_map_:
- add_debug_prefix_map (opt->arg);
-+
-+ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
-+ add_file_prefix_map (opt->arg);
- break;
-
- case OPT_fdump_:
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0074-fdebug-prefix-map-support-to-remap-relative-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0074-fdebug-prefix-map-support-to-remap-relative-path.patch
deleted file mode 100644
index 0b91fdbbc..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0074-fdebug-prefix-map-support-to-remap-relative-path.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 289ad2969a5966c603bf6928ce442db74c4cbb25 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Thu, 24 Mar 2016 11:23:14 -0400
-Subject: [PATCH] gcc/final.c: -fdebug-prefix-map support to remap sources with
- relative path
-
-PR other/70428
-* final.c (remap_debug_filename): Use lrealpath to translate
-relative path before remapping
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428
-Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
-diff --git a/gcc/final.c b/gcc/final.c
-index 55cf509..c3594c2 100644
---- a/gcc/final.c
-+++ b/gcc/final.c
-@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
- const char *name;
- size_t name_len;
-
-+ /* Support to remap filename with relative path */
-+ char *realpath = lrealpath (filename);
-+ if (realpath == NULL)
-+ return filename;
-+
- for (map = debug_prefix_maps; map; map = map->next)
-- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
-+ if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0)
- break;
- if (!map)
-- return filename;
-- name = filename + map->old_len;
-+ {
-+ free (realpath);
-+ return filename;
-+ }
-+ name = realpath + map->old_len;
- name_len = strlen (name) + 1;
- s = (char *) alloca (name_len + map->new_len);
- memcpy (s, map->new_prefix, map->new_len);
- memcpy (s + map->new_len, name, name_len);
-+ free (realpath);
- return ggc_strdup (s);
- }
-
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3.inc
deleted file mode 100644
index 9808be113..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3.inc
+++ /dev/null
@@ -1,143 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "5.3.0"
-
-#SNAP = "5-20150405"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "5.3.0"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-5.3:${FILE_DIRNAME}/gcc-5.3/backport:"
-
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
-
-LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
-"
-#BASEURI = "http://www.netgull.com/gcc/snapshots/${SNAP}/gcc-${SNAP}.tar.bz2"
-BASEURI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2"
-
-SRC_URI = "\
- ${BASEURI} \
- ${BACKPORTS} \
- file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
- file://0002-uclibc-conf.patch \
- file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
- file://0004-uclibc-locale.patch \
- file://0005-uclibc-locale-no__x.patch \
- file://0006-uclibc-locale-wchar_fix.patch \
- file://0007-uclibc-locale-update.patch \
- file://0008-missing-execinfo_h.patch \
- file://0009-c99-snprintf.patch \
- file://0010-gcc-poison-system-directories.patch \
- file://0011-gcc-poison-dir-extend.patch \
- file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://0013-64-bit-multilib-hack.patch \
- file://0014-optional-libstdc.patch \
- file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
- file://0016-COLLECT_GCC_OPTIONS.patch \
- file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
- file://0018-fortran-cross-compile-hack.patch \
- file://0019-libgcc-sjlj-check.patch \
- file://0020-cpp-honor-sysroot.patch \
- file://0021-MIPS64-Default-to-N64-ABI.patch \
- file://0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
- file://0023-gcc-Fix-argument-list-too-long-error.patch \
- file://0024-Disable-sdt.patch \
- file://0025-libtool.patch \
- file://0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
- file://0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
- file://0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
- file://0029-export-CPP.patch \
- file://0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
- file://0032-Ensure-target-gcc-headers-can-be-included.patch \
- file://0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
- file://0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
- file://0035-Dont-link-the-plugins-with-libgomp-explicitly.patch \
- file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
- file://0037-aarch64-Add-support-for-musl-ldso.patch \
- file://0038-fix-g-sysroot.patch \
- file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
- file://0040-handle-sysroot-support-for-nativesdk-gcc.patch \
- file://0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
- file://0042-Fix-various-_FOR_BUILD-and-related-variables.patch \
- file://0043-libstdc-Support-musl.patch \
- file://0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch \
- file://0045-Support-for-arm-linux-musl.patch \
- file://0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch \
- file://0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
- file://0048-ssp_nonshared.patch \
- file://0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch \
- file://0050-powerpc-pass-secure-plt-to-the-linker.patch \
- file://0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \
- file://0052-nios2-use-ret-with-r31.patch \
- file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \
- file://0054-support-ffile-prefix-map.patch \
- file://0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
- file://0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch \
- file://0057-unwind-fix-for-musl.patch \
- file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \
-"
-
-BACKPORTS = ""
-
-SRC_URI[md5sum] = "c9616fd448f980259c31de613e575719"
-SRC_URI[sha256sum] = "b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db"
-
-#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${SNAP}"
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-
-# Language Overrides
-FORTRAN = ""
-JAVA = ""
-
-LTO = "--enable-lto"
-
-EXTRA_OECONF_BASE = "\
- ${LTO} \
- --enable-libssp \
- --enable-libitm \
- --disable-bootstrap \
- --disable-libmudflap \
- --with-system-zlib \
- --with-linker-hash-style=${LINKER_HASH_STYLE} \
- --enable-linker-build-id \
- --with-ppl=no \
- --with-cloog=no \
- --enable-checking=release \
- --enable-cheaders=c_global \
- --without-isl \
-"
-
-EXTRA_OECONF_INITIAL = "\
- --disable-libmudflap \
- --disable-libgomp \
- --disable-libitm \
- --disable-libquadmath \
- --with-system-zlib \
- --disable-lto \
- --disable-plugin \
- --enable-decimal-float=no \
- --without-isl \
- gcc_cv_libc_provides_ssp=yes \
-"
-
-EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-
-EXTRA_OECONF_PATHS = "\
- --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
- --with-sysroot=/not/exist \
- --with-build-sysroot=${STAGING_DIR_TARGET} \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
deleted file mode 100644
index b91c02d0b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
+++ /dev/null
@@ -1,270 +0,0 @@
-From 0b54799d80fb859c7b142467e4d42c99db59df50 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Dec 2015 08:30:35 +0000
-Subject: [PATCH 44/46] Adding -mmusl as a musl libc specifier, and the
- necessary hacks for it to know how to find musl's dynamic linker.
-
-Upstream-Status: Backport [partial]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config.gcc | 10 ++++-
- gcc/config/linux.h | 100 +++++++++++++++++++++++++++++++++++++-----
- gcc/config/linux.opt | 4 ++
- gcc/config/rs6000/secureplt.h | 1 +
- gcc/config/rs6000/sysv4.h | 5 +++
- gcc/ginclude/stddef.h | 3 ++
- 6 files changed, 110 insertions(+), 13 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 3825bd5..39ce047 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -575,7 +575,7 @@ case ${target} in
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # 32-bit x86 processors supported by --with-arch=. Each processor
- # MUST be separated by exactly one space.
-@@ -720,6 +720,9 @@ case ${target} in
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-@@ -2420,6 +2423,11 @@ powerpc*-*-linux*)
- powerpc*-*-linux*paired*)
- tm_file="${tm_file} rs6000/750cl.h" ;;
- esac
-+ case ${target} in
-+ *-linux*-musl*)
-+ enable_secureplt=yes ;;
-+ esac
-+
- if test x${enable_secureplt} = xyes; then
- tm_file="rs6000/secureplt.h ${tm_file}"
- fi
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 22b9be5..ca9a17f 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -53,18 +55,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- uClibc or Bionic is the default C library and whether
- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -84,16 +89,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
-
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
-@@ -123,3 +128,74 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- # define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
-
- #endif
-+
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
-index c054338..9334f74 100644
---- a/gcc/config/linux.opt
-+++ b/gcc/config/linux.opt
-@@ -30,3 +30,7 @@ Use GNU C library
- muclibc
- Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
-+Use musl C library
-diff --git a/gcc/config/rs6000/secureplt.h b/gcc/config/rs6000/secureplt.h
-index b463463..77edf2a 100644
---- a/gcc/config/rs6000/secureplt.h
-+++ b/gcc/config/rs6000/secureplt.h
-@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
- #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
-+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index c6c31dc..7cd07e0 100644
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -538,6 +538,10 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
- #define CC1_SECURE_PLT_DEFAULT_SPEC ""
- #endif
-
-+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
-+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
-+#endif
-+
- /* Pass -G xxx to the compiler. */
- #undef CC1_SPEC
- #define CC1_SPEC "%{G*} %(cc1_cpu)" \
-@@ -889,6 +893,7 @@ ncrtn.o%s"
- { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
- { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
- { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
-+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \
- { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
- { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
- { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
-diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
-index f20a41b..eb879ef 100644
---- a/gcc/ginclude/stddef.h
-+++ b/gcc/ginclude/stddef.h
-@@ -184,6 +184,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__ /* BeOS */
- #define __SIZE_T__ /* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -200,6 +201,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- || defined(__DragonFly__) \
- || defined(__FreeBSD_kernel__)
-@@ -218,6 +220,7 @@ typedef __SIZE_TYPE__ size_t;
- typedef long ssize_t;
- #endif /* __BEOS__ */
- #endif /* !(defined (__GNUG__) && defined (size_t)) */
-+#endif /* __DEFINED_size_t */
- #endif /* __size_t */
- #endif /* _SIZET_ */
- #endif /* _GCC_SIZE_T */
---
-2.6.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc
new file mode 100644
index 000000000..338530fd6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4.inc
@@ -0,0 +1,146 @@
+require gcc-common.inc
+
+# Third digit in PV should be incremented after a minor release
+
+PV = "5.4.0"
+
+#SNAP = "5-20150405"
+
+# BINV should be incremented to a revision after a minor gcc release
+
+BINV = "5.4.0"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-5.4:${FILE_DIRNAME}/gcc-5.4/backport:"
+
+DEPENDS =+ "mpfr gmp libmpc zlib"
+NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
+
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
+"
+#BASEURI = "http://www.netgull.com/gcc/snapshots/${SNAP}/gcc-${SNAP}.tar.bz2"
+BASEURI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2"
+
+SRC_URI = "\
+ ${BASEURI} \
+ ${BACKPORTS} \
+ file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
+ file://0002-uclibc-conf.patch \
+ file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
+ file://0004-uclibc-locale.patch \
+ file://0005-uclibc-locale-no__x.patch \
+ file://0006-uclibc-locale-wchar_fix.patch \
+ file://0007-uclibc-locale-update.patch \
+ file://0008-missing-execinfo_h.patch \
+ file://0009-c99-snprintf.patch \
+ file://0010-gcc-poison-system-directories.patch \
+ file://0011-gcc-poison-dir-extend.patch \
+ file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://0013-64-bit-multilib-hack.patch \
+ file://0014-optional-libstdc.patch \
+ file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+ file://0016-COLLECT_GCC_OPTIONS.patch \
+ file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+ file://0018-fortran-cross-compile-hack.patch \
+ file://0019-libgcc-sjlj-check.patch \
+ file://0020-cpp-honor-sysroot.patch \
+ file://0021-MIPS64-Default-to-N64-ABI.patch \
+ file://0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+ file://0023-gcc-Fix-argument-list-too-long-error.patch \
+ file://0024-Disable-sdt.patch \
+ file://0025-libtool.patch \
+ file://0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+ file://0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+ file://0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
+ file://0029-export-CPP.patch \
+ file://0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
+ file://0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
+ file://0032-Ensure-target-gcc-headers-can-be-included.patch \
+ file://0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
+ file://0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
+ file://0035-Dont-link-the-plugins-with-libgomp-explicitly.patch \
+ file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
+ file://0037-aarch64-Add-support-for-musl-ldso.patch \
+ file://0038-fix-g-sysroot.patch \
+ file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
+ file://0040-handle-sysroot-support-for-nativesdk-gcc.patch \
+ file://0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
+ file://0042-Fix-various-_FOR_BUILD-and-related-variables.patch \
+ file://0043-libstdc-Support-musl.patch \
+ file://0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch \
+ file://0045-Support-for-arm-linux-musl.patch \
+ file://0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch \
+ file://0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
+ file://0048-ssp_nonshared.patch \
+ file://0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch \
+ file://0050-powerpc-pass-secure-plt-to-the-linker.patch \
+ file://0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \
+ file://0052-nios2-use-ret-with-r31.patch \
+ file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \
+ file://0054-support-ffile-prefix-map.patch \
+ file://0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
+ file://0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch \
+ file://0057-unwind-fix-for-musl.patch \
+ file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \
+ file://0059-libgcc-use-ldflags.patch \
+"
+
+BACKPORTS = ""
+
+SRC_URI[md5sum] = "4c626ac2a83ef30dfb9260e6f59c2b30"
+SRC_URI[sha256sum] = "608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a"
+
+UPSTREAM_CHECK_REGEX = "gcc-(?P<pver>5\.\d+\.\d+).tar"
+
+#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${SNAP}"
+S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+LTO = "--enable-lto"
+
+EXTRA_OECONF_BASE = "\
+ ${LTO} \
+ --enable-libssp \
+ --enable-libitm \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --with-system-zlib \
+ --with-linker-hash-style=${LINKER_HASH_STYLE} \
+ --enable-linker-build-id \
+ --with-ppl=no \
+ --with-cloog=no \
+ --enable-checking=release \
+ --enable-cheaders=c_global \
+ --without-isl \
+"
+
+EXTRA_OECONF_INITIAL = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libitm \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --enable-decimal-float=no \
+ --without-isl \
+ gcc_cv_libc_provides_ssp=yes \
+"
+
+EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
+
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
index 1aead9691..1aead9691 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0002-uclibc-conf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch
index 8d6aeb5e4..8d6aeb5e4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0002-uclibc-conf.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0002-uclibc-conf.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
index bd0326343..bd0326343 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0003-gcc-uclibc-locale-ctype_touplow_t.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0004-uclibc-locale.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch
index 656265a28..656265a28 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0004-uclibc-locale.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0004-uclibc-locale.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0005-uclibc-locale-no__x.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch
index 19a86a4e1..19a86a4e1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0005-uclibc-locale-no__x.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0005-uclibc-locale-no__x.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0006-uclibc-locale-wchar_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch
index d7dbe68bd..d7dbe68bd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0006-uclibc-locale-wchar_fix.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0006-uclibc-locale-wchar_fix.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0007-uclibc-locale-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch
index cde749931..cde749931 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0007-uclibc-locale-update.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0007-uclibc-locale-update.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0008-missing-execinfo_h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch
index 9f8793125..9f8793125 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0008-missing-execinfo_h.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0008-missing-execinfo_h.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0009-c99-snprintf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch
index 6b236c62c..6b236c62c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0009-c99-snprintf.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0009-c99-snprintf.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0010-gcc-poison-system-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch
index 2da887767..2da887767 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0010-gcc-poison-system-directories.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0010-gcc-poison-system-directories.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0011-gcc-poison-dir-extend.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch
index 511e69481..511e69481 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0011-gcc-poison-dir-extend.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0011-gcc-poison-dir-extend.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
index 750bbc823..750bbc823 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0013-64-bit-multilib-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch
index 45aaf4cc2..45aaf4cc2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0013-64-bit-multilib-hack.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0013-64-bit-multilib-hack.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0014-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch
index 73741f83c..73741f83c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0014-optional-libstdc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0014-optional-libstdc.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
index 1b62ef806..1b62ef806 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0016-COLLECT_GCC_OPTIONS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch
index e6ae262e4..e6ae262e4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0016-COLLECT_GCC_OPTIONS.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0016-COLLECT_GCC_OPTIONS.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
index b89a27919..b89a27919 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0018-fortran-cross-compile-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch
index e8ba32558..e8ba32558 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0018-fortran-cross-compile-hack.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0018-fortran-cross-compile-hack.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0019-libgcc-sjlj-check.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch
index 01a4d1fda..01a4d1fda 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0019-libgcc-sjlj-check.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0019-libgcc-sjlj-check.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0020-cpp-honor-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch
index 13f66d413..13f66d413 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0020-cpp-honor-sysroot.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0020-cpp-honor-sysroot.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0021-MIPS64-Default-to-N64-ABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch
index c7cffe417..c7cffe417 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0021-MIPS64-Default-to-N64-ABI.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0021-MIPS64-Default-to-N64-ABI.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index 620835132..620835132 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0023-gcc-Fix-argument-list-too-long-error.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch
index be91c9e63..be91c9e63 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0023-gcc-Fix-argument-list-too-long-error.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0023-gcc-Fix-argument-list-too-long-error.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0024-Disable-sdt.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch
index b23ce9756..b23ce9756 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0024-Disable-sdt.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0024-Disable-sdt.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0025-libtool.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch
index 8d5eb973b..8d5eb973b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0025-libtool.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0025-libtool.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
index a22d95f72..a22d95f72 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
index 46815d156..46815d156 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
index 60ddd9cee..60ddd9cee 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0029-export-CPP.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch
index 62195aa87..62195aa87 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0029-export-CPP.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0029-export-CPP.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
index 57051871b..57051871b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
index f2bc66432..f2bc66432 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0032-Ensure-target-gcc-headers-can-be-included.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch
index 89503ff60..89503ff60 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0032-Ensure-target-gcc-headers-can-be-included.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0032-Ensure-target-gcc-headers-can-be-included.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
index 19d480f3d..19d480f3d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
index a453fa6b3..a453fa6b3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
index 6ed589beb..6ed589beb 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
index 41c0294da..41c0294da 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0037-aarch64-Add-support-for-musl-ldso.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch
index 30dbe74ef..30dbe74ef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0037-aarch64-Add-support-for-musl-ldso.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0037-aarch64-Add-support-for-musl-ldso.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0038-fix-g-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch
index 9ba574a5c..9ba574a5c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0038-fix-g-sysroot.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0038-fix-g-sysroot.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
index 2e0df968b..2e0df968b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0040-handle-sysroot-support-for-nativesdk-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch
index 11e1310f1..11e1310f1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0040-handle-sysroot-support-for-nativesdk-gcc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0040-handle-sysroot-support-for-nativesdk-gcc.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch
index 5a504a1f2..5a504a1f2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0042-Fix-various-_FOR_BUILD-and-related-variables.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch
index 5af764b7c..5af764b7c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0042-Fix-various-_FOR_BUILD-and-related-variables.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0042-Fix-various-_FOR_BUILD-and-related-variables.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0043-libstdc-Support-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch
index bad8402ef..bad8402ef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0043-libstdc-Support-musl.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0043-libstdc-Support-musl.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
new file mode 100644
index 000000000..26aa96cad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
@@ -0,0 +1,270 @@
+From 0b54799d80fb859c7b142467e4d42c99db59df50 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Dec 2015 08:30:35 +0000
+Subject: [PATCH 44/46] Adding -mmusl as a musl libc specifier, and the
+ necessary hacks for it to know how to find musl's dynamic linker.
+
+Upstream-Status: Backport [partial]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config.gcc | 10 ++++-
+ gcc/config/linux.h | 100 +++++++++++++++++++++++++++++++++++++-----
+ gcc/config/linux.opt | 4 ++
+ gcc/config/rs6000/secureplt.h | 1 +
+ gcc/config/rs6000/sysv4.h | 5 +++
+ gcc/ginclude/stddef.h | 3 ++
+ 6 files changed, 110 insertions(+), 13 deletions(-)
+
+Index: gcc-5.4.0/gcc/config.gcc
+===================================================================
+--- gcc-5.4.0.orig/gcc/config.gcc
++++ gcc-5.4.0/gcc/config.gcc
+@@ -575,7 +575,7 @@ case ${target} in
+ esac
+
+ # Common C libraries.
+-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
+
+ # 32-bit x86 processors supported by --with-arch=. Each processor
+ # MUST be separated by exactly one space.
+@@ -720,6 +720,9 @@ case ${target} in
+ *-*-*uclibc*)
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
+ ;;
++ *-*-*musl*)
++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
++ ;;
+ *)
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
+ ;;
+@@ -2420,6 +2423,11 @@ powerpc*-*-linux*)
+ powerpc*-*-linux*paired*)
+ tm_file="${tm_file} rs6000/750cl.h" ;;
+ esac
++ case ${target} in
++ *-linux*-musl*)
++ enable_secureplt=yes ;;
++ esac
++
+ if test x${enable_secureplt} = xyes; then
+ tm_file="rs6000/secureplt.h ${tm_file}"
+ fi
+Index: gcc-5.4.0/gcc/config/linux.h
+===================================================================
+--- gcc-5.4.0.orig/gcc/config/linux.h
++++ gcc-5.4.0/gcc/config/linux.h
+@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI
+ #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
+ #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
+ #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
+ #else
+ #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
+ #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
+ #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
++#define OPTION_MUSL (linux_libc == LIBC_MUSL)
+ #endif
+
+ #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
+@@ -53,18 +55,21 @@ see the files COPYING3 and COPYING.RUNTI
+ uClibc or Bionic is the default C library and whether
+ -muclibc or -mglibc or -mbionic has been passed to change the default. */
+
+-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
+- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
+
+ #if DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
+ #elif DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
+ #elif DEFAULT_LIBC == LIBC_BIONIC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif /* DEFAULT_LIBC */
+@@ -84,16 +89,16 @@ see the files COPYING3 and COPYING.RUNTI
+
+ #define GNU_USER_DYNAMIC_LINKER \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
+- BIONIC_DYNAMIC_LINKER)
++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
+ #define GNU_USER_DYNAMIC_LINKER32 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
+- BIONIC_DYNAMIC_LINKER32)
++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
+ #define GNU_USER_DYNAMIC_LINKER64 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
+- BIONIC_DYNAMIC_LINKER64)
++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
+ #define GNU_USER_DYNAMIC_LINKERX32 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
+- BIONIC_DYNAMIC_LINKERX32)
++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
+
+ /* Whether we have Bionic libc runtime */
+ #undef TARGET_HAS_BIONIC
+@@ -123,3 +128,74 @@ see the files COPYING3 and COPYING.RUNTI
+ # define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
+
+ #endif
++
++/* musl avoids problematic includes by rearranging the include directories.
++ * Unfortunately, this is mostly duplicated from cppdefault.c */
++#if DEFAULT_LIBC == LIBC_MUSL
++#define INCLUDE_DEFAULTS_MUSL_GPP \
++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
++
++#ifdef LOCAL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_LOCAL \
++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_LOCAL
++#endif
++
++#ifdef PREFIX_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_PREFIX \
++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_PREFIX
++#endif
++
++#ifdef CROSS_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_CROSS \
++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#ifdef TOOL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_TOOL \
++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_TOOL
++#endif
++
++#ifdef NATIVE_SYSTEM_HEADER_DIR
++#define INCLUDE_DEFAULTS_MUSL_NATIVE \
++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_NATIVE
++#endif
++
++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
++# undef INCLUDE_DEFAULTS_MUSL_LOCAL
++# define INCLUDE_DEFAULTS_MUSL_LOCAL
++# undef INCLUDE_DEFAULTS_MUSL_NATIVE
++# define INCLUDE_DEFAULTS_MUSL_NATIVE
++#else
++# undef INCLUDE_DEFAULTS_MUSL_CROSS
++# define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#undef INCLUDE_DEFAULTS
++#define INCLUDE_DEFAULTS \
++ { \
++ INCLUDE_DEFAULTS_MUSL_GPP \
++ INCLUDE_DEFAULTS_MUSL_PREFIX \
++ INCLUDE_DEFAULTS_MUSL_CROSS \
++ INCLUDE_DEFAULTS_MUSL_TOOL \
++ INCLUDE_DEFAULTS_MUSL_NATIVE \
++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
++ { 0, 0, 0, 0, 0, 0 } \
++ }
++#endif
+Index: gcc-5.4.0/gcc/config/linux.opt
+===================================================================
+--- gcc-5.4.0.orig/gcc/config/linux.opt
++++ gcc-5.4.0/gcc/config/linux.opt
+@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l
+ Use GNU C library
+
+ muclibc
+-Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
++Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl)
+ Use uClibc C library
++
++mmusl
++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic)
++Use musl C library
+Index: gcc-5.4.0/gcc/config/rs6000/secureplt.h
+===================================================================
+--- gcc-5.4.0.orig/gcc/config/rs6000/secureplt.h
++++ gcc-5.4.0/gcc/config/rs6000/secureplt.h
+@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3.
+ <http://www.gnu.org/licenses/>. */
+
+ #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
+Index: gcc-5.4.0/gcc/config/rs6000/sysv4.h
+===================================================================
+--- gcc-5.4.0.orig/gcc/config/rs6000/sysv4.h
++++ gcc-5.4.0/gcc/config/rs6000/sysv4.h
+@@ -538,6 +538,10 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
+ #define CC1_SECURE_PLT_DEFAULT_SPEC ""
+ #endif
+
++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
++#define LINK_SECURE_PLT_DEFAULT_SPEC ""
++#endif
++
+ /* Pass -G xxx to the compiler. */
+ #undef CC1_SPEC
+ #define CC1_SPEC "%{G*} %(cc1_cpu)" \
+@@ -889,6 +893,7 @@ ncrtn.o%s"
+ { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
+ { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
+ { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
++ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \
+ { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
+ { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
+ { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
+Index: gcc-5.4.0/gcc/ginclude/stddef.h
+===================================================================
+--- gcc-5.4.0.orig/gcc/ginclude/stddef.h
++++ gcc-5.4.0/gcc/ginclude/stddef.h
+@@ -184,6 +184,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+ #ifndef _GCC_SIZE_T
+ #ifndef _SIZET_
+ #ifndef __size_t
++#ifndef __DEFINED_size_t /* musl */
+ #define __size_t__ /* BeOS */
+ #define __SIZE_T__ /* Cray Unicos/Mk */
+ #define _SIZE_T
+@@ -200,6 +201,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+ #define ___int_size_t_h
+ #define _GCC_SIZE_T
+ #define _SIZET_
++#define __DEFINED_size_t /* musl */
+ #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
+ || defined(__DragonFly__) \
+ || defined(__FreeBSD_kernel__)
+@@ -218,6 +220,7 @@ typedef __SIZE_TYPE__ size_t;
+ typedef long ssize_t;
+ #endif /* __BEOS__ */
+ #endif /* !(defined (__GNUG__) && defined (size_t)) */
++#endif /* __DEFINED_size_t */
+ #endif /* __size_t */
+ #endif /* _SIZET_ */
+ #endif /* _GCC_SIZE_T */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0045-Support-for-arm-linux-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch
index 3c1115aa8..3c1115aa8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0045-Support-for-arm-linux-musl.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0045-Support-for-arm-linux-musl.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch
index ddb0fc4f4..ddb0fc4f4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch
index a1cfb9c7a..a1cfb9c7a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch
index 5ddd40a4a..5ddd40a4a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0048-ssp_nonshared.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch
index 0ea5143e0..0ea5143e0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0050-powerpc-pass-secure-plt-to-the-linker.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch
index b2f2bbdf4..b2f2bbdf4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0050-powerpc-pass-secure-plt-to-the-linker.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
index e8f79b590..e8f79b590 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0052-nios2-use-ret-with-r31.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch
index f3cb47fd1..f3cb47fd1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0052-nios2-use-ret-with-r31.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0052-nios2-use-ret-with-r31.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch
index c18f40e74..c18f40e74 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0054-support-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch
index da1687913..da1687913 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0054-support-ffile-prefix-map.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0054-support-ffile-prefix-map.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
index c7caed8c8..c7caed8c8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch
index 97913420e..97913420e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0057-unwind-fix-for-musl.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch
index c193587bf..c193587bf 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0057-unwind-fix-for-musl.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0057-unwind-fix-for-musl.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0058-fdebug-prefix-map-support-to-remap-relative-path.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch
index 0b91fdbbc..0b91fdbbc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0058-fdebug-prefix-map-support-to-remap-relative-path.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0058-fdebug-prefix-map-support-to-remap-relative-path.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch
new file mode 100644
index 000000000..325b72ab5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-5.4/0059-libgcc-use-ldflags.patch
@@ -0,0 +1,16 @@
+Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-Status: Pending
+
+--- gcc-5.3.0.orig/libgcc/config/t-slibgcc
++++ gcc-5.3.0/libgcc/config/t-slibgcc
+@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_S
+ $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+
+ SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+- $(SHLIB_LDFLAGS) \
++ $(LDFLAGS) $(SHLIB_LDFLAGS) \
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
+ $(SHLIB_OBJS) $(SHLIB_LC) && \
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2.inc
new file mode 100644
index 000000000..b118995e1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2.inc
@@ -0,0 +1,133 @@
+require gcc-common.inc
+
+# Third digit in PV should be incremented after a minor release
+
+PV = "6.2.0"
+
+# BINV should be incremented to a revision after a minor gcc release
+
+BINV = "6.2.0"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-6.2:${FILE_DIRNAME}/gcc-6.2/backport:"
+
+DEPENDS =+ "mpfr gmp libmpc zlib"
+NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
+
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
+"
+
+
+BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2"
+#SRCREV = "bd9a826d5448db11d29d2ec5884e7e679066f140"
+#BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git"
+#BASEURI ?= "ftp://sourceware.org/pub/gcc/snapshots/6.2.0-RC-20160815/gcc-6.2.0-RC-20160815.tar.bz2"
+
+SRC_URI = "\
+ ${BASEURI} \
+ file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
+ file://0002-uclibc-conf.patch \
+ file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
+ file://0004-uclibc-locale.patch \
+ file://0005-uclibc-locale-no__x.patch \
+ file://0006-uclibc-locale-wchar_fix.patch \
+ file://0007-uclibc-locale-update.patch \
+ file://0008-missing-execinfo_h.patch \
+ file://0009-c99-snprintf.patch \
+ file://0010-gcc-poison-system-directories.patch \
+ file://0011-gcc-poison-dir-extend.patch \
+ file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+ file://0013-64-bit-multilib-hack.patch \
+ file://0014-optional-libstdc.patch \
+ file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+ file://0016-COLLECT_GCC_OPTIONS.patch \
+ file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+ file://0018-fortran-cross-compile-hack.patch \
+ file://0019-cpp-honor-sysroot.patch \
+ file://0020-MIPS64-Default-to-N64-ABI.patch \
+ file://0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+ file://0022-gcc-Fix-argument-list-too-long-error.patch \
+ file://0023-Disable-sdt.patch \
+ file://0024-libtool.patch \
+ file://0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+ file://0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+ file://0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
+ file://0028-export-CPP.patch \
+ file://0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
+ file://0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
+ file://0031-Ensure-target-gcc-headers-can-be-included.patch \
+ file://0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
+ file://0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
+ file://0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
+ file://0035-aarch64-Add-support-for-musl-ldso.patch \
+ file://0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
+ file://0037-handle-sysroot-support-for-nativesdk-gcc.patch \
+ file://0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
+ file://0039-Fix-various-_FOR_BUILD-and-related-variables.patch \
+ file://0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
+ file://0041-ssp_nonshared.patch \
+ file://0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch \
+ file://0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
+ file://0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \
+ file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
+ file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
+ file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
+ ${BACKPORTS} \
+"
+BACKPORTS = ""
+
+SRC_URI[md5sum] = "9768625159663b300ae4de2f4745fcc4"
+SRC_URI[sha256sum] = "9944589fc722d3e66308c0ce5257788ebd7872982a718aa2516123940671b7c5"
+
+S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git"
+B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+LTO = "--enable-lto"
+
+EXTRA_OECONF_BASE = "\
+ ${LTO} \
+ --enable-libssp \
+ --enable-libitm \
+ --disable-bootstrap \
+ --disable-libmudflap \
+ --with-system-zlib \
+ --with-linker-hash-style=${LINKER_HASH_STYLE} \
+ --enable-linker-build-id \
+ --with-ppl=no \
+ --with-cloog=no \
+ --enable-checking=release \
+ --enable-cheaders=c_global \
+ --without-isl \
+"
+
+EXTRA_OECONF_INITIAL = "\
+ --disable-libmudflap \
+ --disable-libgomp \
+ --disable-libitm \
+ --disable-libquadmath \
+ --with-system-zlib \
+ --disable-lto \
+ --disable-plugin \
+ --enable-decimal-float=no \
+ --without-isl \
+ gcc_cv_libc_provides_ssp=yes \
+"
+
+EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
+
+EXTRA_OECONF_PATHS = "\
+ --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
+ --with-sysroot=/not/exist \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
new file mode 100644
index 000000000..415f091ee
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -0,0 +1,42 @@
+From 92ed30da16b7487b334f739be177eb39885ab772 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:37:11 +0400
+Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 35f231e..bfadc33 100755
+--- a/configure
++++ b/configure
+@@ -7550,7 +7550,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+diff --git a/configure.ac b/configure.ac
+index 74bf58a..197d61b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3149,7 +3149,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0002-uclibc-conf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0002-uclibc-conf.patch
new file mode 100644
index 000000000..4d284ef86
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0002-uclibc-conf.patch
@@ -0,0 +1,53 @@
+From 4efc5a258c812875743647d756f75c93c4d514a5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:38:25 +0400
+Subject: [PATCH 02/46] uclibc-conf
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ contrib/regression/objs-gcc.sh | 4 ++++
+ libjava/classpath/ltconfig | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
+index 60b0497..6dc7ead 100755
+--- a/contrib/regression/objs-gcc.sh
++++ b/contrib/regression/objs-gcc.sh
+@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
+diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
+index d318957..df55950 100755
+--- a/libjava/classpath/ltconfig
++++ b/libjava/classpath/ltconfig
+@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch
new file mode 100644
index 000000000..df07febee
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch
@@ -0,0 +1,87 @@
+From ad5fd283fc7ef04f66c7fb003805364ea3bd34e9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:40:12 +0400
+Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
+ libstdc++-v3/config/locale/generic/c_locale.h | 9 +++++++++
+ libstdc++-v3/config/os/gnu-linux/ctype_base.h | 9 +++++++++
+ 3 files changed, 23 insertions(+)
+
+diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
+index ef6ce8f..4740636 100644
+--- a/libstdc++-v3/config/locale/generic/c_locale.cc
++++ b/libstdc++-v3/config/locale/generic/c_locale.cc
+@@ -273,5 +273,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
+ #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+ #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+ extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
++#ifdef __UCLIBC__
++// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
++_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
++#else
+ _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
++#endif
+ #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
+index 794471e..d65f955 100644
+--- a/libstdc++-v3/config/locale/generic/c_locale.h
++++ b/libstdc++-v3/config/locale/generic/c_locale.h
+@@ -40,13 +40,22 @@
+
+ #include <clocale>
+
++#ifdef __UCLIBC__
++#include <features.h>
++#include <ctype.h>
++#endif
++
+ #define _GLIBCXX_NUM_CATEGORIES 0
+
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+
++#ifdef __UCLIBC__
++ typedef __ctype_touplow_t* __c_locale;
++#else
+ typedef int* __c_locale;
++#endif
+
+ // Convert numeric value of type double and long double to string and
+ // return length of string. If vsnprintf is available use it, otherwise
+diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
+index 591c793..55eb0e9 100644
+--- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
++++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
+@@ -33,6 +33,11 @@
+
+ // Information as gleaned from /usr/include/ctype.h
+
++#ifdef __UCLIBC__
++#include <features.h>
++#include <ctype.h>
++#endif
++
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ struct ctype_base
+ {
+ // Non-standard typedefs.
++#ifdef __UCLIBC__
++ typedef const __ctype_touplow_t* __to_type;
++#else
+ typedef const int* __to_type;
++#endif
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0004-uclibc-locale.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0004-uclibc-locale.patch
new file mode 100644
index 000000000..ae2627c2e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0004-uclibc-locale.patch
@@ -0,0 +1,2862 @@
+From 68bd083357e78678a9baac760beb2a31f00954a5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:41:39 +0400
+Subject: [PATCH 04/46] uclibc-locale
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/acinclude.m4 | 37 ++
+ .../config/locale/uclibc/c++locale_internal.h | 63 ++
+ libstdc++-v3/config/locale/uclibc/c_locale.cc | 160 +++++
+ libstdc++-v3/config/locale/uclibc/c_locale.h | 117 ++++
+ .../config/locale/uclibc/codecvt_members.cc | 308 +++++++++
+ .../config/locale/uclibc/collate_members.cc | 80 +++
+ libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++
+ .../config/locale/uclibc/messages_members.cc | 100 +++
+ .../config/locale/uclibc/messages_members.h | 118 ++++
+ .../config/locale/uclibc/monetary_members.cc | 692 +++++++++++++++++++++
+ .../config/locale/uclibc/numeric_members.cc | 160 +++++
+ libstdc++-v3/config/locale/uclibc/time_members.cc | 406 ++++++++++++
+ libstdc++-v3/config/locale/uclibc/time_members.h | 68 ++
+ libstdc++-v3/configure | 75 +++
+ libstdc++-v3/include/c_compatibility/wchar.h | 2 +
+ libstdc++-v3/include/c_std/cwchar | 2 +
+ 16 files changed, 2688 insertions(+)
+ create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+ create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
+ create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
+ create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
+
+diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
+index b0f88cb..a0ee36b 100644
+--- a/libstdc++-v3/acinclude.m4
++++ b/libstdc++-v3/acinclude.m4
+@@ -2358,6 +2358,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ *-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ enable_clocale_flag=gnu
+ ;;
+@@ -2542,6 +2545,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ AC_MSG_RESULT(uclibc)
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++ AC_SUBST(glibcxx_MOFILES)
++ AC_SUBST(glibcxx_POFILES)
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+new file mode 100644
+index 0000000..2ae3e4a
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -0,0 +1,63 @@
++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
++
++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++// Written by Jakub Jelinek <jakub@redhat.com>
++
++#include <bits/c++config.h>
++#include <clocale>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning clean this up
++#endif
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++
++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
++extern "C" __typeof(strcoll_l) __strcoll_l;
++extern "C" __typeof(strftime_l) __strftime_l;
++extern "C" __typeof(strtod_l) __strtod_l;
++extern "C" __typeof(strtof_l) __strtof_l;
++extern "C" __typeof(strtold_l) __strtold_l;
++extern "C" __typeof(strxfrm_l) __strxfrm_l;
++extern "C" __typeof(newlocale) __newlocale;
++extern "C" __typeof(freelocale) __freelocale;
++extern "C" __typeof(duplocale) __duplocale;
++extern "C" __typeof(uselocale) __uselocale;
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++extern "C" __typeof(iswctype_l) __iswctype_l;
++extern "C" __typeof(towlower_l) __towlower_l;
++extern "C" __typeof(towupper_l) __towupper_l;
++extern "C" __typeof(wcscoll_l) __wcscoll_l;
++extern "C" __typeof(wcsftime_l) __wcsftime_l;
++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
++extern "C" __typeof(wctype_l) __wctype_l;
++#endif
++
++#endif // GLIBC 2.3 and later
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+new file mode 100644
+index 0000000..5081dc1
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+@@ -0,0 +1,160 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <cerrno> // For errno
++#include <locale>
++#include <stdexcept>
++#include <langinfo.h>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
++#define __strtof_l(S, E, L) strtof((S), (E))
++#define __strtod_l(S, E, L) strtod((S), (E))
++#define __strtold_l(S, E, L) strtold((S), (E))
++#warning should dummy __newlocale check for C|POSIX ?
++#define __newlocale(a, b, c) NULL
++#define __freelocale(a) ((void)0)
++#define __duplocale(a) __c_locale()
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ void
++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
++ __c_locale __old)
++ {
++ __cloc = __newlocale(1 << LC_ALL, __s, __old);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ if (!__cloc)
++ {
++ // This named locale is not supported by the underlying OS.
++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
++ "name not valid"));
++ }
++#endif
++ }
++
++ void
++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
++ {
++ if (_S_get_c_locale() != __cloc)
++ __freelocale(__cloc);
++ }
++
++ __c_locale
++ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
++ { return __duplocale(__cloc); }
++} // namespace std
++
++namespace __gnu_cxx
++{
++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
++ {
++ "LC_CTYPE",
++ "LC_NUMERIC",
++ "LC_TIME",
++ "LC_COLLATE",
++ "LC_MONETARY",
++ "LC_MESSAGES",
++#if _GLIBCXX_NUM_CATEGORIES != 0
++ "LC_PAPER",
++ "LC_NAME",
++ "LC_ADDRESS",
++ "LC_TELEPHONE",
++ "LC_MEASUREMENT",
++ "LC_IDENTIFICATION"
++#endif
++ };
++}
++
++namespace std
++{
++ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
++} // namespace std
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
+new file mode 100644
+index 0000000..da07c1f
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -0,0 +1,117 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifndef _C_LOCALE_H
++#define _C_LOCALE_H 1
++
++#pragma GCC system_header
++
++#include <cstring> // get std::strlen
++#include <cstdio> // get std::snprintf or std::sprintf
++#include <clocale>
++#include <langinfo.h> // For codecvt
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this
++#endif
++#ifdef __UCLIBC_HAS_LOCALE__
++#include <iconv.h> // For codecvt using iconv, iconv_t
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#include <libintl.h> // For messages
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning what is _GLIBCXX_C_LOCALE_GNU for
++#endif
++#define _GLIBCXX_C_LOCALE_GNU 1
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix categories
++#endif
++// #define _GLIBCXX_NUM_CATEGORIES 6
++#define _GLIBCXX_NUM_CATEGORIES 0
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++namespace __gnu_cxx
++{
++ extern "C" __typeof(uselocale) __uselocale;
++}
++#endif
++
++namespace std
++{
++#ifdef __UCLIBC_HAS_XLOCALE__
++ typedef __locale_t __c_locale;
++#else
++ typedef int* __c_locale;
++#endif
++
++ // Convert numeric value of type _Tv to string and return length of
++ // string. If snprintf is available use it, otherwise fall back to
++ // the unsafe sprintf which, in general, can be dangerous and should
++ // be avoided.
++ template<typename _Tv>
++ int
++ __convert_from_v(char* __out,
++ const int __size __attribute__ ((__unused__)),
++ const char* __fmt,
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ _Tv __v, const __c_locale& __cloc, int __prec)
++ {
++ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
++#else
++ _Tv __v, const __c_locale&, int __prec)
++ {
++# ifdef __UCLIBC_HAS_LOCALE__
++ char* __old = std::setlocale(LC_ALL, NULL);
++ char* __sav = new char[std::strlen(__old) + 1];
++ std::strcpy(__sav, __old);
++ std::setlocale(LC_ALL, "C");
++# endif
++#endif
++
++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ __gnu_cxx::__uselocale(__old);
++#elif defined __UCLIBC_HAS_LOCALE__
++ std::setlocale(LC_ALL, __sav);
++ delete [] __sav;
++#endif
++ return __ret;
++ }
++}
++
++#endif
+diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+new file mode 100644
+index 0000000..64aa962
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+@@ -0,0 +1,308 @@
++// std::codecvt implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <cstdlib> // For MB_CUR_MAX
++#include <climits> // For MB_LEN_MAX
++#include <bits/c++locale_internal.h>
++
++namespace std
++{
++ // Specializations.
++#ifdef _GLIBCXX_USE_WCHAR_T
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_out(state_type& __state, const intern_type* __from,
++ const intern_type* __from_end, const intern_type*& __from_next,
++ extern_type* __to, extern_type* __to_end,
++ extern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
++ // in case we fall back to wcrtomb and then continue, in a loop.
++ // NB: wcsnrtombs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
++ __from_end - __from_next);
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // wcrtomb.
++ for (; __from < __from_next; ++__from)
++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ extern_type __buf[MB_LEN_MAX];
++ __tmp_state = __state;
++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
++ if (__conv > static_cast<size_t>(__to_end - __to_next))
++ __ret = partial;
++ else
++ {
++ memcpy(__to_next, __buf, __conv);
++ __state = __tmp_state;
++ __to_next += __conv;
++ ++__from_next;
++ }
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_in(state_type& __state, const extern_type* __from,
++ const extern_type* __from_end, const extern_type*& __from_next,
++ intern_type* __to, intern_type* __to_end,
++ intern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we store a L'\0' and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
++ __from_end
++ - __from_next));
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (;; ++__to_next, __from += __conv)
++ {
++ __conv = mbrtowc(__to_next, __from, __from_end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __from_next = __from;
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ // It is unclear what to return in this case (see DR 382).
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ if (__to_next < __to_end)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from_next;
++ *__to_next++ = L'\0';
++ }
++ else
++ __ret = partial;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_encoding() const throw()
++ {
++ // XXX This implementation assumes that the encoding is
++ // stateless and is either single-byte or variable-width.
++ int __ret = 0;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ if (MB_CUR_MAX == 1)
++ __ret = 1;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_max_length() const throw()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ // XXX Probably wrong for stateful encodings.
++ int __ret = MB_CUR_MAX;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_length(state_type& __state, const extern_type* __from,
++ const extern_type* __end, size_t __max) const
++ {
++ int __ret = 0;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we advance past it and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++
++ // A dummy internal buffer is needed in order for mbsnrtocws to consider
++ // its fourth parameter (it wouldn't with NULL as first parameter).
++ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
++ * __max));
++ while (__from < __end && __max)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
++ __end
++ - __from));
++ if (!__from_chunk_end)
++ __from_chunk_end = __end;
++
++ const extern_type* __tmp_from = __from;
++ size_t __conv = mbsnrtowcs(__to, &__from,
++ __from_chunk_end - __from,
++ __max, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (__from = __tmp_from;; __from += __conv)
++ {
++ __conv = mbrtowc(NULL, __from, __end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __state = __tmp_state;
++ __ret += __from - __tmp_from;
++ break;
++ }
++ if (!__from)
++ __from = __from_chunk_end;
++
++ __ret += __from - __tmp_from;
++ __max -= __conv;
++
++ if (__from < __end && __max)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from;
++ ++__ret;
++ --__max;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+new file mode 100644
+index 0000000..c2664a7
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+@@ -0,0 +1,80 @@
++// std::collate implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++#endif
++
++namespace std
++{
++ // These are basically extensions to char_traits, and perhaps should
++ // be put there instead of here.
++ template<>
++ int
++ collate<char>::_M_compare(const char* __one, const char* __two) const
++ {
++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<char>::_M_transform(char* __to, const char* __from,
++ size_t __n) const
++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ int
++ collate<wchar_t>::_M_compare(const wchar_t* __one,
++ const wchar_t* __two) const
++ {
++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
++ size_t __n) const
++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+new file mode 100644
+index 0000000..7294e3a
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+@@ -0,0 +1,300 @@
++// std::ctype implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __wctype_l(S, L) wctype((S))
++#define __towupper_l(C, L) towupper((C))
++#define __towlower_l(C, L) towlower((C))
++#define __iswctype_l(C, M, L) iswctype((C), (M))
++#endif
++
++namespace std
++{
++ // NB: The other ctype<char> specializations are in src/locale.cc and
++ // various /config/os/* files.
++ template<>
++ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
++ : ctype<char>(0, false, __refs)
++ {
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
++ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
++#endif
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ ctype<wchar_t>::__wmask_type
++ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
++ {
++ __wmask_type __ret;
++ switch (__m)
++ {
++ case space:
++ __ret = __wctype_l("space", _M_c_locale_ctype);
++ break;
++ case print:
++ __ret = __wctype_l("print", _M_c_locale_ctype);
++ break;
++ case cntrl:
++ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
++ break;
++ case upper:
++ __ret = __wctype_l("upper", _M_c_locale_ctype);
++ break;
++ case lower:
++ __ret = __wctype_l("lower", _M_c_locale_ctype);
++ break;
++ case alpha:
++ __ret = __wctype_l("alpha", _M_c_locale_ctype);
++ break;
++ case digit:
++ __ret = __wctype_l("digit", _M_c_locale_ctype);
++ break;
++ case punct:
++ __ret = __wctype_l("punct", _M_c_locale_ctype);
++ break;
++ case xdigit:
++ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
++ break;
++ case alnum:
++ __ret = __wctype_l("alnum", _M_c_locale_ctype);
++ break;
++ case graph:
++ __ret = __wctype_l("graph", _M_c_locale_ctype);
++ break;
++ default:
++ __ret = __wmask_type();
++ }
++ return __ret;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_toupper(wchar_t __c) const
++ { return __towupper_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_tolower(wchar_t __c) const
++ { return __towlower_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ bool
++ ctype<wchar_t>::
++ do_is(mask __m, wchar_t __c) const
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ bool __ret = false;
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur]
++ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ return __ret;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
++ {
++ for (; __lo < __hi; ++__vec, ++__lo)
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ mask __m = 0;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
++ __m |= _M_bit[__bitcur];
++ *__vec = __m;
++ }
++ return __hi;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi && !this->do_is(__m, *__lo))
++ ++__lo;
++ return __lo;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
++ {
++ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
++ ++__lo;
++ return __lo;
++ }
++
++ wchar_t
++ ctype<wchar_t>::
++ do_widen(char __c) const
++ { return _M_widen[static_cast<unsigned char>(__c)]; }
++
++ const char*
++ ctype<wchar_t>::
++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
++ {
++ while (__lo < __hi)
++ {
++ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++ ++__lo;
++ ++__dest;
++ }
++ return __hi;
++ }
++
++ char
++ ctype<wchar_t>::
++ do_narrow(wchar_t __wc, char __dfault) const
++ {
++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
++ return _M_narrow[__wc];
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ const int __c = wctob(__wc);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
++ char* __dest) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ if (_M_narrow_ok)
++ while (__lo < __hi)
++ {
++ if (*__lo >= 0 && *__lo < 128)
++ *__dest = _M_narrow[*__lo];
++ else
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++ ++__lo;
++ ++__dest;
++ }
++ else
++ while (__lo < __hi)
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ ++__lo;
++ ++__dest;
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __hi;
++ }
++
++ void
++ ctype<wchar_t>::_M_initialize_ctype()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ wint_t __i;
++ for (__i = 0; __i < 128; ++__i)
++ {
++ const int __c = wctob(__i);
++ if (__c == EOF)
++ break;
++ else
++ _M_narrow[__i] = static_cast<char>(__c);
++ }
++ if (__i == 128)
++ _M_narrow_ok = true;
++ else
++ _M_narrow_ok = false;
++ for (size_t __j = 0;
++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
++ _M_widen[__j] = btowc(__j);
++
++ for (size_t __k = 0; __k <= 11; ++__k)
++ {
++ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ }
++#endif // _GLIBCXX_USE_WCHAR_T
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+new file mode 100644
+index 0000000..13594d9
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+@@ -0,0 +1,100 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix gettext stuff
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__dcgettext(const char *domainname,
++ const char *msgid, int category);
++#undef gettext
++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#else
++#undef gettext
++#define gettext(msgid) (msgid)
++#endif
++
++namespace std
++{
++ // Specializations.
++ template<>
++ string
++ messages<char>::do_get(catalog, int, int, const string& __dfault) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
++ __uselocale(__old);
++ return string(__msg);
++#elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ const char* __msg = gettext(__dfault.c_str());
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return string(__msg);
++#else
++ const char* __msg = gettext(__dfault.c_str());
++ return string(__msg);
++#endif
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ wstring
++ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
++ {
++# ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ __uselocale(__old);
++ return _M_convert_from_char(__msg);
++# elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return _M_convert_from_char(__msg);
++# else
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ return _M_convert_from_char(__msg);
++# endif
++ }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+new file mode 100644
+index 0000000..1424078
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
+@@ -0,0 +1,118 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix prototypes for *textdomain funcs
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__textdomain(const char *domainname);
++extern "C" char *__bindtextdomain(const char *domainname,
++ const char *dirname);
++#else
++#undef __textdomain
++#undef __bindtextdomain
++#define __textdomain(D) ((void)0)
++#define __bindtextdomain(D,P) ((void)0)
++#endif
++
++ // Non-virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::messages(size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
++ _M_name_messages(_S_get_c_name())
++ { }
++
++ template<typename _CharT>
++ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
++ _M_name_messages(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_messages = __tmp;
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
++ const char* __dir) const
++ {
++ __bindtextdomain(__s.c_str(), __dir);
++ return this->do_open(__s, __loc);
++ }
++
++ // Virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::~messages()
++ {
++ if (_M_name_messages != _S_get_c_name())
++ delete [] _M_name_messages;
++ _S_destroy_c_locale(_M_c_locale_messages);
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::do_open(const basic_string<char>& __s,
++ const locale&) const
++ {
++ // No error checking is done, assume the catalog exists and can
++ // be used.
++ __textdomain(__s.c_str());
++ return 0;
++ }
++
++ template<typename _CharT>
++ void
++ messages<_CharT>::do_close(catalog) const
++ { }
++
++ // messages_byname
++ template<typename _CharT>
++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
++ : messages<_CharT>(__refs)
++ {
++ if (this->_M_name_messages != locale::facet::_S_get_c_name())
++ delete [] this->_M_name_messages;
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ this->_M_name_messages = __tmp;
++
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_messages);
++ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
++ }
++ }
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+new file mode 100644
+index 0000000..aa52731
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -0,0 +1,692 @@
++// std::moneypunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning optimize this for uclibc
++#warning tailor for stub locale support
++#endif
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ // Construct and return valid pattern consisting of some combination of:
++ // space none symbol sign value
++ money_base::pattern
++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
++ {
++ pattern __ret;
++
++ // This insanely complicated routine attempts to construct a valid
++ // pattern for use with monyepunct. A couple of invariants:
++
++ // if (__precedes) symbol -> value
++ // else value -> symbol
++
++ // if (__space) space
++ // else none
++
++ // none == never first
++ // space never first or last
++
++ // Any elegant implementations of this are welcome.
++ switch (__posn)
++ {
++ case 0:
++ case 1:
++ // 1 The sign precedes the value and symbol.
++ __ret.field[0] = sign;
++ if (__space)
++ {
++ // Pattern starts with sign.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[3] = symbol;
++ }
++ __ret.field[2] = space;
++ }
++ else
++ {
++ // Pattern starts with sign and ends with none.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[3] = none;
++ }
++ break;
++ case 2:
++ // 2 The sign follows the value and symbol.
++ if (__space)
++ {
++ // Pattern either ends with sign.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[1] = space;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ // Pattern ends with sign then none.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[1] = symbol;
++ }
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ break;
++ case 3:
++ // 3 The sign immediately precedes the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = sign;
++ __ret.field[1] = symbol;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = sign;
++ __ret.field[3] = symbol;
++ }
++ else
++ {
++ __ret.field[1] = sign;
++ __ret.field[2] = symbol;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ case 4:
++ // 4 The sign immediately follows the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = sign;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = symbol;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ default:
++ ;
++ }
++ return __ret;
++ }
++
++ template<>
++ void
++ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == true
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ void
++ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == false
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ moneypunct<char, true>::~moneypunct()
++ { delete _M_data; }
++
++ template<>
++ moneypunct<char, false>::~moneypunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ void
++ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len;
++ __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ moneypunct<wchar_t, true>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++
++ template<>
++ moneypunct<wchar_t, false>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+new file mode 100644
+index 0000000..883ec1a
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -0,0 +1,160 @@
++// std::numpunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
++ __cloc));
++
++ // Check for NULL, which implies no grouping.
++ if (_M_data->_M_thousands_sep == '\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = "true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = "false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<char>::~numpunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<wchar_t>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] =
++ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] =
++ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
++ }
++ else
++ {
++ // Named locale.
++ // NB: In the GNU model wchar_t is always 32 bit wide.
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++
++ if (_M_data->_M_thousands_sep == L'\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = L"true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = L"false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<wchar_t>::~numpunct()
++ { delete _M_data; }
++ #endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
+new file mode 100644
+index 0000000..e0707d7
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
+@@ -0,0 +1,406 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __timepunct<char>::
++ _M_put(char* __s, size_t __maxlen, const char* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = strftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = '\0';
++ }
++
++ template<>
++ void
++ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = "%m/%d/%y";
++ _M_data->_M_date_era_format = "%m/%d/%y";
++ _M_data->_M_time_format = "%H:%M:%S";
++ _M_data->_M_time_era_format = "%H:%M:%S";
++ _M_data->_M_date_time_format = "";
++ _M_data->_M_date_time_era_format = "";
++ _M_data->_M_am = "AM";
++ _M_data->_M_pm = "PM";
++ _M_data->_M_am_pm_format = "";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = "Sunday";
++ _M_data->_M_day2 = "Monday";
++ _M_data->_M_day3 = "Tuesday";
++ _M_data->_M_day4 = "Wednesday";
++ _M_data->_M_day5 = "Thursday";
++ _M_data->_M_day6 = "Friday";
++ _M_data->_M_day7 = "Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = "Sun";
++ _M_data->_M_aday2 = "Mon";
++ _M_data->_M_aday3 = "Tue";
++ _M_data->_M_aday4 = "Wed";
++ _M_data->_M_aday5 = "Thu";
++ _M_data->_M_aday6 = "Fri";
++ _M_data->_M_aday7 = "Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = "January";
++ _M_data->_M_month02 = "February";
++ _M_data->_M_month03 = "March";
++ _M_data->_M_month04 = "April";
++ _M_data->_M_month05 = "May";
++ _M_data->_M_month06 = "June";
++ _M_data->_M_month07 = "July";
++ _M_data->_M_month08 = "August";
++ _M_data->_M_month09 = "September";
++ _M_data->_M_month10 = "October";
++ _M_data->_M_month11 = "November";
++ _M_data->_M_month12 = "December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = "Jan";
++ _M_data->_M_amonth02 = "Feb";
++ _M_data->_M_amonth03 = "Mar";
++ _M_data->_M_amonth04 = "Apr";
++ _M_data->_M_amonth05 = "May";
++ _M_data->_M_amonth06 = "Jun";
++ _M_data->_M_amonth07 = "Jul";
++ _M_data->_M_amonth08 = "Aug";
++ _M_data->_M_amonth09 = "Sep";
++ _M_data->_M_amonth10 = "Oct";
++ _M_data->_M_amonth11 = "Nov";
++ _M_data->_M_amonth12 = "Dec";
++ }
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
++ __cloc);
++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ __timepunct<wchar_t>::
++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = L'\0';
++ }
++
++ template<>
++ void
++ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<wchar_t>;
++
++#warning wide time stuff
++// if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = L"%m/%d/%y";
++ _M_data->_M_date_era_format = L"%m/%d/%y";
++ _M_data->_M_time_format = L"%H:%M:%S";
++ _M_data->_M_time_era_format = L"%H:%M:%S";
++ _M_data->_M_date_time_format = L"";
++ _M_data->_M_date_time_era_format = L"";
++ _M_data->_M_am = L"AM";
++ _M_data->_M_pm = L"PM";
++ _M_data->_M_am_pm_format = L"";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = L"Sunday";
++ _M_data->_M_day2 = L"Monday";
++ _M_data->_M_day3 = L"Tuesday";
++ _M_data->_M_day4 = L"Wednesday";
++ _M_data->_M_day5 = L"Thursday";
++ _M_data->_M_day6 = L"Friday";
++ _M_data->_M_day7 = L"Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = L"Sun";
++ _M_data->_M_aday2 = L"Mon";
++ _M_data->_M_aday3 = L"Tue";
++ _M_data->_M_aday4 = L"Wed";
++ _M_data->_M_aday5 = L"Thu";
++ _M_data->_M_aday6 = L"Fri";
++ _M_data->_M_aday7 = L"Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = L"January";
++ _M_data->_M_month02 = L"February";
++ _M_data->_M_month03 = L"March";
++ _M_data->_M_month04 = L"April";
++ _M_data->_M_month05 = L"May";
++ _M_data->_M_month06 = L"June";
++ _M_data->_M_month07 = L"July";
++ _M_data->_M_month08 = L"August";
++ _M_data->_M_month09 = L"September";
++ _M_data->_M_month10 = L"October";
++ _M_data->_M_month11 = L"November";
++ _M_data->_M_month12 = L"December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = L"Jan";
++ _M_data->_M_amonth02 = L"Feb";
++ _M_data->_M_amonth03 = L"Mar";
++ _M_data->_M_amonth04 = L"Apr";
++ _M_data->_M_amonth05 = L"May";
++ _M_data->_M_amonth06 = L"Jun";
++ _M_data->_M_amonth07 = L"Jul";
++ _M_data->_M_amonth08 = L"Aug";
++ _M_data->_M_amonth09 = L"Sep";
++ _M_data->_M_amonth10 = L"Oct";
++ _M_data->_M_amonth11 = L"Nov";
++ _M_data->_M_amonth12 = L"Dec";
++ }
++#if 0
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ union { char *__s; wchar_t *__w; } __u;
++
++ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
++ _M_data->_M_date_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
++ _M_data->_M_date_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
++ _M_data->_M_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
++ _M_data->_M_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
++ _M_data->_M_am = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
++ _M_data->_M_pm = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
++ _M_data->_M_am_pm_format = __u.__w;
++
++ // Day names, starting with "C"'s Sunday.
++ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
++ _M_data->_M_day1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
++ _M_data->_M_day2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
++ _M_data->_M_day3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
++ _M_data->_M_day4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
++ _M_data->_M_day5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
++ _M_data->_M_day6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
++ _M_data->_M_day7 = __u.__w;
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
++ _M_data->_M_aday1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
++ _M_data->_M_aday2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
++ _M_data->_M_aday3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
++ _M_data->_M_aday4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
++ _M_data->_M_aday5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
++ _M_data->_M_aday6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
++ _M_data->_M_aday7 = __u.__w;
++
++ // Month names, starting with "C"'s January.
++ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
++ _M_data->_M_month01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
++ _M_data->_M_month02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
++ _M_data->_M_month03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
++ _M_data->_M_month04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
++ _M_data->_M_month05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
++ _M_data->_M_month06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
++ _M_data->_M_month07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
++ _M_data->_M_month08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
++ _M_data->_M_month09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
++ _M_data->_M_month10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
++ _M_data->_M_month11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
++ _M_data->_M_month12 = __u.__w;
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
++ _M_data->_M_amonth01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
++ _M_data->_M_amonth02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
++ _M_data->_M_amonth03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
++ _M_data->_M_amonth04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
++ _M_data->_M_amonth05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
++ _M_data->_M_amonth06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
++ _M_data->_M_amonth07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
++ _M_data->_M_amonth08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
++ _M_data->_M_amonth09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
++ _M_data->_M_amonth10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
++ _M_data->_M_amonth11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
++ _M_data->_M_amonth12 = __u.__w;
++ }
++#endif // 0
++ }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
+new file mode 100644
+index 0000000..ba8e858
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/time_members.h
+@@ -0,0 +1,68 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_timepunct = __tmp;
++ _M_initialize_timepunct(__cloc);
++ }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::~__timepunct()
++ {
++ if (_M_name_timepunct != _S_get_c_name())
++ delete [] _M_name_timepunct;
++ delete _M_data;
++ _S_destroy_c_locale(_M_c_locale_timepunct);
++ }
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 41797a9..8a5481c 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15830,6 +15830,9 @@ fi
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ *-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ enable_clocale_flag=gnu
+ ;;
+@@ -16108,6 +16111,78 @@ $as_echo "newlib" >&6; }
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5
++$as_echo "uclibc" >&6; }
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++set dummy msgfmt; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_check_msgfmt+set}" = set; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$check_msgfmt"; then
++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_check_msgfmt="yes"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
++fi
++fi
++check_msgfmt=$ac_cv_prog_check_msgfmt
++if test -n "$check_msgfmt"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5
++$as_echo "$check_msgfmt" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++
++
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
+index 55a0b52..7d8bb15 100644
+--- a/libstdc++-v3/include/c_compatibility/wchar.h
++++ b/libstdc++-v3/include/c_compatibility/wchar.h
+@@ -101,7 +101,9 @@ using std::wmemcmp;
+ using std::wmemcpy;
+ using std::wmemmove;
+ using std::wmemset;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using std::wcsftime;
++#endif
+
+ #if _GLIBCXX_USE_C99_WCHAR
+ using std::wcstold;
+diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
+index dc4cef02..256d126 100644
+--- a/libstdc++-v3/include/c_std/cwchar
++++ b/libstdc++-v3/include/c_std/cwchar
+@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ using ::wcscoll;
+ using ::wcscpy;
+ using ::wcscspn;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using ::wcsftime;
++#endif
+ using ::wcslen;
+ using ::wcsncat;
+ using ::wcsncmp;
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0005-uclibc-locale-no__x.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0005-uclibc-locale-no__x.patch
new file mode 100644
index 000000000..3275016e7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0005-uclibc-locale-no__x.patch
@@ -0,0 +1,257 @@
+From c01c14e8e9be382ecd4121ee70f5003b4cb0f904 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:42:36 +0400
+Subject: [PATCH 05/46] uclibc-locale-no__x
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ .../config/locale/uclibc/c++locale_internal.h | 45 ++++++++++++++++++++++
+ libstdc++-v3/config/locale/uclibc/c_locale.cc | 14 -------
+ libstdc++-v3/config/locale/uclibc/c_locale.h | 1 +
+ .../config/locale/uclibc/collate_members.cc | 7 ----
+ libstdc++-v3/config/locale/uclibc/ctype_members.cc | 7 ----
+ .../config/locale/uclibc/messages_members.cc | 7 +---
+ .../config/locale/uclibc/messages_members.h | 18 ++++-----
+ .../config/locale/uclibc/monetary_members.cc | 4 --
+ .../config/locale/uclibc/numeric_members.cc | 3 --
+ libstdc++-v3/config/locale/uclibc/time_members.cc | 3 --
+ 10 files changed, 55 insertions(+), 54 deletions(-)
+
+diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+index 2ae3e4a..e74fddf 100644
+--- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
++++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
+ extern "C" __typeof(wctype_l) __wctype_l;
+ #endif
+
++# define __nl_langinfo_l nl_langinfo_l
++# define __strcoll_l strcoll_l
++# define __strftime_l strftime_l
++# define __strtod_l strtod_l
++# define __strtof_l strtof_l
++# define __strtold_l strtold_l
++# define __strxfrm_l strxfrm_l
++# define __newlocale newlocale
++# define __freelocale freelocale
++# define __duplocale duplocale
++# define __uselocale uselocale
++
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l iswctype_l
++# define __towlower_l towlower_l
++# define __towupper_l towupper_l
++# define __wcscoll_l wcscoll_l
++# define __wcsftime_l wcsftime_l
++# define __wcsxfrm_l wcsxfrm_l
++# define __wctype_l wctype_l
++# endif
++
++#else
++# define __nl_langinfo_l(N, L) nl_langinfo((N))
++# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++# define __strtod_l(S, E, L) strtod((S), (E))
++# define __strtof_l(S, E, L) strtof((S), (E))
++# define __strtold_l(S, E, L) strtold((S), (E))
++# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++# warning should dummy __newlocale check for C|POSIX ?
++# define __newlocale(a, b, c) NULL
++# define __freelocale(a) ((void)0)
++# define __duplocale(a) __c_locale()
++//# define __uselocale ?
++//
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l(C, M, L) iswctype((C), (M))
++# define __towlower_l(C, L) towlower((C))
++# define __towupper_l(C, L) towupper((C))
++# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
++# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++# define __wctype_l(S, L) wctype((S))
++# endif
++
+ #endif // GLIBC 2.3 and later
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+index 5081dc1..21430d0 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+@@ -39,20 +39,6 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
+-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
+-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
+-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
+-#define __strtof_l(S, E, L) strtof((S), (E))
+-#define __strtod_l(S, E, L) strtod((S), (E))
+-#define __strtold_l(S, E, L) strtold((S), (E))
+-#warning should dummy __newlocale check for C|POSIX ?
+-#define __newlocale(a, b, c) NULL
+-#define __freelocale(a) ((void)0)
+-#define __duplocale(a) __c_locale()
+-#endif
+-
+ namespace std
+ {
+ template<>
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
+index da07c1f..4bca5f1 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.h
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -68,6 +68,7 @@ namespace __gnu_cxx
+ {
+ extern "C" __typeof(uselocale) __uselocale;
+ }
++#define __uselocale uselocale
+ #endif
+
+ namespace std
+diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+index c2664a7..ec5c329 100644
+--- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+@@ -36,13 +36,6 @@
+ #include <locale>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
+-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
+-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
+-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
+-#endif
+-
+ namespace std
+ {
+ // These are basically extensions to char_traits, and perhaps should
+diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+index 7294e3a..7b12861 100644
+--- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+@@ -38,13 +38,6 @@
+ #undef _LIBC
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __wctype_l(S, L) wctype((S))
+-#define __towupper_l(C, L) towupper((C))
+-#define __towlower_l(C, L) towlower((C))
+-#define __iswctype_l(C, M, L) iswctype((C), (M))
+-#endif
+-
+ namespace std
+ {
+ // NB: The other ctype<char> specializations are in src/locale.cc and
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+index 13594d9..d7693b4 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+@@ -39,13 +39,10 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix gettext stuff
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__dcgettext(const char *domainname,
+- const char *msgid, int category);
+ #undef gettext
+-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
+ #else
+-#undef gettext
+ #define gettext(msgid) (msgid)
+ #endif
+
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+index 1424078..d89da33 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.h
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
+@@ -36,15 +36,11 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__textdomain(const char *domainname);
+-extern "C" char *__bindtextdomain(const char *domainname,
+- const char *dirname);
+-#else
+-#undef __textdomain
+-#undef __bindtextdomain
+-#define __textdomain(D) ((void)0)
+-#define __bindtextdomain(D,P) ((void)0)
++#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#undef textdomain
++#undef bindtextdomain
++#define textdomain(D) ((void)0)
++#define bindtextdomain(D,P) ((void)0)
+ #endif
+
+ // Non-virtual member functions.
+@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char* __dir) const
+ {
+- __bindtextdomain(__s.c_str(), __dir);
++ bindtextdomain(__s.c_str(), __dir);
+ return this->do_open(__s, __loc);
+ }
+
+@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
+ {
+ // No error checking is done, assume the catalog exists and can
+ // be used.
+- __textdomain(__s.c_str());
++ textdomain(__s.c_str());
+ return 0;
+ }
+
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+index aa52731..2e6f80a 100644
+--- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -43,10 +43,6 @@
+ #warning tailor for stub locale support
+ #endif
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+-
+ namespace std
+ {
+ // Construct and return valid pattern consisting of some combination of:
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+index 883ec1a..2c70642 100644
+--- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -41,9 +41,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
+index e0707d7..d848ed5 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
+@@ -40,9 +40,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0006-uclibc-locale-wchar_fix.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0006-uclibc-locale-wchar_fix.patch
new file mode 100644
index 000000000..e45a482d5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0006-uclibc-locale-wchar_fix.patch
@@ -0,0 +1,68 @@
+From e7a4760fb40008cae33e6fc7dc4cfef6c2fd5f93 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:45:57 +0400
+Subject: [PATCH 06/46] uclibc-locale-wchar_fix
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/config/locale/uclibc/monetary_members.cc | 4 ++--
+ libstdc++-v3/config/locale/uclibc/numeric_members.cc | 13 +++++++++++++
+ 2 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+index 2e6f80a..31ebb9f 100644
+--- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -401,7 +401,7 @@ namespace std
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+@@ -556,7 +556,7 @@ namespace std
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+index 2c70642..d5c8961 100644
+--- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -127,12 +127,25 @@ namespace std
+ {
+ // Named locale.
+ // NB: In the GNU model wchar_t is always 32 bit wide.
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be numeric
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# elif defined __UCLIBC_HAS_LOCALE__
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
+ union { char *__s; wchar_t __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
+ _M_data->_M_decimal_point = __u.__w;
+
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
+ _M_data->_M_thousands_sep = __u.__w;
++#endif
+
+ if (_M_data->_M_thousands_sep == L'\0')
+ _M_data->_M_grouping = "";
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0007-uclibc-locale-update.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0007-uclibc-locale-update.patch
new file mode 100644
index 000000000..b73e5914e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0007-uclibc-locale-update.patch
@@ -0,0 +1,542 @@
+From 8d53a38a3038104e6830ecea5e4beadce54457c1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:46:58 +0400
+Subject: [PATCH 07/46] uclibc-locale-update
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ .../config/locale/uclibc/c++locale_internal.h | 3 +
+ libstdc++-v3/config/locale/uclibc/c_locale.cc | 74 ++++++++++------------
+ libstdc++-v3/config/locale/uclibc/c_locale.h | 42 ++++++------
+ libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 +++++++++++----
+ .../config/locale/uclibc/messages_members.h | 12 ++--
+ .../config/locale/uclibc/monetary_members.cc | 34 ++++++----
+ .../config/locale/uclibc/numeric_members.cc | 5 ++
+ libstdc++-v3/config/locale/uclibc/time_members.cc | 18 ++++--
+ libstdc++-v3/config/locale/uclibc/time_members.h | 17 +++--
+ 9 files changed, 158 insertions(+), 98 deletions(-)
+
+diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+index e74fddf..971a6b4 100644
+--- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
++++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -31,6 +31,9 @@
+
+ #include <bits/c++config.h>
+ #include <clocale>
++#include <cstdlib>
++#include <cstring>
++#include <cstddef>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning clean this up
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+index 21430d0..1b9d8e1 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+@@ -39,23 +39,20 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+
+-namespace std
+-{
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+ template<>
+ void
+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- float __f = __strtof_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __f;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -63,16 +60,13 @@ namespace std
+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- double __d = __strtod_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __d;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -80,16 +74,13 @@ namespace std
+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- long double __ld = __strtold_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __ld;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ void
+@@ -110,17 +101,18 @@ namespace std
+ void
+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
+ {
+- if (_S_get_c_locale() != __cloc)
++ if (__cloc && _S_get_c_locale() != __cloc)
+ __freelocale(__cloc);
+ }
+
+ __c_locale
+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
+ { return __duplocale(__cloc); }
+-} // namespace std
+
+-namespace __gnu_cxx
+-{
++_GLIBCXX_END_NAMESPACE
++
++_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
++
+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
+ {
+ "LC_CTYPE",
+@@ -138,9 +130,11 @@ namespace __gnu_cxx
+ "LC_IDENTIFICATION"
+ #endif
+ };
+-}
+
+-namespace std
+-{
++_GLIBCXX_END_NAMESPACE
++
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
+-} // namespace std
++
++_GLIBCXX_END_NAMESPACE
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
+index 4bca5f1..64a6d46 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.h
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -39,21 +39,23 @@
+ #pragma GCC system_header
+
+ #include <cstring> // get std::strlen
+-#include <cstdio> // get std::snprintf or std::sprintf
++#include <cstdio> // get std::vsnprintf or std::vsprintf
+ #include <clocale>
+ #include <langinfo.h> // For codecvt
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix this
+ #endif
+-#ifdef __UCLIBC_HAS_LOCALE__
++#ifdef _GLIBCXX_USE_ICONV
+ #include <iconv.h> // For codecvt using iconv, iconv_t
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-#include <libintl.h> // For messages
++#ifdef HAVE_LIBINTL_H
++#include <libintl.h> // For messages
+ #endif
++#include <cstdarg>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning what is _GLIBCXX_C_LOCALE_GNU for
++// psm: used in os/gnu-linux/ctype_noninline.h
+ #endif
+ #define _GLIBCXX_C_LOCALE_GNU 1
+
+@@ -78,23 +80,25 @@ namespace std
+ #else
+ typedef int* __c_locale;
+ #endif
+-
+- // Convert numeric value of type _Tv to string and return length of
+- // string. If snprintf is available use it, otherwise fall back to
+- // the unsafe sprintf which, in general, can be dangerous and should
++ // Convert numeric value of type double to string and return length of
++ // string. If vsnprintf is available use it, otherwise fall back to
++ // the unsafe vsprintf which, in general, can be dangerous and should
+ // be avoided.
+- template<typename _Tv>
+- int
+- __convert_from_v(char* __out,
+- const int __size __attribute__ ((__unused__)),
+- const char* __fmt,
+-#ifdef __UCLIBC_HAS_XCLOCALE__
+- _Tv __v, const __c_locale& __cloc, int __prec)
++ inline int
++ __convert_from_v(const __c_locale&
++#ifndef __UCLIBC_HAS_XCLOCALE__
++ __cloc __attribute__ ((__unused__))
++#endif
++ ,
++ char* __out,
++ const int __size,
++ const char* __fmt, ...)
+ {
++ va_list __args;
++#ifdef __UCLIBC_HAS_XCLOCALE__
++
+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+ #else
+- _Tv __v, const __c_locale&, int __prec)
+- {
+ # ifdef __UCLIBC_HAS_LOCALE__
+ char* __old = std::setlocale(LC_ALL, NULL);
+ char* __sav = new char[std::strlen(__old) + 1];
+@@ -103,7 +107,9 @@ namespace std
+ # endif
+ #endif
+
+- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++ va_start(__args, __fmt);
++ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
++ va_end(__args);
+
+ #ifdef __UCLIBC_HAS_XCLOCALE__
+ __gnu_cxx::__uselocale(__old);
+diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+index 7b12861..13e011d 100644
+--- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+@@ -33,16 +33,20 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+-namespace std
+-{
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+ // NB: The other ctype<char> specializations are in src/locale.cc and
+ // various /config/os/* files.
+- template<>
+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
+ : ctype<char>(0, false, __refs)
+ {
+@@ -57,6 +61,8 @@ namespace std
+ #endif
+ }
+ }
++ ctype_byname<char>::~ctype_byname()
++ { }
+
+ #ifdef _GLIBCXX_USE_WCHAR_T
+ ctype<wchar_t>::__wmask_type
+@@ -138,17 +144,33 @@ namespace std
+ ctype<wchar_t>::
+ do_is(mask __m, wchar_t __c) const
+ {
+- // Highest bitmask in ctype_base == 10, but extra in "C"
+- // library for blank.
++ // The case of __m == ctype_base::space is particularly important,
++ // due to its use in many istream functions. Therefore we deal with
++ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
++ // is the mask corresponding to ctype_base::space. NB: an encoding
++ // change would not affect correctness!
++
+ bool __ret = false;
+- const size_t __bitmasksize = 11;
+- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
+- if (__m & _M_bit[__bitcur]
+- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
+- {
+- __ret = true;
+- break;
+- }
++ if (__m == _M_bit[5])
++ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
++ else
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur])
++ {
++ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ else if (__m == _M_bit[__bitcur])
++ break;
++ }
++ }
++
+ return __ret;
+ }
+
+@@ -290,4 +312,5 @@ namespace std
+ #endif
+ }
+ #endif // _GLIBCXX_USE_WCHAR_T
+-}
++
++_GLIBCXX_END_NAMESPACE
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+index d89da33..067657a 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.h
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
+@@ -53,12 +53,16 @@
+ template<typename _CharT>
+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
+ size_t __refs)
+- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
+- _M_name_messages(__s)
++ : facet(__refs), _M_c_locale_messages(NULL),
++ _M_name_messages(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_messages = __tmp;
++
++ // Last to avoid leaking memory if new throws.
++ _M_c_locale_messages = _S_clone_c_locale(__cloc);
+ }
+
+ template<typename _CharT>
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+index 31ebb9f..7679b9c 100644
+--- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -206,7 +211,7 @@ namespace std
+ }
+ break;
+ default:
+- ;
++ __ret = pattern();
+ }
+ return __ret;
+ }
+@@ -390,7 +395,9 @@ namespace std
+ __c_locale __old = __uselocale(__cloc);
+ #else
+ // Switch to named locale so that mbsrtowcs will work.
+- char* __old = strdup(setlocale(LC_ALL, NULL));
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
+ setlocale(LC_ALL, __name);
+ #endif
+
+@@ -477,8 +484,8 @@ namespace std
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ __throw_exception_again;
+ }
+@@ -498,8 +505,8 @@ namespace std
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ }
+ }
+@@ -545,8 +552,11 @@ namespace std
+ __c_locale __old = __uselocale(__cloc);
+ #else
+ // Switch to named locale so that mbsrtowcs will work.
+- char* __old = strdup(setlocale(LC_ALL, NULL));
+- setlocale(LC_ALL, __name);
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
++ memcpy(__sav, __old, __llen);
++ setlocale(LC_ALL, __name);
+ #endif
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -633,8 +643,8 @@ namespace std
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ __throw_exception_again;
+ }
+@@ -653,8 +663,8 @@ namespace std
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ __uselocale(__old);
+ #else
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ }
+ }
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+index d5c8961..8ae8969 100644
+--- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
+index d848ed5..f24d53e 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
+@@ -53,11 +53,14 @@ namespace std
+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
+ _M_c_locale_timepunct);
+ #else
+- char* __old = strdup(setlocale(LC_ALL, NULL));
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
++ memcpy(__sav, __old, __llen);
+ setlocale(LC_ALL, _M_name_timepunct);
+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ // Make sure __s is null terminated.
+ if (__len == 0)
+@@ -207,11 +210,14 @@ namespace std
+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
+ _M_c_locale_timepunct);
+ #else
+- char* __old = strdup(setlocale(LC_ALL, NULL));
++ char* __old = setlocale(LC_ALL, NULL);
++ const size_t __llen = strlen(__old) + 1;
++ char* __sav = new char[__llen];
++ memcpy(__sav, __old, __llen);
+ setlocale(LC_ALL, _M_name_timepunct);
+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
+- setlocale(LC_ALL, __old);
+- free(__old);
++ setlocale(LC_ALL, __sav);
++ delete [] __sav;
+ #endif
+ // Make sure __s is null terminated.
+ if (__len == 0)
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
+index ba8e858..1665dde 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.h
++++ b/libstdc++-v3/config/locale/uclibc/time_members.h
+@@ -50,12 +50,21 @@
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+- _M_name_timepunct(__s)
++ _M_name_timepunct(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_timepunct = __tmp;
+- _M_initialize_timepunct(__cloc);
++
++ try
++ { _M_initialize_timepunct(__cloc); }
++ catch(...)
++ {
++ delete [] _M_name_timepunct;
++ __throw_exception_again;
++ }
++
+ }
+
+ template<typename _CharT>
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0008-missing-execinfo_h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0008-missing-execinfo_h.patch
new file mode 100644
index 000000000..01e7c9549
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0008-missing-execinfo_h.patch
@@ -0,0 +1,28 @@
+From 6dde3da24ef4b9b357bca670d8551cab3fdda843 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:48:10 +0400
+Subject: [PATCH 08/46] missing-execinfo_h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ boehm-gc/include/gc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
+index 6b38f2d..fca98ff 100644
+--- a/boehm-gc/include/gc.h
++++ b/boehm-gc/include/gc.h
+@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
+ #if defined(__linux__) || defined(__GLIBC__)
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0009-c99-snprintf.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0009-c99-snprintf.patch
new file mode 100644
index 000000000..d62341ac6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0009-c99-snprintf.patch
@@ -0,0 +1,28 @@
+From b794f1f1c1c7c06f3f0d78cf76c4fb90c2ab8dfb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:49:03 +0400
+Subject: [PATCH 09/46] c99-snprintf
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/include/c_std/cstdio | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
+index a4119ba..8396f43 100644
+--- a/libstdc++-v3/include/c_std/cstdio
++++ b/libstdc++-v3/include/c_std/cstdio
+@@ -144,7 +144,7 @@ namespace std
+ using ::vsprintf;
+ } // namespace std
+
+-#if _GLIBCXX_USE_C99_STDIO
++#if _GLIBCXX_USE_C99_STDIO || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0010-gcc-poison-system-directories.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0010-gcc-poison-system-directories.patch
new file mode 100644
index 000000000..ac4cf442d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0010-gcc-poison-system-directories.patch
@@ -0,0 +1,192 @@
+From d76250323dad69212c958e4857a98d99ab51a39e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:59:00 +0400
+Subject: [PATCH 10/46] gcc: poison-system-directories
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [distribution: codesourcery]
+---
+ gcc/common.opt | 4 ++++
+ gcc/config.in | 6 ++++++
+ gcc/configure | 16 ++++++++++++++++
+ gcc/configure.ac | 10 ++++++++++
+ gcc/doc/invoke.texi | 9 +++++++++
+ gcc/gcc.c | 2 ++
+ gcc/incpath.c | 19 +++++++++++++++++++
+ 7 files changed, 66 insertions(+)
+
+diff --git a/gcc/common.opt b/gcc/common.opt
+index 67048db..733185c 100644
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -659,6 +659,10 @@ Wreturn-local-addr
+ Common Var(warn_return_local_addr) Init(1) Warning
+ Warn about returning a pointer/reference to a local or temporary variable.
+
++Wpoison-system-directories
++Common Var(flag_poison_system_directories) Init(1) Warning
++Warn for -I and -L options using system directories if cross compiling
++
+ Wshadow
+ Common Var(warn_shadow) Warning
+ Warn when one local variable shadows another.
+diff --git a/gcc/config.in b/gcc/config.in
+index 115cb61..105b30f 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -187,6 +187,12 @@
+ #endif
+
+
++/* Define to warn for use of native system header directories */
++#ifndef USED_FOR_TARGET
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++#endif
++
++
+ /* Define if you want all operations on RTL (the basic data structure of the
+ optimizer and back end) to be checked for dynamic type safety at runtime.
+ This is quite expensive. */
+diff --git a/gcc/configure b/gcc/configure
+index 1c6e340..8f83152 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -942,6 +942,7 @@ with_system_zlib
+ enable_maintainer_mode
+ enable_link_mutex
+ enable_version_specific_runtime_libs
++enable_poison_system_directories
+ enable_plugin
+ enable_host_shared
+ enable_libquadmath_support
+@@ -1681,6 +1682,8 @@ Optional Features:
+ --enable-version-specific-runtime-libs
+ specify that runtime libraries should be installed
+ in a compiler-specific directory
++ --enable-poison-system-directories
++ warn for use of native system header directories
+ --enable-plugin enable plugin support
+ --enable-host-shared build host code as shared libraries
+ --disable-libquadmath-support
+@@ -28908,6 +28911,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+ fi
+
+
++# Check whether --enable-poison-system-directories was given.
++if test "${enable_poison_system_directories+set}" = set; then :
++ enableval=$enable_poison_system_directories;
++else
++ enable_poison_system_directories=no
++fi
++
++if test "x${enable_poison_system_directories}" = "xyes"; then
++
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
++
++fi
++
+ # Substitute configuration variables
+
+
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 6c1dcd9..0fccaef 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5861,6 +5861,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+ [specify that runtime libraries should be
+ installed in a compiler-specific directory])])
+
++AC_ARG_ENABLE([poison-system-directories],
++ AS_HELP_STRING([--enable-poison-system-directories],
++ [warn for use of native system header directories]),,
++ [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++ [1],
++ [Define to warn for use of native system header directories])
++fi
++
+ # Substitute configuration variables
+ AC_SUBST(subdirs)
+ AC_SUBST(srcdir)
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 821f8fd..8bb49e7 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -284,6 +284,7 @@ Objective-C and Objective-C++ Dialects}.
+ -Wparentheses -Wno-pedantic-ms-format @gol
+ -Wplacement-new -Wplacement-new=@var{n} @gol
+ -Wpointer-arith -Wno-pointer-to-int-cast @gol
++-Wno-poison-system-directories @gol
+ -Wno-pragmas -Wredundant-decls -Wno-return-local-addr @gol
+ -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol
+ -Wshift-overflow -Wshift-overflow=@var{n} @gol
+@@ -4723,6 +4724,14 @@ made up of data only and thus requires no special treatment. But, for
+ most targets, it is made up of code and thus requires the stack to be
+ made executable in order for the program to work properly.
+
++@item -Wno-poison-system-directories
++@opindex Wno-poison-system-directories
++Do not warn for @option{-I} or @option{-L} options using system
++directories such as @file{/usr/include} when cross compiling. This
++option is intended for use in chroot environments when such
++directories contain the correct headers and libraries for the target
++system rather than the host.
++
+ @item -Wfloat-equal
+ @opindex Wfloat-equal
+ @opindex Wno-float-equal
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 1af5920..4cfef7f 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1017,6 +1017,8 @@ proper position among the other output files. */
+ "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+ "%X %{o*} %{e*} %{N} %{n} %{r}\
+ %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
++ %{Wno-poison-system-directories:--no-poison-system-directories} \
++ %{Werror=poison-system-directories:--error-poison-system-directories} \
+ %{static:} %{L*} %(mfwrap) %(link_libgcc) " \
+ VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
+ %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+index ea40f4a..856da41 100644
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -26,6 +26,7 @@
+ #include "intl.h"
+ #include "incpath.h"
+ #include "cppdefault.h"
++#include "diagnostic-core.h"
+
+ /* Microsoft Windows does not natively support inodes.
+ VMS has non-numeric inodes. */
+@@ -381,6 +382,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
+ }
+ fprintf (stderr, _("End of search list.\n"));
+ }
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++ if (flag_poison_system_directories)
++ {
++ struct cpp_dir *p;
++
++ for (p = heads[QUOTE]; p; p = p->next)
++ {
++ if ((!strncmp (p->name, "/usr/include", 12))
++ || (!strncmp (p->name, "/usr/local/include", 18))
++ || (!strncmp (p->name, "/usr/X11R6/include", 18)))
++ warning (OPT_Wpoison_system_directories,
++ "include location \"%s\" is unsafe for "
++ "cross-compilation",
++ p->name);
++ }
++ }
++#endif
+ }
+
+ /* Use given -I paths for #include "..." but not #include <...>, and
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0011-gcc-poison-dir-extend.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0011-gcc-poison-dir-extend.patch
new file mode 100644
index 000000000..a1736aea1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0011-gcc-poison-dir-extend.patch
@@ -0,0 +1,39 @@
+From a1c24b59def393e43cd50b6768604a212c788ed3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:00:34 +0400
+Subject: [PATCH 11/46] gcc-poison-dir-extend
+
+Add /sw/include and /opt/include based on the original
+zecke-no-host-includes.patch patch. The original patch checked for
+/usr/include, /sw/include and /opt/include and then triggered a failure and
+aborted.
+
+Instead, we add the two missing items to the current scan. If the user
+wants this to be a failure, they can add "-Werror=poison-system-directories".
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/incpath.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+index 856da41..d2fc82c 100644
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -392,7 +392,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
+ {
+ if ((!strncmp (p->name, "/usr/include", 12))
+ || (!strncmp (p->name, "/usr/local/include", 18))
+- || (!strncmp (p->name, "/usr/X11R6/include", 18)))
++ || (!strncmp (p->name, "/usr/X11R6/include", 18))
++ || (!strncmp (p->name, "/sw/include", 11))
++ || (!strncmp (p->name, "/opt/include", 12)))
+ warning (OPT_Wpoison_system_directories,
+ "include location \"%s\" is unsafe for "
+ "cross-compilation",
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
new file mode 100644
index 000000000..939b0705f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -0,0 +1,73 @@
+From 00ef5f0f2a8d3b33aeb1e55c0d23439f4dd495af Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:08:31 +0400
+Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
+
+Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
+
+This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
+
+Other changes I had to do include:
+
+- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
+
+- passing the right CFLAGS to configure scripts as exported environment variables
+
+I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
+
+Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
+
+Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ configure | 32 ++++++++++++++++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+
+diff --git a/configure b/configure
+index bfadc33..755d382 100755
+--- a/configure
++++ b/configure
+@@ -6819,6 +6819,38 @@ fi
+
+
+
++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
++# might be empty or "-g". We don't require a C++ compiler, so CXXFLAGS
++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
++# We want to ensure that TARGET libraries (which we know are built with
++# gcc) are built with "-O2 -g", so include those options when setting
++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
++if test "x$CFLAGS_FOR_TARGET" = x; then
++ CFLAGS_FOR_TARGET=$CFLAGS
++ case " $CFLAGS " in
++ *" -O2 "*) ;;
++ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
++ esac
++ case " $CFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
++ esac
++fi
++
++
++if test "x$CXXFLAGS_FOR_TARGET" = x; then
++ CXXFLAGS_FOR_TARGET=$CXXFLAGS
++ case " $CXXFLAGS " in
++ *" -O2 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
++ esac
++ case " $CXXFLAGS " in
++ *" -g "* | *" -g3 "*) ;;
++ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
++ esac
++fi
++
++
+ # Handle --with-headers=XXX. If the value is not "yes", the contents of
+ # the named directory are copied to $(tooldir)/sys-include.
+ if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0013-64-bit-multilib-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0013-64-bit-multilib-hack.patch
new file mode 100644
index 000000000..e31cde431
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0013-64-bit-multilib-hack.patch
@@ -0,0 +1,85 @@
+From 7fc7a070ac53a55950a1eac76f02877d4106b4b3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:10:06 +0400
+Subject: [PATCH 13/46] 64-bit multilib hack.
+
+GCC has internal multilib handling code but it assumes a very specific rigid directory
+layout. The build system implementation of multilib layout is very generic and allows
+complete customisation of the library directories.
+
+This patch is a partial solution to allow any custom directories to be passed into gcc
+and handled correctly. It forces gcc to use the base_libdir (which is the current
+directory, "."). We need to do this for each multilib that is configured as we don't
+know which compiler options may be being passed into the compiler. Since we have a compiler
+per mulitlib at this point that isn't an issue.
+
+The one problem is the target compiler is only going to work for the default multlilib at
+this point. Ideally we'd figure out which multilibs were being enabled with which paths
+and be able to patch these entries with a complete set of correct paths but this we
+don't have such code at this point. This is something the target gcc recipe should do
+and override these platform defaults in its build config.
+
+RP 15/8/11
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/config/i386/t-linux64 | 6 ++----
+ gcc/config/mips/t-linux64 | 10 +++-------
+ gcc/config/rs6000/t-linux64 | 5 ++---
+ 3 files changed, 7 insertions(+), 14 deletions(-)
+
+diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
+index c0cc8a3..365a5d6 100644
+--- a/gcc/config/i386/t-linux64
++++ b/gcc/config/i386/t-linux64
+@@ -32,7 +32,5 @@
+ #
+ comma=,
+ MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+-MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
+-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
++MULTILIB_DIRNAMES = . .
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
+index 16c8adf..b932ace 100644
+--- a/gcc/config/mips/t-linux64
++++ b/gcc/config/mips/t-linux64
+@@ -17,10 +17,6 @@
+ # <http://www.gnu.org/licenses/>.
+
+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+-MULTILIB_DIRNAMES = n32 32 64
+-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
+-MULTILIB_OSDIRNAMES = \
+- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
++MULTILIB_DIRNAMES = . . .
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
++
+diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
+index fa7550b..9b5d9ef 100644
+--- a/gcc/config/rs6000/t-linux64
++++ b/gcc/config/rs6000/t-linux64
+@@ -26,10 +26,9 @@
+ # MULTILIB_OSDIRNAMES according to what is found on the target.
+
+ MULTILIB_OPTIONS := m64/m32
+-MULTILIB_DIRNAMES := 64 32
++MULTILIB_DIRNAMES := . .
+ MULTILIB_EXTRA_OPTS :=
+-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+
+ rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+ $(COMPILE) $<
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0014-optional-libstdc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0014-optional-libstdc.patch
new file mode 100644
index 000000000..44b0cc7d6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0014-optional-libstdc.patch
@@ -0,0 +1,125 @@
+From 36275f7981bdaf919bbc9b51a7c7fae1e192adb3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:12:56 +0400
+Subject: [PATCH 14/46] optional libstdc
+
+gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
+will not run correctly since by default the linker will try to link against libstdc++
+which shouldn't exist yet. We need an option to disable -lstdc++
+option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
+driver. This patch adds such an option which only disables the -lstdc++.
+
+A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
+do this officially, the likely answer is don't build libstdc++ separately.
+
+RP 29/6/10
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ gcc/c-family/c.opt | 4 ++++
+ gcc/cp/g++spec.c | 1 +
+ gcc/doc/invoke.texi | 32 +++++++++++++++++++++++++++++++-
+ gcc/gcc.c | 1 +
+ 4 files changed, 37 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index 4f86876..660da6c 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -1647,6 +1647,10 @@ nostdinc++
+ C++ ObjC++
+ Do not search standard system include directories for C++.
+
++nostdlib++
++Driver
++Do not link standard C++ runtime library
++
+ o
+ C ObjC C++ ObjC++ Joined Separate
+ ; Documented in common.opt
+diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
+index 03cbde0..3642540 100644
+--- a/gcc/cp/g++spec.c
++++ b/gcc/cp/g++spec.c
+@@ -137,6 +137,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
+ switch (decoded_options[i].opt_index)
+ {
+ case OPT_nostdlib:
++ case OPT_nostdlib__:
+ case OPT_nodefaultlibs:
+ library = -1;
+ break;
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 8bb49e7..84d68aa 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -207,6 +207,9 @@ in the following sections.
+ -fno-weak -nostdinc++ @gol
+ -fvisibility-inlines-hidden @gol
+ -fvisibility-ms-compat @gol
++-fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
++-fvtv-counts -fvtv-debug @gol
++-nostdlib++ @gol
+ -fext-numeric-literals @gol
+ -Wabi=@var{n} -Wabi-tag -Wconversion-null -Wctor-dtor-privacy @gol
+ -Wdelete-non-virtual-dtor -Wliteral-suffix -Wmultiple-inheritance @gol
+@@ -470,7 +473,7 @@ Objective-C and Objective-C++ Dialects}.
+ -s -static -static-libgcc -static-libstdc++ @gol
+ -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
+ -static-libmpx -static-libmpxwrappers @gol
+--shared -shared-libgcc -symbolic @gol
++-shared -shared-libgcc -symbolic -nostdlib++ @gol
+ -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
+ -u @var{symbol} -z @var{keyword}}
+
+@@ -10601,6 +10604,33 @@ library subroutines.
+ constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
+ GNU Compiler Collection (GCC) Internals}.)
+
++@item -nostdlib++
++@opindex nostdlib++
++Do not use the standard system C++ runtime libraries when linking.
++Only the libraries you specify will be passed to the linker.
++
++@cindex @option{-lgcc}, use with @option{-nostdlib}
++@cindex @option{-nostdlib} and unresolved references
++@cindex unresolved references and @option{-nostdlib}
++@cindex @option{-lgcc}, use with @option{-nodefaultlibs}
++@cindex @option{-nodefaultlibs} and unresolved references
++@cindex unresolved references and @option{-nodefaultlibs}
++One of the standard libraries bypassed by @option{-nostdlib} and
++@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
++which GCC uses to overcome shortcomings of particular machines, or special
++needs for some languages.
++(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
++Collection (GCC) Internals},
++for more discussion of @file{libgcc.a}.)
++In most cases, you need @file{libgcc.a} even when you want to avoid
++other standard libraries. In other words, when you specify @option{-nostdlib}
++or @option{-nodefaultlibs} you should usually specify @option{-lgcc} as well.
++This ensures that you have no unresolved references to internal GCC
++library subroutines.
++(An example of such an internal subroutine is @code{__main}, used to ensure C++
++constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
++GNU Compiler Collection (GCC) Internals}.)
++
+ @item -pie
+ @opindex pie
+ Produce a position independent executable on targets that support it.
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 4cfef7f..da0b482 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1028,6 +1028,7 @@ proper position among the other output files. */
+ %(mflib) " STACK_SPLIT_SPEC "\
+ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
+ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
++ %{!nostdlib++:}\
+ %{!nostdlib:%{!nostartfiles:%E}} %{T*} \n%(post_link) }}}}}}"
+ #endif
+
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
new file mode 100644
index 000000000..6fc7346f6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
@@ -0,0 +1,59 @@
+From 9346f6042d8f7f85a75ca2af15f3b8d234985165 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:14:20 +0400
+Subject: [PATCH 15/46] gcc: disable MASK_RELAX_PIC_CALLS bit
+
+The new feature added after 4.3.3
+"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
+will cause cc1plus eat up all the system memory when build webkit-gtk.
+The function mips_get_pic_call_symbol keeps on recursively calling itself.
+Disable this feature to walk aside the bug.
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/configure | 7 -------
+ gcc/configure.ac | 7 -------
+ 2 files changed, 14 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 8f83152..5e72f17 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -27018,13 +27018,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
+ rm -f conftest.*
+ fi
+ fi
+- if test $gcc_cv_as_ld_jalr_reloc = yes; then
+- if test x$target_cpu_default = x; then
+- target_cpu_default=MASK_RELAX_PIC_CALLS
+- else
+- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
+- fi
+- fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
+ $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
+
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 0fccaef..dd8f6fa 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -4522,13 +4522,6 @@ x:
+ rm -f conftest.*
+ fi
+ fi
+- if test $gcc_cv_as_ld_jalr_reloc = yes; then
+- if test x$target_cpu_default = x; then
+- target_cpu_default=MASK_RELAX_PIC_CALLS
+- else
+- target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
+- fi
+- fi
+ AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
+
+ AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0016-COLLECT_GCC_OPTIONS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0016-COLLECT_GCC_OPTIONS.patch
new file mode 100644
index 000000000..c1548647c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0016-COLLECT_GCC_OPTIONS.patch
@@ -0,0 +1,38 @@
+From 1033bc2d4efc5c301bb822b607a673f5b10cc69f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:16:28 +0400
+Subject: [PATCH 16/46] COLLECT_GCC_OPTIONS
+
+This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
+invoke collect2.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/gcc.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index da0b482..7ca129f 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -4591,6 +4591,15 @@ set_collect_gcc_options (void)
+ sizeof ("COLLECT_GCC_OPTIONS=") - 1);
+
+ first_time = TRUE;
++#ifdef HAVE_LD_SYSROOT
++ if (target_system_root_changed && target_system_root)
++ {
++ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
++ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
++ obstack_grow (&collect_obstack, "'", 1);
++ first_time = FALSE;
++ }
++#endif
+ for (i = 0; (int) i < n_switches; i++)
+ {
+ const char *const *args;
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
new file mode 100644
index 000000000..0dbabd9e9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -0,0 +1,96 @@
+From 67123a306880af997a99ae514677c2da4973bd1a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:17:25 +0400
+Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in
+ ${B}
+
+Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
+the source can be shared between gcc-cross-initial,
+gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+While compiling gcc-crosssdk-initial-x86_64 on some host, there is
+occasionally failure that test the existance of default.h doesn't
+work, the reason is tm_include_list='** defaults.h' rather than
+tm_include_list='** ./defaults.h'
+
+So we add the test condition for this situation.
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/Makefile.in | 2 +-
+ gcc/configure | 4 ++--
+ gcc/configure.ac | 4 ++--
+ gcc/mkconfig.sh | 4 ++--
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 6c5adc0..9a1d466 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -517,7 +517,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
+
+ xmake_file=@xmake_file@
+-tmake_file=@tmake_file@
++tmake_file=@tmake_file@ ./t-oe
+ TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
+ TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
+ TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
+diff --git a/gcc/configure b/gcc/configure
+index 5e72f17..389b6d5 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12130,8 +12130,8 @@ for f in $tm_file; do
+ tm_include_list="${tm_include_list} $f"
+ ;;
+ defaults.h )
+- tm_file_list="${tm_file_list} \$(srcdir)/$f"
+- tm_include_list="${tm_include_list} $f"
++ tm_file_list="${tm_file_list} ./$f"
++ tm_include_list="${tm_include_list} ./$f"
+ ;;
+ * )
+ tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index dd8f6fa..91ac800 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1883,8 +1883,8 @@ for f in $tm_file; do
+ tm_include_list="${tm_include_list} $f"
+ ;;
+ defaults.h )
+- tm_file_list="${tm_file_list} \$(srcdir)/$f"
+- tm_include_list="${tm_include_list} $f"
++ tm_file_list="${tm_file_list} ./$f"
++ tm_include_list="${tm_include_list} ./$f"
+ ;;
+ * )
+ tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
+diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
+index 67dfac6..b73e08d 100644
+--- a/gcc/mkconfig.sh
++++ b/gcc/mkconfig.sh
+@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
+ if [ $# -ge 1 ]; then
+ echo '#ifdef IN_GCC' >> ${output}T
+ for file in "$@"; do
+- if test x"$file" = x"defaults.h"; then
++ if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
+ postpone_defaults_h="yes"
+ else
+ echo "# include \"$file\"" >> ${output}T
+@@ -109,7 +109,7 @@ esac
+
+ # If we postponed including defaults.h, add the #include now.
+ if test x"$postpone_defaults_h" = x"yes"; then
+- echo "# include \"defaults.h\"" >> ${output}T
++ echo "# include \"./defaults.h\"" >> ${output}T
+ fi
+
+ # Add multiple inclusion protection guard, part two.
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0018-fortran-cross-compile-hack.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0018-fortran-cross-compile-hack.patch
new file mode 100644
index 000000000..b43d89ea8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0018-fortran-cross-compile-hack.patch
@@ -0,0 +1,46 @@
+From e360dc3e0f1e0b9b001ef722fcf66f8120a03dbc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:20:01 +0400
+Subject: [PATCH 18/46] fortran cross-compile hack.
+
+* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
+used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
+directory.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ libgfortran/configure | 2 +-
+ libgfortran/configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libgfortran/configure b/libgfortran/configure
+index f746f6f..b4f3278 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -12734,7 +12734,7 @@ esac
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ ac_ext=${ac_fc_srcext-f}
+ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
+index 8f377bb..67710b5 100644
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -240,7 +240,7 @@ AC_SUBST(enable_static)
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ AC_PROG_FC(gfortran)
+
+ # extra LD Flags which are required for targets
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0019-cpp-honor-sysroot.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0019-cpp-honor-sysroot.patch
new file mode 100644
index 000000000..417a5ede4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0019-cpp-honor-sysroot.patch
@@ -0,0 +1,54 @@
+From 98d9c0c1b5552294b2130f7304bfb522da323442 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:22:00 +0400
+Subject: [PATCH 19/46] cpp: honor sysroot.
+
+Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
+preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
+rather than the --sysroot option specified on the commandline. If access to that directory is
+permission denied (unreadable), gcc will error.
+
+This happens when ccache is in use due to the fact it uses preprocessed source files.
+
+The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
+-isystem, -isysroot happen and the correct sysroot is used.
+
+[YOCTO #2074]
+
+RP 2012/04/13
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/cp/lang-specs.h | 2 +-
+ gcc/gcc.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
+index 9707fac..fe487a2 100644
+--- a/gcc/cp/lang-specs.h
++++ b/gcc/cp/lang-specs.h
+@@ -64,5 +64,5 @@ along with GCC; see the file COPYING3. If not see
+ {".ii", "@c++-cpp-output", 0, 0, 0},
+ {"@c++-cpp-output",
+ "%{!M:%{!MM:%{!E:\
+- cc1plus -fpreprocessed %i %(cc1_options) %2\
++ cc1plus -fpreprocessed %i %I %(cc1_options) %2\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 7ca129f..04fa81d 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1329,7 +1329,7 @@ static const struct compiler default_compilers[] =
+ %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
+ {".i", "@cpp-output", 0, 0, 0},
+ {"@cpp-output",
+- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {".s", "@assembler", 0, 0, 0},
+ {"@assembler",
+ "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0020-MIPS64-Default-to-N64-ABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0020-MIPS64-Default-to-N64-ABI.patch
new file mode 100644
index 000000000..ba612f545
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0020-MIPS64-Default-to-N64-ABI.patch
@@ -0,0 +1,57 @@
+From 1f15447fbcf65142627af8a9694761534da8d0d1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:23:08 +0400
+Subject: [PATCH 20/46] MIPS64: Default to N64 ABI
+
+MIPS64 defaults to n32 ABI, this patch makes it
+so that it defaults to N64 ABI
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [OE config specific]
+---
+ gcc/config.gcc | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index f66e48c..9c6d156 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2065,29 +2065,29 @@ mips*-*-linux*) # Linux MIPS, either endian.
+ default_mips_arch=mips32
+ ;;
+ mips64el-st-linux-gnu)
+- default_mips_abi=n32
++ default_mips_abi=64
+ tm_file="${tm_file} mips/st.h"
+ tmake_file="${tmake_file} mips/t-st"
+ enable_mips_multilibs="yes"
+ ;;
+ mips64octeon*-*-linux*)
+- default_mips_abi=n32
++ default_mips_abi=64
+ tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
+ target_cpu_default=MASK_SOFT_FLOAT_ABI
+ enable_mips_multilibs="yes"
+ ;;
+ mipsisa64r6*-*-linux*)
+- default_mips_abi=n32
++ default_mips_abi=64
+ default_mips_arch=mips64r6
+ enable_mips_multilibs="yes"
+ ;;
+ mipsisa64r2*-*-linux*)
+- default_mips_abi=n32
++ default_mips_abi=64
+ default_mips_arch=mips64r2
+ enable_mips_multilibs="yes"
+ ;;
+ mips64*-*-linux* | mipsisa64*-*-linux*)
+- default_mips_abi=n32
++ default_mips_abi=64
+ enable_mips_multilibs="yes"
+ ;;
+ esac
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
new file mode 100644
index 000000000..6675ce34f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -0,0 +1,234 @@
+From 9f73c8918b63e6a1c9b79384fac411d1056eec1c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:24:50 +0400
+Subject: [PATCH 21/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+ relative to SYSTEMLIBS_DIR
+
+This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+relative to SYSTEMLIBS_DIR which can be set in generated headers
+This breaks the assumption of hardcoded multilib in gcc
+Change is only for the supported architectures in OE including
+SH, sparc, alpha for possible future support (if any)
+
+Removes the do_headerfix task in metadata
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [OE configuration]
+---
+ gcc/config/alpha/linux-elf.h | 4 ++--
+ gcc/config/arm/linux-eabi.h | 4 ++--
+ gcc/config/arm/linux-elf.h | 2 +-
+ gcc/config/i386/linux.h | 2 +-
+ gcc/config/i386/linux64.h | 6 +++---
+ gcc/config/linux.h | 8 ++++----
+ gcc/config/mips/linux.h | 12 ++++++------
+ gcc/config/rs6000/linux64.h | 16 ++++++----------
+ gcc/config/sh/linux.h | 2 +-
+ gcc/config/sparc/linux.h | 2 +-
+ gcc/config/sparc/linux64.h | 4 ++--
+ 11 files changed, 29 insertions(+), 33 deletions(-)
+
+diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
+index a0764d3..02f7a7c 100644
+--- a/gcc/config/alpha/linux-elf.h
++++ b/gcc/config/alpha/linux-elf.h
+@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see
+ #define EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index ace8481..4010435 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -68,8 +68,8 @@
+ GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
+
+ #undef GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
+-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
+ #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
+
+ #define GLIBC_DYNAMIC_LINKER \
+diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
+index a94bd2d..0220628 100644
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -62,7 +62,7 @@
+
+ #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #define LINUX_TARGET_LINK_SPEC "%{h*} \
+ %{static:-Bstatic} \
+diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
+index d37a875..edde586 100644
+--- a/gcc/config/i386/linux.h
++++ b/gcc/config/i386/linux.h
+@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
+diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
+index 73d22e3..f4b5615 100644
+--- a/gcc/config/i386/linux64.h
++++ b/gcc/config/i386/linux64.h
+@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
+ #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
+
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
+
+ #undef MUSL_DYNAMIC_LINKER32
+ #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
+diff --git a/gcc/config/linux.h b/gcc/config/linux.h
+index 9aeeb94..b055652 100644
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -81,10 +81,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
+ GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
+ supporting both 32-bit and 64-bit compilation. */
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
+diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
+index fa253b6..da02c8d 100644
+--- a/gcc/config/mips/linux.h
++++ b/gcc/config/mips/linux.h
+@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3. If not see
+ #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
+
+ #define GLIBC_DYNAMIC_LINKER32 \
+- "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ #define GLIBC_DYNAMIC_LINKER64 \
+- "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ #define GLIBC_DYNAMIC_LINKERN32 \
+- "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+
+ #undef UCLIBC_DYNAMIC_LINKER32
+ #define UCLIBC_DYNAMIC_LINKER32 \
+- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
+ #undef UCLIBC_DYNAMIC_LINKER64
+ #define UCLIBC_DYNAMIC_LINKER64 \
+- "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
+ #define UCLIBC_DYNAMIC_LINKERN32 \
+- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
++ "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
+
+ #undef MUSL_DYNAMIC_LINKER32
+ #define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
+diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
+index fefa0c4..7173938 100644
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -412,16 +412,11 @@ extern int dot_symbols;
+ #undef LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+
+-#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1"
+-
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
+ #ifdef LINUX64_DEFAULT_ABI_ELFv2
+-#define GLIBC_DYNAMIC_LINKER64 \
+-"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \
+-":%(dynamic_linker_prefix)/lib64/ld64.so.2}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
+ #else
+-#define GLIBC_DYNAMIC_LINKER64 \
+-"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \
+-":%(dynamic_linker_prefix)/lib64/ld64.so.1}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
+ #endif
+
+ #define MUSL_DYNAMIC_LINKER32 \
+@@ -429,8 +424,9 @@ extern int dot_symbols;
+ #define MUSL_DYNAMIC_LINKER64 \
+ "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
+
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
++
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U, M) \
+ "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
+diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
+index 2a036ac..50fb735 100644
+--- a/gcc/config/sh/linux.h
++++ b/gcc/config/sh/linux.h
+@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see
+ "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
+ "%{mfdpic:-fdpic}.so.1"
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
+diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
+index 9b32577..7bd66de 100644
+--- a/gcc/config/sparc/linux.h
++++ b/gcc/config/sparc/linux.h
+@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
+ When the -shared link option is used a final link is not being
+ done. */
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #undef LINK_SPEC
+ #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
+diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
+index a1ef325..3bae3d5 100644
+--- a/gcc/config/sparc/linux64.h
++++ b/gcc/config/sparc/linux64.h
+@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3. If not see
+ When the -shared link option is used a final link is not being
+ done. */
+
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
+
+ #ifdef SPARC_BI_ARCH
+
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0022-gcc-Fix-argument-list-too-long-error.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0022-gcc-Fix-argument-list-too-long-error.patch
new file mode 100644
index 000000000..fab6e4aeb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0022-gcc-Fix-argument-list-too-long-error.patch
@@ -0,0 +1,40 @@
+From acce5157f6b3a1dc9a3676b7118ac887dc5693be Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:26:37 +0400
+Subject: [PATCH 22/46] gcc: Fix argument list too long error.
+
+There would be an "Argument list too long" error when the
+build directory is longer than 200, this is caused by:
+
+headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
+
+The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
+it, use the $(sort list) of GNU make which can handle the too long list
+would fix the problem, the header would be short enough after sorted.
+The "tr ' ' '\012'" was used for translating the space to "\n", the
+$(sort list) doesn't need this.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 9a1d466..450cb79 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3349,7 +3349,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+ # We keep the directory structure for files in config or c-family and .def
+ # files. All other files are flattened to a single directory.
+ $(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
+- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
++ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
+ for file in $$headers; do \
+ if [ -f $$file ] ; then \
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0023-Disable-sdt.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0023-Disable-sdt.patch
new file mode 100644
index 000000000..0efd890aa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0023-Disable-sdt.patch
@@ -0,0 +1,113 @@
+From 6573aec00ada35c48c1838c8491ce8f7798ae993 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:28:10 +0400
+Subject: [PATCH 23/46] Disable sdt.
+
+We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
+It may or may not exist from preivous builds though. To be determinstic, disable
+sdt.h usage always. This avoids build failures if the header is removed after configure
+but before libgcc is compiled for example.
+
+RP 2012/8/7
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Disable sdt for libstdc++-v3.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Upstream-Status: Inappropriate [hack]
+---
+ gcc/configure | 12 ++++++------
+ gcc/configure.ac | 18 +++++++++---------
+ libstdc++-v3/configure | 6 +++---
+ libstdc++-v3/configure.ac | 2 +-
+ 4 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 389b6d5..73c264d 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -28528,12 +28528,12 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
+ $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
+ have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+- have_sys_sdt_h=yes
+-
+-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
+-
+-fi
++#if test -f $target_header_dir/sys/sdt.h; then
++# have_sys_sdt_h=yes
++#
++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
++#
++#fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
+ $as_echo "$have_sys_sdt_h" >&6; }
+
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 91ac800..cecf121 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5514,15 +5514,15 @@ fi
+ AC_SUBST([enable_default_ssp])
+
+ # Test for <sys/sdt.h> on the target.
+-GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
+-AC_MSG_CHECKING(sys/sdt.h in the target C library)
+-have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+- have_sys_sdt_h=yes
+- AC_DEFINE(HAVE_SYS_SDT_H, 1,
+- [Define if your target C library provides sys/sdt.h])
+-fi
+-AC_MSG_RESULT($have_sys_sdt_h)
++#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
++#AC_MSG_CHECKING(sys/sdt.h in the target C library)
++#have_sys_sdt_h=no
++#if test -f $target_header_dir/sys/sdt.h; then
++# have_sys_sdt_h=yes
++# AC_DEFINE(HAVE_SYS_SDT_H, 1,
++# [Define if your target C library provides sys/sdt.h])
++#fi
++#AC_MSG_RESULT($have_sys_sdt_h)
+
+ # Check if TFmode long double should be used by default or not.
+ # Some glibc targets used DFmode long double, but with glibc 2.4
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 8a5481c..6a40e92 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -21735,11 +21735,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+- if test $glibcxx_cv_sys_sdt_h = yes; then
++# if test $glibcxx_cv_sys_sdt_h = yes; then
+
+-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
+
+- fi
++# fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
+ $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
+
+diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
+index 9e19e99..0077ffd 100644
+--- a/libstdc++-v3/configure.ac
++++ b/libstdc++-v3/configure.ac
+@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
+ GLIBCXX_CHECK_SC_NPROC_ONLN
+ GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
+ GLIBCXX_CHECK_SYSCTL_HW_NCPU
+-GLIBCXX_CHECK_SDT_H
++#GLIBCXX_CHECK_SDT_H
+
+ # Check for available headers.
+ AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0024-libtool.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0024-libtool.patch
new file mode 100644
index 000000000..1f73b5db5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0024-libtool.patch
@@ -0,0 +1,42 @@
+From 6c0aa5c2538829248547197718037ff0b9788676 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:29:11 +0400
+Subject: [PATCH 24/46] libtool
+
+libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
+when running on am x86_64 build host.
+
+This patch stops this speading to libdir in the libstdc++.la file within libtool.
+Arguably, it shouldn't be passing this into libtool in the first place but
+for now this resolves the nastiest problems this causes.
+
+func_normal_abspath would resolve an empty path to `pwd` so we need
+to filter the zero case.
+
+RP 2012/8/24
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ ltmain.sh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 9503ec8..0121fba 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -6359,6 +6359,10 @@ func_mode_link ()
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
++ if test -n "$install_libdir"; then
++ func_normal_abspath "$install_libdir"
++ install_libdir=$func_normal_abspath_result
++ fi
+
+ oldlibs=
+ if test -z "$rpath"; then
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
new file mode 100644
index 000000000..3b7ee497f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -0,0 +1,43 @@
+From b1263a48553ce75f8c3bed4fe12122af57845567 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:30:32 +0400
+Subject: [PATCH 25/46] gcc: armv4: pass fix-v4bx to linker to support EABI.
+
+The LINK_SPEC for linux gets overwritten by linux-eabi.h which
+means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
+the option is not passed to linker when chosing march=armv4
+This patch redefines this in linux-eabi.h and reinserts it
+for eabi defaulting toolchains.
+
+We might want to send it upstream.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/config/arm/linux-eabi.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index 4010435..aaea1c9 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -94,10 +94,14 @@
+ #define MUSL_DYNAMIC_LINKER \
+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
+
++/* For armv4 we pass --fix-v4bx to linker to support EABI */
++#undef TARGET_FIX_V4BX_SPEC
++#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
+ #undef LINK_SPEC
+-#define LINK_SPEC EABI_LINK_SPEC \
++#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \
+ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
+ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
new file mode 100644
index 000000000..be25be616
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patch
@@ -0,0 +1,102 @@
+From b5c305fc251299f2e328410b18cfb55c75b5f038 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:33:04 +0400
+Subject: [PATCH 26/46] Use the multilib config files from ${B} instead of
+ using the ones from ${S}
+
+Use the multilib config files from ${B} instead of using the ones from ${S}
+so that the source can be shared between gcc-cross-initial,
+gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/configure | 22 ++++++++++++++++++----
+ gcc/configure.ac | 22 ++++++++++++++++++----
+ 2 files changed, 36 insertions(+), 8 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 73c264d..377253e 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12110,10 +12110,20 @@ done
+ tmake_file_=
+ for f in ${tmake_file}
+ do
+- if test -f ${srcdir}/config/$f
+- then
+- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+- fi
++ case $f in
++ */t-linux64 )
++ if test -f ./config/$f
++ then
++ tmake_file_="${tmake_file_} ./config/$f"
++ fi
++ ;;
++ * )
++ if test -f ${srcdir}/config/$f
++ then
++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
++ fi
++ ;;
++ esac
+ done
+ tmake_file="${tmake_file_}"
+
+@@ -12124,6 +12134,10 @@ tm_file_list="options.h"
+ tm_include_list="options.h insn-constants.h"
+ for f in $tm_file; do
+ case $f in
++ */linux64.h )
++ tm_file_list="${tm_file_list} ./config/$f"
++ tm_include_list="${tm_include_list} ./config/$f"
++ ;;
+ ./* )
+ f=`echo $f | sed 's/^..//'`
+ tm_file_list="${tm_file_list} $f"
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index cecf121..54e7619 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1863,10 +1863,20 @@ done
+ tmake_file_=
+ for f in ${tmake_file}
+ do
+- if test -f ${srcdir}/config/$f
+- then
+- tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+- fi
++ case $f in
++ */t-linux64 )
++ if test -f ./config/$f
++ then
++ tmake_file_="${tmake_file_} ./config/$f"
++ fi
++ ;;
++ * )
++ if test -f ${srcdir}/config/$f
++ then
++ tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
++ fi
++ ;;
++ esac
+ done
+ tmake_file="${tmake_file_}"
+
+@@ -1877,6 +1887,10 @@ tm_file_list="options.h"
+ tm_include_list="options.h insn-constants.h"
+ for f in $tm_file; do
+ case $f in
++ */linux64.h )
++ tm_file_list="${tm_file_list} ./config/$f"
++ tm_include_list="${tm_include_list} ./config/$f"
++ ;;
+ ./* )
+ f=`echo $f | sed 's/^..//'`
+ tm_file_list="${tm_file_list} $f"
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
new file mode 100644
index 000000000..d1bbebc0a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0027-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
@@ -0,0 +1,31 @@
+From eb6178b7fb466ae429c56380c6dbc564a16d900a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 09:39:38 +0000
+Subject: [PATCH 27/46] Avoid using libdir from .la which usually points to a
+ host path
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 0121fba..52bdbdb 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -5628,6 +5628,9 @@ func_mode_link ()
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
++ # Instead of using libdir from .la which usually points to a host path,
++ # use the path the .la is contained in.
++ libdir="$abs_ladir"
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0028-export-CPP.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0028-export-CPP.patch
new file mode 100644
index 000000000..c21253938
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0028-export-CPP.patch
@@ -0,0 +1,53 @@
+From 617184f35e97934d9e6268e71378574e2b776c2b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 09:40:59 +0000
+Subject: [PATCH 28/46] export CPP
+
+The OE environment sets and exports CPP as being the target gcc. When
+building gcc-cross-canadian for a mingw targetted sdk, the following can be found
+in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
+
+configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
+configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5
+configure:3666: $? = 0
+configure:3698: result: no
+configure:3786: checking how to run the C preprocessor
+configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
+configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
+configure:3876: $? = 0
+
+Note this is a *build* target (in build-x86_64-linux) so it should be
+using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
+headers are very different, using the wrong cpp is a real problem. It is leaking
+into configure through the CPP variable. Ultimately this leads to build
+failures related to not being able to include a process.h file for pem-unix.c.
+
+The fix is to ensure we export a sane CPP value into the build
+environment when using build targets. We could define a CPP_FOR_BUILD value which may be
+the version which needs to be upstreamed but for now, this fix is good enough to
+avoid the problem.
+
+RP 22/08/2013
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.in b/Makefile.in
+index 1522e39..beb9b9a 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
+ AR="$(AR_FOR_BUILD)"; export AR; \
+ AS="$(AS_FOR_BUILD)"; export AS; \
+ CC="$(CC_FOR_BUILD)"; export CC; \
++ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
new file mode 100644
index 000000000..47b9c0d1b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0029-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
@@ -0,0 +1,56 @@
+From e140700976e3b7eb4250b1ffde9bc16494456903 Mon Sep 17 00:00:00 2001
+From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
+Date: Wed, 5 Feb 2014 16:52:31 +0200
+Subject: [PATCH 29/46] Enable SPE & AltiVec generation on powepc*linux target
+
+When is configured with --target=powerpc-linux, the resulting GCC will
+not be able to generate code for SPE targets (e500v1/v2).
+GCC configured with --target=powerpc-linuxspe will not be able to
+generate AltiVec instructions (for e6500).
+This patch modifies the configured file such that SPE or AltiVec code
+can be generated when gcc is configured with --target=powerpc-linux.
+The ABI and speciffic instructions can be selected through the
+"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
+---
+ gcc/config.gcc | 9 ++++++++-
+ gcc/config/rs6000/linuxspe.h | 3 ---
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 9c6d156..18cff5a 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2392,7 +2392,14 @@ powerpc-*-rtems*)
+ tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
+ ;;
+ powerpc*-*-linux*)
+- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
++ case ${target} in
++ powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
++ ;;
++ *)
++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h"
++ ;;
++ esac
+ extra_options="${extra_options} rs6000/sysv4.opt"
+ tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
+ extra_objs="$extra_objs rs6000-linux.o"
+diff --git a/gcc/config/rs6000/linuxspe.h b/gcc/config/rs6000/linuxspe.h
+index 35623cd..f74e00d 100644
+--- a/gcc/config/rs6000/linuxspe.h
++++ b/gcc/config/rs6000/linuxspe.h
+@@ -27,6 +27,3 @@
+ #undef TARGET_DEFAULT
+ #define TARGET_DEFAULT MASK_STRICT_ALIGN
+ #endif
+-
+-#undef ASM_DEFAULT_SPEC
+-#define ASM_DEFAULT_SPEC "-mppc -mspe -me500"
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
new file mode 100644
index 000000000..c09d0192e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0030-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
@@ -0,0 +1,42 @@
+From 0ddcb95a86830766fd02122f19384fc929b377c5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 10:21:55 +0000
+Subject: [PATCH 30/46] Disable the MULTILIB_OSDIRNAMES and other multilib
+ options.
+
+Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
+systems where the libdir is NOT set to /lib64. This is allowed by the
+ABI, as
+long as the dynamic loader is present in /lib.
+
+We simply want to use the default rules in gcc to find and configure the
+normal libdir.
+
+Upstream-Status: Inappropriate[OE-Specific]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/t-aarch64-linux | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
+index 1cfe9f3..d688ac9 100644
+--- a/gcc/config/aarch64/t-aarch64-linux
++++ b/gcc/config/aarch64/t-aarch64-linux
+@@ -21,8 +21,8 @@
+ LIB1ASMSRC = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+
+-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
+-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
++#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+
+-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
++#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0031-Ensure-target-gcc-headers-can-be-included.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0031-Ensure-target-gcc-headers-can-be-included.patch
new file mode 100644
index 000000000..fb1cd0f16
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0031-Ensure-target-gcc-headers-can-be-included.patch
@@ -0,0 +1,98 @@
+From fc6621435a64a9d69aa251b70361da94cf2db6be Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 10:25:11 +0000
+Subject: [PATCH 31/46] Ensure target gcc headers can be included
+
+There are a few headers installed as part of the OpenEmbedded
+gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
+built for the target architecture, these are within the target
+sysroot and not cross/nativesdk; thus they weren't able to be
+found by gcc with the existing search paths. Add support for
+picking up these headers under the sysroot supplied on the gcc
+command line in order to resolve this.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/Makefile.in | 2 ++
+ gcc/cppdefault.c | 4 ++++
+ gcc/defaults.h | 9 +++++++++
+ gcc/gcc.c | 7 -------
+ 4 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 450cb79..cc75536 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -593,6 +593,7 @@ libexecdir = @libexecdir@
+
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
++libsubdir_target = gcc/$(target_noncanonical)/$(version)
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
+ # Directory in which all plugin resources are installed
+@@ -2688,6 +2689,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
+
+ PREPROCESSOR_DEFINES = \
+ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
++ -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
+ -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
+ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+ -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
+diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
+index 54aaf06..7b4dd51 100644
+--- a/gcc/cppdefault.c
++++ b/gcc/cppdefault.c
+@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
+ /* This is the dir for gcc's private headers. */
+ { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
+ #endif
++#ifdef GCC_INCLUDE_SUBDIR_TARGET
++ /* This is the dir for gcc's private headers under the specified sysroot. */
++ { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++#endif
+ #ifdef LOCAL_INCLUDE_DIR
+ /* /usr/local/include comes before the fixincluded header files. */
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+diff --git a/gcc/defaults.h b/gcc/defaults.h
+index 3e18338..0f317f2 100644
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -1492,4 +1492,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
+ #endif
+
++/* Default prefixes to attach to command names. */
++
++#ifndef STANDARD_STARTFILE_PREFIX_1
++#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
++#endif
++#ifndef STANDARD_STARTFILE_PREFIX_2
++#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
++#endif
++
+ #endif /* ! GCC_DEFAULTS_H */
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 04fa81d..9750cc2 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1450,13 +1450,6 @@ static const char *gcc_libexec_prefix;
+
+ /* Default prefixes to attach to command names. */
+
+-#ifndef STANDARD_STARTFILE_PREFIX_1
+-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+-#endif
+-#ifndef STANDARD_STARTFILE_PREFIX_2
+-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
+-#endif
+-
+ #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
+ #undef MD_EXEC_PREFIX
+ #undef MD_STARTFILE_PREFIX
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
new file mode 100644
index 000000000..c0b001db5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
@@ -0,0 +1,54 @@
+From ff939c5063d8f8d444bdb25651a0a48e608efaa4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 11:17:19 +0000
+Subject: [PATCH 32/46] gcc 4.8+ won't build with --disable-dependency-tracking
+
+since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
+
+This patch ensures we only use those compiler options when its enabled.
+
+Upstream-Status: Submitted
+
+(Problem was already reported upstream, attached this patch there
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
+
+RP
+2012/09/22
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libatomic/Makefile.am | 3 ++-
+ libatomic/Makefile.in | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
+index b351244..399ce18 100644
+--- a/libatomic/Makefile.am
++++ b/libatomic/Makefile.am
+@@ -101,7 +101,8 @@ PAT_S = $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
+
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS =
+ M_SIZE = -DN=$(PAT_N)
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE = $(PAT_BASE)_n.c
+diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
+index a083d87..a92cfce 100644
+--- a/libatomic/Makefile.in
++++ b/libatomic/Makefile.in
+@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
+ PAT_S = $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS =
+ M_SIZE = -DN=$(PAT_N)
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE = $(PAT_BASE)_n.c
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
new file mode 100644
index 000000000..e425d7146
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patch
@@ -0,0 +1,38 @@
+From 5092f5389d02e78cd59690cf3fca24b56a97aff2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 3 Mar 2015 08:21:19 +0000
+Subject: [PATCH 33/46] Don't search host directory during "relink" if
+ $inst_prefix is provided
+
+http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
+
+Upstream-Status: Submitted
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 52bdbdb..82bcec3 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -6004,12 +6004,13 @@ func_mode_link ()
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
++ # Default if $libdir is not relative to the prefix:
+ add_dir="-L$libdir"
+- # Try looking first in the location we're being installed to.
++
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+- add_dir="$add_dir -L$inst_prefix_dir$libdir"
++ add_dir="-L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
new file mode 100644
index 000000000..922a8555b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
@@ -0,0 +1,29 @@
+From 1faa6f69f93bb95af2b2b2bd24e181b50fb5b37c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Apr 2015 23:15:27 -0700
+Subject: [PATCH 34/46] Use SYSTEMLIBS_DIR replacement instead of hardcoding
+ base_libdir
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate [OE Configuration]
+
+ gcc/config/aarch64/aarch64-linux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index 5fcaa59..8588ac0 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -21,7 +21,7 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0035-aarch64-Add-support-for-musl-ldso.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0035-aarch64-Add-support-for-musl-ldso.patch
new file mode 100644
index 000000000..9dfc47276
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0035-aarch64-Add-support-for-musl-ldso.patch
@@ -0,0 +1,28 @@
+From 3768468c1a6cc170fff88c03b808c975ac653811 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Apr 2015 23:18:39 -0700
+Subject: [PATCH 35/46] aarch64: Add support for musl ldso
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate [OE Configuration]
+
+ gcc/config/aarch64/aarch64-linux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index 8588ac0..946b3ca 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -24,7 +24,7 @@
+ #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+
+ #undef MUSL_DYNAMIC_LINKER
+-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+
+ #undef ASAN_CC1_SPEC
+ #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
new file mode 100644
index 000000000..f89a8860f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -0,0 +1,54 @@
+From f4d3c8e970d42a43cd3d2f751e13324efa936ff8 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 5 Jul 2015 20:25:18 -0700
+Subject: [PATCH 36/46] libcc1: fix libcc1's install path and rpath
+
+* Install libcc1.so and libcc1plugin.so into
+ $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
+ had done to lto-plugin.
+* Fix bad RPATH iussue:
+ gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
+ /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
+ [rpaths]
+
+Upstream-Status: Inappropriate [OE configuration]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ libcc1/Makefile.am | 4 ++--
+ libcc1/Makefile.in | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
+index b40820b..32930c5 100644
+--- a/libcc1/Makefile.am
++++ b/libcc1/Makefile.am
+@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+ $(Wc)$(libiberty_normal)))
+ libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
+
+-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
+-cc1libdir = $(libdir)/$(libsuffix)
++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
++plugindir = $(cc1libdir)
+
+ if ENABLE_PLUGIN
+ plugin_LTLIBRARIES = libcc1plugin.la
+diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
+index 79d39d3..227ec22 100644
+--- a/libcc1/Makefile.in
++++ b/libcc1/Makefile.in
+@@ -291,8 +291,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+ $(Wc)$(libiberty_normal)))
+
+ libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
+-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
+-cc1libdir = $(libdir)/$(libsuffix)
++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
++plugindir = $(cc1libdir)
+ @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
+ @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
+ BUILT_SOURCES = compiler-name.h
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0037-handle-sysroot-support-for-nativesdk-gcc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0037-handle-sysroot-support-for-nativesdk-gcc.patch
new file mode 100644
index 000000000..15efcb12e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0037-handle-sysroot-support-for-nativesdk-gcc.patch
@@ -0,0 +1,213 @@
+From 1475b941d7a9c9874b0fb0558d01805945467331 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:39:54 +0000
+Subject: [PATCH 37/46] handle sysroot support for nativesdk-gcc
+
+Being able to build a nativesdk gcc is useful, particularly in cases
+where the host compiler may be of an incompatible version (or a 32
+bit compiler is needed).
+
+Sadly, building nativesdk-gcc is not straight forward. We install
+nativesdk-gcc into a relocatable location and this means that its
+library locations can change. "Normal" sysroot support doesn't help
+in this case since the values of paths like "libdir" change, not just
+base root directory of the system.
+
+In order to handle this we do two things:
+
+a) Add %r into spec file markup which can be used for injected paths
+ such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
+b) Add other paths which need relocation into a .gccrelocprefix section
+ which the relocation code will notice and adjust automatically.
+
+Upstream-Status: Inappropriate
+RP 2015/7/28
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++++-------------
+ gcc/cppdefault.h | 3 ++-
+ gcc/gcc.c | 20 ++++++++++++++------
+ 3 files changed, 53 insertions(+), 20 deletions(-)
+
+diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
+index 7b4dd51..9d1166c 100644
+--- a/gcc/cppdefault.c
++++ b/gcc/cppdefault.c
+@@ -35,6 +35,30 @@
+ # undef CROSS_INCLUDE_DIR
+ #endif
+
++static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
++static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
++static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
++static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
++static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
++#ifdef LOCAL_INCLUDE_DIR
++static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
++#endif
++#ifdef PREFIX_INCLUDE_DIR
++static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
++#endif
++#ifdef FIXED_INCLUDE_DIR
++static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
++#endif
++#ifdef CROSS_INCLUDE_DIR
++static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
++#endif
++#ifdef TOOL_INCLUDE_DIR
++static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
++#endif
++#ifdef NATIVE_SYSTEM_HEADER_DIR
++static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
++#endif
++
+ const struct default_include cpp_include_defaults[]
+ #ifdef INCLUDE_DEFAULTS
+ = INCLUDE_DEFAULTS;
+@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
+ = {
+ #ifdef GPLUSPLUS_INCLUDE_DIR
+ /* Pick up GNU C++ generic include files. */
+- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
++ { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
+ #endif
+ #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
+ /* Pick up GNU C++ target-dependent include files. */
+- { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
++ { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
+ #endif
+ #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
+ /* Pick up GNU C++ backward and deprecated include files. */
+- { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
++ { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
+ #endif
+ #ifdef GCC_INCLUDE_DIR
+ /* This is the dir for gcc's private headers. */
+- { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
++ { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
+ #endif
+ #ifdef GCC_INCLUDE_SUBDIR_TARGET
+ /* This is the dir for gcc's private headers under the specified sysroot. */
+- { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++ { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
+ #endif
+ #ifdef LOCAL_INCLUDE_DIR
+ /* /usr/local/include comes before the fixincluded header files. */
+- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+- { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
++ { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
+ #endif
+ #ifdef PREFIX_INCLUDE_DIR
+- { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
++ { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
+ #endif
+ #ifdef FIXED_INCLUDE_DIR
+ /* This is the dir for fixincludes. */
+- { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
++ { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
+ /* A multilib suffix needs adding if different multilibs use
+ different headers. */
+ #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
+@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
+ #endif
+ #ifdef CROSS_INCLUDE_DIR
+ /* One place the target system's headers might be. */
+- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
++ { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
+ #endif
+ #ifdef TOOL_INCLUDE_DIR
+ /* Another place the target system's headers might be. */
+- { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
++ { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
+ #endif
+ #ifdef NATIVE_SYSTEM_HEADER_DIR
+ /* /usr/include comes dead last. */
+- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
+- { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
++ { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
+ #endif
+ { 0, 0, 0, 0, 0, 0 }
+ };
+diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
+index 8a81b45..9759efd 100644
+--- a/gcc/cppdefault.h
++++ b/gcc/cppdefault.h
+@@ -33,7 +33,8 @@
+
+ struct default_include
+ {
+- const char *const fname; /* The name of the directory. */
++ const char *fname; /* The name of the directory. */
++
+ const char *const component; /* The component containing the directory
+ (see update_path in prefix.c) */
+ const char cplusplus; /* Only look here if we're compiling C++. */
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 9750cc2..94c240e 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -247,6 +247,8 @@ FILE *report_times_to_file = NULL;
+ #endif
+ static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT;
+
++static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
++
+ /* Nonzero means pass the updated target_system_root to the compiler. */
+
+ static int target_system_root_changed;
+@@ -517,6 +519,7 @@ or with constant text in a single argument.
+ %G process LIBGCC_SPEC as a spec.
+ %R Output the concatenation of target_system_root and
+ target_sysroot_suffix.
++ %r Output the base path target_relocatable_prefix
+ %S process STARTFILE_SPEC as a spec. A capital S is actually used here.
+ %E process ENDFILE_SPEC as a spec. A capital E is actually used here.
+ %C process CPP_SPEC as a spec.
+@@ -1473,10 +1476,10 @@ static const char *gcc_libexec_prefix;
+ gcc_exec_prefix is set because, in that case, we know where the
+ compiler has been installed, and use paths relative to that
+ location instead. */
+-static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
+-static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
+-static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
+-static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
++static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
++static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
++static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
++static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+
+ /* For native compilers, these are well-known paths containing
+ components that may be provided by the system. For cross
+@@ -1484,9 +1487,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+ static const char *md_exec_prefix = MD_EXEC_PREFIX;
+ static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
+ static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
+-static const char *const standard_startfile_prefix_1
++static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
+ = STANDARD_STARTFILE_PREFIX_1;
+-static const char *const standard_startfile_prefix_2
++static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
+ = STANDARD_STARTFILE_PREFIX_2;
+
+ /* A relative path to be used in finding the location of tools
+@@ -5762,6 +5765,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
+ }
+ break;
+
++ case 'r':
++ obstack_grow (&obstack, target_relocatable_prefix,
++ strlen (target_relocatable_prefix));
++ break;
++
+ case 'S':
+ value = do_spec_1 (startfile_spec, 0, NULL);
+ if (value != 0)
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
new file mode 100644
index 000000000..89ee79db8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch
@@ -0,0 +1,102 @@
+From 42e4cdcaad590536246866b0846ec279e124fa16 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:41:45 +0000
+Subject: [PATCH 38/46] Search target sysroot gcc version specific dirs with
+ multilib.
+
+We install the gcc libraries (such as crtbegin.p) into
+<sysroot><libdir>/<target-sys>/5.2.0/
+which is a default search path for GCC (aka multi_suffix in the
+code below). <target-sys> is 'machine' in gcc's terminology. We use
+these directories so that multiple gcc versions could in theory
+co-exist on target.
+
+We only want to build one gcc-cross-canadian per arch and have this work
+for all multilibs. <target-sys> can be handled by mapping the multilib
+<target-sys> to the one used by gcc-cross-canadian, e.g.
+mips64-polkmllib32-linux
+is symlinked to by mips64-poky-linux.
+
+The default gcc search path in the target sysroot for a "lib64" mutlilib
+is:
+
+<sysroot>/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/../lib64/
+<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/../lib64/
+<sysroot>/lib32/
+<sysroot>/usr/lib32/
+
+which means that the lib32 crtbegin.o will be found and the lib64 ones
+will not which leads to compiler failures.
+
+This patch injects a multilib version of that path first so the lib64
+binaries can be found first. With this change the search path becomes:
+
+<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/../lib64/
+<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/../lib64/
+<sysroot>/lib32/
+<sysroot>/usr/lib32/
+
+Upstream-Status: Pending
+RP 2015/7/31
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/gcc.c | 29 ++++++++++++++++++++++++++++-
+ 1 file changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 94c240e..2812819 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -2507,7 +2507,7 @@ for_each_path (const struct path_prefix *paths,
+ if (path == NULL)
+ {
+ len = paths->max_len + extra_space + 1;
+- len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
++ len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
+ path = XNEWVEC (char, len);
+ }
+
+@@ -2519,6 +2519,33 @@ for_each_path (const struct path_prefix *paths,
+ /* Look first in MACHINE/VERSION subdirectory. */
+ if (!skip_multi_dir)
+ {
++ if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
++ {
++ const char *this_multi;
++ size_t this_multi_len;
++
++ if (pl->os_multilib)
++ {
++ this_multi = multi_os_dir;
++ this_multi_len = multi_os_dir_len;
++ }
++ else
++ {
++ this_multi = multi_dir;
++ this_multi_len = multi_dir_len;
++ }
++
++ /* Look in multilib MACHINE/VERSION subdirectory first */
++ if (this_multi_len)
++ {
++ memcpy (path + len, this_multi, this_multi_len + 1);
++ memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
++ ret = callback (path, callback_info);
++ if (ret)
++ break;
++ }
++ }
++
+ memcpy (path + len, multi_suffix, suffix_len + 1);
+ ret = callback (path, callback_info);
+ if (ret)
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0039-Fix-various-_FOR_BUILD-and-related-variables.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
new file mode 100644
index 000000000..0ce7aec79
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0039-Fix-various-_FOR_BUILD-and-related-variables.patch
@@ -0,0 +1,137 @@
+From 9ced49e459ccf1887feb58adf1e8836dcb4b1bdf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:42:45 +0000
+Subject: [PATCH 39/46] Fix various _FOR_BUILD and related variables
+
+When doing a FOR_BUILD thing, you have to override CFLAGS with
+CFLAGS_FOR_BUILD. And if you use C++, you also have to override
+CXXFLAGS with CXXFLAGS_FOR_BUILD.
+Without this, when building for mingw, you end up trying to use
+the mingw headers for a host build.
+
+The same goes for other variables as well, such as CPPFLAGS,
+CPP, and GMPINC.
+
+Upstream-Status: Pending
+
+Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.in | 6 ++++++
+ Makefile.tpl | 5 +++++
+ gcc/Makefile.in | 2 +-
+ gcc/configure | 2 +-
+ gcc/configure.ac | 2 +-
+ 5 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index beb9b9a..3e1c6bc 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
+ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+@@ -170,6 +171,9 @@ BUILD_EXPORTS = \
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
++ CPP="$(CC_FOR_BUILD) -E" \
++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
+@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@
+ HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
++ CPP="$(CC) -E"; export CPP; \
+ ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+@@ -713,6 +718,7 @@ BASE_FLAGS_TO_PASS = \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
+ "EXPECT=$(EXPECT)" \
+ "FLEX=$(FLEX)" \
+ "INSTALL=$(INSTALL)" \
+diff --git a/Makefile.tpl b/Makefile.tpl
+index 6b2eb6a..114e462 100644
+--- a/Makefile.tpl
++++ b/Makefile.tpl
+@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
+ CC="$(CC_FOR_BUILD)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+@@ -172,6 +173,9 @@ BUILD_EXPORTS = \
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
++ CPP="$(CC_FOR_BUILD) -E" \
++ CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
+@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@
+ HOST_EXPORTS = \
+ $(BASE_EXPORTS) \
+ CC="$(CC)"; export CC; \
++ CPP="$(CC) -E"; export CPP; \
+ ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index cc75536..0ad2dc8 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -780,7 +780,7 @@ BUILD_LDFLAGS=@BUILD_LDFLAGS@
+ BUILD_NO_PIE_FLAG = @BUILD_NO_PIE_FLAG@
+ BUILD_LDFLAGS += $(BUILD_NO_PIE_FLAG)
+ BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
+- -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
++ -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
+
+ # Actual name to use when installing a native compiler.
+ GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
+diff --git a/gcc/configure b/gcc/configure
+index 377253e..78fc64a 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11799,7 +11799,7 @@ else
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
+ LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
+ ${realsrcdir}/configure \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 54e7619..a94666e 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1682,7 +1682,7 @@ else
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
+ LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+- GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
++ GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
+ ${realsrcdir}/configure \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
new file mode 100644
index 000000000..c9a6fd0eb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch
@@ -0,0 +1,28 @@
+From b0412c01c275aaeb6b458461cd2425120c8bcec8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 2 Feb 2016 10:26:10 -0800
+Subject: [PATCH 40/46] nios2: Define MUSL_DYNAMIC_LINKER
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ gcc/config/nios2/linux.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
+index 4ef55b5..62bc1e7 100644
+--- a/gcc/config/nios2/linux.h
++++ b/gcc/config/nios2/linux.h
+@@ -30,6 +30,7 @@
+ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1"
+
+ #undef LINK_SPEC
+ #define LINK_SPEC LINK_SPEC_ENDIAN \
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0041-ssp_nonshared.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0041-ssp_nonshared.patch
new file mode 100644
index 000000000..074452974
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0041-ssp_nonshared.patch
@@ -0,0 +1,28 @@
+From 551a5db7acb56e085a101f1c222d51b2c1b039a4 Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sat, 7 Nov 2015 14:58:40 +0000
+Subject: [PATCH 41/46] ssp_nonshared
+
+---
+Upstream-Status: Inappropriate [OE Configuration]
+
+ gcc/gcc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 2812819..9de96ee 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -863,7 +863,8 @@ proper position among the other output files. */
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+- "|fstack-protector-strong|fstack-protector-explicit:}"
++ "|fstack-protector-strong|fstack-protector-explicit" \
++ ":-lssp_nonshared}"
+ #else
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+ "|fstack-protector-strong|fstack-protector-explicit" \
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
new file mode 100644
index 000000000..861f0fd7f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch
@@ -0,0 +1,292 @@
+From ba738cc411c9a54e389e336bcaa0a2428dd4a9d2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Mar 2016 02:27:43 -0400
+Subject: [PATCH 42/46] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
+
+Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one
+directory name (old) to another (new) in __FILE__, __BASE_FILE__ and
+__builtin_FILE ().
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
+
+Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/c-family/c-opts.c | 13 +++++++
+ gcc/c-family/c.opt | 4 +++
+ gcc/dwarf2out.c | 1 +
+ gcc/gimplify.c | 3 ++
+ libcpp/Makefile.in | 10 +++---
+ libcpp/file-map.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++
+ libcpp/include/file-map.h | 30 ++++++++++++++++
+ libcpp/macro.c | 2 ++
+ 8 files changed, 150 insertions(+), 5 deletions(-)
+ create mode 100644 libcpp/file-map.c
+ create mode 100644 libcpp/include/file-map.h
+
+diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
+index fec58bc..7a0af43 100644
+--- a/gcc/c-family/c-opts.c
++++ b/gcc/c-family/c-opts.c
+@@ -38,6 +38,14 @@ along with GCC; see the file COPYING3. If not see
+ #include "opts.h"
+ #include "plugin.h" /* For PLUGIN_INCLUDE_FILE event. */
+ #include "mkdeps.h"
++#include "file-map.h"
++#include "c-target.h"
++#include "tm.h" /* For BYTES_BIG_ENDIAN,
++ DOLLARS_IN_IDENTIFIERS,
++ STDC_0_IN_SYSTEM_HEADERS,
++ TARGET_FLT_EVAL_METHOD_NON_DEFAULT and
++ TARGET_OPTF. */
++#include "tm_p.h" /* For C_COMMON_OVERRIDE_OPTIONS. */
+ #include "dumpfile.h"
+
+ #ifndef DOLLARS_IN_IDENTIFIERS
+@@ -503,6 +511,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
+ cpp_opts->narrow_charset = arg;
+ break;
+
++ case OPT_ffile_prefix_map_:
++ if (add_file_prefix_map (arg) < 0)
++ error ("invalid argument %qs to -ffile-prefix-map", arg);
++ break;
++
+ case OPT_fwide_exec_charset_:
+ cpp_opts->wide_charset = arg;
+ break;
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index 660da6c..31f7b34 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -1208,6 +1208,10 @@ fexec-charset=
+ C ObjC C++ ObjC++ Joined RejectNegative
+ -fexec-charset=<cset> Convert all strings and character constants to character set <cset>.
+
++ffile-prefix-map=
++C ObjC C++ ObjC++ Joined RejectNegative
++-ffile-prefix-map=<old=new> Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE ()
++
+ fextended-identifiers
+ C ObjC C++ ObjC++
+ Permit universal character names (\\u and \\U) in identifiers.
+diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
+index 80f2df5..a2bfcc0 100644
+--- a/gcc/dwarf2out.c
++++ b/gcc/dwarf2out.c
+@@ -21672,6 +21672,7 @@ gen_producer_string (void)
+ case OPT_fltrans_output_list_:
+ case OPT_fresolution_:
+ case OPT_fdebug_prefix_map_:
++ case OPT_ffile_prefix_map_:
+ /* Ignore these. */
+ continue;
+ default:
+diff --git a/gcc/gimplify.c b/gcc/gimplify.c
+index e223e59..1433c25 100644
+--- a/gcc/gimplify.c
++++ b/gcc/gimplify.c
+@@ -57,6 +57,8 @@ along with GCC; see the file COPYING3. If not see
+ #include "gomp-constants.h"
+ #include "tree-dump.h"
+ #include "gimple-walk.h"
++#include "file-map.h"
++
+ #include "langhooks-def.h" /* FIXME: for lhd_set_decl_assembler_name */
+ #include "builtins.h"
+
+@@ -2432,6 +2434,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
+ case BUILT_IN_FILE:
+ {
+ const char *locfile = LOCATION_FILE (EXPR_LOCATION (*expr_p));
++ locfile = remap_file_filename (locfile);
+ *expr_p = build_string_literal (strlen (locfile) + 1, locfile);
+ return GS_OK;
+ }
+diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
+index a7d7828..3d29572 100644
+--- a/libcpp/Makefile.in
++++ b/libcpp/Makefile.in
+@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
+
+
+ libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
+- expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
+- mkdeps.o pch.o symtab.o traditional.o
++ expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \
++ macro.o mkdeps.o pch.o symtab.o traditional.o
+
+ libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
+- expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
+- mkdeps.c pch.c symtab.c traditional.c
++ expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \
++ macro.c mkdeps.c pch.c symtab.c traditional.c
+
+ all: libcpp.a $(USED_CATALOGS)
+
+@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
+
+ TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
+ include/line-map.h include/symtab.h include/cpp-id-data.h \
+- include/cpplib.h include/mkdeps.h system.h
++ include/cpplib.h include/mkdeps.h system.h include/file-map.h
+
+ TAGS: $(TAGS_SOURCES)
+ cd $(srcdir) && etags $(TAGS_SOURCES)
+diff --git a/libcpp/file-map.c b/libcpp/file-map.c
+new file mode 100644
+index 0000000..18035ef
+--- /dev/null
++++ b/libcpp/file-map.c
+@@ -0,0 +1,92 @@
++/* Map one directory name to another in __FILE__, __BASE_FILE__
++ and __builtin_FILE ().
++ Copyright (C) 2001-2016 Free Software Foundation, Inc.
++
++This program is free software; you can redistribute it and/or modify it
++under the terms of the GNU General Public License as published by the
++Free Software Foundation; either version 3, or (at your option) any
++later version.
++
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; see the file COPYING3. If not see
++<http://www.gnu.org/licenses/>.
++
++ In other words, you are welcome to use, share and improve this program.
++ You are forbidden to forbid anyone else to use, share and improve
++ what you give them. Help stamp out software-hoarding! */
++
++#include "config.h"
++#include "system.h"
++#include "file-map.h"
++
++/* Structure recording the mapping from source file and directory
++ names at compile time to __FILE__ */
++typedef struct file_prefix_map
++{
++ const char *old_prefix;
++ const char *new_prefix;
++ size_t old_len;
++ size_t new_len;
++ struct file_prefix_map *next;
++} file_prefix_map;
++
++/* Linked list of such structures. */
++static file_prefix_map *file_prefix_maps;
++
++/* Record prefix mapping of __FILE__. ARG is the argument to
++ -ffile-prefix-map and must be of the form OLD=NEW. */
++int
++add_file_prefix_map (const char *arg)
++{
++ file_prefix_map *map;
++ const char *p;
++
++ p = strchr (arg, '=');
++ if (!p)
++ {
++ fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg);
++ return -1;
++ }
++ map = XNEW (file_prefix_map);
++ map->old_prefix = xstrndup (arg, p - arg);
++ map->old_len = p - arg;
++ p++;
++ map->new_prefix = xstrdup (p);
++ map->new_len = strlen (p);
++ map->next = file_prefix_maps;
++ file_prefix_maps = map;
++
++ return 0;
++}
++
++/* Perform user-specified mapping of __FILE__ prefixes. Return
++ the new name corresponding to filename. */
++
++const char *
++remap_file_filename (const char *filename)
++{
++ file_prefix_map *map;
++ char *s;
++ const char *name;
++ size_t name_len;
++
++ for (map = file_prefix_maps; map; map = map->next)
++ if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
++ break;
++ if (!map)
++ return filename;
++ name = filename + map->old_len;
++ name_len = strlen (name) + 1;
++ s = (char *) alloca (name_len + map->new_len);
++ memcpy (s, map->new_prefix, map->new_len);
++ memcpy (s + map->new_len, name, name_len);
++
++ return xstrdup (s);
++}
++
++
+diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
+new file mode 100644
+index 0000000..8750315
+--- /dev/null
++++ b/libcpp/include/file-map.h
+@@ -0,0 +1,30 @@
++/* Map one directory name to another in __FILE__, __BASE_FILE__
++ and __builtin_FILE ().
++ Copyright (C) 2001-2016 Free Software Foundation, Inc.
++
++This program is free software; you can redistribute it and/or modify it
++under the terms of the GNU General Public License as published by the
++Free Software Foundation; either version 3, or (at your option) any
++later version.
++
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; see the file COPYING3. If not see
++<http://www.gnu.org/licenses/>.
++
++ In other words, you are welcome to use, share and improve this program.
++ You are forbidden to forbid anyone else to use, share and improve
++ what you give them. Help stamp out software-hoarding! */
++
++#ifndef LIBCPP_FILE_MAP_H
++#define LIBCPP_FILE_MAP_H
++
++const char * remap_file_filename (const char *filename);
++
++int add_file_prefix_map (const char *arg);
++
++#endif /* !LIBCPP_FILE_MAP_H */
+diff --git a/libcpp/macro.c b/libcpp/macro.c
+index c251553..3ceec3d 100644
+--- a/libcpp/macro.c
++++ b/libcpp/macro.c
+@@ -26,6 +26,7 @@ along with this program; see the file COPYING3. If not see
+ #include "system.h"
+ #include "cpplib.h"
+ #include "internal.h"
++#include "file-map.h"
+
+ typedef struct macro_arg macro_arg;
+ /* This structure represents the tokens of a macro argument. These
+@@ -301,6 +302,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node,
+ if (!name)
+ abort ();
+ }
++ name = remap_file_filename (name);
+ len = strlen (name);
+ buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
+ result = buf;
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
new file mode 100644
index 000000000..0077f80e4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
@@ -0,0 +1,43 @@
+From 25c87c6cc40ec5cc6965f8bfb215bec01abd6d82 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Mar 2016 05:39:59 -0400
+Subject: [PATCH 43/46] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
+
+The oe-core may use external toolchain to compile,
+which may not support -ffile-prefix-map.
+
+Since we use -fdebug-prefix-map to do the same thing,
+so we could reuse it to replace -ffile-prefix-map.
+
+Upstream-Status: Inappropriate[oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/opts-global.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gcc/opts-global.c b/gcc/opts-global.c
+index b7e5232..121d7b9 100644
+--- a/gcc/opts-global.c
++++ b/gcc/opts-global.c
+@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
+ #include "langhooks.h"
+ #include "dbgcnt.h"
+ #include "debug.h"
++#include "file-map.h"
+ #include "output.h"
+ #include "plugin.h"
+ #include "toplev.h"
+@@ -357,6 +358,9 @@ handle_common_deferred_options (void)
+
+ case OPT_fdebug_prefix_map_:
+ add_debug_prefix_map (opt->arg);
++
++ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
++ add_file_prefix_map (opt->arg);
+ break;
+
+ case OPT_fdump_:
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
new file mode 100644
index 000000000..5d41af44a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
@@ -0,0 +1,54 @@
+From 6ab23e88aef22bbabee7b9600c459ff39547bb66 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 24 Mar 2016 11:23:14 -0400
+Subject: [PATCH 44/46] gcc/final.c: -fdebug-prefix-map support to remap
+ sources with relative path
+
+PR other/70428
+* final.c (remap_debug_filename): Use lrealpath to translate
+relative path before remapping
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428
+Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/final.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/gcc/final.c b/gcc/final.c
+index 55cf509..23293e5 100644
+--- a/gcc/final.c
++++ b/gcc/final.c
+@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
+ const char *name;
+ size_t name_len;
+
++ /* Support to remap filename with relative path */
++ char *realpath = lrealpath (filename);
++ if (realpath == NULL)
++ return filename;
++
+ for (map = debug_prefix_maps; map; map = map->next)
+- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
++ if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0)
+ break;
+ if (!map)
+- return filename;
+- name = filename + map->old_len;
++ {
++ free (realpath);
++ return filename;
++ }
++ name = realpath + map->old_len;
+ name_len = strlen (name) + 1;
+ s = (char *) alloca (name_len + map->new_len);
+ memcpy (s, map->new_prefix, map->new_len);
+ memcpy (s + map->new_len, name, name_len);
++ free (realpath);
+ return ggc_strdup (s);
+ }
+
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
new file mode 100644
index 000000000..c62b727d6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
@@ -0,0 +1,125 @@
+From 5a47d404ea29e2547269e3ddf38754462d93f903 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Apr 2016 20:03:28 +0000
+Subject: [PATCH 45/46] libgcc: Add knob to use ldbl-128 on ppc
+
+musl does not support ldbl 128 so we can not assume
+that linux as a whole supports ldbl-128 bits, instead
+act upon configure option passed to gcc and assume no
+on musl and yes otherwise if no option is passed since
+default behaviour is to assume ldbl128 it does not
+change the defaults
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ libgcc/Makefile.in | 1 +
+ libgcc/config/rs6000/t-linux | 5 ++++-
+ libgcc/configure | 18 ++++++++++++++++++
+ libgcc/configure.ac | 12 ++++++++++++
+ 4 files changed, 35 insertions(+), 1 deletion(-)
+ mode change 100644 => 100755 libgcc/configure
+
+diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
+index f09b39b..296cf0f 100644
+--- a/libgcc/Makefile.in
++++ b/libgcc/Makefile.in
+@@ -43,6 +43,7 @@ enable_vtable_verify = @enable_vtable_verify@
+ enable_decimal_float = @enable_decimal_float@
+ fixed_point = @fixed_point@
+ with_aix_soname = @with_aix_soname@
++with_ldbl128 = @with_ldbl128@
+
+ host_noncanonical = @host_noncanonical@
+ real_host_noncanonical = @real_host_noncanonical@
+diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
+index 4f6d4c4..c50dd94 100644
+--- a/libgcc/config/rs6000/t-linux
++++ b/libgcc/config/rs6000/t-linux
+@@ -1,3 +1,6 @@
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
+
+-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
++ifeq ($(with_ldbl128),yes)
++HOST_LIBGCC2_CFLAGS += -mlong-double-128
++endif
++HOST_LIBGCC2_CFLAGS += -mno-minimal-toc
+diff --git a/libgcc/configure b/libgcc/configure
+old mode 100644
+new mode 100755
+index e7d6c75..e9a9019
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -614,6 +614,7 @@ build_vendor
+ build_cpu
+ build
+ with_aix_soname
++with_ldbl128
+ enable_vtable_verify
+ enable_shared
+ libgcc_topdir
+@@ -663,6 +664,7 @@ with_cross_host
+ with_ld
+ enable_shared
+ enable_vtable_verify
++with_long_double_128
+ with_aix_soname
+ enable_version_specific_runtime_libs
+ with_slibdir
+@@ -1319,6 +1321,7 @@ Optional Packages:
+ --with-target-subdir=SUBDIR Configuring in a subdirectory for target
+ --with-cross-host=HOST Configuring with a cross compiler
+ --with-ld arrange to use the specified ld (full pathname)
++ --with-long-double-128 use 128-bit long double by default
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX
+@@ -2201,6 +2204,21 @@ fi
+
+
+
++# Check whether --with-long-double-128 was given.
++if test "${with_long_double_128+set}" = set; then :
++ withval=$with_long_double_128; with_ldbl128="$with_long_double_128"
++else
++ case "${host}" in
++ power*-*-musl*)
++ with_ldbl128="no";;
++ *) with_ldbl128="yes";;
++ esac
++
++fi
++
++
++
++
+ # Check whether --with-aix-soname was given.
+ if test "${with_aix_soname+set}" = set; then :
+ withval=$with_aix_soname; case "${host}:${enable_shared}" in
+diff --git a/libgcc/configure.ac b/libgcc/configure.ac
+index 269997f..81dc3ba 100644
+--- a/libgcc/configure.ac
++++ b/libgcc/configure.ac
+@@ -77,6 +77,18 @@ AC_ARG_ENABLE(vtable-verify,
+ [enable_vtable_verify=no])
+ AC_SUBST(enable_vtable_verify)
+
++AC_ARG_WITH(long-double-128,
++[AS_HELP_STRING([--with-long-double-128],
++ [use 128-bit long double by default])],
++ with_ldbl128="$with_long_double_128",
++[case "${host}" in
++ power*-*-musl*)
++ with_ldbl128="no";;
++ *) with_ldbl128="yes";;
++ esac
++])
++AC_SUBST(with_ldbl128)
++
+ AC_ARG_WITH(aix-soname,
+ [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+ [shared library versioning (aka "SONAME") variant to provide on AIX])],
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
new file mode 100644
index 000000000..390037f7b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
@@ -0,0 +1,29 @@
+From 513bf3c33e2f551f08bd57605091d5ddeba3536b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 4 May 2016 21:11:34 -0700
+Subject: [PATCH 46/46] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS
+
+Upstream-Status: Pending
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libgcc/config/t-slibgcc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc
+index 8c5f890..29be909 100644
+--- a/libgcc/config/t-slibgcc
++++ b/libgcc/config/t-slibgcc
+@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
+ $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+
+ SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+- $(SHLIB_LDFLAGS) \
++ $(LDFLAGS) $(SHLIB_LDFLAGS) \
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
+ $(SHLIB_OBJS) $(SHLIB_LC) && \
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
new file mode 100644
index 000000000..ed6cd6905
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
@@ -0,0 +1,85 @@
+From 0a9ed0479203cb7e69c3745b0c259007410f39ba Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sat, 24 Oct 2015 20:09:53 +0000
+Subject: [PATCH 47/47] libgcc_s: Use alias for __cpu_indicator_init instead of
+ symver
+
+Adapter from
+
+https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html
+
+This fix was debated but hasnt been applied gcc upstream since
+they expect musl to support '@' in symbol versioning which is
+a sun/gnu versioning extention. This patch however avoids the
+need for the '@' symbols at all
+
+libgcc/Changelog:
+
+2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add.
+ (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove.
+
+ * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER.
+
+gcc/Changelog:
+
+2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ * config/i386/i386.c (ix86_expand_builtin): Make __builtin_cpu_init
+ call __cpu_indicator_init_local instead of __cpu_indicator_init.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Rejected
+
+ gcc/config/i386/i386.c | 4 ++--
+ libgcc/config/i386/cpuinfo.c | 6 +++---
+ libgcc/config/i386/t-linux | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 861a029..1c97d72 100644
+--- a/gcc/config/i386/i386.c
++++ b/gcc/config/i386/i386.c
+@@ -40323,10 +40323,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
+ {
+ case IX86_BUILTIN_CPU_INIT:
+ {
+- /* Make it call __cpu_indicator_init in libgcc. */
++ /* Make it call __cpu_indicator_init_local in libgcc.a. */
+ tree call_expr, fndecl, type;
+ type = build_function_type_list (integer_type_node, NULL_TREE);
+- fndecl = build_fn_decl ("__cpu_indicator_init", type);
++ fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
+ call_expr = build_call_expr (fndecl, 0);
+ return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
+ }
+diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
+index 8c2248d..6c82f15 100644
+--- a/libgcc/config/i386/cpuinfo.c
++++ b/libgcc/config/i386/cpuinfo.c
+@@ -485,7 +485,7 @@ __cpu_indicator_init (void)
+ return 0;
+ }
+
+-#if defined SHARED && defined USE_ELF_SYMVER
+-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
+-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
++#ifndef SHARED
++int __cpu_indicator_init_local (void)
++ __attribute__ ((weak, alias ("__cpu_indicator_init")));
+ #endif
+diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
+index 11bb46e..4f47f7b 100644
+--- a/libgcc/config/i386/t-linux
++++ b/libgcc/config/i386/t-linux
+@@ -3,4 +3,4 @@
+ # t-slibgcc-elf-ver and t-linux
+ SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
+
+-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
++HOST_LIBGCC2_CFLAGS += -mlong-double-80
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch
new file mode 100644
index 000000000..9c39c7f7a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch
@@ -0,0 +1,92 @@
+From 84d2a5509892b65ed60d39e6e2f9719e3762e40e Mon Sep 17 00:00:00 2001
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 31 May 2016 08:29:39 +0000
+Subject: [PATCH] [ARM] PR target/71056: Don't use vectorized builtins when
+ NEON is not available
+
+ PR target/71056
+ * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Return
+ NULL_TREE early if NEON is not available. Remove now redundant check
+ in ARM_CHECK_BUILTIN_MODE.
+
+ * gcc.target/arm/pr71056.c: New test.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@236910 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ gcc/ChangeLog | 7 +++++++
+ gcc/config/arm/arm-builtins.c | 6 +++++-
+ gcc/testsuite/ChangeLog | 5 +++++
+ gcc/testsuite/gcc.target/arm/pr71056.c | 32 ++++++++++++++++++++++++++++++++
+ 4 files changed, 49 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.target/arm/pr71056.c
+
+diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c
+index 90fb40f..68b2839 100644
+--- a/gcc/config/arm/arm-builtins.c
++++ b/gcc/config/arm/arm-builtins.c
+@@ -2861,6 +2861,10 @@ arm_builtin_vectorized_function (unsigned int fn, tree type_out, tree type_in)
+ int in_n, out_n;
+ bool out_unsigned_p = TYPE_UNSIGNED (type_out);
+
++ /* Can't provide any vectorized builtins when we can't use NEON. */
++ if (!TARGET_NEON)
++ return NULL_TREE;
++
+ if (TREE_CODE (type_out) != VECTOR_TYPE
+ || TREE_CODE (type_in) != VECTOR_TYPE)
+ return NULL_TREE;
+@@ -2875,7 +2879,7 @@ arm_builtin_vectorized_function (unsigned int fn, tree type_out, tree type_in)
+ NULL_TREE is returned if no such builtin is available. */
+ #undef ARM_CHECK_BUILTIN_MODE
+ #define ARM_CHECK_BUILTIN_MODE(C) \
+- (TARGET_NEON && TARGET_FPU_ARMV8 \
++ (TARGET_FPU_ARMV8 \
+ && flag_unsafe_math_optimizations \
+ && ARM_CHECK_BUILTIN_MODE_1 (C))
+
+diff --git a/gcc/testsuite/gcc.target/arm/pr71056.c b/gcc/testsuite/gcc.target/arm/pr71056.c
+new file mode 100644
+index 0000000..136754e
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arm/pr71056.c
+@@ -0,0 +1,32 @@
++/* PR target/71056. */
++/* { dg-do compile } */
++/* { dg-require-effective-target arm_vfp3_ok } */
++/* { dg-options "-O3 -mfpu=vfpv3" } */
++
++/* Check that compiling for a non-NEON target doesn't try to introduce
++ a NEON vectorized builtin. */
++
++extern char *buff;
++int f2 ();
++struct T1
++{
++ int reserved[2];
++ unsigned int ip;
++ unsigned short cs;
++ unsigned short rsrv2;
++};
++void
++f3 (const char *p)
++{
++ struct T1 x;
++ __builtin_memcpy (&x, p, sizeof (struct T1));
++ x.reserved[0] = __builtin_bswap32 (x.reserved[0]);
++ x.reserved[1] = __builtin_bswap32 (x.reserved[1]);
++ x.ip = __builtin_bswap32 (x.ip);
++ x.cs = x.cs << 8 | x.cs >> 8;
++ x.rsrv2 = x.rsrv2 << 8 | x.rsrv2 >> 8;
++ if (f2 ())
++ {
++ __builtin_memcpy (buff, "\n", 1);
++ }
++}
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/CVE-2016-4490.patch b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/CVE-2016-4490.patch
new file mode 100644
index 000000000..f32e91d4f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-6.2/CVE-2016-4490.patch
@@ -0,0 +1,290 @@
+From 7d235b1b5ea35352c54957ef5530d9a02c46962f Mon Sep 17 00:00:00 2001
+From: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 2 May 2016 17:06:40 +0000
+Subject: [PATCH] =?UTF-8?q?Demangler=20integer=20overflow=20fixes=20from?=
+ =?UTF-8?q?=20Marcel=20B=C3=B6hme.?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ PR c++/70498
+ * cp-demangle.c: Parse numbers as integer instead of long to avoid
+ overflow after sanity checks. Include <limits.h> if available.
+ (INT_MAX): Define if necessary.
+ (d_make_template_param): Takes integer argument instead of long.
+ (d_make_function_param): Likewise.
+ (d_append_num): Likewise.
+ (d_identifier): Likewise.
+ (d_number): Parse as and return integer.
+ (d_compact_number): Handle overflow.
+ (d_source_name): Change variable type to integer for parsed number.
+ (d_java_resource): Likewise.
+ (d_special_name): Likewise.
+ (d_discriminator): Likewise.
+ (d_unnamed_type): Likewise.
+ * testsuite/demangle-expected: Add regression test cases.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235767 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+CVE: CVE-2016-4490
+[Yocto #9632]
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ libiberty/ChangeLog | 19 +++++++++++++
+ libiberty/cp-demangle.c | 52 ++++++++++++++++++++---------------
+ libiberty/testsuite/demangle-expected | 14 ++++++++--
+ 3 files changed, 61 insertions(+), 24 deletions(-)
+
+Index: git/libiberty/ChangeLog
+===================================================================
+--- git.orig/libiberty/ChangeLog
++++ git/libiberty/ChangeLog
+@@ -1,3 +1,22 @@
++2016-05-02 Marcel Böhme <boehme.marcel@gmail.com>
++
++ PR c++/70498
++ * cp-demangle.c: Parse numbers as integer instead of long to avoid
++ overflow after sanity checks. Include <limits.h> if available.
++ (INT_MAX): Define if necessary.
++ (d_make_template_param): Takes integer argument instead of long.
++ (d_make_function_param): Likewise.
++ (d_append_num): Likewise.
++ (d_identifier): Likewise.
++ (d_number): Parse as and return integer.
++ (d_compact_number): Handle overflow.
++ (d_source_name): Change variable type to integer for parsed number.
++ (d_java_resource): Likewise.
++ (d_special_name): Likewise.
++ (d_discriminator): Likewise.
++ (d_unnamed_type): Likewise.
++ * testsuite/demangle-expected: Add regression test cases.
++
+ 2016-04-27 Release Manager
+
+ * GCC 6.1.0 released.
+Index: git/libiberty/cp-demangle.c
+===================================================================
+--- git.orig/libiberty/cp-demangle.c
++++ git/libiberty/cp-demangle.c
+@@ -128,6 +128,13 @@ extern char *alloca ();
+ # endif /* alloca */
+ #endif /* HAVE_ALLOCA_H */
+
++#ifdef HAVE_LIMITS_H
++#include <limits.h>
++#endif
++#ifndef INT_MAX
++# define INT_MAX (int)(((unsigned int) ~0) >> 1) /* 0x7FFFFFFF */
++#endif
++
+ #include "ansidecl.h"
+ #include "libiberty.h"
+ #include "demangle.h"
+@@ -398,7 +405,7 @@ d_make_dtor (struct d_info *, enum gnu_v
+ struct demangle_component *);
+
+ static struct demangle_component *
+-d_make_template_param (struct d_info *, long);
++d_make_template_param (struct d_info *, int);
+
+ static struct demangle_component *
+ d_make_sub (struct d_info *, const char *, int);
+@@ -421,9 +428,9 @@ static struct demangle_component *d_unqu
+
+ static struct demangle_component *d_source_name (struct d_info *);
+
+-static long d_number (struct d_info *);
++static int d_number (struct d_info *);
+
+-static struct demangle_component *d_identifier (struct d_info *, long);
++static struct demangle_component *d_identifier (struct d_info *, int);
+
+ static struct demangle_component *d_operator_name (struct d_info *);
+
+@@ -1119,7 +1126,7 @@ d_make_dtor (struct d_info *di, enum gnu
+ /* Add a new template parameter. */
+
+ static struct demangle_component *
+-d_make_template_param (struct d_info *di, long i)
++d_make_template_param (struct d_info *di, int i)
+ {
+ struct demangle_component *p;
+
+@@ -1135,7 +1142,7 @@ d_make_template_param (struct d_info *di
+ /* Add a new function parameter. */
+
+ static struct demangle_component *
+-d_make_function_param (struct d_info *di, long i)
++d_make_function_param (struct d_info *di, int i)
+ {
+ struct demangle_component *p;
+
+@@ -1620,7 +1627,7 @@ d_unqualified_name (struct d_info *di)
+ static struct demangle_component *
+ d_source_name (struct d_info *di)
+ {
+- long len;
++ int len;
+ struct demangle_component *ret;
+
+ len = d_number (di);
+@@ -1633,12 +1640,12 @@ d_source_name (struct d_info *di)
+
+ /* number ::= [n] <(non-negative decimal integer)> */
+
+-static long
++static int
+ d_number (struct d_info *di)
+ {
+ int negative;
+ char peek;
+- long ret;
++ int ret;
+
+ negative = 0;
+ peek = d_peek_char (di);
+@@ -1681,7 +1688,7 @@ d_number_component (struct d_info *di)
+ /* identifier ::= <(unqualified source code identifier)> */
+
+ static struct demangle_component *
+-d_identifier (struct d_info *di, long len)
++d_identifier (struct d_info *di, int len)
+ {
+ const char *name;
+
+@@ -1702,7 +1709,7 @@ d_identifier (struct d_info *di, long le
+ /* Look for something which looks like a gcc encoding of an
+ anonymous namespace, and replace it with a more user friendly
+ name. */
+- if (len >= (long) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
++ if (len >= (int) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
+ && memcmp (name, ANONYMOUS_NAMESPACE_PREFIX,
+ ANONYMOUS_NAMESPACE_PREFIX_LEN) == 0)
+ {
+@@ -1870,7 +1877,7 @@ d_java_resource (struct d_info *di)
+ {
+ struct demangle_component *p = NULL;
+ struct demangle_component *next = NULL;
+- long len, i;
++ int len, i;
+ char c;
+ const char *str;
+
+@@ -2012,7 +2019,7 @@ d_special_name (struct d_info *di)
+ case 'C':
+ {
+ struct demangle_component *derived_type;
+- long offset;
++ int offset;
+ struct demangle_component *base_type;
+
+ derived_type = cplus_demangle_type (di);
+@@ -2946,10 +2953,10 @@ d_pointer_to_member_type (struct d_info
+
+ /* <non-negative number> _ */
+
+-static long
++static int
+ d_compact_number (struct d_info *di)
+ {
+- long num;
++ int num;
+ if (d_peek_char (di) == '_')
+ num = 0;
+ else if (d_peek_char (di) == 'n')
+@@ -2957,7 +2964,7 @@ d_compact_number (struct d_info *di)
+ else
+ num = d_number (di) + 1;
+
+- if (! d_check_char (di, '_'))
++ if (num < 0 || ! d_check_char (di, '_'))
+ return -1;
+ return num;
+ }
+@@ -2969,7 +2976,7 @@ d_compact_number (struct d_info *di)
+ static struct demangle_component *
+ d_template_param (struct d_info *di)
+ {
+- long param;
++ int param;
+
+ if (! d_check_char (di, 'T'))
+ return NULL;
+@@ -3171,9 +3178,10 @@ d_expression_1 (struct d_info *di)
+ }
+ else
+ {
+- index = d_compact_number (di) + 1;
+- if (index == 0)
++ index = d_compact_number (di);
++ if (index == INT_MAX || index == -1)
+ return NULL;
++ index ++;
+ }
+ return d_make_function_param (di, index);
+ }
+@@ -3502,7 +3510,7 @@ d_local_name (struct d_info *di)
+ static int
+ d_discriminator (struct d_info *di)
+ {
+- long discrim;
++ int discrim;
+
+ if (d_peek_char (di) != '_')
+ return 1;
+@@ -3558,7 +3566,7 @@ static struct demangle_component *
+ d_unnamed_type (struct d_info *di)
+ {
+ struct demangle_component *ret;
+- long num;
++ int num;
+
+ if (! d_check_char (di, 'U'))
+ return NULL;
+@@ -4086,10 +4094,10 @@ d_append_string (struct d_print_info *dp
+ }
+
+ static inline void
+-d_append_num (struct d_print_info *dpi, long l)
++d_append_num (struct d_print_info *dpi, int l)
+ {
+ char buf[25];
+- sprintf (buf,"%ld", l);
++ sprintf (buf,"%d", l);
+ d_append_string (dpi, buf);
+ }
+
+Index: git/libiberty/testsuite/demangle-expected
+===================================================================
+--- git.orig/libiberty/testsuite/demangle-expected
++++ git/libiberty/testsuite/demangle-expected
+@@ -4422,12 +4422,22 @@ void baz<int>(A<sizeof (foo((int)(), (fl
+ _Z3fooI1FEN1XIXszdtcl1PclcvT__EEE5arrayEE4TypeEv
+ X<sizeof ((P(((F)())())).array)>::Type foo<F>()
+ #
+-# Tests a use-after-free problem
++# Tests a use-after-free problem PR70481
+
+ _Q.__0
+ ::Q.(void)
+ #
+-# Tests a use-after-free problem
++# Tests a use-after-free problem PR70481
+
+ _Q10-__9cafebabe.
+ cafebabe.::-(void)
++#
++# Tests integer overflow problem PR70492
++
++__vt_90000000000cafebabe
++__vt_90000000000cafebabe
++#
++# Tests write access violation PR70498
++
++_Z80800000000000000000000
++_Z80800000000000000000000
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc
index e4fd4d6f7..f540b4d96 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc
@@ -33,6 +33,8 @@ def get_gcc_ppc_plt_settings(bb, d):
def get_long_double_setting(bb, d):
if d.getVar('TRANSLATED_TARGET_ARCH', True) in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC', True) in [ 'uclibc', 'glibc' ]:
return "--with-long-double-128"
+ else:
+ return "--without-long-double-128"
return ""
def get_gcc_multiarch_setting(bb, d):
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
index f4f76bda5..ddebbb841 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -44,6 +44,10 @@ EXTRA_OECONF = "\
${@get_gcc_multiarch_setting(bb, d)} \
"
+# Set this here since GCC configure won't auto-detect and enable
+# initfini-arry when cross compiling.
+EXTRA_OECONF_append = " --enable-initfini-array"
+
export gcc_cv_collect2_libs = 'none required'
# We need to set gcc_cv_collect2_libs else there is cross-compilation badness
# in the config.log files (which might not get generated until do_compile
@@ -57,6 +61,10 @@ EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-6
EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
EXTRA_OECONF_append_mips64n32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
EXTRA_OECONF_append_mips64eln32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
+EXTRA_OECONF_append_mipsisa32r6el = " --with-abi=32 --with-arch=mips32r6"
+EXTRA_OECONF_append_mipsisa32r6 = " --with-abi=32 --with-arch=mips32r6"
+EXTRA_OECONF_append_mipsisa64r6el = " --with-abi=64 --with-arch-64=mips64r6"
+EXTRA_OECONF_append_mipsisa64r6 = " --with-abi=64 --with-arch-64=mips64r6"
# ARMv6+ adds atomic instructions that affect the ABI in libraries built
# with TUNE_CCARGS in gcc-runtime. Make the compiler default to a
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb
index bf53c5cd7..bf53c5cd7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.2.bb
index bf53c5cd7..bf53c5cd7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 048b5302b..dcf22710a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -77,7 +77,7 @@ do_install () {
# gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
case ${PN} in
- *gcc-cross-initial-${TARGET_ARCH}|*gcc-crosssdk-initial-${TARGET_ARCH})
+ *gcc-cross-initial-${TARGET_ARCH}|*gcc-crosssdk-initial-${SDK_SYS})
dest=${D}/${includedir}/gcc-build-internal-initial-${TARGET_SYS}
hardlinkdir . $dest
;;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb
index 4c73e5ce6..4c73e5ce6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.2.bb
index 4c73e5ce6..4c73e5ce6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc
index f47936061..cc465a279 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -13,6 +13,11 @@ PN = "gcc-cross-${TARGET_ARCH}"
require gcc-configure-common.inc
+# While we want the 'gnu' hash style, we explicitly set it to sysv here to
+# ensure that any recipe which doesn't obey our LDFLAGS (which also set it to
+# gnu) will hit a QA failure.
+LINKER_HASH_STYLE ?= "sysv"
+
EXTRA_OECONF += "--enable-poison-system-directories"
EXTRA_OECONF_append_sh4 = " \
--with-multilib-list= \
@@ -183,12 +188,15 @@ do_install () {
# gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build
case ${PN} in
- *gcc-cross-${TARGET_ARCH}|*gcc-crosssdk-${TARGET_ARCH})
+ *gcc-cross-${TARGET_ARCH}|*gcc-crosssdk-${SDK_SYS})
dest=${D}/${includedir}/gcc-build-internal-${TARGET_SYS}
hardlinkdir . $dest
;;
esac
}
+# This is reflected in the recipe name and target gcc shouldn't depend
+# on SDK settings either
+do_install[vardepsexclude] += "SDK_SYS"
do_package[noexec] = "1"
do_packagedata[noexec] = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb
index b43cca0c5..b43cca0c5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.2.bb
index b43cca0c5..b43cca0c5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
index 7d2599cb6..08eda5d4c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial.inc
@@ -1,6 +1,6 @@
inherit crosssdk
-PN = "gcc-crosssdk-initial-${TARGET_ARCH}"
+PN = "gcc-crosssdk-initial-${SDK_SYS}"
SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb
index fd90e1140..fd90e1140 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.2.bb
index fd90e1140..fd90e1140 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk.inc
index 53f880f39..cda292779 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk.inc
@@ -1,6 +1,6 @@
inherit crosssdk
-PN = "gcc-crosssdk-${TARGET_ARCH}"
+PN = "gcc-crosssdk-${SDK_SYS}"
SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include"
SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb
index 40a6c4fef..40a6c4fef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.2.bb
index 40a6c4fef..40a6c4fef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
index 8639c1c49..15252f1a4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -1,5 +1,7 @@
require gcc-configure-common.inc
+SUMMARY = "Runtime libraries from GCC"
+
# Over-ride the LICENSE set by gcc-${PV}.inc to remove "& GPLv3"
# All gcc-runtime packages are now covered by the runtime exception.
LICENSE = "GPL-3.0-with-GCC-exception"
@@ -19,6 +21,10 @@ RUNTIMELIBITM_mips = ""
RUNTIMELIBITM_mipsel = ""
RUNTIMELIBITM_mips64 = ""
RUNTIMELIBITM_mips64el = ""
+RUNTIMELIBITM_mipsisa32r6 = ""
+RUNTIMELIBITM_mipsisa32r6el = ""
+RUNTIMELIBITM_mipsisa64r6 = ""
+RUNTIMELIBITM_mipsisa64r6el = ""
RUNTIMELIBITM_nios2 = ""
RUNTIMELIBITM_microblaze = ""
@@ -73,9 +79,39 @@ do_install () {
if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
fi
+
+}
+
+do_install_append_class-target () {
if [ "${TARGET_OS}" = "linux-gnuspe" ]; then
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
fi
+
+ if [ "${TARGET_OS}" = "linux-gnun32" ]; then
+ if [ "${MULTILIBS}" != "" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux/32
+ else
+ ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+ fi
+ fi
+ if [ "${TARGET_OS}" = "linux-gnux32" ]; then
+ if [ "${MULTILIBS}" != "" ]; then
+ mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-poky-linux
+ ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-poky-linux/x32
+ else
+ ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
+ fi
+ fi
+
+ if [ "${TCLIBC}" != "glibc" ]; then
+ case "${TARGET_OS}" in
+ "linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";;
+ "linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";;
+ *) extra_target_os="linux";;
+ esac
+ ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
+ fi
chown -R root:root ${D}
}
@@ -123,73 +159,98 @@ FILES_${PN}-dbg += "\
"
FILES_libg2c = "${target_libdir}/libg2c.so.*"
+SUMMARY_libg2c = "Companion runtime library for g77"
FILES_libg2c-dev = "\
${libdir}/libg2c.so \
${libdir}/libg2c.a \
${libdir}/libfrtbegin.a \
"
+SUMMARY_libg2c-dev = "Companion runtime library for g77 - development files"
FILES_libstdc++ = "${libdir}/libstdc++.so.*"
+SUMMARY_libstdc++ = "GNU standard C++ library"
FILES_libstdc++-dev = "\
${includedir}/c++/ \
${libdir}/libstdc++.so \
${libdir}/libstdc++*.la \
${libdir}/libsupc++.la \
"
+SUMMARY_libstdc++-dev = "GNU standard C++ library - development files"
FILES_libstdc++-staticdev = "\
${libdir}/libstdc++*.a \
${libdir}/libsupc++.a \
"
+SUMMARY_libstdc++-staticdev = "GNU standard C++ library - static development files"
FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
+SUMMARY_libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files"
FILES_libssp = "${libdir}/libssp.so.*"
+SUMMARY_libssp = "GNU stack smashing protection library"
FILES_libssp-dev = "\
${libdir}/libssp*.so \
${libdir}/libssp*_nonshared.a \
${libdir}/libssp*.la \
${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp \
"
+SUMMARY_libssp-dev = "GNU stack smashing protection library - development files"
FILES_libssp-staticdev = "${libdir}/libssp*.a"
+SUMMARY_libssp-staticdev = "GNU stack smashing protection library - static development files"
FILES_libquadmath = "${libdir}/libquadmath*.so.*"
+SUMMARY_libquadmath = "GNU quad-precision math library"
FILES_libquadmath-dev = "\
${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
${libdir}/libquadmath*.so \
${libdir}/libquadmath.la \
"
+SUMMARY_libquadmath-dev = "GNU quad-precision math library - development files"
FILES_libquadmath-staticdev = "${libdir}/libquadmath.a"
+SUMMARY_libquadmath-staticdev = "GNU quad-precision math library - static development files"
+# NOTE: mudflap has been removed as of gcc 4.9 and has been superseded by the address sanitiser
FILES_libmudflap = "${libdir}/libmudflap*.so.*"
+SUMMARY_libmudflap = "Pointer debugging library for gcc"
FILES_libmudflap-dev = "\
${libdir}/libmudflap*.so \
${libdir}/libmudflap.la \
"
+SUMMARY_libmudflap-dev = "Pointer debugging library for gcc - development files"
FILES_libmudflap-staticdev = "${libdir}/libmudflap.a"
+SUMMARY_libmudflap-staticdev = "Pointer debugging library for gcc - static development files"
FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
+SUMMARY_libgomp = "GNU OpenMP parallel programming library"
FILES_libgomp-dev = "\
${libdir}/libgomp*${SOLIBSDEV} \
${libdir}/libgomp*.la \
${libdir}/libgomp.spec \
${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
"
+SUMMARY_libgomp-dev = "GNU OpenMP parallel programming library - development files"
FILES_libgomp-staticdev = "${libdir}/libgomp*.a"
+SUMMARY_libgomp-staticdev = "GNU OpenMP parallel programming library - static development files"
FILES_libatomic = "${libdir}/libatomic.so.*"
+SUMMARY_libatomic = "GNU C++11 atomics support library"
FILES_libatomic-dev = "\
${libdir}/libatomic.so \
${libdir}/libatomic.la \
"
+SUMMARY_libatomic-dev = "GNU C++11 atomics support library - development files"
FILES_libatomic-staticdev = "${libdir}/libatomic.a"
+SUMMARY_libatomic-staticdev = "GNU C++11 atomics support library - static development files"
FILES_libitm = "${libdir}/libitm.so.*"
+SUMMARY_libitm = "GNU transactional memory support library"
FILES_libitm-dev = "\
${libdir}/libitm.so \
${libdir}/libitm.la \
${libdir}/libitm.spec \
"
+SUMMARY_libitm-dev = "GNU transactional memory support library - development files"
FILES_libitm-staticdev = "${libdir}/libitm.a"
+SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files"
do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_4.9.bb
deleted file mode 100644
index 497d69168..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_4.9.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-runtime.inc
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb
index 8f31e7792..8f31e7792 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.2.bb
new file mode 100644
index 000000000..8f31e7792
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_6.2.bb
@@ -0,0 +1,7 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-runtime.inc
+
+FILES_libgomp-dev += "\
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
+"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index 6091a0b6f..df4e297a4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -50,7 +50,7 @@ do_install () {
INHIBIT_DEFAULT_DEPS = "1"
ALLOW_EMPTY_${PN} = "1"
-DEPENDS = "gcc-runtime"
+DEPENDS = "gcc-runtime virtual/${TARGET_PREFIX}gcc"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb
index 601f66602..601f66602 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.2.bb
index 601f66602..601f66602 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb
index b890fa33e..b890fa33e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.2.bb
index b890fa33e..b890fa33e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-source_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc
index b8dabe574..f436fa24f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc
@@ -4,7 +4,6 @@ require gcc-configure-common.inc
EXTRA_OECONF_PATHS = "\
--with-sysroot=/ \
--with-build-sysroot=${STAGING_DIR_TARGET} \
- --with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \
--with-gxx-include-dir=${includedir}/c++/${BINV} \
"
@@ -43,6 +42,10 @@ FILES_${PN} = "\
${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
"
INSANE_SKIP_${PN} += "dev-so"
+RRECOMMENDS_${PN} += "\
+ libssp \
+ libssp-dev \
+"
FILES_${PN}-dev = "\
${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
@@ -70,10 +73,19 @@ FILES_g77-symlinks = "\
${bindir}/g77 \
${bindir}/f77 \
"
+RRECOMMENDS_g77 = "\
+ libg2c \
+ libg2c-dev \
+"
+
FILES_gfortran = "\
${bindir}/${TARGET_PREFIX}gfortran \
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
"
+RRECOMMENDS_gfortran = "\
+ libquadmath \
+ libquadmath-dev \
+"
FILES_gfortran-symlinks = "\
${bindir}/gfortran \
${bindir}/f95"
@@ -99,6 +111,12 @@ FILES_g++-symlinks = "\
${bindir}/c++ \
${bindir}/g++ \
"
+RRECOMMENDS_g++ = "\
+ libstdc++ \
+ libstdc++-dev \
+ libatomic \
+ libatomic-dev \
+"
FILES_${PN}-doc = "\
${infodir} \
@@ -205,6 +223,4 @@ do_install_append () {
# and builds track file dependencies (e.g. perl and its makedepends code).
# For determinism we don't install this ever and rely on the copy from gcc-cross.
# [YOCTO #7287]
-sysroot_stage_dirs_append () {
- rm -rf $to${libdir}/gcc
-}
+SYSROOT_DIRS_BLACKLIST += "${libdir}/gcc"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_4.9.bb
deleted file mode 100644
index a9dc612fb..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_4.9.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-target.inc
-
-# http://errors.yoctoproject.org/Errors/Details/20497/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-BBCLASSEXTEND = "nativesdk"
-
-#SYSTEMHEADERS_class-nativesdk = "${@'${target_includedir}'.replace(d.getVar('SDKPATH', True),'%r')}"
-#SYSTEMLIBS_class-nativesdk = "${@'${target_base_libdir}'.replace(d.getVar('SDKPATH', True),'%r')}/"
-#SYSTEMLIBS1_class-nativesdk = "${@'${target_libdir}'.replace(d.getVar('SDKPATH', True),'%r')}/"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb
index b0a523cae..b0a523cae 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.2.bb
new file mode 100644
index 000000000..b0a523cae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/gcc_6.2.bb
@@ -0,0 +1,15 @@
+require recipes-devtools/gcc/gcc-${PV}.inc
+require gcc-target.inc
+
+# Building with thumb enabled on armv4t fails with
+# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
+# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
+ARM_INSTRUCTION_SET_armv4 = "arm"
+
+do_configure_prepend() {
+ # Easiest way to stop bad RPATHs getting into the library since we have a
+ # broken libtool here
+ sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${S}/libcc1/configure
+}
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-common.inc
index dae07e96d..8a13f542c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -1,6 +1,6 @@
BPN = "libgcc"
-require gcc-shared-source.inc
+require gcc-configure-common.inc
INHIBIT_DEFAULT_DEPS = "1"
@@ -111,9 +111,15 @@ fakeroot python do_multilib_install() {
if not tune_bitness:
tune_bitness = '32' # /lib => 32bit lib
+ tune_abiextension = tune_parameters['abiextension']
+ if tune_abiextension:
+ libcextension = '-gnu' + tune_abiextension
+ else:
+ libcextension = ''
+
src = '../../../' + tune_baselib + '/' + \
tune_arch + d.getVar('TARGET_VENDOR', True) + 'ml' + ml + \
- '-' + d.getVar('TARGET_OS', True) + '/' + binv + '/'
+ '-' + d.getVar('TARGET_OS', True) + libcextension + '/' + binv + '/'
dest = d.getVar('D', True) + d.getVar('libdir', True) + '/' + \
d.getVar('TARGET_SYS', True) + '/' + binv + '/' + tune_bitness
@@ -123,15 +129,18 @@ fakeroot python do_multilib_install() {
os.symlink(src, dest)
}
-def get_original_vendoros(d):
- vendoros = d.expand('${TARGET_VENDOR}-${TARGET_OS}')
+def get_original_os(d):
+ vendoros = d.expand('${TARGET_ARCH}${ORIG_TARGET_VENDOR}-${TARGET_OS}')
for suffix in [d.getVar('ABIEXTENSION', True), d.getVar('LIBCEXTENSION', True)]:
if suffix and vendoros.endswith(suffix):
vendoros = vendoros[:-len(suffix)]
+ # Arm must use linux-gnueabi not linux as only the former is accepted by gcc
+ if vendoros.startswith("arm-") and not vendoros.endswith("-gnueabi"):
+ vendoros = vendoros + "-gnueabi"
return vendoros
-ORIG_TARGET_VENDOROS := "${@get_original_vendoros(d)}"
-BASETARGET_SYS = "${TARGET_ARCH}${ORIG_TARGET_VENDOROS}"
+ORIG_TARGET_VENDOR := "${TARGET_VENDOR}"
+BASETARGET_SYS = "${@get_original_os(d)}"
addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot
fakeroot python do_extra_symlinks() {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial.inc
index 59e8a62e7..687a8a0b0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial.inc
@@ -5,7 +5,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial"
LICENSE = "GPL-3.0-with-GCC-exception"
STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
-STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
PACKAGES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb
index 19f253fce..19f253fce 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.2.bb
index 19f253fce..19f253fce 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
index 68377869c..4770394c4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
@@ -2,6 +2,17 @@ require libgcc-common.inc
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+do_install_append_class-target () {
+ if [ "${TCLIBC}" != "glibc" ]; then
+ case "${TARGET_OS}" in
+ "linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";;
+ "linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";;
+ *) extra_target_os="linux";;
+ esac
+ ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
+ fi
+}
+
PACKAGES = "\
${PN} \
${PN}-dev \
@@ -19,6 +30,7 @@ FILES_${PN}-dev = "\
${base_libdir}/libgcc*.so \
${@base_conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
${libdir}/${TARGET_SYS}/${BINV}* \
+ ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
"
LIBGCCBUILDTREENAME = "gcc-build-internal-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb
index a5152f28e..a5152f28e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.2.bb
index a5152f28e..a5152f28e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgcc_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_4.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb
index 71dd8b4bd..71dd8b4bd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_4.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.4.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.2.bb
index 71dd8b4bd..71dd8b4bd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gcc/libgfortran_6.2.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.10.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.11.inc
index a9267d554..a9267d554 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.10.1.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-7.11.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
index 0d28ee4ee..09231434d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
@@ -2,7 +2,7 @@ SUMMARY = "GNU debugger"
HOMEPAGE = "http://www.gnu.org/software/gdb/"
LICENSE = "GPLv3+"
SECTION = "devel"
-DEPENDS = "expat zlib ncurses ${LTTNGUST}"
+DEPENDS = "expat zlib ncurses virtual/libiconv ${LTTNGUST}"
LTTNGUST = "lttng-ust"
LTTNGUST_aarch64 = ""
@@ -16,8 +16,6 @@ LTTNGUST_mips64eln32 = ""
LTTNGUST_sh4 = ""
LTTNGUST_libc-musl = ""
-INC_PR = "r0"
-
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
@@ -25,8 +23,25 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
inherit autotools texinfo
-SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
- "
+SRCREV = "1a982b689ce4e20523bdf69e47fdd574c4f63934"
+
+SRC_URI = "git://sourceware.org/git/binutils-gdb.git;branch=gdb-7.11-branch \
+ file://0001-include-sys-types.h-for-mode_t.patch \
+ file://0002-make-man-install-relative-to-DESTDIR.patch \
+ file://0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
+ file://0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \
+ file://0005-Add-support-for-Renesas-SH-sh4-architecture.patch \
+ file://0006-Dont-disable-libreadline.a-when-using-disable-static.patch \
+ file://0007-use-asm-sgidefs.h.patch \
+ file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \
+ file://0009-Change-order-of-CFLAGS.patch \
+ file://0010-resolve-restrict-keyword-conflict.patch \
+ file://0011-avx_mpx.patch \
+"
+
+UPSTREAM_CHECK_GITTAGREGEX = "gdb\-(?P<pver>.+)\-release"
+
+S = "${WORKDIR}/git"
B = "${WORKDIR}/build-${TARGET_SYS}"
@@ -40,12 +55,15 @@ EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
${GDBPROPREFIX} ${EXPAT} \
${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
--disable-rpath \
- "
+ --disable-gas --disable-binutils \
+ --disable-ld --disable-gold \
+ --disable-gprof \
+"
PACKAGECONFIG ??= "readline"
# Use --without-system-readline to compile with readline 5.
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python,python python-codecs"
+PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
GDBPROPREFIX = "--program-prefix=''"
@@ -69,4 +87,3 @@ RRECOMMENDS_gdb_append_linux = " glibc-thread-db "
RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db "
RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db "
RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db "
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index 6e42af1ba..e53081d0c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -1,5 +1,5 @@
inherit cross-canadian
-inherit python-dir
+inherit python3-dir
SUMMARY = "GNU debugger (cross-canadian gdb for ${TARGET_ARCH} target)"
PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
@@ -12,9 +12,9 @@ GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
# Overrides PACKAGECONFIG variables in gdb-common.inc
PACKAGECONFIG ??= "python readline"
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python, \
- nativesdk-python-core nativesdk-python-lang nativesdk-python-re \
- nativesdk-python-codecs nativesdk-python-netclient"
+PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
+ nativesdk-python3-core nativesdk-python3-lang nativesdk-python3-re \
+ nativesdk-python3-codecs nativesdk-python3-netclient"
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
@@ -23,8 +23,8 @@ do_configure_prepend() {
cat > ${WORKDIR}/python << EOF
#! /bin/sh
case "\$2" in
- --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;;
- --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
+ --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;;
+ --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;;
--exec-prefix) echo "${exec_prefix}" ;;
*) exit 1 ;;
esac
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.10.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.11.bb
index 301035940..301035940 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.10.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.11.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross.inc
index 2468d2303..5fa7c3367 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -2,16 +2,14 @@ require gdb-common.inc
DEPENDS = "expat-native ncurses-native"
-inherit pythonnative
+inherit python3native
# Overrides PACKAGECONFIG variables in gdb-common.inc
PACKAGECONFIG ??= "python readline"
-PACKAGECONFIG[python] = "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python,--without-python,python-native"
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3-native"
PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline-native"
do_compile_prepend() {
- export BUILD_SYS="${BUILD_SYS}"
- export HOST_SYS="${HOST_SYS}"
export STAGING_LIBDIR="${STAGING_LIBDIR_NATIVE}"
export STAGING_INCDIR="${STAGING_INCDIR_NATIVE}"
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.10.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.10.1.bb
deleted file mode 100644
index 3a95cfb03..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.10.1.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require gdb-cross.inc
-require gdb-${PV}.inc
-
-SRC_URI += "file://0001-make-man-install-relative-to-DESTDIR.patch"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.11.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.11.bb
new file mode 100644
index 000000000..50cf159fd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.11.bb
@@ -0,0 +1,2 @@
+require gdb-cross.inc
+require gdb-${PV}.inc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb.inc b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb.inc
index d9c864dca..52119a0aa 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb.inc
@@ -2,14 +2,6 @@ require gdb-common.inc
inherit gettext
-SRC_URI += "file://0002-Change-order-of-CFLAGS.patch \
- file://0003-Add-support-for-Renesas-SH-sh4-architecture.patch \
- file://0001-Use-exported-definitions-of-SIGRTMIN.patch \
- file://0001-include-sys-types.h-for-mode_t.patch \
- file://0001-use-asm-sgidefs.h.patch \
- file://force-readline-static.patch \
- file://0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
- "
#LDFLAGS_append = " -s"
#export CFLAGS_append=" -L${STAGING_LIBDIR}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch
deleted file mode 100644
index 5f0c09693..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 2f97e89e9e4e5797d0d973e1d05c1f44c46b4912 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 5 Jun 2015 20:21:38 -0700
-Subject: [PATCH] Use exorted definitions of SIGRTMIN
-
-Define W_STOPCODE if not defined already
-
-__SIGRTMIN is internal to glibc and other libcs e.g. musl
-may not provide them
-
-Fixes
-https://sourceware.org/bugzilla/show_bug.cgi?id=13012
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- gdb/linux-nat.c | 4 ++--
- gdb/nat/linux-nat.h | 4 ++++
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
-index 396c30c..50320ee 100644
---- a/gdb/linux-nat.c
-+++ b/gdb/linux-nat.c
-@@ -4856,10 +4856,10 @@ lin_thread_get_thread_signals (sigset_t *set)
- fortunately they don't change! */
-
- if (restart == 0)
-- restart = __SIGRTMIN;
-+ restart = SIGRTMIN;
-
- if (cancel == 0)
-- cancel = __SIGRTMIN + 1;
-+ cancel = SIGRTMIN + 1;
-
- sigaddset (set, restart);
- sigaddset (set, cancel);
-diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
-index 83a6d91..efbe0fd 100644
---- a/gdb/nat/linux-nat.h
-+++ b/gdb/nat/linux-nat.h
-@@ -25,4 +25,8 @@
- instead SIGTRAP with bit 7 set. */
- #define SYSCALL_SIGTRAP (SIGTRAP | 0x80)
-
-+#ifndef W_STOPCODE
-+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
-+#endif
-+
- #endif /* LINUX_NAT_H */
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
index a0292e416..0042c0063 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
@@ -1,7 +1,7 @@
-From acbee4edacb80b5eeaff2480712fe98e56443997 Mon Sep 17 00:00:00 2001
+From fddd7178915968acf680814411b8b3cb137d0587 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 19 Jan 2016 18:18:52 -0800
-Subject: [PATCH] include sys/types.h for mode_t
+Subject: [PATCH 01/10] include sys/types.h for mode_t
mode_t is used in target.h, so we need to include sys/types.h to get the
defintion
@@ -14,10 +14,10 @@ Upstream-Status: Pending
1 file changed, 1 insertion(+)
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
-index 9a40867..aaecab9 100644
+index 5af2051..f42c510 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
-@@ -27,6 +27,7 @@
+@@ -28,6 +28,7 @@
#include "target/waitstatus.h"
#include "mem-break.h"
#include "btrace-common.h"
@@ -26,5 +26,5 @@ index 9a40867..aaecab9 100644
struct emit_ops;
struct buffer;
--
-2.7.0
+2.8.2
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
deleted file mode 100644
index 6996c183b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 12b0506951460c3cc37d775478d024db3f95e9d8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 02:27:55 +0000
-Subject: [PATCH 1/3] make man install relative to DESTDIR
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sim/common/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
-index d49a93b..2121c46 100644
---- a/sim/common/Makefile.in
-+++ b/sim/common/Makefile.in
-@@ -35,7 +35,7 @@ tooldir = $(libdir)/$(target_alias)
- datarootdir = @datarootdir@
- datadir = @datadir@
- mandir = @mandir@
--man1dir = $(mandir)/man1
-+man1dir = $(DESTDIR)$(mandir)/man1
- infodir = @infodir@
- includedir = @includedir@
-
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
deleted file mode 100644
index 31739525a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From e92f8932ef488de2a56db4299131ce6a4eb170bd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 23 Mar 2016 06:30:09 +0000
-Subject: [PATCH] mips-linux-nat: Define _ABIO32 if not defined
-
-This helps building gdb on mips64 on musl, since
-musl does not provide sgidefs.h this define is
-only defined when GCC is using o32 ABI, in that
-case gcc emits it as built-in define and hence
-it works ok for mips32
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- gdb/mips-linux-nat.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index fd5c705..753f29d 100644
---- a/gdb/mips-linux-nat.c
-+++ b/gdb/mips-linux-nat.c
-@@ -46,6 +46,11 @@
- #define PTRACE_GET_THREAD_AREA 25
- #endif
-
-+/* musl does not define and relies on compiler built-in macros for it */
-+#ifndef _ABIO32
-+#define _ABIO32 1
-+#endif
-+
- /* Assume that we have PTRACE_GETREGS et al. support. If we do not,
- we'll clear this and use PTRACE_PEEKUSER instead. */
- static int have_ptrace_regsets = 1;
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch
deleted file mode 100644
index eaec39030..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 677b5b56135141c0d259e370aacd0e11c810aa15 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Fri, 5 Feb 2016 14:00:00 -0800
-Subject: [PATCH] use <asm/sgidefs.h>
-
-Build fix for MIPS with musl libc
-
-The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
-but not by musl. Regardless of the libc, the kernel headers provide
-<asm/sgidefs.h> which provides the same definitions, so use that
-instead.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- gdb/mips-linux-nat.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
-index a36bb63..fd5c705 100644
---- a/gdb/mips-linux-nat.c
-+++ b/gdb/mips-linux-nat.c
-@@ -31,7 +31,7 @@
- #include "gdb_proc_service.h"
- #include "gregset.h"
-
--#include <sgidefs.h>
-+#include <asm/sgidefs.h>
- #include <sys/ptrace.h>
- #include <asm/ptrace.h>
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-Change-order-of-CFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-Change-order-of-CFLAGS.patch
deleted file mode 100644
index bccb45fda..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-Change-order-of-CFLAGS.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 262ccc4fdb2a3df0f16c61a807046964ae7729c9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 02:29:23 +0000
-Subject: [PATCH 2/3] Change order of CFLAGS
-
-Lets us override Werror if need be
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gdb/gdbserver/Makefile.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
-index 1ed2ec8..0cef95b 100644
---- a/gdb/gdbserver/Makefile.in
-+++ b/gdb/gdbserver/Makefile.in
-@@ -131,10 +131,10 @@ CFLAGS = @CFLAGS@
- CPPFLAGS = @CPPFLAGS@
-
- # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
--INTERNAL_CFLAGS_BASE = ${CFLAGS} ${GLOBAL_CFLAGS} \
-+INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \
- ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
- INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
--INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
-+INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${CFLAGS} -DGDBSERVER
-
- # LDFLAGS is specifically reserved for setting from the command line
- # when running make.
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
new file mode 100644
index 000000000..defed621f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
@@ -0,0 +1,28 @@
+From 3229cb09033eeb5003a08d91fa9d43be8ba4c86b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 02:27:55 +0000
+Subject: [PATCH 02/10] make man install relative to DESTDIR
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sim/common/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
+index a05f507..8d0fa64 100644
+--- a/sim/common/Makefile.in
++++ b/sim/common/Makefile.in
+@@ -35,7 +35,7 @@ tooldir = $(libdir)/$(target_alias)
+ datarootdir = @datarootdir@
+ datadir = @datadir@
+ mandir = @mandir@
+-man1dir = $(mandir)/man1
++man1dir = $(DESTDIR)$(mandir)/man1
+ infodir = @infodir@
+ includedir = @includedir@
+
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-Add-support-for-Renesas-SH-sh4-architecture.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-Add-support-for-Renesas-SH-sh4-architecture.patch
deleted file mode 100644
index 4a3e22c44..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-Add-support-for-Renesas-SH-sh4-architecture.patch
+++ /dev/null
@@ -1,921 +0,0 @@
-From 407cb13cfb70697f45dfb761304e005e1ecbd0e9 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 02:31:12 +0000
-Subject: [PATCH 3/3] Add support for Renesas SH (sh4) architecture.
-
-gdb (7.4-1~cvs20111117.2) experimental; urgency=low
- .
- * Add Renesas SH (sh4) support (Closes: #576242)
- - Thanks Nobuhiro Iwamatsu, Takashi Yoshii.
-Author: Hector Oron <zumbi@debian.org>
-Bug-Debian: http://bugs.debian.org/576242
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gdb/Makefile.in | 1 +
- gdb/configure.host | 1 +
- gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++++++++++
- gdb/sh-tdep.c | 54 ++--
- gdb/sh-tdep.h | 49 ++++
- gdb/testsuite/gdb.asm/asm-source.exp | 5 +
- gdb/testsuite/gdb.asm/sh.inc | 3 +-
- gdb/testsuite/gdb.base/annota1.c | 3 +
- gdb/testsuite/gdb.base/annota3.c | 4 +
- gdb/testsuite/gdb.base/sigall.c | 3 +
- gdb/testsuite/gdb.base/signals.c | 4 +
- 11 files changed, 617 insertions(+), 29 deletions(-)
-
-diff --git a/gdb/Makefile.in b/gdb/Makefile.in
-index 7937801..63baf81 100644
---- a/gdb/Makefile.in
-+++ b/gdb/Makefile.in
-@@ -1707,6 +1707,7 @@ ALLDEPFILES = \
- score-tdep.c \
- ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
- sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
-+ sh-linux-tdep.c sh-linux-nat.c \
- sol2-tdep.c \
- solib-svr4.c \
- sparc-linux-nat.c sparc-linux-tdep.c \
-diff --git a/gdb/configure.host b/gdb/configure.host
-index d07be4b..b6391c5 100644
---- a/gdb/configure.host
-+++ b/gdb/configure.host
-@@ -150,6 +150,7 @@ powerpc*-*-linux*) gdb_host=linux ;;
-
- s390*-*-linux*) gdb_host=linux ;;
-
-+sh*-*-linux*) gdb_host=linux ;;
- sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
- gdb_host=nbsd ;;
- sh*-*-openbsd*) gdb_host=nbsd ;;
-diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c
-index 2ff2ee8..1a11262 100644
---- a/gdb/sh-linux-tdep.c
-+++ b/gdb/sh-linux-tdep.c
-@@ -18,14 +18,37 @@
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
- #include "defs.h"
-+#include "gdbcore.h"
-+#include "frame.h"
-+#include "frame-base.h"
-+#include "frame-unwind.h"
-+#include "dwarf2-frame.h"
-+#include "value.h"
-+#include "regcache.h"
-+#include "inferior.h"
- #include "osabi.h"
-
-+#include "reggroups.h"
-+#include "arch-utils.h"
-+#include "floatformat.h"
- #include "solib-svr4.h"
- #include "symtab.h"
-+#include "gdb_string.h"
-+#include "command.h"
-+#include "gdb_assert.h"
-
- #include "trad-frame.h"
- #include "tramp-frame.h"
-
-+#include <sys/ptrace.h>
-+#include <sys/types.h>
-+#include <sys/param.h>
-+#include <sys/user.h>
-+#include <sys/syscall.h>
-+
-+#include <asm/ptrace.h>
-+
-+#include "regset.h"
- #include "glibc-tdep.h"
- #include "sh-tdep.h"
- #include "linux-tdep.h"
-@@ -180,9 +203,505 @@ static struct tramp_frame sh_linux_rt_sigreturn_tramp_frame = {
- sh_linux_rt_sigreturn_init
- };
-
-+/* Recognizing signal handler frames. */
-+
-+/* GNU/Linux has two flavors of signals. Normal signal handlers, and
-+ "realtime" (RT) signals. The RT signals can provide additional
-+ information to the signal handler if the SA_SIGINFO flag is set
-+ when establishing a signal handler using `sigaction'. It is not
-+ unlikely that future versions of GNU/Linux will support SA_SIGINFO
-+ for normal signals too. */
-+
-+/* When the SH Linux kernel calls a signal handler and the
-+ SA_RESTORER flag isn't set, the return address points to a bit of
-+ code on the stack. This function returns whether the PC appears to
-+ be within this bit of code.
-+
-+ The instruction sequence for normal signals is
-+ mov.w 1f,r3
-+ trapa #16
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ 1: .word __NR_sigreturn
-+ or 0x9305 0xc310 0x200b 0x200b 0x200b 0x200b 0x200b 0x0077.
-+
-+ Checking for the code sequence should be somewhat reliable, because
-+ the effect is to call the system call sigreturn. This is unlikely
-+ to occur anywhere other than a signal trampoline.
-+
-+ It kind of sucks that we have to read memory from the process in
-+ order to identify a signal trampoline, but there doesn't seem to be
-+ any other way. The PC_IN_SIGTRAMP macro in tm-linux.h arranges to
-+ only call us if no function name could be identified, which should
-+ be the case since the code is on the stack.
-+
-+ Detection of signal trampolines for handlers that set the
-+ SA_RESTORER flag is in general not possible. Unfortunately this is
-+ what the GNU C Library has been doing for quite some time now.
-+ However, as of version 2.1.2, the GNU C Library uses signal
-+ trampolines (named __restore and __restore_rt) that are identical
-+ to the ones used by the kernel. Therefore, these trampolines are
-+ supported too. */
-+
-+#define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */
-+#define TRAP16 0xc310 /* Syscall w/no args (NR in R3) */
-+#define OR_R0_R0 0x200b /* or r0,r0 (insert to avoid hardware bug) */
-+
-+#define LINUX_SIGTRAMP_INSN0 MOVW(7) /* Move mem word at PC+7 to R3 */
-+#define LINUX_SIGTRAMP_INSN1 TRAP16 /* Syscall w/no args (NR in R3) */
-+#define LINUX_SIGTRAMP_INSN2 OR_R0_R0 /* or r0,r0 (insert to avoid hardware bug) */
-+
-+static const unsigned short linux_sigtramp_code[] =
-+{
-+ LINUX_SIGTRAMP_INSN0,
-+ LINUX_SIGTRAMP_INSN1,
-+ LINUX_SIGTRAMP_INSN2,
-+ LINUX_SIGTRAMP_INSN2,
-+ LINUX_SIGTRAMP_INSN2,
-+ LINUX_SIGTRAMP_INSN2,
-+ LINUX_SIGTRAMP_INSN2,
-+ __NR_sigreturn
-+};
-+
-+#define LINUX_SIGTRAMP_LEN (sizeof linux_sigtramp_code)
-+
-+/* If PC is in a sigtramp routine, return the address of the start of
-+ the routine. Otherwise, return 0. */
-+
-+static CORE_ADDR
-+sh_linux_sigtramp_start (struct frame_info *next_frame)
-+{
-+ CORE_ADDR pc = get_frame_pc (next_frame);
-+ gdb_byte buf[LINUX_SIGTRAMP_LEN];
-+
-+ /* We only recognize a signal trampoline if PC is at the start of
-+ one of the three instructions. We optimize for finding the PC at
-+ the start, as will be the case when the trampoline is not the
-+ first frame on the stack. We assume that in the case where the
-+ PC is not at the start of the instruction sequence, there will be
-+ a few trailing readable bytes on the stack. */
-+
-+ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
-+ return 0;
-+
-+ if (buf[0] != LINUX_SIGTRAMP_INSN0)
-+ {
-+ if (buf[0] != LINUX_SIGTRAMP_INSN1)
-+ return 0;
-+
-+ pc -= 2;
-+
-+ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
-+ return 0;
-+ }
-+
-+ if (memcmp (buf, linux_sigtramp_code, LINUX_SIGTRAMP_LEN) != 0)
-+ return 0;
-+
-+ return pc;
-+}
-+
-+/* This function does the same for RT signals. Here the instruction
-+ sequence is
-+ mov.w 1f,r3
-+ trapa #16
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ or r0, r0
-+ 1: .word __NR_rt_sigreturn
-+ or 0x9305 0xc310 0x200b 0x200b 0x200b 0x200b 0x200b 0x00ad.
-+
-+ The effect is to call the system call rt_sigreturn. */
-+
-+#define LINUX_RT_SIGTRAMP_INSN0 MOVW(7) /* Move mem word at PC+7 to R3 */
-+#define LINUX_RT_SIGTRAMP_INSN1 TRAP16 /* Syscall w/no args (NR in R3) */
-+#define LINUX_RT_SIGTRAMP_INSN2 OR_R0_R0 /* or r0,r0 (insert to avoid hardware bug) */
-+
-+static const unsigned short linux_rt_sigtramp_code[] =
-+{
-+ LINUX_RT_SIGTRAMP_INSN0,
-+ LINUX_RT_SIGTRAMP_INSN1,
-+ LINUX_RT_SIGTRAMP_INSN2,
-+ LINUX_RT_SIGTRAMP_INSN2,
-+ LINUX_RT_SIGTRAMP_INSN2,
-+ LINUX_RT_SIGTRAMP_INSN2,
-+ LINUX_RT_SIGTRAMP_INSN2,
-+ __NR_rt_sigreturn
-+};
-+
-+#define LINUX_RT_SIGTRAMP_LEN (sizeof linux_rt_sigtramp_code)
-+
-+/* If PC is in a RT sigtramp routine, return the address of the start
-+ of the routine. Otherwise, return 0. */
-+
-+static CORE_ADDR
-+sh_linux_rt_sigtramp_start (struct frame_info *next_frame)
-+{
-+ CORE_ADDR pc = get_frame_pc (next_frame);
-+ gdb_byte buf[LINUX_RT_SIGTRAMP_LEN];
-+
-+ /* We only recognize a signal trampoline if PC is at the start of
-+ one of the two instructions. We optimize for finding the PC at
-+ the start, as will be the case when the trampoline is not the
-+ first frame on the stack. We assume that in the case where the
-+ PC is not at the start of the instruction sequence, there will be
-+ a few trailing readable bytes on the stack. */
-+
-+ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_RT_SIGTRAMP_LEN))
-+ return 0;
-+
-+ if (buf[0] != LINUX_RT_SIGTRAMP_INSN0)
-+ {
-+ if (buf[0] != LINUX_RT_SIGTRAMP_INSN1)
-+ return 0;
-+
-+ pc -= 2;
-+
-+ if (!safe_frame_unwind_memory (next_frame, pc, buf,
-+ LINUX_RT_SIGTRAMP_LEN))
-+ return 0;
-+ }
-+
-+ if (memcmp (buf, linux_rt_sigtramp_code, LINUX_RT_SIGTRAMP_LEN) != 0)
-+ return 0;
-+
-+ return pc;
-+}
-+
-+/* Return whether PC is in a GNU/Linux sigtramp routine. */
-+
-+static int
-+sh_linux_sigtramp_p (struct frame_info *this_frame)
-+{
-+ CORE_ADDR pc = get_frame_pc (this_frame);
-+ char *name;
-+
-+ find_pc_partial_function (pc, &name, NULL, NULL);
-+
-+ /* If we have NAME, we can optimize the search. The trampolines are
-+ named __restore and __restore_rt. However, they aren't dynamically
-+ exported from the shared C library, so the trampoline may appear to
-+ be part of the preceding function. This should always be sigaction,
-+ __sigaction, or __libc_sigaction (all aliases to the same function). */
-+ if (name == NULL || strstr (name, "sigaction") != NULL)
-+ return (sh_linux_sigtramp_start (this_frame) != 0
-+ || sh_linux_rt_sigtramp_start (this_frame) != 0);
-+
-+ return (strcmp ("__restore", name) == 0
-+ || strcmp ("__restore_rt", name) == 0);
-+}
-+
-+/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
-+#define SH_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 12
-+
-+
-+/* Assuming NEXT_FRAME is a frame following a GNU/Linux sigtramp
-+ routine, return the address of the associated sigcontext structure. */
-+
-+static CORE_ADDR
-+sh_linux_sigcontext_addr (struct frame_info *this_frame)
-+{
-+ CORE_ADDR pc;
-+ CORE_ADDR sp;
-+
-+ sp = get_frame_register_unsigned (this_frame, SP_REGNUM);
-+
-+ pc = sh_linux_sigtramp_start (this_frame);
-+ if (pc)
-+ {
-+ return sp;
-+ }
-+
-+ pc = sh_linux_rt_sigtramp_start (this_frame);
-+ if (pc)
-+ {
-+ CORE_ADDR ucontext_addr;
-+
-+ /* The sigcontext structure is part of the user context. A
-+ pointer to the user context is passed as the third argument
-+ to the signal handler. */
-+ ucontext_addr = get_frame_register_unsigned (this_frame, ARG0_REGNUM+2);
-+ return ucontext_addr + SH_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
-+ }
-+
-+ error ("Couldn't recognize signal trampoline.");
-+ return 0;
-+}
-+
-+/* Signal trampolines. */
-+extern struct sh_frame_cache *sh_alloc_frame_cache (void);
-+
-+static struct sh_frame_cache *
-+sh_linux_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
-+{
-+ struct sh_frame_cache *cache;
-+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_current_arch ());
-+ CORE_ADDR sigcontext_addr;
-+
-+ if (*this_cache)
-+ return *this_cache;
-+
-+ cache = sh_alloc_frame_cache ();
-+
-+ cache->base = get_frame_register_unsigned (this_frame, SP_REGNUM);
-+ sigcontext_addr = tdep->sigcontext_addr (this_frame);
-+ if (tdep->sc_reg_offset)
-+ {
-+ int i;
-+
-+ gdb_assert (tdep->sc_num_regs <= SH_NUM_REGS);
-+
-+ for (i = 0; i < tdep->sc_num_regs; i++)
-+ if (tdep->sc_reg_offset[i] != -1)
-+ cache->saved_regs[i] = sigcontext_addr + tdep->sc_reg_offset[i];
-+ }
-+
-+ *this_cache = cache;
-+ return cache;
-+}
-+
-+static void
-+sh_linux_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache,
-+ struct frame_id *this_id)
-+{
-+ struct sh_frame_cache *cache =
-+ sh_linux_sigtramp_frame_cache (this_frame, this_cache);
-+
-+ (*this_id) = frame_id_build (cache->base + 64, cache->pc);
-+}
-+
-+extern struct value * sh_frame_prev_register ();
-+static struct value *
-+sh_linux_sigtramp_frame_prev_register (struct frame_info *this_frame,
-+ void **this_cache, int regnum)
-+{
-+ sh_linux_sigtramp_frame_cache (this_frame, this_cache);
-+
-+ return sh_frame_prev_register (this_frame, this_cache, regnum);
-+}
-+
-+static int
-+sh_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
-+ struct frame_info *this_frame,
-+ void **this_prologue_cache)
-+{
-+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
-+
-+ /* We shouldn't even bother if we don't have a sigcontext_addr
-+ handler. */
-+ if (tdep->sigcontext_addr == NULL)
-+ return 0;
-+
-+ if (tdep->sigtramp_p != NULL)
-+ {
-+ if (tdep->sigtramp_p (this_frame))
-+ return 1;
-+ }
-+
-+ return 0;
-+}
-+
-+static const struct frame_unwind sh_linux_sigtramp_frame_unwind =
-+{
-+ SIGTRAMP_FRAME,
-+ sh_linux_sigtramp_frame_this_id,
-+ sh_linux_sigtramp_frame_prev_register,
-+ NULL,
-+ sh_linux_sigtramp_frame_sniffer
-+};
-+
-+/* Supply register REGNUM from the buffer specified by GREGS and LEN
-+ in the general-purpose register set REGSET to register cache
-+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
-+
-+void
-+sh_supply_gregset (const struct regset *regset, struct regcache *regcache,
-+ int regnum, const void *gregs, size_t len)
-+{
-+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
-+ const char *regs = gregs;
-+ int i;
-+
-+ gdb_assert (len == tdep->sizeof_gregset);
-+
-+ for (i = 0; i < tdep->gregset_num_regs; i++)
-+ {
-+ if ((regnum == i || regnum == -1)
-+ && tdep->gregset_reg_offset[i] != -1)
-+ regcache_raw_supply (regcache, i, regs + tdep->gregset_reg_offset[i]);
-+ }
-+}
-+
-+/* Collect register REGNUM from the register cache REGCACHE and store
-+ it in the buffer specified by GREGS and LEN as described by the
-+ general-purpose register set REGSET. If REGNUM is -1, do this for
-+ all registers in REGSET. */
-+
-+void
-+sh_collect_gregset (const struct regset *regset,
-+ const struct regcache *regcache,
-+ int regnum, void *gregs, size_t len)
-+{
-+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
-+ char *regs = gregs;
-+ int i;
-+
-+ gdb_assert (len == tdep->sizeof_gregset);
-+
-+ for (i = 0; i < tdep->gregset_num_regs; i++)
-+ {
-+ if ((regnum == i || regnum == -1)
-+ && tdep->gregset_reg_offset[i] != -1)
-+ regcache_raw_collect (regcache, i, regs + tdep->gregset_reg_offset[i]);
-+ }
-+}
-+
-+/* Supply register REGNUM from the buffer specified by FPREGS and LEN
-+ in the floating-point register set REGSET to register cache
-+ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
-+
-+static void
-+sh_supply_fpregset (const struct regset *regset, struct regcache *regcache,
-+ int regnum, const void *fpregs, size_t len)
-+{
-+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
-+ const char *regs = fpregs;
-+ int i;
-+
-+ gdb_assert (len == tdep->sizeof_fpregset);
-+ for (i = 0; i < 16; i++)
-+ {
-+ if (regnum == i+25 || regnum == -1)
-+ regcache_raw_supply (regcache, i+25, regs + i*4);
-+ }
-+ if (regnum == FPSCR_REGNUM || regnum == -1)
-+ regcache_raw_supply (regcache, FPSCR_REGNUM, regs + 32*4);
-+ if (regnum == FPUL_REGNUM || regnum == -1)
-+ regcache_raw_supply (regcache, FPUL_REGNUM, regs + 33*4);
-+}
-+
-+/* Collect register REGNUM from the register cache REGCACHE and store
-+ it in the buffer specified by FPREGS and LEN as described by the
-+ floating-point register set REGSET. If REGNUM is -1, do this for
-+ all registers in REGSET. */
-+
-+static void
-+sh_collect_fpregset (const struct regset *regset,
-+ const struct regcache *regcache,
-+ int regnum, void *fpregs, size_t len)
-+{
-+ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
-+ char *regs = fpregs;
-+ int i;
-+
-+ gdb_assert (len == tdep->sizeof_fpregset);
-+ for (i = 0; i < 16; i++)
-+ {
-+ if (regnum == i+25 || regnum == -1)
-+ regcache_raw_collect (regcache, i+25, regs + i*4);
-+ }
-+ if (regnum == FPSCR_REGNUM || regnum == -1)
-+ regcache_raw_collect (regcache, FPSCR_REGNUM, regs + 32*4);
-+ if (regnum == FPUL_REGNUM || regnum == -1)
-+ regcache_raw_collect (regcache, FPUL_REGNUM, regs + 33*4);
-+}
-+
-+/* Return the appropriate register set for the core section identified
-+ by SECT_NAME and SECT_SIZE. */
-+
-+const struct regset *
-+sh_linux_regset_from_core_section (struct gdbarch *gdbarch,
-+ const char *sect_name, size_t sect_size)
-+{
-+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-+
-+ if (strcmp (sect_name, ".reg") == 0 && sect_size == tdep->sizeof_gregset)
-+ {
-+ if (tdep->gregset == NULL)
-+ tdep->gregset = regset_alloc (gdbarch, sh_supply_gregset,
-+ sh_collect_gregset);
-+ return tdep->gregset;
-+ }
-+
-+ if ((strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset))
-+ {
-+ if (tdep->fpregset == NULL)
-+ tdep->fpregset = regset_alloc (gdbarch, sh_supply_fpregset,
-+ sh_collect_fpregset);
-+ return tdep->fpregset;
-+ }
-+
-+ return NULL;
-+}
-+
-+/* The register sets used in GNU/Linux ELF core-dumps are identical to
-+ the register sets in `struct user' that are used for a.out
-+ core-dumps. These are also used by ptrace(2). The corresponding
-+ types are `elf_gregset_t' for the general-purpose registers (with
-+ `elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
-+ for the floating-point registers.
-+
-+ Those types used to be available under the names `gregset_t' and
-+ `fpregset_t' too, and GDB used those names in the past. But those
-+ names are now used for the register sets used in the `mcontext_t'
-+ type, which have a different size and layout. */
-+
-+/* Mapping between the general-purpose registers in `struct user'
-+ format and GDB's register cache layout. */
-+
-+/* From <sys/reg.h>. */
-+static int sh_linux_gregset_reg_offset[] =
-+{
-+ 0, 4, 8, 12, 16, 20, 24, 28,
-+ 32, 36, 40, 44, 48, 52, 56, 60,
-+
-+ REG_PC*4, REG_PR*4, REG_GBR*4, -1,
-+ REG_MACH*4, REG_MACL*4, REG_SR*4,
-+};
-+
-+/* Mapping between the general-purpose registers in `struct
-+ sigcontext' format and GDB's register cache layout. */
-+
-+/* From <asm/sigcontext.h>. */
-+static int sh_linux_sc_reg_offset[] =
-+{
-+ 4, 8, 12, 16, 20, 24, 28, 32,
-+ 36, 40, 44, 48, 52, 56, 60, 64,
-+ 68, 72, 80, -1,
-+ 84, 88, 76
-+};
-+
- static void
- sh_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
- {
-+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-+ bfd abfd;
-+
-+ tdep->gregset_reg_offset = sh_linux_gregset_reg_offset;
-+ tdep->gregset_num_regs = ARRAY_SIZE (sh_linux_gregset_reg_offset);
-+ tdep->sizeof_gregset = 23 * 4;
-+
-+ tdep->jb_pc_offset = 32; /* From <bits/setjmp.h>. */
-+
-+ tdep->sigtramp_p = sh_linux_sigtramp_p;
-+ tdep->sigcontext_addr = sh_linux_sigcontext_addr;
-+ tdep->sc_reg_offset = sh_linux_sc_reg_offset;
-+ tdep->sc_num_regs = ARRAY_SIZE (sh_linux_sc_reg_offset);
-+
-+ frame_unwind_append_unwinder(gdbarch, &sh_linux_sigtramp_frame_unwind);
-+
-+ /* If we have a register mapping, enable the generic core file
-+ support, unless it has already been enabled. */
-+ if (tdep->gregset_reg_offset
-+ && !gdbarch_regset_from_core_section_p (gdbarch))
-+ set_gdbarch_regset_from_core_section (gdbarch,
-+ sh_linux_regset_from_core_section);
-+
- linux_init_abi (info, gdbarch);
-
- /* GNU/Linux uses SVR4-style shared libraries. */
-diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
-index 82cf2f4..b443e46 100644
---- a/gdb/sh-tdep.c
-+++ b/gdb/sh-tdep.c
-@@ -21,6 +21,9 @@
- sac@cygnus.com. */
-
- #include "defs.h"
-+#include "arch-utils.h"
-+#include "command.h"
-+#include "dummy-frame.h"
- #include "frame.h"
- #include "frame-base.h"
- #include "frame-unwind.h"
-@@ -35,6 +38,7 @@
- #include "arch-utils.h"
- #include "floatformat.h"
- #include "regcache.h"
-+#include "regset.h"
- #include "doublest.h"
- #include "osabi.h"
- #include "reggroups.h"
-@@ -67,23 +71,6 @@ static const char *const sh_cc_enum[] = {
-
- static const char *sh_active_calling_convention = sh_cc_gcc;
-
--#define SH_NUM_REGS 67
--
--struct sh_frame_cache
--{
-- /* Base address. */
-- CORE_ADDR base;
-- LONGEST sp_offset;
-- CORE_ADDR pc;
--
-- /* Flag showing that a frame has been created in the prologue code. */
-- int uses_fp;
--
-- /* Saved registers. */
-- CORE_ADDR saved_regs[SH_NUM_REGS];
-- CORE_ADDR saved_sp;
--};
--
- static int
- sh_is_renesas_calling_convention (struct type *func_type)
- {
-@@ -1043,7 +1030,7 @@ sh_treat_as_flt_p (struct type *type)
- return 0;
- /* Otherwise if the type of that member is float, the whole type is
- treated as float. */
-- if (TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_FLT)
-+ if (TYPE_CODE (check_typedef (TYPE_FIELD_TYPE (type, 0))) == TYPE_CODE_FLT)
- return 1;
- /* Otherwise it's not treated as float. */
- return 0;
-@@ -1093,7 +1080,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
- in four registers available. Loop thru args from first to last. */
- for (argnum = 0; argnum < nargs; argnum++)
- {
-- type = value_type (args[argnum]);
-+ type = check_typedef (value_type (args[argnum]));
- len = TYPE_LENGTH (type);
- val = sh_justify_value_in_reg (gdbarch, args[argnum], len);
-
-@@ -1821,7 +1808,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
- reg->how = DWARF2_FRAME_REG_UNDEFINED;
- }
-
--static struct sh_frame_cache *
-+struct sh_frame_cache *
- sh_alloc_frame_cache (void)
- {
- struct sh_frame_cache *cache;
-@@ -1848,7 +1835,7 @@ sh_alloc_frame_cache (void)
- return cache;
- }
-
--static struct sh_frame_cache *
-+struct sh_frame_cache *
- sh_frame_cache (struct frame_info *this_frame, void **this_cache)
- {
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
-@@ -1915,9 +1902,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
- return cache;
- }
-
--static struct value *
--sh_frame_prev_register (struct frame_info *this_frame,
-- void **this_cache, int regnum)
-+struct value *
-+sh_frame_prev_register (struct frame_info *this_frame, void **this_cache,
-+ int regnum)
- {
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
-@@ -1931,7 +1918,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
- the current frame. Frob regnum so that we pull the value from
- the correct place. */
- if (regnum == gdbarch_pc_regnum (gdbarch))
-- regnum = PR_REGNUM;
-+ regnum = PR_REGNUM; /* XXX: really? */
-
- if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
- return frame_unwind_got_memory (this_frame, regnum,
-@@ -2237,8 +2224,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
- static struct gdbarch *
- sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
- {
-- struct gdbarch *gdbarch;
- struct gdbarch_tdep *tdep;
-+ struct gdbarch *gdbarch;
-
- /* SH5 is handled entirely in sh64-tdep.c. */
- if (info.bfd_arch_info->mach == bfd_mach_sh5)
-@@ -2254,6 +2241,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
- tdep = XCNEW (struct gdbarch_tdep);
- gdbarch = gdbarch_alloc (&info, tdep);
-
-+ /* General-purpose registers. */
-+ tdep->gregset = NULL;
-+ tdep->gregset_reg_offset = NULL;
-+ tdep->gregset_num_regs = 23;
-+ tdep->sizeof_gregset = 0;
-+
-+ /* Floating-point registers. */
-+ tdep->fpregset = NULL;
-+ tdep->sizeof_fpregset = 34*4;
-+
-+ tdep->jb_pc_offset = -1;
-+
- set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
- set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
- set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
-@@ -2404,10 +2403,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
- break;
- }
-
-+ dwarf2_append_unwinders (gdbarch);
-+
- /* Hook in ABI-specific overrides, if they have been registered. */
- gdbarch_init_osabi (info, gdbarch);
-
-- dwarf2_append_unwinders (gdbarch);
- frame_unwind_append_unwinder (gdbarch, &sh_stub_unwind);
- frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind);
-
-diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
-index fc671a5..699f59f 100644
---- a/gdb/sh-tdep.h
-+++ b/gdb/sh-tdep.h
-@@ -21,6 +21,12 @@
-
- /* Contributed by Steve Chamberlain sac@cygnus.com. */
-
-+struct frame_info;
-+struct gdbarch;
-+struct reggroup;
-+struct regset;
-+struct regcache;
-+
- /* Registers for all SH variants. Used also by sh3-rom.c. */
- enum
- {
-@@ -29,6 +35,7 @@ enum
- ARG0_REGNUM = 4,
- ARGLAST_REGNUM = 7,
- FP_REGNUM = 14,
-+ SP_REGNUM = 15,
- PC_REGNUM = 16,
- PR_REGNUM = 17,
- GBR_REGNUM = 18,
-@@ -81,6 +88,24 @@ enum
- FV0_REGNUM = 76,
- FV_LAST_REGNUM = 79
- };
-+#define SH_NUM_REGS 67
-+
-+struct sh_frame_cache
-+{
-+ /* Base address. */
-+ CORE_ADDR base;
-+ LONGEST sp_offset;
-+ CORE_ADDR pc;
-+
-+ /* Flag showing that a frame has been created in the prologue code. */
-+ int uses_fp;
-+
-+ /* Saved registers. */
-+ CORE_ADDR saved_regs[SH_NUM_REGS];
-+ CORE_ADDR saved_sp;
-+};
-+
-+extern struct sh_frame_cache *sh_frame_cache (struct frame_info *next_frame, void **this_cache);
-
- /* This structure describes a register in a core-file. */
- struct sh_corefile_regmap
-@@ -89,8 +114,32 @@ struct sh_corefile_regmap
- unsigned int offset;
- };
-
-+/* sh architecture specific information. */
- struct gdbarch_tdep
- {
-+ /* General-purpose registers. */
-+ struct regset *gregset;
-+ int *gregset_reg_offset;
-+ int gregset_num_regs;
-+ size_t sizeof_gregset;
-+
-+ /* Floating-point registers. */
-+ struct regset *fpregset;
-+ size_t sizeof_fpregset;
-+
-+ /* Offset of saved PC in jmp_buf. */
-+ int jb_pc_offset;
-+
-+ /* Detect sigtramp. */
-+ int (*sigtramp_p) (struct frame_info *);
-+
-+ /* Get address of sigcontext for sigtramp. */
-+ CORE_ADDR (*sigcontext_addr) (struct frame_info *);
-+
-+ /* Offset of registers in `struct sigcontext'. */
-+ int *sc_reg_offset;
-+ int sc_num_regs;
-+
- /* Non-NULL when debugging from a core file. Provides the offset
- where each general-purpose register is stored inside the associated
- core file section. */
-diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
-index 8854af0..ef44682 100644
---- a/gdb/testsuite/gdb.asm/asm-source.exp
-+++ b/gdb/testsuite/gdb.asm/asm-source.exp
-@@ -113,6 +113,11 @@ switch -glob -- [istarget] {
- append link-flags " -m elf32ppc"
- }
- }
-+ "sh*-linux*" {
-+ set asm-arch sh-linux
-+ set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
-+ set debug-flags "-gdwarf-2"
-+ }
- "sh*-*-*" {
- set asm-arch sh
- set debug-flags "-gdwarf-2"
-diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc
-index a4a5fc5..89efed7 100644
---- a/gdb/testsuite/gdb.asm/sh.inc
-+++ b/gdb/testsuite/gdb.asm/sh.inc
-@@ -40,9 +40,8 @@
- mov.l .Lconst\@,r1
- bra .Lafterconst\@
- nop
-- nop
--.Lconst\@:
- .align 2
-+.Lconst\@:
- .long \subr
- .align 1
- .Lafterconst\@:
-diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c
-index 424e1b8..0de2e7b 100644
---- a/gdb/testsuite/gdb.base/annota1.c
-+++ b/gdb/testsuite/gdb.base/annota1.c
-@@ -1,6 +1,9 @@
- #include <stdio.h>
- #include <signal.h>
-
-+#ifdef __sh__
-+#define signal(a,b) /* Signals not supported on this target - make them go away */
-+#endif
-
- void
- handle_USR1 (int sig)
-diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c
-index 424e1b8..952aaf2 100644
---- a/gdb/testsuite/gdb.base/annota3.c
-+++ b/gdb/testsuite/gdb.base/annota3.c
-@@ -1,6 +1,10 @@
- #include <stdio.h>
- #include <signal.h>
-
-+#ifdef __sh__
-+#define signal(a,b) /* Signals not supported on this target - make them go away */
-+#endif
-+
-
- void
- handle_USR1 (int sig)
-diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c
-index 81f3b08..1574b2d 100644
---- a/gdb/testsuite/gdb.base/sigall.c
-+++ b/gdb/testsuite/gdb.base/sigall.c
-@@ -1,6 +1,9 @@
- #include <signal.h>
- #include <unistd.h>
-
-+#ifdef __sh__
-+#define signal(a,b) /* Signals not supported on this target - make them go away */
-+#endif
-
- /* Signal handlers, we set breakpoints in them to make sure that the
- signals really get delivered. */
-diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c
-index 7566068..1205a9b 100644
---- a/gdb/testsuite/gdb.base/signals.c
-+++ b/gdb/testsuite/gdb.base/signals.c
-@@ -3,6 +3,10 @@
- #include <signal.h>
- #include <unistd.h>
-
-+#ifdef __sh__
-+#define signal(a,b) /* Signals not supported on this target - make them go away */
-+#define alarm(a) /* Ditto for alarm() */
-+#endif
-
- static int count = 0;
-
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
new file mode 100644
index 000000000..bac793964
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
@@ -0,0 +1,37 @@
+From 88e67caed662d8344c8db56176c9f1221e6cd2a2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 23 Mar 2016 06:30:09 +0000
+Subject: [PATCH 03/10] mips-linux-nat: Define _ABIO32 if not defined
+
+This helps building gdb on mips64 on musl, since
+musl does not provide sgidefs.h this define is
+only defined when GCC is using o32 ABI, in that
+case gcc emits it as built-in define and hence
+it works ok for mips32
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ gdb/mips-linux-nat.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
+index bfe9fcb..449b43a 100644
+--- a/gdb/mips-linux-nat.c
++++ b/gdb/mips-linux-nat.c
+@@ -46,6 +46,11 @@
+ #define PTRACE_GET_THREAD_AREA 25
+ #endif
+
++/* musl does not define and relies on compiler built-in macros for it */
++#ifndef _ABIO32
++#define _ABIO32 1
++#endif
++
+ /* Assume that we have PTRACE_GETREGS et al. support. If we do not,
+ we'll clear this and use PTRACE_PEEKUSER instead. */
+ static int have_ptrace_regsets = 1;
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
new file mode 100644
index 000000000..a5fe2a279
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
@@ -0,0 +1,53 @@
+From bec564eb454bc7fc6ecfcb573aa53040bf39c1d5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Apr 2016 16:46:03 +0000
+Subject: [PATCH 04/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
+ systems
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gdb/gdbserver/linux-ppc-low.c | 6 ++++++
+ gdb/nat/ppc-linux.h | 6 ++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
+index 2145c50..777905d 100644
+--- a/gdb/gdbserver/linux-ppc-low.c
++++ b/gdb/gdbserver/linux-ppc-low.c
+@@ -21,7 +21,13 @@
+ #include "linux-low.h"
+
+ #include <elf.h>
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
+ #include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+
+ #include "nat/ppc-linux.h"
+
+diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
+index 85fbcd8..cbec9c5 100644
+--- a/gdb/nat/ppc-linux.h
++++ b/gdb/nat/ppc-linux.h
+@@ -18,7 +18,13 @@
+ #ifndef PPC_LINUX_H
+ #define PPC_LINUX_H 1
+
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
+ #include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+ #include <asm/cputable.h>
+
+ /* This sometimes isn't defined. */
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
new file mode 100644
index 000000000..8809e6f8b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
@@ -0,0 +1,921 @@
+From 8c5fe58c5a0044ddb517a41b277ed27fb3d3bedc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 2 Mar 2015 02:31:12 +0000
+Subject: [PATCH 05/10] Add support for Renesas SH (sh4) architecture.
+
+gdb (7.4-1~cvs20111117.2) experimental; urgency=low
+ .
+ * Add Renesas SH (sh4) support (Closes: #576242)
+ - Thanks Nobuhiro Iwamatsu, Takashi Yoshii.
+Author: Hector Oron <zumbi@debian.org>
+Bug-Debian: http://bugs.debian.org/576242
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gdb/Makefile.in | 1 +
+ gdb/configure.host | 1 +
+ gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++++++++++
+ gdb/sh-tdep.c | 54 ++--
+ gdb/sh-tdep.h | 49 ++++
+ gdb/testsuite/gdb.asm/asm-source.exp | 5 +
+ gdb/testsuite/gdb.asm/sh.inc | 3 +-
+ gdb/testsuite/gdb.base/annota1.c | 3 +
+ gdb/testsuite/gdb.base/annota3.c | 4 +
+ gdb/testsuite/gdb.base/sigall.c | 3 +
+ gdb/testsuite/gdb.base/signals.c | 4 +
+ 11 files changed, 617 insertions(+), 29 deletions(-)
+
+diff --git a/gdb/Makefile.in b/gdb/Makefile.in
+index ec2af52..df8e84d 100644
+--- a/gdb/Makefile.in
++++ b/gdb/Makefile.in
+@@ -1736,6 +1736,7 @@ ALLDEPFILES = \
+ score-tdep.c \
+ ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
+ sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
++ sh-linux-tdep.c sh-linux-nat.c \
+ sol2-tdep.c \
+ solib-svr4.c \
+ sparc-linux-nat.c sparc-linux-tdep.c \
+diff --git a/gdb/configure.host b/gdb/configure.host
+index ef265eb..322a1e2 100644
+--- a/gdb/configure.host
++++ b/gdb/configure.host
+@@ -149,6 +149,7 @@ powerpc*-*-linux*) gdb_host=linux ;;
+
+ s390*-*-linux*) gdb_host=linux ;;
+
++sh*-*-linux*) gdb_host=linux ;;
+ sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
+ gdb_host=nbsd ;;
+ sh*-*-openbsd*) gdb_host=nbsd ;;
+diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c
+index 2418d25..ac8ea9e 100644
+--- a/gdb/sh-linux-tdep.c
++++ b/gdb/sh-linux-tdep.c
+@@ -18,14 +18,37 @@
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+ #include "defs.h"
++#include "gdbcore.h"
++#include "frame.h"
++#include "frame-base.h"
++#include "frame-unwind.h"
++#include "dwarf2-frame.h"
++#include "value.h"
++#include "regcache.h"
++#include "inferior.h"
+ #include "osabi.h"
+
++#include "reggroups.h"
++#include "arch-utils.h"
++#include "floatformat.h"
+ #include "solib-svr4.h"
+ #include "symtab.h"
++#include "gdb_string.h"
++#include "command.h"
++#include "gdb_assert.h"
+
+ #include "trad-frame.h"
+ #include "tramp-frame.h"
+
++#include <sys/ptrace.h>
++#include <sys/types.h>
++#include <sys/param.h>
++#include <sys/user.h>
++#include <sys/syscall.h>
++
++#include <asm/ptrace.h>
++
++#include "regset.h"
+ #include "glibc-tdep.h"
+ #include "sh-tdep.h"
+ #include "linux-tdep.h"
+@@ -180,9 +203,505 @@ static struct tramp_frame sh_linux_rt_sigreturn_tramp_frame = {
+ sh_linux_rt_sigreturn_init
+ };
+
++/* Recognizing signal handler frames. */
++
++/* GNU/Linux has two flavors of signals. Normal signal handlers, and
++ "realtime" (RT) signals. The RT signals can provide additional
++ information to the signal handler if the SA_SIGINFO flag is set
++ when establishing a signal handler using `sigaction'. It is not
++ unlikely that future versions of GNU/Linux will support SA_SIGINFO
++ for normal signals too. */
++
++/* When the SH Linux kernel calls a signal handler and the
++ SA_RESTORER flag isn't set, the return address points to a bit of
++ code on the stack. This function returns whether the PC appears to
++ be within this bit of code.
++
++ The instruction sequence for normal signals is
++ mov.w 1f,r3
++ trapa #16
++ or r0, r0
++ or r0, r0
++ or r0, r0
++ or r0, r0
++ or r0, r0
++ 1: .word __NR_sigreturn
++ or 0x9305 0xc310 0x200b 0x200b 0x200b 0x200b 0x200b 0x0077.
++
++ Checking for the code sequence should be somewhat reliable, because
++ the effect is to call the system call sigreturn. This is unlikely
++ to occur anywhere other than a signal trampoline.
++
++ It kind of sucks that we have to read memory from the process in
++ order to identify a signal trampoline, but there doesn't seem to be
++ any other way. The PC_IN_SIGTRAMP macro in tm-linux.h arranges to
++ only call us if no function name could be identified, which should
++ be the case since the code is on the stack.
++
++ Detection of signal trampolines for handlers that set the
++ SA_RESTORER flag is in general not possible. Unfortunately this is
++ what the GNU C Library has been doing for quite some time now.
++ However, as of version 2.1.2, the GNU C Library uses signal
++ trampolines (named __restore and __restore_rt) that are identical
++ to the ones used by the kernel. Therefore, these trampolines are
++ supported too. */
++
++#define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */
++#define TRAP16 0xc310 /* Syscall w/no args (NR in R3) */
++#define OR_R0_R0 0x200b /* or r0,r0 (insert to avoid hardware bug) */
++
++#define LINUX_SIGTRAMP_INSN0 MOVW(7) /* Move mem word at PC+7 to R3 */
++#define LINUX_SIGTRAMP_INSN1 TRAP16 /* Syscall w/no args (NR in R3) */
++#define LINUX_SIGTRAMP_INSN2 OR_R0_R0 /* or r0,r0 (insert to avoid hardware bug) */
++
++static const unsigned short linux_sigtramp_code[] =
++{
++ LINUX_SIGTRAMP_INSN0,
++ LINUX_SIGTRAMP_INSN1,
++ LINUX_SIGTRAMP_INSN2,
++ LINUX_SIGTRAMP_INSN2,
++ LINUX_SIGTRAMP_INSN2,
++ LINUX_SIGTRAMP_INSN2,
++ LINUX_SIGTRAMP_INSN2,
++ __NR_sigreturn
++};
++
++#define LINUX_SIGTRAMP_LEN (sizeof linux_sigtramp_code)
++
++/* If PC is in a sigtramp routine, return the address of the start of
++ the routine. Otherwise, return 0. */
++
++static CORE_ADDR
++sh_linux_sigtramp_start (struct frame_info *next_frame)
++{
++ CORE_ADDR pc = get_frame_pc (next_frame);
++ gdb_byte buf[LINUX_SIGTRAMP_LEN];
++
++ /* We only recognize a signal trampoline if PC is at the start of
++ one of the three instructions. We optimize for finding the PC at
++ the start, as will be the case when the trampoline is not the
++ first frame on the stack. We assume that in the case where the
++ PC is not at the start of the instruction sequence, there will be
++ a few trailing readable bytes on the stack. */
++
++ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
++ return 0;
++
++ if (buf[0] != LINUX_SIGTRAMP_INSN0)
++ {
++ if (buf[0] != LINUX_SIGTRAMP_INSN1)
++ return 0;
++
++ pc -= 2;
++
++ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_SIGTRAMP_LEN))
++ return 0;
++ }
++
++ if (memcmp (buf, linux_sigtramp_code, LINUX_SIGTRAMP_LEN) != 0)
++ return 0;
++
++ return pc;
++}
++
++/* This function does the same for RT signals. Here the instruction
++ sequence is
++ mov.w 1f,r3
++ trapa #16
++ or r0, r0
++ or r0, r0
++ or r0, r0
++ or r0, r0
++ or r0, r0
++ 1: .word __NR_rt_sigreturn
++ or 0x9305 0xc310 0x200b 0x200b 0x200b 0x200b 0x200b 0x00ad.
++
++ The effect is to call the system call rt_sigreturn. */
++
++#define LINUX_RT_SIGTRAMP_INSN0 MOVW(7) /* Move mem word at PC+7 to R3 */
++#define LINUX_RT_SIGTRAMP_INSN1 TRAP16 /* Syscall w/no args (NR in R3) */
++#define LINUX_RT_SIGTRAMP_INSN2 OR_R0_R0 /* or r0,r0 (insert to avoid hardware bug) */
++
++static const unsigned short linux_rt_sigtramp_code[] =
++{
++ LINUX_RT_SIGTRAMP_INSN0,
++ LINUX_RT_SIGTRAMP_INSN1,
++ LINUX_RT_SIGTRAMP_INSN2,
++ LINUX_RT_SIGTRAMP_INSN2,
++ LINUX_RT_SIGTRAMP_INSN2,
++ LINUX_RT_SIGTRAMP_INSN2,
++ LINUX_RT_SIGTRAMP_INSN2,
++ __NR_rt_sigreturn
++};
++
++#define LINUX_RT_SIGTRAMP_LEN (sizeof linux_rt_sigtramp_code)
++
++/* If PC is in a RT sigtramp routine, return the address of the start
++ of the routine. Otherwise, return 0. */
++
++static CORE_ADDR
++sh_linux_rt_sigtramp_start (struct frame_info *next_frame)
++{
++ CORE_ADDR pc = get_frame_pc (next_frame);
++ gdb_byte buf[LINUX_RT_SIGTRAMP_LEN];
++
++ /* We only recognize a signal trampoline if PC is at the start of
++ one of the two instructions. We optimize for finding the PC at
++ the start, as will be the case when the trampoline is not the
++ first frame on the stack. We assume that in the case where the
++ PC is not at the start of the instruction sequence, there will be
++ a few trailing readable bytes on the stack. */
++
++ if (!safe_frame_unwind_memory (next_frame, pc, buf, LINUX_RT_SIGTRAMP_LEN))
++ return 0;
++
++ if (buf[0] != LINUX_RT_SIGTRAMP_INSN0)
++ {
++ if (buf[0] != LINUX_RT_SIGTRAMP_INSN1)
++ return 0;
++
++ pc -= 2;
++
++ if (!safe_frame_unwind_memory (next_frame, pc, buf,
++ LINUX_RT_SIGTRAMP_LEN))
++ return 0;
++ }
++
++ if (memcmp (buf, linux_rt_sigtramp_code, LINUX_RT_SIGTRAMP_LEN) != 0)
++ return 0;
++
++ return pc;
++}
++
++/* Return whether PC is in a GNU/Linux sigtramp routine. */
++
++static int
++sh_linux_sigtramp_p (struct frame_info *this_frame)
++{
++ CORE_ADDR pc = get_frame_pc (this_frame);
++ char *name;
++
++ find_pc_partial_function (pc, &name, NULL, NULL);
++
++ /* If we have NAME, we can optimize the search. The trampolines are
++ named __restore and __restore_rt. However, they aren't dynamically
++ exported from the shared C library, so the trampoline may appear to
++ be part of the preceding function. This should always be sigaction,
++ __sigaction, or __libc_sigaction (all aliases to the same function). */
++ if (name == NULL || strstr (name, "sigaction") != NULL)
++ return (sh_linux_sigtramp_start (this_frame) != 0
++ || sh_linux_rt_sigtramp_start (this_frame) != 0);
++
++ return (strcmp ("__restore", name) == 0
++ || strcmp ("__restore_rt", name) == 0);
++}
++
++/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
++#define SH_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 12
++
++
++/* Assuming NEXT_FRAME is a frame following a GNU/Linux sigtramp
++ routine, return the address of the associated sigcontext structure. */
++
++static CORE_ADDR
++sh_linux_sigcontext_addr (struct frame_info *this_frame)
++{
++ CORE_ADDR pc;
++ CORE_ADDR sp;
++
++ sp = get_frame_register_unsigned (this_frame, SP_REGNUM);
++
++ pc = sh_linux_sigtramp_start (this_frame);
++ if (pc)
++ {
++ return sp;
++ }
++
++ pc = sh_linux_rt_sigtramp_start (this_frame);
++ if (pc)
++ {
++ CORE_ADDR ucontext_addr;
++
++ /* The sigcontext structure is part of the user context. A
++ pointer to the user context is passed as the third argument
++ to the signal handler. */
++ ucontext_addr = get_frame_register_unsigned (this_frame, ARG0_REGNUM+2);
++ return ucontext_addr + SH_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
++ }
++
++ error ("Couldn't recognize signal trampoline.");
++ return 0;
++}
++
++/* Signal trampolines. */
++extern struct sh_frame_cache *sh_alloc_frame_cache (void);
++
++static struct sh_frame_cache *
++sh_linux_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
++{
++ struct sh_frame_cache *cache;
++ struct gdbarch_tdep *tdep = gdbarch_tdep (get_current_arch ());
++ CORE_ADDR sigcontext_addr;
++
++ if (*this_cache)
++ return *this_cache;
++
++ cache = sh_alloc_frame_cache ();
++
++ cache->base = get_frame_register_unsigned (this_frame, SP_REGNUM);
++ sigcontext_addr = tdep->sigcontext_addr (this_frame);
++ if (tdep->sc_reg_offset)
++ {
++ int i;
++
++ gdb_assert (tdep->sc_num_regs <= SH_NUM_REGS);
++
++ for (i = 0; i < tdep->sc_num_regs; i++)
++ if (tdep->sc_reg_offset[i] != -1)
++ cache->saved_regs[i] = sigcontext_addr + tdep->sc_reg_offset[i];
++ }
++
++ *this_cache = cache;
++ return cache;
++}
++
++static void
++sh_linux_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache,
++ struct frame_id *this_id)
++{
++ struct sh_frame_cache *cache =
++ sh_linux_sigtramp_frame_cache (this_frame, this_cache);
++
++ (*this_id) = frame_id_build (cache->base + 64, cache->pc);
++}
++
++extern struct value * sh_frame_prev_register ();
++static struct value *
++sh_linux_sigtramp_frame_prev_register (struct frame_info *this_frame,
++ void **this_cache, int regnum)
++{
++ sh_linux_sigtramp_frame_cache (this_frame, this_cache);
++
++ return sh_frame_prev_register (this_frame, this_cache, regnum);
++}
++
++static int
++sh_linux_sigtramp_frame_sniffer (const struct frame_unwind *self,
++ struct frame_info *this_frame,
++ void **this_prologue_cache)
++{
++ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
++
++ /* We shouldn't even bother if we don't have a sigcontext_addr
++ handler. */
++ if (tdep->sigcontext_addr == NULL)
++ return 0;
++
++ if (tdep->sigtramp_p != NULL)
++ {
++ if (tdep->sigtramp_p (this_frame))
++ return 1;
++ }
++
++ return 0;
++}
++
++static const struct frame_unwind sh_linux_sigtramp_frame_unwind =
++{
++ SIGTRAMP_FRAME,
++ sh_linux_sigtramp_frame_this_id,
++ sh_linux_sigtramp_frame_prev_register,
++ NULL,
++ sh_linux_sigtramp_frame_sniffer
++};
++
++/* Supply register REGNUM from the buffer specified by GREGS and LEN
++ in the general-purpose register set REGSET to register cache
++ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
++
++void
++sh_supply_gregset (const struct regset *regset, struct regcache *regcache,
++ int regnum, const void *gregs, size_t len)
++{
++ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
++ const char *regs = gregs;
++ int i;
++
++ gdb_assert (len == tdep->sizeof_gregset);
++
++ for (i = 0; i < tdep->gregset_num_regs; i++)
++ {
++ if ((regnum == i || regnum == -1)
++ && tdep->gregset_reg_offset[i] != -1)
++ regcache_raw_supply (regcache, i, regs + tdep->gregset_reg_offset[i]);
++ }
++}
++
++/* Collect register REGNUM from the register cache REGCACHE and store
++ it in the buffer specified by GREGS and LEN as described by the
++ general-purpose register set REGSET. If REGNUM is -1, do this for
++ all registers in REGSET. */
++
++void
++sh_collect_gregset (const struct regset *regset,
++ const struct regcache *regcache,
++ int regnum, void *gregs, size_t len)
++{
++ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
++ char *regs = gregs;
++ int i;
++
++ gdb_assert (len == tdep->sizeof_gregset);
++
++ for (i = 0; i < tdep->gregset_num_regs; i++)
++ {
++ if ((regnum == i || regnum == -1)
++ && tdep->gregset_reg_offset[i] != -1)
++ regcache_raw_collect (regcache, i, regs + tdep->gregset_reg_offset[i]);
++ }
++}
++
++/* Supply register REGNUM from the buffer specified by FPREGS and LEN
++ in the floating-point register set REGSET to register cache
++ REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
++
++static void
++sh_supply_fpregset (const struct regset *regset, struct regcache *regcache,
++ int regnum, const void *fpregs, size_t len)
++{
++ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
++ const char *regs = fpregs;
++ int i;
++
++ gdb_assert (len == tdep->sizeof_fpregset);
++ for (i = 0; i < 16; i++)
++ {
++ if (regnum == i+25 || regnum == -1)
++ regcache_raw_supply (regcache, i+25, regs + i*4);
++ }
++ if (regnum == FPSCR_REGNUM || regnum == -1)
++ regcache_raw_supply (regcache, FPSCR_REGNUM, regs + 32*4);
++ if (regnum == FPUL_REGNUM || regnum == -1)
++ regcache_raw_supply (regcache, FPUL_REGNUM, regs + 33*4);
++}
++
++/* Collect register REGNUM from the register cache REGCACHE and store
++ it in the buffer specified by FPREGS and LEN as described by the
++ floating-point register set REGSET. If REGNUM is -1, do this for
++ all registers in REGSET. */
++
++static void
++sh_collect_fpregset (const struct regset *regset,
++ const struct regcache *regcache,
++ int regnum, void *fpregs, size_t len)
++{
++ const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch);
++ char *regs = fpregs;
++ int i;
++
++ gdb_assert (len == tdep->sizeof_fpregset);
++ for (i = 0; i < 16; i++)
++ {
++ if (regnum == i+25 || regnum == -1)
++ regcache_raw_collect (regcache, i+25, regs + i*4);
++ }
++ if (regnum == FPSCR_REGNUM || regnum == -1)
++ regcache_raw_collect (regcache, FPSCR_REGNUM, regs + 32*4);
++ if (regnum == FPUL_REGNUM || regnum == -1)
++ regcache_raw_collect (regcache, FPUL_REGNUM, regs + 33*4);
++}
++
++/* Return the appropriate register set for the core section identified
++ by SECT_NAME and SECT_SIZE. */
++
++const struct regset *
++sh_linux_regset_from_core_section (struct gdbarch *gdbarch,
++ const char *sect_name, size_t sect_size)
++{
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++
++ if (strcmp (sect_name, ".reg") == 0 && sect_size == tdep->sizeof_gregset)
++ {
++ if (tdep->gregset == NULL)
++ tdep->gregset = regset_alloc (gdbarch, sh_supply_gregset,
++ sh_collect_gregset);
++ return tdep->gregset;
++ }
++
++ if ((strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset))
++ {
++ if (tdep->fpregset == NULL)
++ tdep->fpregset = regset_alloc (gdbarch, sh_supply_fpregset,
++ sh_collect_fpregset);
++ return tdep->fpregset;
++ }
++
++ return NULL;
++}
++
++/* The register sets used in GNU/Linux ELF core-dumps are identical to
++ the register sets in `struct user' that are used for a.out
++ core-dumps. These are also used by ptrace(2). The corresponding
++ types are `elf_gregset_t' for the general-purpose registers (with
++ `elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
++ for the floating-point registers.
++
++ Those types used to be available under the names `gregset_t' and
++ `fpregset_t' too, and GDB used those names in the past. But those
++ names are now used for the register sets used in the `mcontext_t'
++ type, which have a different size and layout. */
++
++/* Mapping between the general-purpose registers in `struct user'
++ format and GDB's register cache layout. */
++
++/* From <sys/reg.h>. */
++static int sh_linux_gregset_reg_offset[] =
++{
++ 0, 4, 8, 12, 16, 20, 24, 28,
++ 32, 36, 40, 44, 48, 52, 56, 60,
++
++ REG_PC*4, REG_PR*4, REG_GBR*4, -1,
++ REG_MACH*4, REG_MACL*4, REG_SR*4,
++};
++
++/* Mapping between the general-purpose registers in `struct
++ sigcontext' format and GDB's register cache layout. */
++
++/* From <asm/sigcontext.h>. */
++static int sh_linux_sc_reg_offset[] =
++{
++ 4, 8, 12, 16, 20, 24, 28, 32,
++ 36, 40, 44, 48, 52, 56, 60, 64,
++ 68, 72, 80, -1,
++ 84, 88, 76
++};
++
+ static void
+ sh_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+ {
++ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
++ bfd abfd;
++
++ tdep->gregset_reg_offset = sh_linux_gregset_reg_offset;
++ tdep->gregset_num_regs = ARRAY_SIZE (sh_linux_gregset_reg_offset);
++ tdep->sizeof_gregset = 23 * 4;
++
++ tdep->jb_pc_offset = 32; /* From <bits/setjmp.h>. */
++
++ tdep->sigtramp_p = sh_linux_sigtramp_p;
++ tdep->sigcontext_addr = sh_linux_sigcontext_addr;
++ tdep->sc_reg_offset = sh_linux_sc_reg_offset;
++ tdep->sc_num_regs = ARRAY_SIZE (sh_linux_sc_reg_offset);
++
++ frame_unwind_append_unwinder(gdbarch, &sh_linux_sigtramp_frame_unwind);
++
++ /* If we have a register mapping, enable the generic core file
++ support, unless it has already been enabled. */
++ if (tdep->gregset_reg_offset
++ && !gdbarch_regset_from_core_section_p (gdbarch))
++ set_gdbarch_regset_from_core_section (gdbarch,
++ sh_linux_regset_from_core_section);
++
+ linux_init_abi (info, gdbarch);
+
+ /* GNU/Linux uses SVR4-style shared libraries. */
+diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
+index 336b48e..847b271 100644
+--- a/gdb/sh-tdep.c
++++ b/gdb/sh-tdep.c
+@@ -21,6 +21,9 @@
+ sac@cygnus.com. */
+
+ #include "defs.h"
++#include "arch-utils.h"
++#include "command.h"
++#include "dummy-frame.h"
+ #include "frame.h"
+ #include "frame-base.h"
+ #include "frame-unwind.h"
+@@ -35,6 +38,7 @@
+ #include "arch-utils.h"
+ #include "floatformat.h"
+ #include "regcache.h"
++#include "regset.h"
+ #include "doublest.h"
+ #include "osabi.h"
+ #include "reggroups.h"
+@@ -67,23 +71,6 @@ static const char *const sh_cc_enum[] = {
+
+ static const char *sh_active_calling_convention = sh_cc_gcc;
+
+-#define SH_NUM_REGS 67
+-
+-struct sh_frame_cache
+-{
+- /* Base address. */
+- CORE_ADDR base;
+- LONGEST sp_offset;
+- CORE_ADDR pc;
+-
+- /* Flag showing that a frame has been created in the prologue code. */
+- int uses_fp;
+-
+- /* Saved registers. */
+- CORE_ADDR saved_regs[SH_NUM_REGS];
+- CORE_ADDR saved_sp;
+-};
+-
+ static int
+ sh_is_renesas_calling_convention (struct type *func_type)
+ {
+@@ -1043,7 +1030,7 @@ sh_treat_as_flt_p (struct type *type)
+ return 0;
+ /* Otherwise if the type of that member is float, the whole type is
+ treated as float. */
+- if (TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_FLT)
++ if (TYPE_CODE (check_typedef (TYPE_FIELD_TYPE (type, 0))) == TYPE_CODE_FLT)
+ return 1;
+ /* Otherwise it's not treated as float. */
+ return 0;
+@@ -1093,7 +1080,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
+ in four registers available. Loop thru args from first to last. */
+ for (argnum = 0; argnum < nargs; argnum++)
+ {
+- type = value_type (args[argnum]);
++ type = check_typedef (value_type (args[argnum]));
+ len = TYPE_LENGTH (type);
+ val = sh_justify_value_in_reg (gdbarch, args[argnum], len);
+
+@@ -1821,7 +1808,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
+ reg->how = DWARF2_FRAME_REG_UNDEFINED;
+ }
+
+-static struct sh_frame_cache *
++struct sh_frame_cache *
+ sh_alloc_frame_cache (void)
+ {
+ struct sh_frame_cache *cache;
+@@ -1848,7 +1835,7 @@ sh_alloc_frame_cache (void)
+ return cache;
+ }
+
+-static struct sh_frame_cache *
++struct sh_frame_cache *
+ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
+ {
+ struct gdbarch *gdbarch = get_frame_arch (this_frame);
+@@ -1915,9 +1902,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
+ return cache;
+ }
+
+-static struct value *
+-sh_frame_prev_register (struct frame_info *this_frame,
+- void **this_cache, int regnum)
++struct value *
++sh_frame_prev_register (struct frame_info *this_frame, void **this_cache,
++ int regnum)
+ {
+ struct gdbarch *gdbarch = get_frame_arch (this_frame);
+ struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
+@@ -1931,7 +1918,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
+ the current frame. Frob regnum so that we pull the value from
+ the correct place. */
+ if (regnum == gdbarch_pc_regnum (gdbarch))
+- regnum = PR_REGNUM;
++ regnum = PR_REGNUM; /* XXX: really? */
+
+ if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
+ return frame_unwind_got_memory (this_frame, regnum,
+@@ -2240,8 +2227,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
+ static struct gdbarch *
+ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+ {
+- struct gdbarch *gdbarch;
+ struct gdbarch_tdep *tdep;
++ struct gdbarch *gdbarch;
+
+ /* SH5 is handled entirely in sh64-tdep.c. */
+ if (info.bfd_arch_info->mach == bfd_mach_sh5)
+@@ -2257,6 +2244,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+ tdep = XCNEW (struct gdbarch_tdep);
+ gdbarch = gdbarch_alloc (&info, tdep);
+
++ /* General-purpose registers. */
++ tdep->gregset = NULL;
++ tdep->gregset_reg_offset = NULL;
++ tdep->gregset_num_regs = 23;
++ tdep->sizeof_gregset = 0;
++
++ /* Floating-point registers. */
++ tdep->fpregset = NULL;
++ tdep->sizeof_fpregset = 34*4;
++
++ tdep->jb_pc_offset = -1;
++
+ set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+@@ -2407,10 +2406,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
+ break;
+ }
+
++ dwarf2_append_unwinders (gdbarch);
++
+ /* Hook in ABI-specific overrides, if they have been registered. */
+ gdbarch_init_osabi (info, gdbarch);
+
+- dwarf2_append_unwinders (gdbarch);
+ frame_unwind_append_unwinder (gdbarch, &sh_stub_unwind);
+ frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind);
+
+diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
+index 666968f..62c65b5 100644
+--- a/gdb/sh-tdep.h
++++ b/gdb/sh-tdep.h
+@@ -21,6 +21,12 @@
+
+ /* Contributed by Steve Chamberlain sac@cygnus.com. */
+
++struct frame_info;
++struct gdbarch;
++struct reggroup;
++struct regset;
++struct regcache;
++
+ /* Registers for all SH variants. Used also by sh3-rom.c. */
+ enum
+ {
+@@ -29,6 +35,7 @@ enum
+ ARG0_REGNUM = 4,
+ ARGLAST_REGNUM = 7,
+ FP_REGNUM = 14,
++ SP_REGNUM = 15,
+ PC_REGNUM = 16,
+ PR_REGNUM = 17,
+ GBR_REGNUM = 18,
+@@ -81,6 +88,24 @@ enum
+ FV0_REGNUM = 76,
+ FV_LAST_REGNUM = 79
+ };
++#define SH_NUM_REGS 67
++
++struct sh_frame_cache
++{
++ /* Base address. */
++ CORE_ADDR base;
++ LONGEST sp_offset;
++ CORE_ADDR pc;
++
++ /* Flag showing that a frame has been created in the prologue code. */
++ int uses_fp;
++
++ /* Saved registers. */
++ CORE_ADDR saved_regs[SH_NUM_REGS];
++ CORE_ADDR saved_sp;
++};
++
++extern struct sh_frame_cache *sh_frame_cache (struct frame_info *next_frame, void **this_cache);
+
+ /* This structure describes a register in a core-file. */
+ struct sh_corefile_regmap
+@@ -89,8 +114,32 @@ struct sh_corefile_regmap
+ unsigned int offset;
+ };
+
++/* sh architecture specific information. */
+ struct gdbarch_tdep
+ {
++ /* General-purpose registers. */
++ struct regset *gregset;
++ int *gregset_reg_offset;
++ int gregset_num_regs;
++ size_t sizeof_gregset;
++
++ /* Floating-point registers. */
++ struct regset *fpregset;
++ size_t sizeof_fpregset;
++
++ /* Offset of saved PC in jmp_buf. */
++ int jb_pc_offset;
++
++ /* Detect sigtramp. */
++ int (*sigtramp_p) (struct frame_info *);
++
++ /* Get address of sigcontext for sigtramp. */
++ CORE_ADDR (*sigcontext_addr) (struct frame_info *);
++
++ /* Offset of registers in `struct sigcontext'. */
++ int *sc_reg_offset;
++ int sc_num_regs;
++
+ /* Non-NULL when debugging from a core file. Provides the offset
+ where each general-purpose register is stored inside the associated
+ core file section. */
+diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
+index 6d9aef8..5b66b42 100644
+--- a/gdb/testsuite/gdb.asm/asm-source.exp
++++ b/gdb/testsuite/gdb.asm/asm-source.exp
+@@ -116,6 +116,11 @@ switch -glob -- [istarget] {
+ append link-flags " -m elf32ppc"
+ }
+ }
++ "sh*-linux*" {
++ set asm-arch sh-linux
++ set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
++ set debug-flags "-gdwarf-2"
++ }
+ "sh*-*-*" {
+ set asm-arch sh
+ set debug-flags "-gdwarf-2"
+diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc
+index a4a5fc5..89efed7 100644
+--- a/gdb/testsuite/gdb.asm/sh.inc
++++ b/gdb/testsuite/gdb.asm/sh.inc
+@@ -40,9 +40,8 @@
+ mov.l .Lconst\@,r1
+ bra .Lafterconst\@
+ nop
+- nop
+-.Lconst\@:
+ .align 2
++.Lconst\@:
+ .long \subr
+ .align 1
+ .Lafterconst\@:
+diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c
+index 424e1b8..0de2e7b 100644
+--- a/gdb/testsuite/gdb.base/annota1.c
++++ b/gdb/testsuite/gdb.base/annota1.c
+@@ -1,6 +1,9 @@
+ #include <stdio.h>
+ #include <signal.h>
+
++#ifdef __sh__
++#define signal(a,b) /* Signals not supported on this target - make them go away */
++#endif
+
+ void
+ handle_USR1 (int sig)
+diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c
+index 424e1b8..952aaf21 100644
+--- a/gdb/testsuite/gdb.base/annota3.c
++++ b/gdb/testsuite/gdb.base/annota3.c
+@@ -1,6 +1,10 @@
+ #include <stdio.h>
+ #include <signal.h>
+
++#ifdef __sh__
++#define signal(a,b) /* Signals not supported on this target - make them go away */
++#endif
++
+
+ void
+ handle_USR1 (int sig)
+diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c
+index 81f3b08..1574b2d 100644
+--- a/gdb/testsuite/gdb.base/sigall.c
++++ b/gdb/testsuite/gdb.base/sigall.c
+@@ -1,6 +1,9 @@
+ #include <signal.h>
+ #include <unistd.h>
+
++#ifdef __sh__
++#define signal(a,b) /* Signals not supported on this target - make them go away */
++#endif
+
+ /* Signal handlers, we set breakpoints in them to make sure that the
+ signals really get delivered. */
+diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c
+index 7566068..1205a9b 100644
+--- a/gdb/testsuite/gdb.base/signals.c
++++ b/gdb/testsuite/gdb.base/signals.c
+@@ -3,6 +3,10 @@
+ #include <signal.h>
+ #include <unistd.h>
+
++#ifdef __sh__
++#define signal(a,b) /* Signals not supported on this target - make them go away */
++#define alarm(a) /* Ditto for alarm() */
++#endif
+
+ static int count = 0;
+
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
new file mode 100644
index 000000000..394d26d06
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
@@ -0,0 +1,50 @@
+From f3932cb2960fd54655a448b13d5a5b80f356f8de Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Apr 2016 15:25:03 -0700
+Subject: [PATCH 06/10] Dont disable libreadline.a when using --disable-static
+
+If gdb is configured with --disable-static then this is dutifully passed to
+readline which then disables libreadline.a, which causes a problem when gdb
+tries to link against that.
+
+To ensure that readline always builds static libraries, pass --enable-static to
+the sub-configure.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.def | 3 ++-
+ Makefile.in | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.def b/Makefile.def
+index ea8453e..0fc66c6 100644
+--- a/Makefile.def
++++ b/Makefile.def
+@@ -104,7 +104,8 @@ host_modules= { module= libiconv;
+ missing= install-html;
+ missing= install-info; };
+ host_modules= { module= m4; };
+-host_modules= { module= readline; };
++host_modules= { module= readline;
++ extra_configure_flags='--enable-static';};
+ host_modules= { module= sid; };
+ host_modules= { module= sim; };
+ host_modules= { module= texinfo; no_install= true; };
+diff --git a/Makefile.in b/Makefile.in
+index 2733c4d..3e04e80 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -25380,7 +25380,7 @@ configure-readline:
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+- --target=${target_alias} \
++ --target=${target_alias} --enable-static \
+ || exit 1
+ @endif readline
+
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
new file mode 100644
index 000000000..f32f8ee41
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
@@ -0,0 +1,36 @@
+From 048675a915a72989f2613386975730da016e7c5d Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <amccurdy@gmail.com>
+Date: Sat, 30 Apr 2016 15:29:06 -0700
+Subject: [PATCH 07/10] use <asm/sgidefs.h>
+
+Build fix for MIPS with musl libc
+
+The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
+but not by musl. Regardless of the libc, the kernel headers provide
+<asm/sgidefs.h> which provides the same definitions, so use that
+instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gdb/mips-linux-nat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
+index 449b43a..09603da 100644
+--- a/gdb/mips-linux-nat.c
++++ b/gdb/mips-linux-nat.c
+@@ -31,7 +31,7 @@
+ #include "gdb_proc_service.h"
+ #include "gregset.h"
+
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+ #include "nat/gdb_ptrace.h"
+ #include <asm/ptrace.h>
+
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
new file mode 100644
index 000000000..7e58b617a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
@@ -0,0 +1,50 @@
+From e54ead9d81f4d38412751b815f909db3cb144bb1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Apr 2016 15:31:40 -0700
+Subject: [PATCH 08/10] Use exorted definitions of SIGRTMIN
+
+Define W_STOPCODE if not defined already
+
+__SIGRTMIN is internal to glibc and other libcs e.g. musl
+may not provide them
+
+Fixes
+https://sourceware.org/bugzilla/show_bug.cgi?id=13012
+
+Upstream-Status: Submitted
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gdb/linux-nat.c | 4 ++--
+ gdb/nat/linux-nat.h | 4 ++++
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
+index 0829bcb..3b8a896 100644
+--- a/gdb/linux-nat.c
++++ b/gdb/linux-nat.c
+@@ -4845,6 +4845,6 @@ lin_thread_get_thread_signals (sigset_t *set)
+ /* NPTL reserves the first two RT signals, but does not provide any
+ way for the debugger to query the signal numbers - fortunately
+ they don't change. */
+- sigaddset (set, __SIGRTMIN);
+- sigaddset (set, __SIGRTMIN + 1);
++ sigaddset (set, SIGRTMIN);
++ sigaddset (set, SIGRTMIN + 1);
+ }
+diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
+index 2b485db..d058afc 100644
+--- a/gdb/nat/linux-nat.h
++++ b/gdb/nat/linux-nat.h
+@@ -85,4 +85,8 @@ extern enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp);
+
+ extern void linux_stop_lwp (struct lwp_info *lwp);
+
++#ifndef W_STOPCODE
++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
++#endif
++
+ #endif /* LINUX_NAT_H */
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
new file mode 100644
index 000000000..a230047af
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
@@ -0,0 +1,34 @@
+From ba0bbf887d4911ccee9df57cb13eafb1de34bb31 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Apr 2016 15:35:39 -0700
+Subject: [PATCH 09/10] Change order of CFLAGS
+
+Lets us override Werror if need be
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gdb/gdbserver/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
+index 1e874e3..91e8550 100644
+--- a/gdb/gdbserver/Makefile.in
++++ b/gdb/gdbserver/Makefile.in
+@@ -138,10 +138,10 @@ CXXFLAGS = @CXXFLAGS@
+ CPPFLAGS = @CPPFLAGS@
+
+ # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
+-INTERNAL_CFLAGS_BASE = ${COMPILER_CFLAGS} ${GLOBAL_CFLAGS} \
++INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \
+ ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS}
+ INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
+-INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
++INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER
+
+ # LDFLAGS is specifically reserved for setting from the command line
+ # when running make.
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
new file mode 100644
index 000000000..16c34c703
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
@@ -0,0 +1,48 @@
+From 5a9ccb8c0728b658fc4f7f0f7b36873c64274f10 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 10 May 2016 08:47:05 -0700
+Subject: [PATCH 10/10] resolve restrict keyword conflict
+
+GCC detects that we call 'restrict' as param name in function
+signatures and complains since both params are called 'restrict'
+therefore we use __restrict to denote the C99 keywork
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gdb/gnulib/import/sys_time.in.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gdb/gnulib/import/sys_time.in.h b/gdb/gnulib/import/sys_time.in.h
+index c556c5d..2a6107f 100644
+--- a/gdb/gnulib/import/sys_time.in.h
++++ b/gdb/gnulib/import/sys_time.in.h
+@@ -93,20 +93,20 @@ struct timeval
+ # define gettimeofday rpl_gettimeofday
+ # endif
+ _GL_FUNCDECL_RPL (gettimeofday, int,
+- (struct timeval *restrict, void *restrict)
++ (struct timeval *__restrict, void *__restrict)
+ _GL_ARG_NONNULL ((1)));
+ _GL_CXXALIAS_RPL (gettimeofday, int,
+- (struct timeval *restrict, void *restrict));
++ (struct timeval *__restrict, void *__restrict));
+ # else
+ # if !@HAVE_GETTIMEOFDAY@
+ _GL_FUNCDECL_SYS (gettimeofday, int,
+- (struct timeval *restrict, void *restrict)
++ (struct timeval *__restrict, void *__restrict)
+ _GL_ARG_NONNULL ((1)));
+ # endif
+ /* Need to cast, because on glibc systems, by default, the second argument is
+ struct timezone *. */
+ _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
+- (struct timeval *restrict, void *restrict));
++ (struct timeval *__restrict, void *__restrict));
+ # endif
+ _GL_CXXALIASWARN (gettimeofday);
+ #elif defined GNULIB_POSIXCHECK
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch
new file mode 100644
index 000000000..209c4fcbd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch
@@ -0,0 +1,2601 @@
+gdb: Backport patch to support changes with AVX and MPX
+
+The current MPX target descriptions assume that MPX is always combined
+with AVX, however that's not correct. We can have machines with MPX
+and without AVX; or machines with AVX and without MPX.
+
+This patch adds new target descriptions for machines that support
+both MPX and AVX, as duplicates of the existing MPX descriptions.
+
+The following commit will remove AVX from the MPX-only descriptions.
+
+Upstream-Status: Backport
+
+Signed-off-by: bavery <brian.avery@intel.com>
+
+
+Orignal patch changelog and author attribution:
+
+2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
+
+gdb/ChangeLog:
+
+ * amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
+ New include.
+ (amd64_linux_core_read_description): Add case for
+ X86_XSTATE_AVX_MPX_MASK.
+ (_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
+ * amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
+ * amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
+ (amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
+ (_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
+ * common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
+ (X86_XSTATE_AVX_MPX_MASK): New case.
+ * features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
+ (i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
+ (i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
+ (i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
+ New expedites.
+ * i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
+ include.
+ (i386_linux_core_read_description): Add case
+ X86_XSTATE_AVX_MPX_MASK.
+ (_initialize_i386_linux_tdep): Call
+ initialize_tdesc_i386_avx_mpx_linux.
+ * i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
+ * i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
+ (i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
+ * x86-linux-nat.c (x86_linux_read_description): Add case for
+ X86_XSTATE_AVX_MPX_MASK.
+ * features/i386/amd64-avx-mpx-linux.xml: New file.
+ * features/i386/i386-avx-mpx-linux.xml: New file.
+ * features/i386/i386-avx-mpx.xml: New file.
+ * features/i386/amd64-avx-mpx.xml: New file.
+ * features/i386/amd64-avx-mpx-linux.c: Generated.
+ * features/i386/amd64-avx-mpx.c: Generated.
+ * features/i386/i386-avx-mpx-linux.c: Generated.
+ * features/i386/i386-avx-mpx.c: Generated.
+ * regformats/i386/amd64-avx-mpx-linux.dat: Generated.
+ * regformats/i386/amd64-avx-mpx.dat: Generated.
+ * regformats/i386/i386-avx-mpx-linux.dat: Generated.
+ * regformats/i386/i386-avx-mpx.dat: Generated.
+
+gdb/gdbserver/ChangeLog:
+
+ * Makefile.in (clean): Add removal for i386-avx-mpx.c,
+ i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
+ (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
+ (amd64-avx-mpx-linux.c): New rules.
+ (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
+ * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
+ (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
+ (srv_amd64_regobj): Add amd64-avx-mpx.o.
+ (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
+ (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
+ (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
+ (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
+ (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
+ (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
+ (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
+ * linux-x86-low.c (x86_linux_read_description): Add case for
+ X86_XSTATE_AVX_MPX_MASK.
+ (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
+ (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
+ init_registers_i386_avx_mpx_linux.
+ * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
+ (initialize_low_tracepoint): Call
+ init_registers_i386_avx_mpx_linux.
+ * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
+ (initialize_low_tracepoint): Call
+ init_registers_amd64_avx_mpx_linux.
+ * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
+ (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
+ (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
+ declarations.
+
+
+
+
+diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
+index 21bcd99..5327f7c 100644
+--- a/gdb/amd64-linux-tdep.c
++++ b/gdb/amd64-linux-tdep.c
+@@ -43,6 +43,7 @@
+ #include "features/i386/amd64-linux.c"
+ #include "features/i386/amd64-avx-linux.c"
+ #include "features/i386/amd64-mpx-linux.c"
++#include "features/i386/amd64-avx-mpx-linux.c"
+ #include "features/i386/amd64-avx512-linux.c"
+
+ #include "features/i386/x32-linux.c"
+@@ -1590,6 +1591,11 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch,
+ return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */
+ else
+ return tdesc_amd64_mpx_linux;
++ case X86_XSTATE_AVX_MPX_MASK:
++ if (gdbarch_ptr_bit (gdbarch) == 32)
++ return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */
++ else
++ return tdesc_amd64_avx_mpx_linux;
+ case X86_XSTATE_AVX_MASK:
+ if (gdbarch_ptr_bit (gdbarch) == 32)
+ return tdesc_x32_avx_linux;
+@@ -2285,6 +2291,7 @@ _initialize_amd64_linux_tdep (void)
+ initialize_tdesc_amd64_linux ();
+ initialize_tdesc_amd64_avx_linux ();
+ initialize_tdesc_amd64_mpx_linux ();
++ initialize_tdesc_amd64_avx_mpx_linux ();
+ initialize_tdesc_amd64_avx512_linux ();
+
+ initialize_tdesc_x32_linux ();
+diff --git a/gdb/amd64-linux-tdep.h b/gdb/amd64-linux-tdep.h
+index 8673442..d64d5d6 100644
+--- a/gdb/amd64-linux-tdep.h
++++ b/gdb/amd64-linux-tdep.h
+@@ -35,6 +35,7 @@
+ extern struct target_desc *tdesc_amd64_linux;
+ extern struct target_desc *tdesc_amd64_avx_linux;
+ extern struct target_desc *tdesc_amd64_mpx_linux;
++extern struct target_desc *tdesc_amd64_avx_mpx_linux;
+ extern struct target_desc *tdesc_amd64_avx512_linux;
+
+ extern struct target_desc *tdesc_x32_linux;
+diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
+index fae92b2..88e3bf8 100644
+--- a/gdb/amd64-tdep.c
++++ b/gdb/amd64-tdep.c
+@@ -44,6 +44,7 @@
+ #include "features/i386/amd64.c"
+ #include "features/i386/amd64-avx.c"
+ #include "features/i386/amd64-mpx.c"
++#include "features/i386/amd64-avx-mpx.c"
+ #include "features/i386/amd64-avx512.c"
+
+ #include "features/i386/x32.c"
+@@ -3132,6 +3133,8 @@ amd64_target_description (uint64_t xcr0)
+ return tdesc_amd64_avx512;
+ case X86_XSTATE_MPX_MASK:
+ return tdesc_amd64_mpx;
++ case X86_XSTATE_AVX_MPX_MASK:
++ return tdesc_amd64_avx_mpx;
+ case X86_XSTATE_AVX_MASK:
+ return tdesc_amd64_avx;
+ default:
+@@ -3148,6 +3151,7 @@ _initialize_amd64_tdep (void)
+ initialize_tdesc_amd64 ();
+ initialize_tdesc_amd64_avx ();
+ initialize_tdesc_amd64_mpx ();
++ initialize_tdesc_amd64_avx_mpx ();
+ initialize_tdesc_amd64_avx512 ();
+
+ initialize_tdesc_x32 ();
+diff --git a/gdb/common/x86-xstate.h b/gdb/common/x86-xstate.h
+index 8386420..0aa9164 100644
+--- a/gdb/common/x86-xstate.h
++++ b/gdb/common/x86-xstate.h
+@@ -39,9 +39,10 @@
+ #define X86_XSTATE_X87_MASK X86_XSTATE_X87
+ #define X86_XSTATE_SSE_MASK (X86_XSTATE_X87 | X86_XSTATE_SSE)
+ #define X86_XSTATE_AVX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_AVX)
+-#define X86_XSTATE_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
++#define X86_XSTATE_MPX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_MPX)
++#define X86_XSTATE_AVX_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
+ #define X86_XSTATE_AVX512_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_AVX512)
+-#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_MPX_MASK | X86_XSTATE_AVX512)
++#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_AVX_MPX_MASK | X86_XSTATE_AVX512)
+
+ #define X86_XSTATE_ALL_MASK (X86_XSTATE_MPX_AVX512_MASK)
+
+diff --git a/gdb/features/Makefile b/gdb/features/Makefile
+index 10173cf..e5c5154 100644
+--- a/gdb/features/Makefile
++++ b/gdb/features/Makefile
+@@ -50,9 +50,11 @@ WHICH = aarch64 \
+ i386/amd64 i386/amd64-linux \
+ i386/i386-avx i386/i386-avx-linux \
+ i386/i386-mpx i386/i386-mpx-linux \
++ i386/i386-avx-mpx i386/i386-avx-mpx-linux \
+ i386/i386-avx512 i386/i386-avx512-linux \
+ i386/amd64-avx i386/amd64-avx-linux \
+ i386/amd64-mpx i386/amd64-mpx-linux \
++ i386/amd64-avx-mpx i386/amd64-avx-mpx-linux \
+ i386/amd64-avx512 i386/amd64-avx512-linux \
+ i386/x32 i386/x32-linux \
+ i386/x32-avx i386/x32-avx-linux \
+@@ -83,7 +85,9 @@ i386/amd64-linux-expedite = rbp,rsp,rip
+ i386/i386-avx-expedite = ebp,esp,eip
+ i386/i386-avx-linux-expedite = ebp,esp,eip
+ i386/i386-mpx-expedite = ebp,esp,eip
++i386/i386-avx-mpx-expedite = ebp,esp,eip
+ i386/i386-mpx-linux-expedite = ebp,esp,eip
++i386/i386-avx-mpx-linux-expedite = ebp,esp,eip
+ i386/i386-avx512-expedite = ebp,esp,eip
+ i386/i386-avx512-linux-expedite = ebp,esp,eip
+ i386/i386-mmx-expedite = ebp,esp,eip
+@@ -91,7 +95,9 @@ i386/i386-mmx-linux-expedite = ebp,esp,eip
+ i386/amd64-avx-expedite = rbp,rsp,rip
+ i386/amd64-avx-linux-expedite = rbp,rsp,rip
+ i386/amd64-mpx-expedite = rbp,rsp,rip
++i386/amd64-avx-mpx-expedite = rbp,rsp,rip
+ i386/amd64-mpx-linux-expedite = rbp,rsp,rip
++i386/amd64-avx-mpx-linux-expedite = rbp,rsp,rip
+ i386/amd64-avx512-expedite = rbp,rsp,rip
+ i386/amd64-avx512-linux-expedite = rbp,rsp,rip
+ i386/x32-expedite = rbp,rsp,rip
+@@ -156,6 +162,8 @@ XMLTOC = \
+ i386/amd64-linux.xml \
+ i386/amd64-mpx-linux.xml \
+ i386/amd64-mpx.xml \
++ i386/amd64-avx-mpx-linux.xml \
++ i386/amd64-avx-mpx.xml \
+ i386/amd64.xml \
+ i386/i386-avx-linux.xml \
+ i386/i386-avx.xml \
+@@ -166,6 +174,8 @@ XMLTOC = \
+ i386/i386-mmx.xml \
+ i386/i386-mpx-linux.xml \
+ i386/i386-mpx.xml \
++ i386/i386-avx-mpx-linux.xml \
++ i386/i386-avx-mpx.xml \
+ i386/i386.xml \
+ i386/x32-avx-linux.xml \
+ i386/x32-avx.xml \
+@@ -271,6 +281,10 @@ $(outdir)/i386/i386-mpx.dat: i386/32bit-core.xml i386/32bit-avx.xml \
+ i386/32bit-mpx.xml
+ $(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
+ i386/32bit-linux.xml i386/32bit-mpx.xml
++$(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml \
++ i386/32bit-linux.xml i386/32bit-mpx.xml
++$(outdir)/i386/i386-avx-mpx-linux.dat: i386/32bit-core.xml \
++ i386/32bit-linux.xml i386/32bit-mpx.xml
+ $(outdir)/i386/i386-avx512.dat: i386/32bit-core.xml i386/32bit-avx.xml \
+ i386/32bit-mpx.xml i386/32bit-avx512.xml
+ $(outdir)/i386/i386-avx512-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
+@@ -282,8 +296,12 @@ $(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
+ i386/64bit-linux.xml
+ $(outdir)/i386/amd64-mpx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
+ i386/64bit-linux.xml i386/64bit-mpx.xml
++$(outdir)/i386/amd64-avx-mpx-linux.dat: i386/64bit-core.xml \
++ i386/64bit-linux.xml i386/64bit-mpx.xml
+ $(outdir)/i386/amd64-mpx.dat: i386/64bit-core.xml i386/64bit-avx.xml \
+ i386/64bit-mpx.xml
++$(outdir)/i386/amd64-avx-mpx.dat: i386/64bit-core.xml \
++ i386/64bit-mpx.xml
+ $(outdir)/i386/amd64-avx512.dat: i386/64bit-core.xml i386/64bit-avx.xml \
+ i386/64bit-mpx.xml i386/64bit-avx512.xml
+ $(outdir)/i386/amd64-avx512-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
+diff --git a/gdb/features/i386/amd64-avx-mpx-linux.c b/gdb/features/i386/amd64-avx-mpx-linux.c
+new file mode 100644
+index 0000000..37b4c81
+--- /dev/null
++++ b/gdb/features/i386/amd64-avx-mpx-linux.c
+@@ -0,0 +1,211 @@
++/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
++ Original: amd64-avx-mpx-linux.xml */
++
++#include "defs.h"
++#include "osabi.h"
++#include "target-descriptions.h"
++
++struct target_desc *tdesc_amd64_avx_mpx_linux;
++static void
++initialize_tdesc_amd64_avx_mpx_linux (void)
++{
++ struct target_desc *result = allocate_target_description ();
++ struct tdesc_feature *feature;
++ struct tdesc_type *field_type;
++ struct tdesc_type *type;
++
++ set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
++
++ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
++ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
++ tdesc_add_flag (field_type, 0, "CF");
++ tdesc_add_flag (field_type, 1, "");
++ tdesc_add_flag (field_type, 2, "PF");
++ tdesc_add_flag (field_type, 4, "AF");
++ tdesc_add_flag (field_type, 6, "ZF");
++ tdesc_add_flag (field_type, 7, "SF");
++ tdesc_add_flag (field_type, 8, "TF");
++ tdesc_add_flag (field_type, 9, "IF");
++ tdesc_add_flag (field_type, 10, "DF");
++ tdesc_add_flag (field_type, 11, "OF");
++ tdesc_add_flag (field_type, 14, "NT");
++ tdesc_add_flag (field_type, 16, "RF");
++ tdesc_add_flag (field_type, 17, "VM");
++ tdesc_add_flag (field_type, 18, "AC");
++ tdesc_add_flag (field_type, 19, "VIF");
++ tdesc_add_flag (field_type, 20, "VIP");
++ tdesc_add_flag (field_type, 21, "ID");
++
++ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
++ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
++ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
++ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
++ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
++ field_type = tdesc_named_type (feature, "ieee_single");
++ tdesc_create_vector (feature, "v4f", field_type, 4);
++
++ field_type = tdesc_named_type (feature, "ieee_double");
++ tdesc_create_vector (feature, "v2d", field_type, 2);
++
++ field_type = tdesc_named_type (feature, "int8");
++ tdesc_create_vector (feature, "v16i8", field_type, 16);
++
++ field_type = tdesc_named_type (feature, "int16");
++ tdesc_create_vector (feature, "v8i16", field_type, 8);
++
++ field_type = tdesc_named_type (feature, "int32");
++ tdesc_create_vector (feature, "v4i32", field_type, 4);
++
++ field_type = tdesc_named_type (feature, "int64");
++ tdesc_create_vector (feature, "v2i64", field_type, 2);
++
++ type = tdesc_create_union (feature, "vec128");
++ field_type = tdesc_named_type (feature, "v4f");
++ tdesc_add_field (type, "v4_float", field_type);
++ field_type = tdesc_named_type (feature, "v2d");
++ tdesc_add_field (type, "v2_double", field_type);
++ field_type = tdesc_named_type (feature, "v16i8");
++ tdesc_add_field (type, "v16_int8", field_type);
++ field_type = tdesc_named_type (feature, "v8i16");
++ tdesc_add_field (type, "v8_int16", field_type);
++ field_type = tdesc_named_type (feature, "v4i32");
++ tdesc_add_field (type, "v4_int32", field_type);
++ field_type = tdesc_named_type (feature, "v2i64");
++ tdesc_add_field (type, "v2_int64", field_type);
++ field_type = tdesc_named_type (feature, "uint128");
++ tdesc_add_field (type, "uint128", field_type);
++
++ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
++ tdesc_add_flag (field_type, 0, "IE");
++ tdesc_add_flag (field_type, 1, "DE");
++ tdesc_add_flag (field_type, 2, "ZE");
++ tdesc_add_flag (field_type, 3, "OE");
++ tdesc_add_flag (field_type, 4, "UE");
++ tdesc_add_flag (field_type, 5, "PE");
++ tdesc_add_flag (field_type, 6, "DAZ");
++ tdesc_add_flag (field_type, 7, "IM");
++ tdesc_add_flag (field_type, 8, "DM");
++ tdesc_add_flag (field_type, 9, "ZM");
++ tdesc_add_flag (field_type, 10, "OM");
++ tdesc_add_flag (field_type, 11, "UM");
++ tdesc_add_flag (field_type, 12, "PM");
++ tdesc_add_flag (field_type, 15, "FZ");
++
++ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
++ tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
++ tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
++ type = tdesc_create_struct (feature, "br128");
++ field_type = tdesc_named_type (feature, "uint64");
++ tdesc_add_field (type, "lbound", field_type);
++ field_type = tdesc_named_type (feature, "uint64");
++ tdesc_add_field (type, "ubound_raw", field_type);
++
++ type = tdesc_create_struct (feature, "_bndstatus");
++ tdesc_set_struct_size (type, 8);
++ tdesc_add_bitfield (type, "bde", 2, 63);
++ tdesc_add_bitfield (type, "error", 0, 1);
++
++ type = tdesc_create_union (feature, "status");
++ field_type = tdesc_named_type (feature, "data_ptr");
++ tdesc_add_field (type, "raw", field_type);
++ field_type = tdesc_named_type (feature, "_bndstatus");
++ tdesc_add_field (type, "status", field_type);
++
++ type = tdesc_create_struct (feature, "_bndcfgu");
++ tdesc_set_struct_size (type, 8);
++ tdesc_add_bitfield (type, "base", 12, 63);
++ tdesc_add_bitfield (type, "reserved", 2, 11);
++ tdesc_add_bitfield (type, "preserved", 1, 1);
++ tdesc_add_bitfield (type, "enabled", 0, 0);
++
++ type = tdesc_create_union (feature, "cfgu");
++ field_type = tdesc_named_type (feature, "data_ptr");
++ tdesc_add_field (type, "raw", field_type);
++ field_type = tdesc_named_type (feature, "_bndcfgu");
++ tdesc_add_field (type, "config", field_type);
++
++ tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
++ tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
++
++ tdesc_amd64_avx_mpx_linux = result;
++}
+diff --git a/gdb/features/i386/amd64-avx-mpx-linux.xml b/gdb/features/i386/amd64-avx-mpx-linux.xml
+new file mode 100644
+index 0000000..526c700
+--- /dev/null
++++ b/gdb/features/i386/amd64-avx-mpx-linux.xml
+@@ -0,0 +1,19 @@
++<?xml version="1.0"?>
++<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
++
++ Copying and distribution of this file, with or without modification,
++ are permitted in any medium without royalty provided the copyright
++ notice and this notice are preserved. -->
++
++<!-- AMD64 with AVX and MPX - Includes Linux-only special "register". -->
++
++<!DOCTYPE target SYSTEM "gdb-target.dtd">
++<target>
++ <architecture>i386:x86-64</architecture>
++ <osabi>GNU/Linux</osabi>
++ <xi:include href="64bit-core.xml"/>
++ <xi:include href="64bit-sse.xml"/>
++ <xi:include href="64bit-linux.xml"/>
++ <xi:include href="64bit-avx.xml"/>
++ <xi:include href="64bit-mpx.xml"/>
++</target>
+diff --git a/gdb/features/i386/amd64-avx-mpx.c b/gdb/features/i386/amd64-avx-mpx.c
+new file mode 100644
+index 0000000..1279f73
+--- /dev/null
++++ b/gdb/features/i386/amd64-avx-mpx.c
+@@ -0,0 +1,206 @@
++/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
++ Original: amd64-avx-mpx.xml */
++
++#include "defs.h"
++#include "osabi.h"
++#include "target-descriptions.h"
++
++struct target_desc *tdesc_amd64_avx_mpx;
++static void
++initialize_tdesc_amd64_avx_mpx (void)
++{
++ struct target_desc *result = allocate_target_description ();
++ struct tdesc_feature *feature;
++ struct tdesc_type *field_type;
++ struct tdesc_type *type;
++
++ set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
++ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
++ tdesc_add_flag (field_type, 0, "CF");
++ tdesc_add_flag (field_type, 1, "");
++ tdesc_add_flag (field_type, 2, "PF");
++ tdesc_add_flag (field_type, 4, "AF");
++ tdesc_add_flag (field_type, 6, "ZF");
++ tdesc_add_flag (field_type, 7, "SF");
++ tdesc_add_flag (field_type, 8, "TF");
++ tdesc_add_flag (field_type, 9, "IF");
++ tdesc_add_flag (field_type, 10, "DF");
++ tdesc_add_flag (field_type, 11, "OF");
++ tdesc_add_flag (field_type, 14, "NT");
++ tdesc_add_flag (field_type, 16, "RF");
++ tdesc_add_flag (field_type, 17, "VM");
++ tdesc_add_flag (field_type, 18, "AC");
++ tdesc_add_flag (field_type, 19, "VIF");
++ tdesc_add_flag (field_type, 20, "VIP");
++ tdesc_add_flag (field_type, 21, "ID");
++
++ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
++ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
++ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
++ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
++ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
++ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
++ field_type = tdesc_named_type (feature, "ieee_single");
++ tdesc_create_vector (feature, "v4f", field_type, 4);
++
++ field_type = tdesc_named_type (feature, "ieee_double");
++ tdesc_create_vector (feature, "v2d", field_type, 2);
++
++ field_type = tdesc_named_type (feature, "int8");
++ tdesc_create_vector (feature, "v16i8", field_type, 16);
++
++ field_type = tdesc_named_type (feature, "int16");
++ tdesc_create_vector (feature, "v8i16", field_type, 8);
++
++ field_type = tdesc_named_type (feature, "int32");
++ tdesc_create_vector (feature, "v4i32", field_type, 4);
++
++ field_type = tdesc_named_type (feature, "int64");
++ tdesc_create_vector (feature, "v2i64", field_type, 2);
++
++ type = tdesc_create_union (feature, "vec128");
++ field_type = tdesc_named_type (feature, "v4f");
++ tdesc_add_field (type, "v4_float", field_type);
++ field_type = tdesc_named_type (feature, "v2d");
++ tdesc_add_field (type, "v2_double", field_type);
++ field_type = tdesc_named_type (feature, "v16i8");
++ tdesc_add_field (type, "v16_int8", field_type);
++ field_type = tdesc_named_type (feature, "v8i16");
++ tdesc_add_field (type, "v8_int16", field_type);
++ field_type = tdesc_named_type (feature, "v4i32");
++ tdesc_add_field (type, "v4_int32", field_type);
++ field_type = tdesc_named_type (feature, "v2i64");
++ tdesc_add_field (type, "v2_int64", field_type);
++ field_type = tdesc_named_type (feature, "uint128");
++ tdesc_add_field (type, "uint128", field_type);
++
++ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
++ tdesc_add_flag (field_type, 0, "IE");
++ tdesc_add_flag (field_type, 1, "DE");
++ tdesc_add_flag (field_type, 2, "ZE");
++ tdesc_add_flag (field_type, 3, "OE");
++ tdesc_add_flag (field_type, 4, "UE");
++ tdesc_add_flag (field_type, 5, "PE");
++ tdesc_add_flag (field_type, 6, "DAZ");
++ tdesc_add_flag (field_type, 7, "IM");
++ tdesc_add_flag (field_type, 8, "DM");
++ tdesc_add_flag (field_type, 9, "ZM");
++ tdesc_add_flag (field_type, 10, "OM");
++ tdesc_add_flag (field_type, 11, "UM");
++ tdesc_add_flag (field_type, 12, "PM");
++ tdesc_add_flag (field_type, 15, "FZ");
++
++ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
++ tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
++ type = tdesc_create_struct (feature, "br128");
++ field_type = tdesc_named_type (feature, "uint64");
++ tdesc_add_field (type, "lbound", field_type);
++ field_type = tdesc_named_type (feature, "uint64");
++ tdesc_add_field (type, "ubound_raw", field_type);
++
++ type = tdesc_create_struct (feature, "_bndstatus");
++ tdesc_set_struct_size (type, 8);
++ tdesc_add_bitfield (type, "bde", 2, 63);
++ tdesc_add_bitfield (type, "error", 0, 1);
++
++ type = tdesc_create_union (feature, "status");
++ field_type = tdesc_named_type (feature, "data_ptr");
++ tdesc_add_field (type, "raw", field_type);
++ field_type = tdesc_named_type (feature, "_bndstatus");
++ tdesc_add_field (type, "status", field_type);
++
++ type = tdesc_create_struct (feature, "_bndcfgu");
++ tdesc_set_struct_size (type, 8);
++ tdesc_add_bitfield (type, "base", 12, 63);
++ tdesc_add_bitfield (type, "reserved", 2, 11);
++ tdesc_add_bitfield (type, "preserved", 1, 1);
++ tdesc_add_bitfield (type, "enabled", 0, 0);
++
++ type = tdesc_create_union (feature, "cfgu");
++ field_type = tdesc_named_type (feature, "data_ptr");
++ tdesc_add_field (type, "raw", field_type);
++ field_type = tdesc_named_type (feature, "_bndcfgu");
++ tdesc_add_field (type, "config", field_type);
++
++ tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
++ tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
++
++ tdesc_amd64_avx_mpx = result;
++}
+diff --git a/gdb/features/i386/amd64-avx-mpx.xml b/gdb/features/i386/amd64-avx-mpx.xml
+new file mode 100644
+index 0000000..3eea6dd
+--- /dev/null
++++ b/gdb/features/i386/amd64-avx-mpx.xml
+@@ -0,0 +1,17 @@
++<?xml version="1.0"?>
++<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
++
++ Copying and distribution of this file, with or without modification,
++ are permitted in any medium without royalty provided the copyright
++ notice and this notice are preserved. -->
++
++<!-- AMD64 with AVX and MPX -->
++
++<!DOCTYPE target SYSTEM "gdb-target.dtd">
++<target>
++ <architecture>i386:x86-64</architecture>
++ <xi:include href="64bit-core.xml"/>
++ <xi:include href="64bit-sse.xml"/>
++ <xi:include href="64bit-avx.xml"/>
++ <xi:include href="64bit-mpx.xml"/>
++</target>
+diff --git a/gdb/features/i386/amd64-mpx-linux.c b/gdb/features/i386/amd64-mpx-linux.c
+index 86a1774..5c1584b 100644
+--- a/gdb/features/i386/amd64-mpx-linux.c
++++ b/gdb/features/i386/amd64-mpx-linux.c
+@@ -151,24 +151,6 @@ initialize_tdesc_amd64_mpx_linux (void)
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+ tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
+
+- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+- tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
+-
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+ type = tdesc_create_struct (feature, "br128");
+ field_type = tdesc_named_type (feature, "uint64");
+@@ -200,12 +182,12 @@ initialize_tdesc_amd64_mpx_linux (void)
+ field_type = tdesc_named_type (feature, "_bndcfgu");
+ tdesc_add_field (type, "config", field_type);
+
+- tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
+- tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
++ tdesc_create_reg (feature, "bnd0raw", 58, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd1raw", 59, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd2raw", 60, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd3raw", 61, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bndcfgu", 62, 1, NULL, 64, "cfgu");
++ tdesc_create_reg (feature, "bndstatus", 63, 1, NULL, 64, "status");
+
+ tdesc_amd64_mpx_linux = result;
+ }
+diff --git a/gdb/features/i386/amd64-mpx-linux.xml b/gdb/features/i386/amd64-mpx-linux.xml
+index 15e87b4..835126b 100644
+--- a/gdb/features/i386/amd64-mpx-linux.xml
++++ b/gdb/features/i386/amd64-mpx-linux.xml
+@@ -14,6 +14,5 @@
+ <xi:include href="64bit-core.xml"/>
+ <xi:include href="64bit-sse.xml"/>
+ <xi:include href="64bit-linux.xml"/>
+- <xi:include href="64bit-avx.xml"/>
+ <xi:include href="64bit-mpx.xml"/>
+ </target>
+diff --git a/gdb/features/i386/amd64-mpx.c b/gdb/features/i386/amd64-mpx.c
+index 15ae5f7..4c852ef 100644
+--- a/gdb/features/i386/amd64-mpx.c
++++ b/gdb/features/i386/amd64-mpx.c
+@@ -146,24 +146,6 @@ initialize_tdesc_amd64_mpx (void)
+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+- tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
+-
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+ type = tdesc_create_struct (feature, "br128");
+ field_type = tdesc_named_type (feature, "uint64");
+@@ -195,12 +177,12 @@ initialize_tdesc_amd64_mpx (void)
+ field_type = tdesc_named_type (feature, "_bndcfgu");
+ tdesc_add_field (type, "config", field_type);
+
+- tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
+- tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
++ tdesc_create_reg (feature, "bnd0raw", 57, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd1raw", 58, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd2raw", 59, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd3raw", 60, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bndcfgu", 61, 1, NULL, 64, "cfgu");
++ tdesc_create_reg (feature, "bndstatus", 62, 1, NULL, 64, "status");
+
+ tdesc_amd64_mpx = result;
+ }
+diff --git a/gdb/features/i386/amd64-mpx.xml b/gdb/features/i386/amd64-mpx.xml
+index 21b6df3..e458736 100644
+--- a/gdb/features/i386/amd64-mpx.xml
++++ b/gdb/features/i386/amd64-mpx.xml
+@@ -12,6 +12,5 @@
+ <architecture>i386:x86-64</architecture>
+ <xi:include href="64bit-core.xml"/>
+ <xi:include href="64bit-sse.xml"/>
+- <xi:include href="64bit-avx.xml"/>
+ <xi:include href="64bit-mpx.xml"/>
+ </target>
+diff --git a/gdb/features/i386/i386-avx-mpx-linux.c b/gdb/features/i386/i386-avx-mpx-linux.c
+new file mode 100644
+index 0000000..dd75403
+--- /dev/null
++++ b/gdb/features/i386/i386-avx-mpx-linux.c
+@@ -0,0 +1,187 @@
++/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
++ Original: i386-avx-mpx-linux.xml */
++
++#include "defs.h"
++#include "osabi.h"
++#include "target-descriptions.h"
++
++struct target_desc *tdesc_i386_avx_mpx_linux;
++static void
++initialize_tdesc_i386_avx_mpx_linux (void)
++{
++ struct target_desc *result = allocate_target_description ();
++ struct tdesc_feature *feature;
++ struct tdesc_type *field_type;
++ struct tdesc_type *type;
++
++ set_tdesc_architecture (result, bfd_scan_arch ("i386"));
++
++ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
++ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
++ tdesc_add_flag (field_type, 0, "CF");
++ tdesc_add_flag (field_type, 1, "");
++ tdesc_add_flag (field_type, 2, "PF");
++ tdesc_add_flag (field_type, 4, "AF");
++ tdesc_add_flag (field_type, 6, "ZF");
++ tdesc_add_flag (field_type, 7, "SF");
++ tdesc_add_flag (field_type, 8, "TF");
++ tdesc_add_flag (field_type, 9, "IF");
++ tdesc_add_flag (field_type, 10, "DF");
++ tdesc_add_flag (field_type, 11, "OF");
++ tdesc_add_flag (field_type, 14, "NT");
++ tdesc_add_flag (field_type, 16, "RF");
++ tdesc_add_flag (field_type, 17, "VM");
++ tdesc_add_flag (field_type, 18, "AC");
++ tdesc_add_flag (field_type, 19, "VIF");
++ tdesc_add_flag (field_type, 20, "VIP");
++ tdesc_add_flag (field_type, 21, "ID");
++
++ tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
++ tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
++ tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
++ tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
++ tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
++ field_type = tdesc_named_type (feature, "ieee_single");
++ tdesc_create_vector (feature, "v4f", field_type, 4);
++
++ field_type = tdesc_named_type (feature, "ieee_double");
++ tdesc_create_vector (feature, "v2d", field_type, 2);
++
++ field_type = tdesc_named_type (feature, "int8");
++ tdesc_create_vector (feature, "v16i8", field_type, 16);
++
++ field_type = tdesc_named_type (feature, "int16");
++ tdesc_create_vector (feature, "v8i16", field_type, 8);
++
++ field_type = tdesc_named_type (feature, "int32");
++ tdesc_create_vector (feature, "v4i32", field_type, 4);
++
++ field_type = tdesc_named_type (feature, "int64");
++ tdesc_create_vector (feature, "v2i64", field_type, 2);
++
++ type = tdesc_create_union (feature, "vec128");
++ field_type = tdesc_named_type (feature, "v4f");
++ tdesc_add_field (type, "v4_float", field_type);
++ field_type = tdesc_named_type (feature, "v2d");
++ tdesc_add_field (type, "v2_double", field_type);
++ field_type = tdesc_named_type (feature, "v16i8");
++ tdesc_add_field (type, "v16_int8", field_type);
++ field_type = tdesc_named_type (feature, "v8i16");
++ tdesc_add_field (type, "v8_int16", field_type);
++ field_type = tdesc_named_type (feature, "v4i32");
++ tdesc_add_field (type, "v4_int32", field_type);
++ field_type = tdesc_named_type (feature, "v2i64");
++ tdesc_add_field (type, "v2_int64", field_type);
++ field_type = tdesc_named_type (feature, "uint128");
++ tdesc_add_field (type, "uint128", field_type);
++
++ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
++ tdesc_add_flag (field_type, 0, "IE");
++ tdesc_add_flag (field_type, 1, "DE");
++ tdesc_add_flag (field_type, 2, "ZE");
++ tdesc_add_flag (field_type, 3, "OE");
++ tdesc_add_flag (field_type, 4, "UE");
++ tdesc_add_flag (field_type, 5, "PE");
++ tdesc_add_flag (field_type, 6, "DAZ");
++ tdesc_add_flag (field_type, 7, "IM");
++ tdesc_add_flag (field_type, 8, "DM");
++ tdesc_add_flag (field_type, 9, "ZM");
++ tdesc_add_flag (field_type, 10, "OM");
++ tdesc_add_flag (field_type, 11, "UM");
++ tdesc_add_flag (field_type, 12, "PM");
++ tdesc_add_flag (field_type, 15, "FZ");
++
++ tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
++ tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
++ tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
++ type = tdesc_create_struct (feature, "br128");
++ field_type = tdesc_named_type (feature, "uint64");
++ tdesc_add_field (type, "lbound", field_type);
++ field_type = tdesc_named_type (feature, "uint64");
++ tdesc_add_field (type, "ubound_raw", field_type);
++
++ type = tdesc_create_struct (feature, "_bndstatus");
++ tdesc_set_struct_size (type, 8);
++ tdesc_add_bitfield (type, "bde", 2, 31);
++ tdesc_add_bitfield (type, "error", 0, 1);
++
++ type = tdesc_create_union (feature, "status");
++ field_type = tdesc_named_type (feature, "data_ptr");
++ tdesc_add_field (type, "raw", field_type);
++ field_type = tdesc_named_type (feature, "_bndstatus");
++ tdesc_add_field (type, "status", field_type);
++
++ type = tdesc_create_struct (feature, "_bndcfgu");
++ tdesc_set_struct_size (type, 8);
++ tdesc_add_bitfield (type, "base", 12, 31);
++ tdesc_add_bitfield (type, "reserved", 2, 11);
++ tdesc_add_bitfield (type, "preserved", 1, 1);
++ tdesc_add_bitfield (type, "enabled", 0, 1);
++
++ type = tdesc_create_union (feature, "cfgu");
++ field_type = tdesc_named_type (feature, "data_ptr");
++ tdesc_add_field (type, "raw", field_type);
++ field_type = tdesc_named_type (feature, "_bndcfgu");
++ tdesc_add_field (type, "config", field_type);
++
++ tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
++ tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
++
++ tdesc_i386_avx_mpx_linux = result;
++}
+diff --git a/gdb/features/i386/i386-avx-mpx-linux.xml b/gdb/features/i386/i386-avx-mpx-linux.xml
+new file mode 100644
+index 0000000..c9a1a61
+--- /dev/null
++++ b/gdb/features/i386/i386-avx-mpx-linux.xml
+@@ -0,0 +1,19 @@
++<?xml version="1.0"?>
++<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
++
++ Copying and distribution of this file, with or without modification,
++ are permitted in any medium without royalty provided the copyright
++ notice and this notice are preserved. -->
++
++<!-- I386 with AVX and MPX- Includes Linux-only special "register". -->
++
++<!DOCTYPE target SYSTEM "gdb-target.dtd">
++<target>
++ <architecture>i386</architecture>
++ <osabi>GNU/Linux</osabi>
++ <xi:include href="32bit-core.xml"/>
++ <xi:include href="32bit-sse.xml"/>
++ <xi:include href="32bit-linux.xml"/>
++ <xi:include href="32bit-avx.xml"/>
++ <xi:include href="32bit-mpx.xml"/>
++</target>
+diff --git a/gdb/features/i386/i386-avx-mpx.c b/gdb/features/i386/i386-avx-mpx.c
+new file mode 100644
+index 0000000..f104e4b
+--- /dev/null
++++ b/gdb/features/i386/i386-avx-mpx.c
+@@ -0,0 +1,182 @@
++/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
++ Original: i386-avx-mpx.xml */
++
++#include "defs.h"
++#include "osabi.h"
++#include "target-descriptions.h"
++
++struct target_desc *tdesc_i386_avx_mpx;
++static void
++initialize_tdesc_i386_avx_mpx (void)
++{
++ struct target_desc *result = allocate_target_description ();
++ struct tdesc_feature *feature;
++ struct tdesc_type *field_type;
++ struct tdesc_type *type;
++
++ set_tdesc_architecture (result, bfd_scan_arch ("i386"));
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
++ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
++ tdesc_add_flag (field_type, 0, "CF");
++ tdesc_add_flag (field_type, 1, "");
++ tdesc_add_flag (field_type, 2, "PF");
++ tdesc_add_flag (field_type, 4, "AF");
++ tdesc_add_flag (field_type, 6, "ZF");
++ tdesc_add_flag (field_type, 7, "SF");
++ tdesc_add_flag (field_type, 8, "TF");
++ tdesc_add_flag (field_type, 9, "IF");
++ tdesc_add_flag (field_type, 10, "DF");
++ tdesc_add_flag (field_type, 11, "OF");
++ tdesc_add_flag (field_type, 14, "NT");
++ tdesc_add_flag (field_type, 16, "RF");
++ tdesc_add_flag (field_type, 17, "VM");
++ tdesc_add_flag (field_type, 18, "AC");
++ tdesc_add_flag (field_type, 19, "VIF");
++ tdesc_add_flag (field_type, 20, "VIP");
++ tdesc_add_flag (field_type, 21, "ID");
++
++ tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
++ tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
++ tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
++ tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
++ tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
++ tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
++ tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
++ tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
++ field_type = tdesc_named_type (feature, "ieee_single");
++ tdesc_create_vector (feature, "v4f", field_type, 4);
++
++ field_type = tdesc_named_type (feature, "ieee_double");
++ tdesc_create_vector (feature, "v2d", field_type, 2);
++
++ field_type = tdesc_named_type (feature, "int8");
++ tdesc_create_vector (feature, "v16i8", field_type, 16);
++
++ field_type = tdesc_named_type (feature, "int16");
++ tdesc_create_vector (feature, "v8i16", field_type, 8);
++
++ field_type = tdesc_named_type (feature, "int32");
++ tdesc_create_vector (feature, "v4i32", field_type, 4);
++
++ field_type = tdesc_named_type (feature, "int64");
++ tdesc_create_vector (feature, "v2i64", field_type, 2);
++
++ type = tdesc_create_union (feature, "vec128");
++ field_type = tdesc_named_type (feature, "v4f");
++ tdesc_add_field (type, "v4_float", field_type);
++ field_type = tdesc_named_type (feature, "v2d");
++ tdesc_add_field (type, "v2_double", field_type);
++ field_type = tdesc_named_type (feature, "v16i8");
++ tdesc_add_field (type, "v16_int8", field_type);
++ field_type = tdesc_named_type (feature, "v8i16");
++ tdesc_add_field (type, "v8_int16", field_type);
++ field_type = tdesc_named_type (feature, "v4i32");
++ tdesc_add_field (type, "v4_int32", field_type);
++ field_type = tdesc_named_type (feature, "v2i64");
++ tdesc_add_field (type, "v2_int64", field_type);
++ field_type = tdesc_named_type (feature, "uint128");
++ tdesc_add_field (type, "uint128", field_type);
++
++ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
++ tdesc_add_flag (field_type, 0, "IE");
++ tdesc_add_flag (field_type, 1, "DE");
++ tdesc_add_flag (field_type, 2, "ZE");
++ tdesc_add_flag (field_type, 3, "OE");
++ tdesc_add_flag (field_type, 4, "UE");
++ tdesc_add_flag (field_type, 5, "PE");
++ tdesc_add_flag (field_type, 6, "DAZ");
++ tdesc_add_flag (field_type, 7, "IM");
++ tdesc_add_flag (field_type, 8, "DM");
++ tdesc_add_flag (field_type, 9, "ZM");
++ tdesc_add_flag (field_type, 10, "OM");
++ tdesc_add_flag (field_type, 11, "UM");
++ tdesc_add_flag (field_type, 12, "PM");
++ tdesc_add_flag (field_type, 15, "FZ");
++
++ tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
++ tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
++ tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
++ tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
++
++ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
++ type = tdesc_create_struct (feature, "br128");
++ field_type = tdesc_named_type (feature, "uint64");
++ tdesc_add_field (type, "lbound", field_type);
++ field_type = tdesc_named_type (feature, "uint64");
++ tdesc_add_field (type, "ubound_raw", field_type);
++
++ type = tdesc_create_struct (feature, "_bndstatus");
++ tdesc_set_struct_size (type, 8);
++ tdesc_add_bitfield (type, "bde", 2, 31);
++ tdesc_add_bitfield (type, "error", 0, 1);
++
++ type = tdesc_create_union (feature, "status");
++ field_type = tdesc_named_type (feature, "data_ptr");
++ tdesc_add_field (type, "raw", field_type);
++ field_type = tdesc_named_type (feature, "_bndstatus");
++ tdesc_add_field (type, "status", field_type);
++
++ type = tdesc_create_struct (feature, "_bndcfgu");
++ tdesc_set_struct_size (type, 8);
++ tdesc_add_bitfield (type, "base", 12, 31);
++ tdesc_add_bitfield (type, "reserved", 2, 11);
++ tdesc_add_bitfield (type, "preserved", 1, 1);
++ tdesc_add_bitfield (type, "enabled", 0, 1);
++
++ type = tdesc_create_union (feature, "cfgu");
++ field_type = tdesc_named_type (feature, "data_ptr");
++ tdesc_add_field (type, "raw", field_type);
++ field_type = tdesc_named_type (feature, "_bndcfgu");
++ tdesc_add_field (type, "config", field_type);
++
++ tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
++ tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
++
++ tdesc_i386_avx_mpx = result;
++}
+diff --git a/gdb/features/i386/i386-avx-mpx.xml b/gdb/features/i386/i386-avx-mpx.xml
+new file mode 100644
+index 0000000..ab97367
+--- /dev/null
++++ b/gdb/features/i386/i386-avx-mpx.xml
+@@ -0,0 +1,17 @@
++<?xml version="1.0"?>
++<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
++
++ Copying and distribution of this file, with or without modification,
++ are permitted in any medium without royalty provided the copyright
++ notice and this notice are preserved. -->
++
++<!-- I386 with AVX and MPX -->
++
++<!DOCTYPE target SYSTEM "gdb-target.dtd">
++<target>
++ <architecture>i386</architecture>
++ <xi:include href="32bit-core.xml"/>
++ <xi:include href="32bit-sse.xml"/>
++ <xi:include href="32bit-avx.xml"/>
++ <xi:include href="32bit-mpx.xml"/>
++</target>
+diff --git a/gdb/features/i386/i386-mpx-linux.c b/gdb/features/i386/i386-mpx-linux.c
+index dbf8789..c6bafea 100644
+--- a/gdb/features/i386/i386-mpx-linux.c
++++ b/gdb/features/i386/i386-mpx-linux.c
+@@ -135,16 +135,6 @@ initialize_tdesc_i386_mpx_linux (void)
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+ tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
+
+- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+- tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
+-
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+ type = tdesc_create_struct (feature, "br128");
+ field_type = tdesc_named_type (feature, "uint64");
+@@ -176,12 +166,12 @@ initialize_tdesc_i386_mpx_linux (void)
+ field_type = tdesc_named_type (feature, "_bndcfgu");
+ tdesc_add_field (type, "config", field_type);
+
+- tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
+- tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
++ tdesc_create_reg (feature, "bnd0raw", 42, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd1raw", 43, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd2raw", 44, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd3raw", 45, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bndcfgu", 46, 1, NULL, 64, "cfgu");
++ tdesc_create_reg (feature, "bndstatus", 47, 1, NULL, 64, "status");
+
+ tdesc_i386_mpx_linux = result;
+ }
+diff --git a/gdb/features/i386/i386-mpx-linux.xml b/gdb/features/i386/i386-mpx-linux.xml
+index c4004d6..4228cf5 100644
+--- a/gdb/features/i386/i386-mpx-linux.xml
++++ b/gdb/features/i386/i386-mpx-linux.xml
+@@ -14,6 +14,5 @@
+ <xi:include href="32bit-core.xml"/>
+ <xi:include href="32bit-sse.xml"/>
+ <xi:include href="32bit-linux.xml"/>
+- <xi:include href="32bit-avx.xml"/>
+ <xi:include href="32bit-mpx.xml"/>
+ </target>
+diff --git a/gdb/features/i386/i386-mpx.c b/gdb/features/i386/i386-mpx.c
+index 1e04afd..430db3f 100644
+--- a/gdb/features/i386/i386-mpx.c
++++ b/gdb/features/i386/i386-mpx.c
+@@ -130,16 +130,6 @@ initialize_tdesc_i386_mpx (void)
+ tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
+
+- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+- tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
+- tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
+-
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
+ type = tdesc_create_struct (feature, "br128");
+ field_type = tdesc_named_type (feature, "uint64");
+@@ -171,12 +161,12 @@ initialize_tdesc_i386_mpx (void)
+ field_type = tdesc_named_type (feature, "_bndcfgu");
+ tdesc_add_field (type, "config", field_type);
+
+- tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
+- tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
+- tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
++ tdesc_create_reg (feature, "bnd0raw", 41, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd1raw", 42, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd2raw", 43, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bnd3raw", 44, 1, NULL, 128, "br128");
++ tdesc_create_reg (feature, "bndcfgu", 45, 1, NULL, 64, "cfgu");
++ tdesc_create_reg (feature, "bndstatus", 46, 1, NULL, 64, "status");
+
+ tdesc_i386_mpx = result;
+ }
+diff --git a/gdb/features/i386/i386-mpx.xml b/gdb/features/i386/i386-mpx.xml
+index 52a68db..c1806cb 100644
+--- a/gdb/features/i386/i386-mpx.xml
++++ b/gdb/features/i386/i386-mpx.xml
+@@ -12,6 +12,5 @@
+ <architecture>i386</architecture>
+ <xi:include href="32bit-core.xml"/>
+ <xi:include href="32bit-sse.xml"/>
+- <xi:include href="32bit-avx.xml"/>
+ <xi:include href="32bit-mpx.xml"/>
+ </target>
+diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
+index 1e874e3..dee2ea1 100644
+--- a/gdb/gdbserver/Makefile.in
++++ b/gdb/gdbserver/Makefile.in
+@@ -376,9 +376,11 @@ clean:
+ rm -f xml-builtin.c stamp-xml
+ rm -f i386-avx.c i386-avx-linux.c
+ rm -f i386-mpx.c i386-mpx-linux.c
++ rm -f i386-avx-mpx.c i386-avx-mpx-linux.c
+ rm -f i386-avx512.c i386-avx512-linux.c
+ rm -f amd64-avx.c amd64-avx-linux.c
+ rm -f amd64-mpx.c amd64-mpx-linux.c
++ rm -f amd64-avx-mpx.c amd64-avx-mpx-linux.c
+ rm -f amd64-avx512.c amd64-avx512-linux.c
+ rm -f i386-mmx.c i386-mmx-linux.c
+ rm -f x32.c x32-linux.c
+@@ -495,6 +497,21 @@ regcache-ipa.o: regcache.c
+ i386-linux-ipa.o: i386-linux.c
+ $(IPAGENT_COMPILE) $<
+ $(POSTCOMPILE)
++i386-mmx-linux-ipa.o: i386-mmx-linux.c
++ $(IPAGENT_COMPILE) $<
++ $(POSTCOMPILE)
++i386-avx-linux-ipa.o: i386-avx-linux.c
++ $(IPAGENT_COMPILE) $<
++ $(POSTCOMPILE)
++i386-mpx-linux-ipa.o: i386-mpx-linux.c
++ $(IPAGENT_COMPILE) $<
++ $(POSTCOMPILE)
++i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c
++ $(IPAGENT_COMPILE) $<
++ $(POSTCOMPILE)
++i386-avx512-linux-ipa.o: i386-avx512-linux.c
++ $(IPAGENT_COMPILE) $<
++ $(POSTCOMPILE)
+ linux-i386-ipa.o: linux-i386-ipa.c
+ $(IPAGENT_COMPILE) $<
+ $(POSTCOMPILE)
+@@ -504,6 +521,18 @@ linux-amd64-ipa.o: linux-amd64-ipa.c
+ amd64-linux-ipa.o: amd64-linux.c
+ $(IPAGENT_COMPILE) $<
+ $(POSTCOMPILE)
++amd64-avx-linux-ipa.o: amd64-avx-linux.c
++ $(IPAGENT_COMPILE) $<
++ $(POSTCOMPILE)
++amd64-mpx-linux-ipa.o: amd64-mpx-linux.c
++ $(IPAGENT_COMPILE) $<
++ $(POSTCOMPILE)
++amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c
++ $(IPAGENT_COMPILE) $<
++ $(POSTCOMPILE)
++amd64-avx512-linux-ipa.o: amd64-avx512-linux.c
++ $(IPAGENT_COMPILE) $<
++ $(POSTCOMPILE)
+ linux-aarch64-ipa.o: linux-aarch64-ipa.c
+ $(IPAGENT_COMPILE) $<
+ $(POSTCOMPILE)
+@@ -694,6 +723,10 @@ i386-mpx.c : $(srcdir)/../regformats/i386/i386-mpx.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx.dat i386-mpx.c
+ i386-mpx-linux.c : $(srcdir)/../regformats/i386/i386-mpx-linux.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx-linux.dat i386-mpx-linux.c
++i386-avx-mpx.c : $(srcdir)/../regformats/i386/i386-avx-mpx.dat $(regdat_sh)
++ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx.dat i386-avx-mpx.c
++i386-avx-mpx-linux.c : $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat $(regdat_sh)
++ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat i386-avx-mpx-linux.c
+ i386-mmx.c : $(srcdir)/../regformats/i386/i386-mmx.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mmx.dat i386-mmx.c
+ i386-mmx-linux.c : $(srcdir)/../regformats/i386/i386-mmx-linux.dat $(regdat_sh)
+@@ -808,6 +841,10 @@ amd64-mpx.c : $(srcdir)/../regformats/i386/amd64-mpx.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx.dat amd64-mpx.c
+ amd64-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-mpx-linux.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx-linux.dat amd64-mpx-linux.c
++amd64-avx-mpx.c : $(srcdir)/../regformats/i386/amd64-avx-mpx.dat $(regdat_sh)
++ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx.dat amd64-avx-mpx.c
++amd64-avx-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat $(regdat_sh)
++ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat amd64-avx-mpx-linux.c
+ x32.c : $(srcdir)/../regformats/i386/x32.dat $(regdat_sh)
+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32.dat x32.c
+ x32-linux.c : $(srcdir)/../regformats/i386/x32-linux.dat $(regdat_sh)
+diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
+index a54b9e7..4935a36 100644
+--- a/gdb/gdbserver/configure.srv
++++ b/gdb/gdbserver/configure.srv
+@@ -24,20 +24,23 @@
+ # Default hostio_last_error implementation
+ srv_hostio_err_objs="hostio-errno.o"
+
+-srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-mmx.o"
+-srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-mmx-linux.o"
+-srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o x32.o x32-avx.o x32-avx512.o"
+-srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx512-linux.o amd64-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx512-linux.o"
++srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-avx-mpx.o i386-mmx.o"
++srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-avx-mpx-linux.o i386-mmx-linux.o"
++srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o amd64-avx-mpx.o x32.o x32-avx.o x32-avx512.o"
++srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx512-linux.o amd64-mpx-linux.o amd64-avx-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx512-linux.o"
++
++
++ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o i386-avx-mpx-linux-ipa.o i386-avx512-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o"
++ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx512-linux-ipa.o amd64-mpx-linux-ipa.o"
+
+-ipa_i386_linux_regobj=i386-linux-ipa.o
+-ipa_amd64_linux_regobj=amd64-linux-ipa.o
+
+ srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml"
+ srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml i386/64bit-avx512.xml i386/x32-core.xml i386/64bit-mpx.xml"
+-srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx512.xml i386/i386-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
+-srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx512.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx512.xml i386/amd64-mpx.xml $srv_i386_64bit_xmlfiles"
+-srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx512-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml $srv_i386_32bit_xmlfiles"
+-srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx512-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx512-linux.xml $srv_i386_64bit_xmlfiles"
++srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx512.xml i386/i386-mpx.xml i386/i386-avx-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
++srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx512.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx512.xml i386/amd64-mpx.xml i386/amd64-avx-mpx.xml $srv_i386_64bit_xmlfiles"
++srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx512-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml i386/i386-avx-mpx-linux.xml $srv_i386_32bit_xmlfiles"
++srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx512-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/amd64-avx-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx512-linux.xml $srv_i386_64bit_xmlfiles"
++
+
+
+ # Linux object files. This is so we don't have to repeat
+diff --git a/gdb/gdbserver/linux-aarch64-ipa.c b/gdb/gdbserver/linux-aarch64-ipa.c
+index 758708d..f1eaa70 100644
+--- a/gdb/gdbserver/linux-aarch64-ipa.c
++++ b/gdb/gdbserver/linux-aarch64-ipa.c
+@@ -143,9 +143,18 @@ gdb_agent_get_raw_reg (const unsigned char *raw_regs, int regnum)
+ + aarch64_ft_collect_regmap[regnum] * FT_CR_SIZE);
+ }
+
++/* Return target_desc to use for IPA, given the tdesc index passed by
++ gdbserver. Index is ignored, since we have only one tdesc
++ at the moment. */
++
++const struct target_desc *
++get_ipa_tdesc (int idx)
++{
++ return tdesc_aarch64;
++}
++
+ void
+ initialize_low_tracepoint (void)
+ {
+ init_registers_aarch64 ();
+- ipa_tdesc = tdesc_aarch64;
+ }
+diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c
+index 2eeedcd..f9c72a0 100644
+--- a/gdb/gdbserver/linux-amd64-ipa.c
++++ b/gdb/gdbserver/linux-amd64-ipa.c
+@@ -20,6 +20,7 @@
+
+ #include "server.h"
+ #include "tracepoint.h"
++#include "linux-x86-tdesc.h"
+
+ /* Defined in auto-generated file amd64-linux.c. */
+ void init_registers_amd64_linux (void);
+@@ -166,9 +167,37 @@ supply_static_tracepoint_registers (struct regcache *regcache,
+
+ #endif /* HAVE_UST */
+
++/* Return target_desc to use for IPA, given the tdesc index passed by
++ gdbserver. */
++
++const struct target_desc *
++get_ipa_tdesc (int idx)
++{
++ switch (idx)
++ {
++ case X86_TDESC_SSE:
++ return tdesc_amd64_linux;
++ case X86_TDESC_AVX:
++ return tdesc_amd64_avx_linux;
++ case X86_TDESC_MPX:
++ return tdesc_amd64_mpx_linux;
++ case X86_TDESC_AVX_MPX:
++ return tdesc_amd64_avx_mpx_linux;
++ case X86_TDESC_AVX512:
++ return tdesc_amd64_avx512_linux;
++ default:
++ internal_error (__FILE__, __LINE__,
++ "unknown ipa tdesc index: %d", idx);
++ return tdesc_amd64_linux;
++ }
++}
++
+ void
+ initialize_low_tracepoint (void)
+ {
+ init_registers_amd64_linux ();
+- ipa_tdesc = tdesc_amd64_linux;
++ init_registers_amd64_avx_linux ();
++ init_registers_amd64_avx_mpx_linux ();
++ init_registers_amd64_mpx_linux ();
++ init_registers_amd64_avx512_linux ();
+ }
+diff --git a/gdb/gdbserver/linux-i386-ipa.c b/gdb/gdbserver/linux-i386-ipa.c
+index 11dc038..d7a8e7d 100644
+--- a/gdb/gdbserver/linux-i386-ipa.c
++++ b/gdb/gdbserver/linux-i386-ipa.c
+@@ -21,6 +21,7 @@
+ #include "server.h"
+ #include <sys/mman.h>
+ #include "tracepoint.h"
++#include "linux-x86-tdesc.h"
+
+ /* GDB register numbers. */
+
+@@ -47,10 +48,6 @@ enum i386_gdb_regnum
+
+ #define i386_num_regs 16
+
+-/* Defined in auto-generated file i386-linux.c. */
+-void init_registers_i386_linux (void);
+-extern const struct target_desc *tdesc_i386_linux;
+-
+ #define FT_CR_EAX 15
+ #define FT_CR_ECX 14
+ #define FT_CR_EDX 13
+@@ -247,10 +244,40 @@ initialize_fast_tracepoint_trampoline_buffer (void)
+ }
+ }
+
++/* Return target_desc to use for IPA, given the tdesc index passed by
++ gdbserver. */
++
++const struct target_desc *
++get_ipa_tdesc (int idx)
++{
++ switch (idx)
++ {
++ case X86_TDESC_MMX:
++ return tdesc_i386_mmx_linux;
++ case X86_TDESC_SSE:
++ return tdesc_i386_linux;
++ case X86_TDESC_AVX:
++ return tdesc_i386_avx_linux;
++ case X86_TDESC_MPX:
++ return tdesc_i386_mpx_linux;
++ case X86_TDESC_AVX_MPX:
++ return tdesc_i386_avx_mpx_linux;
++ case X86_TDESC_AVX512:
++ return tdesc_i386_avx512_linux;
++ default:
++ internal_error (__FILE__, __LINE__,
++ "unknown ipa tdesc index: %d", idx);
++ return tdesc_i386_linux;
++ }
++}
++
+ void
+ initialize_low_tracepoint (void)
+ {
++ init_registers_i386_mmx_linux ();
+ init_registers_i386_linux ();
+- ipa_tdesc = tdesc_i386_linux;
++ init_registers_i386_avx_linux ();
++ init_registers_i386_mpx_linux ();
++ init_registers_i386_avx512_linux ();
+ initialize_fast_tracepoint_trampoline_buffer ();
+ }
+diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
+index 8b025bd..a142c2c 100644
+--- a/gdb/gdbserver/linux-low.c
++++ b/gdb/gdbserver/linux-low.c
+@@ -6432,6 +6432,15 @@ linux_supports_catch_syscall (void)
+ }
+
+ static int
++linux_get_ipa_tdesc_idx (void)
++{
++ if (the_low_target.get_ipa_tdesc_idx == NULL)
++ return 0;
++
++ return (*the_low_target.get_ipa_tdesc_idx) ();
++}
++
++static int
+ linux_supports_tracepoints (void)
+ {
+ if (*the_low_target.supports_tracepoints == NULL)
+@@ -7408,6 +7417,7 @@ static struct target_ops linux_target_ops = {
+ linux_breakpoint_kind_from_current_state,
+ linux_supports_software_single_step,
+ linux_supports_catch_syscall,
++ linux_get_ipa_tdesc_idx,
+ };
+
+ #ifdef HAVE_LINUX_REGSETS
+diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
+index 4ec8550..d4946c1 100644
+--- a/gdb/gdbserver/linux-low.h
++++ b/gdb/gdbserver/linux-low.h
+@@ -246,6 +246,9 @@ struct linux_target_ops
+ due to SYSCALL_SIGTRAP. */
+ void (*get_syscall_trapinfo) (struct regcache *regcache,
+ int *sysno, int *sysret);
++
++ /* See target.h. */
++ int (*get_ipa_tdesc_idx) (void);
+ };
+
+ extern struct linux_target_ops the_low_target;
+diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
+index 0c4954a..2535959 100644
+--- a/gdb/gdbserver/linux-x86-low.c
++++ b/gdb/gdbserver/linux-x86-low.c
+@@ -45,57 +45,7 @@
+ #include "nat/linux-nat.h"
+ #include "nat/x86-linux.h"
+ #include "nat/x86-linux-dregs.h"
+-
+-#ifdef __x86_64__
+-/* Defined in auto-generated file amd64-linux.c. */
+-void init_registers_amd64_linux (void);
+-extern const struct target_desc *tdesc_amd64_linux;
+-
+-/* Defined in auto-generated file amd64-avx-linux.c. */
+-void init_registers_amd64_avx_linux (void);
+-extern const struct target_desc *tdesc_amd64_avx_linux;
+-
+-/* Defined in auto-generated file amd64-avx512-linux.c. */
+-void init_registers_amd64_avx512_linux (void);
+-extern const struct target_desc *tdesc_amd64_avx512_linux;
+-
+-/* Defined in auto-generated file amd64-mpx-linux.c. */
+-void init_registers_amd64_mpx_linux (void);
+-extern const struct target_desc *tdesc_amd64_mpx_linux;
+-
+-/* Defined in auto-generated file x32-linux.c. */
+-void init_registers_x32_linux (void);
+-extern const struct target_desc *tdesc_x32_linux;
+-
+-/* Defined in auto-generated file x32-avx-linux.c. */
+-void init_registers_x32_avx_linux (void);
+-extern const struct target_desc *tdesc_x32_avx_linux;
+-
+-/* Defined in auto-generated file x32-avx512-linux.c. */
+-void init_registers_x32_avx512_linux (void);
+-extern const struct target_desc *tdesc_x32_avx512_linux;
+-
+-#endif
+-
+-/* Defined in auto-generated file i386-linux.c. */
+-void init_registers_i386_linux (void);
+-extern const struct target_desc *tdesc_i386_linux;
+-
+-/* Defined in auto-generated file i386-mmx-linux.c. */
+-void init_registers_i386_mmx_linux (void);
+-extern const struct target_desc *tdesc_i386_mmx_linux;
+-
+-/* Defined in auto-generated file i386-avx-linux.c. */
+-void init_registers_i386_avx_linux (void);
+-extern const struct target_desc *tdesc_i386_avx_linux;
+-
+-/* Defined in auto-generated file i386-avx512-linux.c. */
+-void init_registers_i386_avx512_linux (void);
+-extern const struct target_desc *tdesc_i386_avx512_linux;
+-
+-/* Defined in auto-generated file i386-mpx-linux.c. */
+-void init_registers_i386_mpx_linux (void);
+-extern const struct target_desc *tdesc_i386_mpx_linux;
++#include "linux-x86-tdesc.h"
+
+ #ifdef __x86_64__
+ static struct target_desc *tdesc_amd64_linux_no_xml;
+@@ -839,6 +789,9 @@ x86_linux_read_description (void)
+ case X86_XSTATE_AVX512_MASK:
+ return tdesc_amd64_avx512_linux;
+
++ case X86_XSTATE_AVX_MPX_MASK:
++ return tdesc_amd64_avx_mpx_linux;
++
+ case X86_XSTATE_MPX_MASK:
+ return tdesc_amd64_mpx_linux;
+
+@@ -886,6 +839,9 @@ x86_linux_read_description (void)
+ case (X86_XSTATE_MPX_MASK):
+ return tdesc_i386_mpx_linux;
+
++ case (X86_XSTATE_AVX_MPX_MASK):
++ return tdesc_i386_avx_mpx_linux;
++
+ case (X86_XSTATE_AVX_MASK):
+ return tdesc_i386_avx_linux;
+
+@@ -2891,6 +2847,42 @@ x86_supports_hardware_single_step (void)
+ return 1;
+ }
+
++static int
++x86_get_ipa_tdesc_idx (void)
++{
++ struct regcache *regcache = get_thread_regcache (current_thread, 0);
++ const struct target_desc *tdesc = regcache->tdesc;
++
++#ifdef __x86_64__
++ if (tdesc == tdesc_amd64_linux || tdesc == tdesc_amd64_linux_no_xml
++ || tdesc == tdesc_x32_linux)
++ return X86_TDESC_SSE;
++ if (tdesc == tdesc_amd64_avx_linux || tdesc == tdesc_x32_avx_linux)
++ return X86_TDESC_AVX;
++ if (tdesc == tdesc_amd64_mpx_linux)
++ return X86_TDESC_MPX;
++ if (tdesc == tdesc_amd64_avx_mpx_linux)
++ return X86_TDESC_AVX_MPX;
++ if (tdesc == tdesc_amd64_avx512_linux || tdesc == tdesc_x32_avx512_linux)
++ return X86_TDESC_AVX512;
++#endif
++
++ if (tdesc == tdesc_i386_mmx_linux)
++ return X86_TDESC_MMX;
++ if (tdesc == tdesc_i386_linux || tdesc == tdesc_i386_linux_no_xml)
++ return X86_TDESC_SSE;
++ if (tdesc == tdesc_i386_avx_linux)
++ return X86_TDESC_AVX;
++ if (tdesc == tdesc_i386_mpx_linux)
++ return X86_TDESC_MPX;
++ if (tdesc == tdesc_i386_avx_mpx_linux)
++ return X86_TDESC_AVX_MPX;
++ if (tdesc == tdesc_i386_avx512_linux)
++ return X86_TDESC_AVX512;
++
++ return 0;
++}
++
+ /* This is initialized assuming an amd64 target.
+ x86_arch_setup will correct it for i386 or amd64 targets. */
+
+@@ -2934,6 +2926,7 @@ struct linux_target_ops the_low_target =
+ NULL, /* breakpoint_kind_from_current_state */
+ x86_supports_hardware_single_step,
+ x86_get_syscall_trapinfo,
++ x86_get_ipa_tdesc_idx,
+ };
+
+ void
+@@ -2945,6 +2938,7 @@ initialize_low_arch (void)
+ init_registers_amd64_avx_linux ();
+ init_registers_amd64_avx512_linux ();
+ init_registers_amd64_mpx_linux ();
++ init_registers_amd64_avx_mpx_linux ();
+
+ init_registers_x32_linux ();
+ init_registers_x32_avx_linux ();
+@@ -2959,6 +2953,7 @@ initialize_low_arch (void)
+ init_registers_i386_avx_linux ();
+ init_registers_i386_avx512_linux ();
+ init_registers_i386_mpx_linux ();
++ init_registers_i386_avx_mpx_linux ();
+
+ tdesc_i386_linux_no_xml = XNEW (struct target_desc);
+ copy_target_description (tdesc_i386_linux_no_xml, tdesc_i386_linux);
+diff --git a/gdb/gdbserver/linux-x86-tdesc.h b/gdb/gdbserver/linux-x86-tdesc.h
+new file mode 100644
+index 0000000..720f50c
+--- /dev/null
++++ b/gdb/gdbserver/linux-x86-tdesc.h
+@@ -0,0 +1,98 @@
++/* Low level support for x86 (i386 and x86-64), shared between gdbserver
++ and IPA.
++
++ Copyright (C) 2016 Free Software Foundation, Inc.
++
++ This file is part of GDB.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>. */
++
++/* Note: since IPA obviously knows what ABI it's running on (i386 vs x86_64
++ vs x32), it's sufficient to pass only the register set here. This,
++ together with the ABI known at IPA compile time, maps to a tdesc. */
++
++enum x86_linux_tdesc {
++ X86_TDESC_MMX = 0,
++ X86_TDESC_SSE = 1,
++ X86_TDESC_AVX = 2,
++ X86_TDESC_MPX = 3,
++ X86_TDESC_AVX_MPX = 4,
++ X86_TDESC_AVX512 = 5,
++};
++
++#ifdef __x86_64__
++
++#if defined __LP64__ || !defined IN_PROCESS_AGENT
++/* Defined in auto-generated file amd64-linux.c. */
++void init_registers_amd64_linux (void);
++extern const struct target_desc *tdesc_amd64_linux;
++
++/* Defined in auto-generated file amd64-avx-linux.c. */
++void init_registers_amd64_avx_linux (void);
++extern const struct target_desc *tdesc_amd64_avx_linux;
++
++/* Defined in auto-generated file amd64-avx512-linux.c. */
++void init_registers_amd64_avx512_linux (void);
++extern const struct target_desc *tdesc_amd64_avx512_linux;
++
++/* Defined in auto-generated file amd64-avx-mpx-linux.c. */
++void init_registers_amd64_avx_mpx_linux (void);
++extern const struct target_desc *tdesc_amd64_avx_mpx_linux;
++
++/* Defined in auto-generated file amd64-mpx-linux.c. */
++void init_registers_amd64_mpx_linux (void);
++extern const struct target_desc *tdesc_amd64_mpx_linux;
++#endif
++
++#if defined __ILP32__ || !defined IN_PROCESS_AGENT
++/* Defined in auto-generated file x32-linux.c. */
++void init_registers_x32_linux (void);
++extern const struct target_desc *tdesc_x32_linux;
++
++/* Defined in auto-generated file x32-avx-linux.c. */
++void init_registers_x32_avx_linux (void);
++extern const struct target_desc *tdesc_x32_avx_linux;
++
++/* Defined in auto-generated file x32-avx512-linux.c. */
++void init_registers_x32_avx512_linux (void);
++extern const struct target_desc *tdesc_x32_avx512_linux;
++#endif
++
++#endif
++
++#if defined __i386__ || !defined IN_PROCESS_AGENT
++/* Defined in auto-generated file i386-linux.c. */
++void init_registers_i386_linux (void);
++extern const struct target_desc *tdesc_i386_linux;
++
++/* Defined in auto-generated file i386-mmx-linux.c. */
++void init_registers_i386_mmx_linux (void);
++extern const struct target_desc *tdesc_i386_mmx_linux;
++
++/* Defined in auto-generated file i386-avx-linux.c. */
++void init_registers_i386_avx_linux (void);
++extern const struct target_desc *tdesc_i386_avx_linux;
++
++/* Defined in auto-generated file i386-avx-mpx-linux.c. */
++void init_registers_i386_avx_mpx_linux (void);
++extern const struct target_desc *tdesc_i386_avx_mpx_linux;
++
++/* Defined in auto-generated file i386-avx512-linux.c. */
++void init_registers_i386_avx512_linux (void);
++extern const struct target_desc *tdesc_i386_avx512_linux;
++
++/* Defined in auto-generated file i386-mpx-linux.c. */
++void init_registers_i386_mpx_linux (void);
++extern const struct target_desc *tdesc_i386_mpx_linux;
++#endif
+diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
+index 5af2051..4c14c20 100644
+--- a/gdb/gdbserver/target.h
++++ b/gdb/gdbserver/target.h
+@@ -471,6 +471,9 @@ struct target_ops
+ /* Return 1 if the target supports catch syscall, 0 (or leave the
+ callback NULL) otherwise. */
+ int (*supports_catch_syscall) (void);
++
++ /* Return tdesc index for IPA. */
++ int (*get_ipa_tdesc_idx) (void);
+ };
+
+ extern struct target_ops *the_target;
+@@ -550,6 +553,10 @@ int kill_inferior (int);
+ (the_target->supports_catch_syscall ? \
+ (*the_target->supports_catch_syscall) () : 0)
+
++#define target_get_ipa_tdesc_idx() \
++ (the_target->get_ipa_tdesc_idx \
++ ? (*the_target->get_ipa_tdesc_idx) () : 0)
++
+ #define target_supports_tracepoints() \
+ (the_target->supports_tracepoints \
+ ? (*the_target->supports_tracepoints) () : 0)
+diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
+index 0671999..cc86677 100644
+--- a/gdb/gdbserver/tracepoint.c
++++ b/gdb/gdbserver/tracepoint.c
+@@ -134,6 +134,7 @@ trace_vdebug (const char *fmt, ...)
+ # define ust_loaded IPA_SYM_EXPORTED_NAME (ust_loaded)
+ # define helper_thread_id IPA_SYM_EXPORTED_NAME (helper_thread_id)
+ # define cmd_buf IPA_SYM_EXPORTED_NAME (cmd_buf)
++# define ipa_tdesc_idx IPA_SYM_EXPORTED_NAME (ipa_tdesc_idx)
+ #endif
+
+ #ifndef IN_PROCESS_AGENT
+@@ -171,6 +172,7 @@ struct ipa_sym_addresses
+ CORE_ADDR addr_get_trace_state_variable_value;
+ CORE_ADDR addr_set_trace_state_variable_value;
+ CORE_ADDR addr_ust_loaded;
++ CORE_ADDR addr_ipa_tdesc_idx;
+ };
+
+ static struct
+@@ -207,6 +209,7 @@ static struct
+ IPA_SYM(get_trace_state_variable_value),
+ IPA_SYM(set_trace_state_variable_value),
+ IPA_SYM(ust_loaded),
++ IPA_SYM(ipa_tdesc_idx),
+ };
+
+ static struct ipa_sym_addresses ipa_sym_addrs;
+@@ -3231,6 +3234,11 @@ cmd_qtstart (char *packet)
+
+ *packet = '\0';
+
++ /* Tell IPA about the correct tdesc. */
++ if (write_inferior_integer (ipa_sym_addrs.addr_ipa_tdesc_idx,
++ target_get_ipa_tdesc_idx ()))
++ error ("Error setting ipa_tdesc_idx variable in lib");
++
+ /* Start out empty. */
+ if (agent_loaded_p ())
+ write_inferior_data_ptr (ipa_sym_addrs.addr_tracepoints, 0);
+@@ -4714,19 +4722,20 @@ collect_data_at_step (struct tracepoint_hit_ctx *ctx,
+ #endif
+
+ #ifdef IN_PROCESS_AGENT
+-/* The target description used by the IPA. Given that the IPA library
+- is built for a specific architecture that is loaded into the
+- inferior, there only needs to be one such description per
+- build. */
+-const struct target_desc *ipa_tdesc;
++/* The target description index for IPA. Passed from gdbserver, used
++ to select ipa_tdesc. */
++EXTERN_C_PUSH
++IP_AGENT_EXPORT_VAR int ipa_tdesc_idx;
++EXTERN_C_POP
+ #endif
+
+ static struct regcache *
+ get_context_regcache (struct tracepoint_hit_ctx *ctx)
+ {
+ struct regcache *regcache = NULL;
+-
+ #ifdef IN_PROCESS_AGENT
++ const struct target_desc *ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
++
+ if (ctx->type == fast_tracepoint)
+ {
+ struct fast_tracepoint_ctx *fctx = (struct fast_tracepoint_ctx *) ctx;
+@@ -5799,11 +5808,13 @@ IP_AGENT_EXPORT_FUNC void
+ gdb_collect (struct tracepoint *tpoint, unsigned char *regs)
+ {
+ struct fast_tracepoint_ctx ctx;
++ const struct target_desc *ipa_tdesc;
+
+ /* Don't do anything until the trace run is completely set up. */
+ if (!tracing)
+ return;
+
++ ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
+ ctx.base.type = fast_tracepoint;
+ ctx.regs = regs;
+ ctx.regcache_initted = 0;
+@@ -6660,6 +6671,7 @@ gdb_probe (const struct marker *mdata, void *probe_private,
+ {
+ struct tracepoint *tpoint;
+ struct static_tracepoint_ctx ctx;
++ const struct target_desc *ipa_tdesc;
+
+ /* Don't do anything until the trace run is completely set up. */
+ if (!tracing)
+@@ -6668,6 +6680,7 @@ gdb_probe (const struct marker *mdata, void *probe_private,
+ return;
+ }
+
++ ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
+ ctx.base.type = static_tracepoint;
+ ctx.regcache_initted = 0;
+ ctx.regs = regs;
+diff --git a/gdb/gdbserver/tracepoint.h b/gdb/gdbserver/tracepoint.h
+index cab89cf..e30f4f7 100644
+--- a/gdb/gdbserver/tracepoint.h
++++ b/gdb/gdbserver/tracepoint.h
+@@ -124,6 +124,7 @@ int handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc);
+
+ #ifdef IN_PROCESS_AGENT
+ void initialize_low_tracepoint (void);
++const struct target_desc *get_ipa_tdesc (int idx);
+ void supply_fast_tracepoint_registers (struct regcache *regcache,
+ const unsigned char *regs);
+ void supply_static_tracepoint_registers (struct regcache *regcache,
+@@ -131,9 +132,6 @@ void supply_static_tracepoint_registers (struct regcache *regcache,
+ CORE_ADDR pc);
+ void set_trampoline_buffer_space (CORE_ADDR begin, CORE_ADDR end,
+ char *errmsg);
+-
+-extern const struct target_desc *ipa_tdesc;
+-
+ #else
+ void stop_tracing (void);
+
+diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
+index af39e78..df47efd 100644
+--- a/gdb/i386-linux-tdep.c
++++ b/gdb/i386-linux-tdep.c
+@@ -47,6 +47,7 @@
+ #include "features/i386/i386-linux.c"
+ #include "features/i386/i386-mmx-linux.c"
+ #include "features/i386/i386-mpx-linux.c"
++#include "features/i386/i386-avx-mpx-linux.c"
+ #include "features/i386/i386-avx-linux.c"
+ #include "features/i386/i386-avx512-linux.c"
+
+@@ -630,6 +631,8 @@ i386_linux_core_read_description (struct gdbarch *gdbarch,
+ return tdesc_i386_avx512_linux;
+ case X86_XSTATE_MPX_MASK:
+ return tdesc_i386_mpx_linux;
++ case X86_XSTATE_AVX_MPX_MASK:
++ return tdesc_i386_avx_mpx_linux;
+ case X86_XSTATE_AVX_MASK:
+ return tdesc_i386_avx_linux;
+ case X86_XSTATE_SSE_MASK:
+@@ -1018,5 +1021,6 @@ _initialize_i386_linux_tdep (void)
+ initialize_tdesc_i386_mmx_linux ();
+ initialize_tdesc_i386_avx_linux ();
+ initialize_tdesc_i386_mpx_linux ();
++ initialize_tdesc_i386_avx_mpx_linux ();
+ initialize_tdesc_i386_avx512_linux ();
+ }
+diff --git a/gdb/i386-linux-tdep.h b/gdb/i386-linux-tdep.h
+index ecc9e31..0cb0c4d 100644
+--- a/gdb/i386-linux-tdep.h
++++ b/gdb/i386-linux-tdep.h
+@@ -42,6 +42,7 @@ extern struct target_desc *tdesc_i386_linux;
+ extern struct target_desc *tdesc_i386_mmx_linux;
+ extern struct target_desc *tdesc_i386_avx_linux;
+ extern struct target_desc *tdesc_i386_mpx_linux;
++extern struct target_desc *tdesc_i386_avx_mpx_linux;
+ extern struct target_desc *tdesc_i386_avx512_linux;
+
+ /* Format of XSAVE extended state is:
+diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
+index b706463..1ec0a08 100644
+--- a/gdb/i386-tdep.c
++++ b/gdb/i386-tdep.c
+@@ -53,6 +53,7 @@
+ #include "features/i386/i386.c"
+ #include "features/i386/i386-avx.c"
+ #include "features/i386/i386-mpx.c"
++#include "features/i386/i386-avx-mpx.c"
+ #include "features/i386/i386-avx512.c"
+ #include "features/i386/i386-mmx.c"
+
+@@ -8618,6 +8619,8 @@ i386_target_description (uint64_t xcr0)
+ case X86_XSTATE_MPX_AVX512_MASK:
+ case X86_XSTATE_AVX512_MASK:
+ return tdesc_i386_avx512;
++ case X86_XSTATE_AVX_MPX_MASK:
++ return tdesc_i386_avx_mpx;
+ case X86_XSTATE_MPX_MASK:
+ return tdesc_i386_mpx;
+ case X86_XSTATE_AVX_MASK:
+@@ -8957,6 +8960,7 @@ Show Intel Memory Protection Extensions specific variables."),
+ initialize_tdesc_i386_mmx ();
+ initialize_tdesc_i386_avx ();
+ initialize_tdesc_i386_mpx ();
++ initialize_tdesc_i386_avx_mpx ();
+ initialize_tdesc_i386_avx512 ();
+
+ /* Tell remote stub that we support XML target description. */
+diff --git a/gdb/regformats/i386/amd64-avx-mpx-linux.dat b/gdb/regformats/i386/amd64-avx-mpx-linux.dat
+new file mode 100644
+index 0000000..6d45324
+--- /dev/null
++++ b/gdb/regformats/i386/amd64-avx-mpx-linux.dat
+@@ -0,0 +1,85 @@
++# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
++# Generated from: i386/amd64-avx-mpx-linux.xml
++name:amd64_avx_mpx_linux
++xmltarget:amd64-avx-mpx-linux.xml
++expedite:rbp,rsp,rip
++64:rax
++64:rbx
++64:rcx
++64:rdx
++64:rsi
++64:rdi
++64:rbp
++64:rsp
++64:r8
++64:r9
++64:r10
++64:r11
++64:r12
++64:r13
++64:r14
++64:r15
++64:rip
++32:eflags
++32:cs
++32:ss
++32:ds
++32:es
++32:fs
++32:gs
++80:st0
++80:st1
++80:st2
++80:st3
++80:st4
++80:st5
++80:st6
++80:st7
++32:fctrl
++32:fstat
++32:ftag
++32:fiseg
++32:fioff
++32:foseg
++32:fooff
++32:fop
++128:xmm0
++128:xmm1
++128:xmm2
++128:xmm3
++128:xmm4
++128:xmm5
++128:xmm6
++128:xmm7
++128:xmm8
++128:xmm9
++128:xmm10
++128:xmm11
++128:xmm12
++128:xmm13
++128:xmm14
++128:xmm15
++32:mxcsr
++64:orig_rax
++128:ymm0h
++128:ymm1h
++128:ymm2h
++128:ymm3h
++128:ymm4h
++128:ymm5h
++128:ymm6h
++128:ymm7h
++128:ymm8h
++128:ymm9h
++128:ymm10h
++128:ymm11h
++128:ymm12h
++128:ymm13h
++128:ymm14h
++128:ymm15h
++128:bnd0raw
++128:bnd1raw
++128:bnd2raw
++128:bnd3raw
++64:bndcfgu
++64:bndstatus
+diff --git a/gdb/regformats/i386/amd64-avx-mpx.dat b/gdb/regformats/i386/amd64-avx-mpx.dat
+new file mode 100644
+index 0000000..d985641
+--- /dev/null
++++ b/gdb/regformats/i386/amd64-avx-mpx.dat
+@@ -0,0 +1,84 @@
++# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
++# Generated from: i386/amd64-avx-mpx.xml
++name:amd64_avx_mpx
++xmltarget:amd64-avx-mpx.xml
++expedite:rbp,rsp,rip
++64:rax
++64:rbx
++64:rcx
++64:rdx
++64:rsi
++64:rdi
++64:rbp
++64:rsp
++64:r8
++64:r9
++64:r10
++64:r11
++64:r12
++64:r13
++64:r14
++64:r15
++64:rip
++32:eflags
++32:cs
++32:ss
++32:ds
++32:es
++32:fs
++32:gs
++80:st0
++80:st1
++80:st2
++80:st3
++80:st4
++80:st5
++80:st6
++80:st7
++32:fctrl
++32:fstat
++32:ftag
++32:fiseg
++32:fioff
++32:foseg
++32:fooff
++32:fop
++128:xmm0
++128:xmm1
++128:xmm2
++128:xmm3
++128:xmm4
++128:xmm5
++128:xmm6
++128:xmm7
++128:xmm8
++128:xmm9
++128:xmm10
++128:xmm11
++128:xmm12
++128:xmm13
++128:xmm14
++128:xmm15
++32:mxcsr
++128:ymm0h
++128:ymm1h
++128:ymm2h
++128:ymm3h
++128:ymm4h
++128:ymm5h
++128:ymm6h
++128:ymm7h
++128:ymm8h
++128:ymm9h
++128:ymm10h
++128:ymm11h
++128:ymm12h
++128:ymm13h
++128:ymm14h
++128:ymm15h
++128:bnd0raw
++128:bnd1raw
++128:bnd2raw
++128:bnd3raw
++64:bndcfgu
++64:bndstatus
+diff --git a/gdb/regformats/i386/amd64-mpx-linux.dat b/gdb/regformats/i386/amd64-mpx-linux.dat
+index 7a05cfe..523ae01 100644
+--- a/gdb/regformats/i386/amd64-mpx-linux.dat
++++ b/gdb/regformats/i386/amd64-mpx-linux.dat
+@@ -61,22 +61,6 @@ expedite:rbp,rsp,rip
+ 128:xmm15
+ 32:mxcsr
+ 64:orig_rax
+-128:ymm0h
+-128:ymm1h
+-128:ymm2h
+-128:ymm3h
+-128:ymm4h
+-128:ymm5h
+-128:ymm6h
+-128:ymm7h
+-128:ymm8h
+-128:ymm9h
+-128:ymm10h
+-128:ymm11h
+-128:ymm12h
+-128:ymm13h
+-128:ymm14h
+-128:ymm15h
+ 128:bnd0raw
+ 128:bnd1raw
+ 128:bnd2raw
+diff --git a/gdb/regformats/i386/amd64-mpx.dat b/gdb/regformats/i386/amd64-mpx.dat
+index 1b75f4d..43b8776 100644
+--- a/gdb/regformats/i386/amd64-mpx.dat
++++ b/gdb/regformats/i386/amd64-mpx.dat
+@@ -60,22 +60,6 @@ expedite:rbp,rsp,rip
+ 128:xmm14
+ 128:xmm15
+ 32:mxcsr
+-128:ymm0h
+-128:ymm1h
+-128:ymm2h
+-128:ymm3h
+-128:ymm4h
+-128:ymm5h
+-128:ymm6h
+-128:ymm7h
+-128:ymm8h
+-128:ymm9h
+-128:ymm10h
+-128:ymm11h
+-128:ymm12h
+-128:ymm13h
+-128:ymm14h
+-128:ymm15h
+ 128:bnd0raw
+ 128:bnd1raw
+ 128:bnd2raw
+diff --git a/gdb/regformats/i386/i386-avx-mpx-linux.dat b/gdb/regformats/i386/i386-avx-mpx-linux.dat
+new file mode 100644
+index 0000000..831c476
+--- /dev/null
++++ b/gdb/regformats/i386/i386-avx-mpx-linux.dat
+@@ -0,0 +1,61 @@
++# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
++# Generated from: i386/i386-avx-mpx-linux.xml
++name:i386_avx_mpx_linux
++xmltarget:i386-avx-mpx-linux.xml
++expedite:ebp,esp,eip
++32:eax
++32:ecx
++32:edx
++32:ebx
++32:esp
++32:ebp
++32:esi
++32:edi
++32:eip
++32:eflags
++32:cs
++32:ss
++32:ds
++32:es
++32:fs
++32:gs
++80:st0
++80:st1
++80:st2
++80:st3
++80:st4
++80:st5
++80:st6
++80:st7
++32:fctrl
++32:fstat
++32:ftag
++32:fiseg
++32:fioff
++32:foseg
++32:fooff
++32:fop
++128:xmm0
++128:xmm1
++128:xmm2
++128:xmm3
++128:xmm4
++128:xmm5
++128:xmm6
++128:xmm7
++32:mxcsr
++32:orig_eax
++128:ymm0h
++128:ymm1h
++128:ymm2h
++128:ymm3h
++128:ymm4h
++128:ymm5h
++128:ymm6h
++128:ymm7h
++128:bnd0raw
++128:bnd1raw
++128:bnd2raw
++128:bnd3raw
++64:bndcfgu
++64:bndstatus
+diff --git a/gdb/regformats/i386/i386-avx-mpx.dat b/gdb/regformats/i386/i386-avx-mpx.dat
+new file mode 100644
+index 0000000..8caef75
+--- /dev/null
++++ b/gdb/regformats/i386/i386-avx-mpx.dat
+@@ -0,0 +1,60 @@
++# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
++# Generated from: i386/i386-avx-mpx.xml
++name:i386_avx_mpx
++xmltarget:i386-avx-mpx.xml
++expedite:ebp,esp,eip
++32:eax
++32:ecx
++32:edx
++32:ebx
++32:esp
++32:ebp
++32:esi
++32:edi
++32:eip
++32:eflags
++32:cs
++32:ss
++32:ds
++32:es
++32:fs
++32:gs
++80:st0
++80:st1
++80:st2
++80:st3
++80:st4
++80:st5
++80:st6
++80:st7
++32:fctrl
++32:fstat
++32:ftag
++32:fiseg
++32:fioff
++32:foseg
++32:fooff
++32:fop
++128:xmm0
++128:xmm1
++128:xmm2
++128:xmm3
++128:xmm4
++128:xmm5
++128:xmm6
++128:xmm7
++32:mxcsr
++128:ymm0h
++128:ymm1h
++128:ymm2h
++128:ymm3h
++128:ymm4h
++128:ymm5h
++128:ymm6h
++128:ymm7h
++128:bnd0raw
++128:bnd1raw
++128:bnd2raw
++128:bnd3raw
++64:bndcfgu
++64:bndstatus
+diff --git a/gdb/regformats/i386/i386-mpx-linux.dat b/gdb/regformats/i386/i386-mpx-linux.dat
+index b52b68d..1dcdce9 100644
+--- a/gdb/regformats/i386/i386-mpx-linux.dat
++++ b/gdb/regformats/i386/i386-mpx-linux.dat
+@@ -45,14 +45,6 @@ expedite:ebp,esp,eip
+ 128:xmm7
+ 32:mxcsr
+ 32:orig_eax
+-128:ymm0h
+-128:ymm1h
+-128:ymm2h
+-128:ymm3h
+-128:ymm4h
+-128:ymm5h
+-128:ymm6h
+-128:ymm7h
+ 128:bnd0raw
+ 128:bnd1raw
+ 128:bnd2raw
+diff --git a/gdb/regformats/i386/i386-mpx.dat b/gdb/regformats/i386/i386-mpx.dat
+index 0ea420b..dda5164 100644
+--- a/gdb/regformats/i386/i386-mpx.dat
++++ b/gdb/regformats/i386/i386-mpx.dat
+@@ -44,14 +44,6 @@ expedite:ebp,esp,eip
+ 128:xmm6
+ 128:xmm7
+ 32:mxcsr
+-128:ymm0h
+-128:ymm1h
+-128:ymm2h
+-128:ymm3h
+-128:ymm4h
+-128:ymm5h
+-128:ymm6h
+-128:ymm7h
+ 128:bnd0raw
+ 128:bnd1raw
+ 128:bnd2raw
+diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp
+index 15ad7e7..3a94471 100644
+--- a/gdb/testsuite/gdb.trace/ftrace.exp
++++ b/gdb/testsuite/gdb.trace/ftrace.exp
+@@ -132,7 +132,6 @@ proc test_fast_tracepoints {} {
+ gdb_test "tfind pc *set_point" "Found trace frame .*" \
+ "tfind set_point frame, first time"
+
+- setup_kfail "gdb/13808" "x86_64-*-linux*"
+ gdb_test "print globvar" " = 1"
+
+ gdb_test "tfind pc *set_point" "Found trace frame .*" \
+diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c
+index 3cc18c1..107576f 100644
+--- a/gdb/x86-linux-nat.c
++++ b/gdb/x86-linux-nat.c
+@@ -215,6 +215,11 @@ x86_linux_read_description (struct target_ops *ops)
+ return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
+ else
+ return tdesc_amd64_mpx_linux;
++ case X86_XSTATE_AVX_MPX_MASK:
++ if (is_x32)
++ return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
++ else
++ return tdesc_amd64_avx_mpx_linux;
+ case X86_XSTATE_AVX_MASK:
+ if (is_x32)
+ return tdesc_x32_avx_linux;
+@@ -237,6 +242,8 @@ x86_linux_read_description (struct target_ops *ops)
+ return tdesc_i386_avx512_linux;
+ case X86_XSTATE_MPX_MASK:
+ return tdesc_i386_mpx_linux;
++ case X86_XSTATE_AVX_MPX_MASK:
++ return tdesc_i386_avx_mpx_linux;
+ case X86_XSTATE_AVX_MASK:
+ return tdesc_i386_avx_linux;
+ default:
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/force-readline-static.patch b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/force-readline-static.patch
deleted file mode 100644
index d34ee8cee..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb/force-readline-static.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-If gdb is configured with --disable-static then this is dutifully passed to
-readline which then disables libreadline.a, which causes a problem when gdb
-tries to link against that.
-
-To ensure that readline always builds static libraries, pass --enable-static to
-the sub-configure.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/Makefile.def b/Makefile.def
-index 4394188..05c661a 100644
---- a/Makefile.def
-+++ b/Makefile.def
-@@ -100,7 +100,8 @@ host_modules= { module= libiconv;
- missing= install-html;
- missing= install-info; };
- host_modules= { module= m4; };
--host_modules= { module= readline; };
-+host_modules= { module= readline;
-+ extra_configure_flags='--enable-static';};
- host_modules= { module= sid; };
- host_modules= { module= sim; };
- host_modules= { module= texinfo; no_install= true; };
-diff --git a/Makefile.in b/Makefile.in
-index 61e0ab6..837f36e 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -24971,7 +24971,7 @@ configure-readline:
- $$s/$$module_srcdir/configure \
- --srcdir=$${topdir}/$$module_srcdir \
- $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
-- --target=${target_alias} \
-+ --target=${target_alias} --enable-static \
- || exit 1
- @endif readline
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.10.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.10.1.bb
deleted file mode 100644
index f897e1213..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.10.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require gdb.inc
-require gdb-${PV}.inc
-
-inherit python-dir
-
-do_configure_prepend() {
- if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
- cat > ${WORKDIR}/python << EOF
-#!/bin/sh
-case "\$2" in
- --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;;
- --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
- --exec-prefix) echo "${exec_prefix}" ;;
- *) exit 1 ;;
-esac
-exit 0
-EOF
- chmod +x ${WORKDIR}/python
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.11.bb b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.11.bb
new file mode 100644
index 000000000..57cffc998
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/gdb/gdb_7.11.bb
@@ -0,0 +1,26 @@
+require gdb.inc
+require gdb-${PV}.inc
+
+inherit python3-dir
+
+EXTRA_OEMAKE_append_libc-musl = "\
+ gt_cv_func_gnugettext1_libc=yes \
+ gt_cv_func_gnugettext2_libc=yes \
+ "
+
+do_configure_prepend() {
+ if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
+ cat > ${WORKDIR}/python << EOF
+#!/bin/sh
+case "\$2" in
+ --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;;
+ --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;;
+ --exec-prefix) echo "${exec_prefix}" ;;
+ *) exit 1 ;;
+esac
+exit 0
+EOF
+ chmod +x ${WORKDIR}/python
+ fi
+}
+CFLAGS_append_libc-musl = " -Drpl_gettimeofday=gettimeofday"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
index a1d0300be..753b0472a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git.inc
@@ -17,6 +17,7 @@ EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \
--without-tcltk \
"
+# Needs brokensep as this doesn't use automake
inherit autotools-brokensep perlnative bash-completion
EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
@@ -31,8 +32,7 @@ do_compile_prepend () {
do_install () {
oe_runmake install DESTDIR="${D}" bindir=${bindir} \
- template_dir=${datadir}/git-core/templates \
- GIT_PYTHON_DIR=${D}${datadir}/git-core/python
+ template_dir=${datadir}/git-core/templates
install -d ${D}/${mandir}/man1
install -d ${D}/${mandir}/man5
install -d ${D}/${mandir}/man7
@@ -107,10 +107,6 @@ FILES_${PN}-perltools += " \
"
RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
-PACKAGES =+ "${PN}-python"
-FILES_${PN}-python = "${libdir}/python*"
-
-
# git-tk package with gitk and git-gui
PACKAGES =+ "${PN}-tk"
#RDEPENDS_${PN}-tk = "${PN} tk tcl"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.7.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.7.4.bb
deleted file mode 100644
index bc72793d4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.7.4.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require git.inc
-
-EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
- ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
- "
-EXTRA_OEMAKE += "NO_GETTEXT=1"
-
-SRC_URI[tarball.md5sum] = "c64012d491e24c7d65cd389f75383d91"
-SRC_URI[tarball.sha256sum] = "7104c4f5d948a75b499a954524cb281fe30c6649d8abe20982936f75ec1f275b"
-SRC_URI[manpages.md5sum] = "58020dc13a5801c49f7986fef7027535"
-SRC_URI[manpages.sha256sum] = "0dfe1931ad302873470e0280248e3aa50502b5edd00dcc3e9c9173667b6fea6a"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.9.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.9.3.bb
new file mode 100644
index 000000000..d59f3d283
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/git/git_2.9.3.bb
@@ -0,0 +1,11 @@
+require git.inc
+
+EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
+ ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
+ "
+EXTRA_OEMAKE += "NO_GETTEXT=1"
+
+SRC_URI[tarball.md5sum] = "c783361be894b8bfa5373811b1b65602"
+SRC_URI[tarball.sha256sum] = "a252b6636b12d5ba57732c8469701544c26c2b1689933bd1b425e603cbb247c0"
+SRC_URI[manpages.md5sum] = "66fafd61d65f9d2d99581133170eb186"
+SRC_URI[manpages.sha256sum] = "8ea1a55b048fafbf0c0c6fcbca4b5b0f5e9917893221fc7345c09051d65832ce"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch
deleted file mode 100644
index 24f073f9f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 814d6fb6c1f4a544c8fd37f5a390ba020c2d8c85 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 10 Jan 2016 22:28:17 +0000
-Subject: [PATCH] libguile: Check for strtol_l during configure
-
-strtol_l is a gnu extention which may not be available on other linux
-libc implementations e.g. musl. Therefore check for this funciton and
-conditionalize the use of it.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 5 +++--
- libguile/i18n.c | 2 +-
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3969929..f8a6a1a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -752,7 +752,8 @@ AC_CHECK_HEADERS([assert.h crt_externs.h])
- # truncate - not in mingw
- # isblank - available as a GNU extension or in C99
- # _NSGetEnviron - Darwin specific
--# strcoll_l, newlocale - GNU extensions (glibc), also available on Darwin
-+# strcoll_l, newlocale, strtol_l - GNU extensions (glibc),
-+# also available on Darwin
- # fork - unavailable on Windows
- # utimensat - posix.1-2008
- # sched_getaffinity, sched_setaffinity - GNU extensions (glibc)
-@@ -768,7 +769,7 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid \
- getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp \
- index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron \
- strcoll strcoll_l newlocale utimensat sched_getaffinity \
-- sched_setaffinity sendfile])
-+ sched_setaffinity sendfile strtol_l])
-
- AM_CONDITIONAL([BUILD_ICE_9_POPEN],
- [test "x$enable_posix" = "xyes" && test "x$ac_cv_func_fork" = "xyes"])
-diff --git a/libguile/i18n.c b/libguile/i18n.c
-index 97d44b0..9fb6976 100644
---- a/libguile/i18n.c
-+++ b/libguile/i18n.c
-@@ -1352,7 +1352,7 @@ SCM_DEFINE (scm_locale_string_to_integer, "locale-string->integer",
-
- if (c_locale != NULL)
- {
--#ifdef USE_GNU_LOCALE_API
-+#if defined(USE_GNU_LOCALE_API) && defined(HAVE_STRTOL_L)
- c_result = strtol_l (c_str, &c_endptr, c_base, c_locale);
- #else
- RUN_IN_LOCALE_SECTION (c_locale,
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
index 519585b8e..8e8474770 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
@@ -10,27 +10,23 @@ Upstream-Status: Submitted [ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22480
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/system/base/target.scm b/module/system/base/target.scm
-index d60a8e0..d1f6cff 100644
--- a/module/system/base/target.scm
+++ b/module/system/base/target.scm
@@ -65,7 +65,7 @@
(cond ((string-match "^i[0-9]86$" cpu)
(endianness little))
((member cpu '("x86_64" "ia64"
-- "powerpcle" "powerpc64le" "mipsel" "mips64el"))
-+ "powerpcle" "powerpc64le" "mipsel" "mips64el" "nios2"))
+- "powerpcle" "powerpc64le" "mipsel" "mips64el" "sh4"))
++ "powerpcle" "powerpc64le" "mipsel" "mips64el" "sh4" "nios2"))
(endianness little))
((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
- "mips" "mips64"))
-@@ -100,7 +100,7 @@
+ "mips" "mips64" "m68k" "s390x"))
+@@ -108,7 +108,7 @@
((string-match "64$" cpu) 8)
- ((string-match "64[lbe][lbe]$" cpu) 8)
-- ((member cpu '("sparc" "powerpc" "mips" "mipsel")) 4)
-+ ((member cpu '("sparc" "powerpc" "mips" "mipsel" "nios2")) 4)
+ ((string-match "64_?[lbe][lbe]$" cpu) 8)
+- ((member cpu '("sparc" "powerpc" "mips" "mipsel" "m68k" "sh4")) 4)
++ ((member cpu '("sparc" "powerpc" "mips" "mipsel" "m68k" "sh4" "nios2")) 4)
+ ((member cpu '("s390x")) 8)
((string-match "^arm.*" cpu) 4)
(else (error "unknown CPU word size" cpu)))))
-
---
-2.7.0.rc3
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
index 43238a7d2..c7bf635ac 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
@@ -1,6 +1,6 @@
Upstream-Status: Inappropriate [debian patch]
-Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
From e52bfcdbaca5dce498678d8f512381e3e39a4066 Mon Sep 17 00:00:00 2001
From: Rob Browning <rlb@defaultvalue.org>
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
index 34be3b96e..d3faf3e01 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
@@ -1,6 +1,6 @@
Upstream-Status: Inappropriate [debian patch]
-Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
From 848543091d55dddb54a85612155964506d712852 Mon Sep 17 00:00:00 2001
From: Rob Browning <rlb@defaultvalue.org>
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch
index e5dc22637..5597bb21f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch
@@ -6,7 +6,7 @@ autoreconf error avoided:
| sed: -e expression #1, char 9: unknown option to `s'
| configure.ac:39: error: AC_INIT should be called with package and version arguments
-Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/01
Index: guile-2.0.5/build-aux/git-version-gen
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch
deleted file mode 100644
index e50059a7e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From a85c78ea1393985fdb6e6678dea19135c553d341 Mon Sep 17 00:00:00 2001
-From: Mark H Weaver <mhw@netris.org>
-Date: Fri, 19 Sep 2014 21:18:09 -0400
-Subject: [PATCH] VM: ASM_MUL for ARM: Add earlyclobber constraint to the SMULL
- outputs.
-
-Reported by Rob Browning <rlb@defaultvalue.org>.
-
-* libguile/vm-i-scheme.c (ASM_MUL)[ARM]: Add earlyclobber (&) constraint
- to the SMULL output registers.
-
-Author: Mark H Weaver <mhw@netris.org>
-
-Upstream-Status: Backport
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- libguile/vm-i-scheme.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c
-index 587aa95..162efab 100644
---- a/libguile/vm-i-scheme.c
-+++ b/libguile/vm-i-scheme.c
-@@ -1,5 +1,4 @@
--/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013,
-- * 2014 Free Software Foundation, Inc.
-+/* Copyright (C) 2001, 2009-2014 Free Software Foundation, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
-@@ -363,7 +362,7 @@ VM_DEFINE_FUNCTION (149, ge, "ge?", 2)
- { \
- scm_t_signed_bits rlo, rhi; \
- asm ("smull %0, %1, %2, %3\n" \
-- : "=r" (rlo), "=r" (rhi) \
-+ : "=&r" (rlo), "=&r" (rhi) \
- : "r" (SCM_UNPACK (x) - scm_tc2_int), \
- "r" (SCM_I_INUM (y))); \
- if (SCM_LIKELY (SCM_SRS (rlo, 31) == rhi)) \
---
-2.3.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
index d3e312f77..da69b5fd7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
@@ -1,6 +1,6 @@
Upstream-Status: Inappropriate [opensuse patch]
-Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Index: guile-2.0.3/libguile/hash.c
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch
deleted file mode 100644
index e20148628..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Upstream-Status: Inappropriate [opensuse patch]
-
-Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10096
-why this test is turned off.
-Index: guile-2.0.3/test-suite/tests/gc.test
-===================================================================
---- guile-2.0.3.orig/test-suite/tests/gc.test 2011-10-15 09:34:40.000000000 -0700
-+++ guile-2.0.3/test-suite/tests/gc.test 2012-01-13 21:52:10.282540355 -0800
-@@ -65,23 +65,23 @@
- foo)))
-
-
--(with-test-prefix "gc"
-- (pass-if "Unused modules are removed"
-- (let* ((guard (make-guardian))
-- (total 1000))
--
-- (for-each (lambda (x) (guard (make-module))) (iota total))
-+;;(with-test-prefix "gc"
-+;; (pass-if "Unused modules are removed"
-+;; (let* ((guard (make-guardian))
-+;; (total 1000))
-+;;
-+;; (for-each (lambda (x) (guard (make-module))) (iota total))
-
- ;; Avoid false references to the modules on the stack.
-- (stack-cleanup 20)
-+;; (stack-cleanup 20)
-
-- (gc)
-- (gc) ;; twice: have to kill the weak vectors.
-- (gc) ;; thrice: because the test doesn't succeed with only
-+;; (gc)
-+;; (gc) ;; twice: have to kill the weak vectors.
-+;; (gc) ;; thrice: because the test doesn't succeed with only
- ;; one gc round. not sure why.
-
-- (= (let lp ((i 0))
-- (if (guard)
-- (lp (1+ i))
-- i))
-- total))))
-+;; (= (let lp ((i 0))
-+;; (if (guard)
-+;; (lp (1+ i))
-+;; i))
-+;; total))))
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch b/import-layers/yocto-poky/meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch
deleted file mode 100644
index e7a06fef1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-These unused functions cause build failures with uclibc since they reference __uclibc_locale_struct
-and this is exposed by uclibc API headers only if C locales are built, but for OE we build full locale
-support
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: guile-2.0.11/libguile/i18n.c
-===================================================================
---- guile-2.0.11.orig/libguile/i18n.c
-+++ guile-2.0.11/libguile/i18n.c
-@@ -851,27 +851,6 @@ str_downcase (register char *dst, regist
- *dst = '\0';
- }
-
--#ifdef USE_GNU_LOCALE_API
--static inline void
--str_upcase_l (register char *dst, register const char *src,
-- scm_t_locale locale)
--{
-- for (; *src != '\0'; src++, dst++)
-- *dst = toupper_l (*src, locale);
-- *dst = '\0';
--}
--
--static inline void
--str_downcase_l (register char *dst, register const char *src,
-- scm_t_locale locale)
--{
-- for (; *src != '\0'; src++, dst++)
-- *dst = tolower_l (*src, locale);
-- *dst = '\0';
--}
--#endif
--
--
- SCM_DEFINE (scm_string_locale_lt, "string-locale<?", 2, 1, 0,
- (SCM s1, SCM s2, SCM locale),
- "Compare strings @var{s1} and @var{s2} in a locale-dependent way."
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.11.bb b/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.11.bb
deleted file mode 100644
index 6cefe6649..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.11.bb
+++ /dev/null
@@ -1,128 +0,0 @@
-SUMMARY = "Guile is the GNU Ubiquitous Intelligent Language for Extensions"
-DESCRIPTION = "Guile is the GNU Ubiquitous Intelligent Language for Extensions,\
- the official extension language for the GNU operating system.\
- Guile is a library designed to help programmers create flexible applications.\
- Using Guile in an application allows the application's functionality to be\
- extended by users or other programmers with plug-ins, modules, or scripts.\
- Guile provides what might be described as 'practical software freedom,'\
- making it possible for users to customize an application to meet their\
- needs without digging into the application's internals."
-
-HOMEPAGE = "http://www.gnu.org/software/guile/"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
- file://debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch \
- file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \
- file://opensuse/guile-64bit.patch \
- file://guile_2.0.6_fix_sed_error.patch \
- file://arm_endianness.patch \
- file://arm_aarch64.patch \
- file://workaround-ice-ssa-corruption.patch \
- file://libguile-Makefile.am-hook.patch \
- file://libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch \
- file://remove_strcase_l_funcs.patch \
- file://0001-libguile-Check-for-strtol_l-during-configure.patch \
- file://0002-Recognize-nios2-as-compilation-target.patch \
- "
-
-# file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
-# file://opensuse/guile-turn-off-gc-test.patch
-
-SRC_URI[md5sum] = "03f1bce1a4983076d955003472306a13"
-SRC_URI[sha256sum] = "aed0a4a6db4e310cbdfeb3613fa6f86fddc91ef624c1e3f8937a6304c69103e2"
-
-
-inherit autotools gettext pkgconfig texinfo
-BBCLASSEXTEND = "native"
-
-DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline"
-# add guile-native only to the target recipe's DEPENDS
-DEPENDS_append_class-target = " guile-native libatomic-ops"
-
-# The comment of the script guile-config said it has been deprecated but we should
-# at least add the required dependency to make it work since we still provide the script.
-RDEPENDS_${PN} = "pkgconfig"
-
-RDEPENDS_${PN}_append_libc-glibc_class-target = " glibc-gconv-iso8859-1"
-
-EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix --without-libreadline-prefix', ''][bb.data.inherits_class('native',d)]}"
-
-EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR} \
- --with-libgmp-prefix=${STAGING_LIBDIR} \
- --with-libltdl-prefix=${STAGING_LIBDIR}"
-EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no "
-
-CFLAGS_append_libc-musl = " -DHAVE_GC_SET_FINALIZER_NOTIFIER \
- -DHAVE_GC_GET_HEAP_USAGE_SAFE \
- -DHAVE_GC_GET_FREE_SPACE_DIVISOR \
- -DHAVE_GC_SET_FINALIZE_ON_DEMAND \
- "
-
-do_configure_prepend() {
- mkdir -p po
-}
-
-export GUILE_FOR_BUILD="${BUILD_SYS}-guile"
-
-do_install_append_class-native() {
- install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile
-
- create_wrapper ${D}/${bindir}/guile \
- GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
- GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
- create_wrapper ${D}${bindir}/${HOST_SYS}-guile \
- GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
- GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
-}
-
-do_install_append_class-target() {
- # cleanup buildpaths in scripts
- sed -i -e 's:${STAGING_DIR_NATIVE}::' ${D}${bindir}/guile-config
- sed -i -e 's:${STAGING_DIR_HOST}::' ${D}${bindir}/guile-snarf
-
- sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc
-}
-
-do_install_append_libc-musl() {
- rm -f ${D}${libdir}/charset.alias
-}
-
-SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
-
-guile_cross_config() {
- # this is only for target recipe
- if [ "${PN}" = "guile" ]
- then
- # Create guile-config returning target values instead of native values
- install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
- echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
- > ${B}/guile-config.cross
- sed -n -e 's:^[ \t]*{[ \t]*": (:' \
- -e 's:",[ \t]*": . ":' \
- -e 's:" *}, *\\:"):' \
- -e 's:^.*cachedir.*$::' \
- -e '/^ (/p' \
- < ${B}/libguile/libpath.h >> ${B}/guile-config.cross
- echo '))' >> ${B}/guile-config.cross
- cat ${B}/meta/guile-config >> ${B}/guile-config.cross
- install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
- fi
-}
-
-# Guile needs the compiled files to be newer than the source, and it won't
-# auto-compile into the prefix even if it can write there, so touch them here as
-# sysroot is managed.
-SSTATEPOSTINSTFUNCS += "guile_sstate_postinst"
-guile_sstate_postinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
- then
- find ${STAGING_DIR_TARGET}/${libdir}/guile/2.0/ccache -type f | xargs touch
- fi
-}
-
-# http://errors.yoctoproject.org/Errors/Details/20491/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.12.bb
new file mode 100644
index 000000000..d2fe511ae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/guile/guile_2.0.12.bb
@@ -0,0 +1,121 @@
+SUMMARY = "Guile is the GNU Ubiquitous Intelligent Language for Extensions"
+DESCRIPTION = "Guile is the GNU Ubiquitous Intelligent Language for Extensions,\
+ the official extension language for the GNU operating system.\
+ Guile is a library designed to help programmers create flexible applications.\
+ Using Guile in an application allows the application's functionality to be\
+ extended by users or other programmers with plug-ins, modules, or scripts.\
+ Guile provides what might be described as 'practical software freedom,'\
+ making it possible for users to customize an application to meet their\
+ needs without digging into the application's internals."
+
+HOMEPAGE = "http://www.gnu.org/software/guile/"
+SECTION = "devel"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
+ file://debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch \
+ file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \
+ file://opensuse/guile-64bit.patch \
+ file://guile_2.0.6_fix_sed_error.patch \
+ file://arm_endianness.patch \
+ file://arm_aarch64.patch \
+ file://workaround-ice-ssa-corruption.patch \
+ file://libguile-Makefile.am-hook.patch \
+ file://0002-Recognize-nios2-as-compilation-target.patch \
+ "
+
+SRC_URI[md5sum] = "081fdf80cd3a76f260a2a0d87f773d6b"
+SRC_URI[sha256sum] = "de8187736f9b260f2fa776ed39b52cb74dd389ccf7039c042f0606270196b7e9"
+
+inherit autotools gettext pkgconfig texinfo
+BBCLASSEXTEND = "native"
+
+DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline"
+# add guile-native only to the target recipe's DEPENDS
+DEPENDS_append_class-target = " guile-native libatomic-ops"
+
+# The comment of the script guile-config said it has been deprecated but we should
+# at least add the required dependency to make it work since we still provide the script.
+RDEPENDS_${PN} = "pkgconfig"
+
+RDEPENDS_${PN}_append_libc-glibc_class-target = " glibc-gconv-iso8859-1"
+
+EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix --without-libreadline-prefix', ''][bb.data.inherits_class('native',d)]}"
+
+EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR} \
+ --with-libgmp-prefix=${STAGING_LIBDIR} \
+ --with-libltdl-prefix=${STAGING_LIBDIR}"
+EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no "
+
+CFLAGS_append_libc-musl = " -DHAVE_GC_SET_FINALIZER_NOTIFIER \
+ -DHAVE_GC_GET_HEAP_USAGE_SAFE \
+ -DHAVE_GC_GET_FREE_SPACE_DIVISOR \
+ -DHAVE_GC_SET_FINALIZE_ON_DEMAND \
+ "
+
+do_configure_prepend() {
+ mkdir -p po
+}
+
+export GUILE_FOR_BUILD="${BUILD_SYS}-guile"
+
+do_install_append_class-native() {
+ install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile
+
+ create_wrapper ${D}/${bindir}/guile \
+ GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
+ GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
+ create_wrapper ${D}${bindir}/${HOST_SYS}-guile \
+ GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
+ GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
+}
+
+do_install_append_class-target() {
+ # cleanup buildpaths in scripts
+ sed -i -e 's:${STAGING_DIR_NATIVE}::' ${D}${bindir}/guile-config
+ sed -i -e 's:${STAGING_DIR_HOST}::' ${D}${bindir}/guile-snarf
+
+ sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc
+}
+
+do_install_append_libc-musl() {
+ rm -f ${D}${libdir}/charset.alias
+}
+
+SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
+
+guile_cross_config() {
+ # this is only for target recipe
+ if [ "${PN}" = "guile" ]
+ then
+ # Create guile-config returning target values instead of native values
+ install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
+ echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
+ > ${B}/guile-config.cross
+ sed -n -e 's:^[ \t]*{[ \t]*": (:' \
+ -e 's:",[ \t]*": . ":' \
+ -e 's:" *}, *\\:"):' \
+ -e 's:^.*cachedir.*$::' \
+ -e '/^ (/p' \
+ < ${B}/libguile/libpath.h >> ${B}/guile-config.cross
+ echo '))' >> ${B}/guile-config.cross
+ cat ${B}/meta/guile-config >> ${B}/guile-config.cross
+ install ${B}/guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
+ fi
+}
+
+# Guile needs the compiled files to be newer than the source, and it won't
+# auto-compile into the prefix even if it can write there, so touch them here as
+# sysroot is managed.
+SSTATEPOSTINSTFUNCS += "guile_sstate_postinst"
+guile_sstate_postinst() {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+ then
+ find ${STAGING_DIR_TARGET}/${libdir}/guile/2.0/ccache -type f | xargs touch
+ fi
+}
+
+# http://errors.yoctoproject.org/Errors/Details/20491/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.3.bb
deleted file mode 100644
index 232b0c37a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Program for creating simple man pages"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "autoconf-native automake-native"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "d1d44a7a7b2bd61755a2045d96ecaea0"
-SRC_URI[sha256sum] = "c232af6475ef65bee02770862a362f4c4c2e6c9967d39e987eb94cadcfc13856"
-
-inherit autotools native
-
-EXTRA_OECONF = "--disable-nls"
-
-# We don't want to reconfigure things as it would require 'perlnative' to be
-# used.
-do_configure() {
- oe_runconf
-}
-
-do_install_append () {
- # Make sure we use /usr/bin/env perl
- sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
new file mode 100644
index 000000000..64dc32cb9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.4.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Program for creating simple man pages"
+SECTION = "devel"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "autoconf-native automake-native"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "544aca496a7d89de3e5d99e56a2f03d3"
+SRC_URI[sha256sum] = "d4ecf697d13f14dd1a78c5995f06459bff706fd1ce593d1c02d81667c0207753"
+
+inherit autotools native
+
+EXTRA_OECONF = "--disable-nls"
+
+# We don't want to reconfigure things as it would require 'perlnative' to be
+# used.
+do_configure() {
+ oe_runconf
+}
+
+do_install_append () {
+ # Make sure we use /usr/bin/env perl
+ sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool.inc b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool.inc
deleted file mode 100644
index eb7ae004a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Utility scripts for internationalizing XML"
-SECTION = "devel"
-LICENSE = "GPLv2"
-
-URLV="${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
-SRC_URI = "http://launchpad.net/${BPN}/trunk/${PV}/+download/${BP}.tar.gz"
-
-UPSTREAM_CHECK_URI = "https://launchpad.net/intltool/trunk/"
-
-S = "${WORKDIR}/intltool-${PV}"
-
-DEPENDS = "libxml-parser-perl-native"
-RDEPENDS_${PN} = "gettext-dev libxml-parser-perl"
-DEPENDS_class-native = "libxml-parser-perl-native"
-# gettext is assumed to exist on the host
-RDEPENDS_${PN}_class-native = "libxml-parser-perl-native"
-RRECOMMENDS_${PN} = "perl-modules"
-RRECOMMENDS_${PN}_class-native = ""
-
-FILES_${PN}-dev = ""
-FILES_${PN} += "${datadir}/aclocal"
-
-INSANE_SKIP_${PN} += "dev-deps"
-
-inherit autotools pkgconfig perlnative
-
-export PERL = "${bindir}/env perl"
-PERL_class-native = "/usr/bin/env nativeperl"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/remove-perl-check.patch b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/remove-perl-check.patch
new file mode 100644
index 000000000..5f57ea333
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/remove-perl-check.patch
@@ -0,0 +1,45 @@
+Remove the perl checks in intltool.m4. This can find a different perl binary to
+the one that the intltool scripts will actually be using (as they hard-code a
+specific binary), for example in the intltool-native case they'll be using
+nativeperl yet this fragment can find and test the host perl.
+
+This can result in recipes failing in do_configure as intltool.m4 finds a host
+perl which doesn't have XML::Parser installed, despite the fact that intltool
+will work fine as nativeperl has XML::Parser.
+
+Upstream-Status: Submitted (https://bugs.launchpad.net/intltool/+bug/1197875)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- a/intltool.m4.orig 2013-07-02 11:22:23.000000000 -0700
++++ b/intltool.m4 2013-07-02 11:22:32.000000000 -0700
+@@ -26,1 +26,1 @@ dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
+-# serial 42 IT_PROG_INTLTOOL
++# serial 42.1 IT_PROG_INTLTOOL
+@@ -131,27 +131,6 @@ if test -z "$xgversion" -o -z "$mmversio
+ AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+ fi
+
+-AC_PATH_PROG(INTLTOOL_PERL, perl)
+-if test -z "$INTLTOOL_PERL"; then
+- AC_MSG_ERROR([perl not found])
+-fi
+-AC_MSG_CHECKING([for perl >= 5.8.1])
+-$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
+-if test $? -ne 0; then
+- AC_MSG_ERROR([perl 5.8.1 is required for intltool])
+-else
+- IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
+- AC_MSG_RESULT([$IT_PERL_VERSION])
+-fi
+-if test "x$2" != "xno-xml"; then
+- AC_MSG_CHECKING([for XML::Parser])
+- if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+- AC_MSG_RESULT([ok])
+- else
+- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
+- fi
+-fi
+-
+ # Substitute ALL_LINGUAS so we can use it in po/Makefile
+ AC_SUBST(ALL_LINGUAS)
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/remove-xml-check.patch b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/remove-xml-check.patch
deleted file mode 100644
index fc69e37b4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/remove-xml-check.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Signed-off-by: Florin Sarbu <florin.sarbu@windriver.com>
-
-Upstream-Status: Inappropriate [OE specific]
-
-Index: intltool-0.40.6/intltool.m4
-===================================================================
---- intltool-0.40.6.orig/intltool.m4 2009-02-14 14:12:28.000000000 -0800
-+++ intltool-0.40.6/intltool.m4 2011-11-23 15:39:34.689561872 -0800
-@@ -122,14 +122,16 @@
- IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
- AC_MSG_RESULT([$IT_PERL_VERSION])
- fi
--if test "x$2" != "xno-xml"; then
-- AC_MSG_CHECKING([for XML::Parser])
-- if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
-- AC_MSG_RESULT([ok])
-- else
-- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-- fi
--fi
-+
-+# Disable this check since we know XML::Parser is installed
-+#if test "x$2" != "xno-xml"; then
-+# AC_MSG_CHECKING([for XML::Parser])
-+# if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
-+# AC_MSG_RESULT([ok])
-+# else
-+# AC_MSG_ERROR([XML::Parser perl module is required for intltool])
-+# fi
-+#fi
-
- # Substitute ALL_LINGUAS so we can use it in po/Makefile
- AC_SUBST(ALL_LINGUAS)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/use-nativeperl.patch b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/use-nativeperl.patch
deleted file mode 100644
index 5f5fed385..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool/use-nativeperl.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-OE has perl binary as 'nativeperl' in native sysroot so we look for it
-in order to avoid intltool searching and finding perl from /usr/bin
-on build system which may not have all the modules that it needs.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE specific]
-Index: intltool-0.40.6/intltool.m4
-===================================================================
---- intltool-0.40.6.orig/intltool.m4 2009-02-14 14:12:28.000000000 -0800
-+++ intltool-0.40.6/intltool.m4 2011-08-09 08:07:16.427347846 -0700
-@@ -110,7 +110,7 @@
- AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
- fi
-
--AC_PATH_PROG(INTLTOOL_PERL, perl)
-+AC_PATH_PROG(INTLTOOL_PERL, nativeperl)
- if test -z "$INTLTOOL_PERL"; then
- AC_MSG_ERROR([perl not found])
- fi
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb
index d520d43c1..a7ea3b727 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/intltool/intltool_0.51.0.bb
@@ -1,19 +1,36 @@
-require intltool.inc
+SUMMARY = "Utility scripts for internationalizing XML"
+SECTION = "devel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-SRC_URI += "file://intltool-nowarn.patch \
- file://perl-522-deprecations.patch \
- ${NATIVEPATCHES} \
+SRC_URI = "http://launchpad.net/${BPN}/trunk/${PV}/+download/${BP}.tar.gz \
+ file://intltool-nowarn.patch \
+ file://perl-522-deprecations.patch \
+ file://remove-perl-check.patch \
+ file://noperlcheck.patch \
"
-
-#
-# All of the intltool scripts have the correct paths to perl already
-# embedded into them and can find perl fine, so we add the remove xml-check
-# in the intltool.m4 via the remove-xml-check.patch
-NATIVEPATCHES = "file://noperlcheck.patch \
- file://remove-xml-check.patch"
-NATIVEPATCHES_class-native = "file://use-nativeperl.patch"
-
SRC_URI[md5sum] = "12e517cac2b57a0121cda351570f1e63"
SRC_URI[sha256sum] = "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd"
+
+UPSTREAM_CHECK_URI = "https://launchpad.net/intltool/trunk/"
+
+DEPENDS = "libxml-parser-perl-native"
+RDEPENDS_${PN} = "gettext-dev libxml-parser-perl"
+DEPENDS_class-native = "libxml-parser-perl-native"
+
+inherit autotools pkgconfig perlnative
+
+export PERL = "${bindir}/env perl"
+PERL_class-native = "/usr/bin/env nativeperl"
+
+# gettext is assumed to exist on the host
+RDEPENDS_${PN}_class-native = "libxml-parser-perl-native"
+RRECOMMENDS_${PN} = "perl-modules"
+RRECOMMENDS_${PN}_class-native = ""
+
+FILES_${PN}-dev = ""
+FILES_${PN} += "${datadir}/aclocal"
+
+INSANE_SKIP_${PN} += "dev-deps"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch
new file mode 100644
index 000000000..bfe9d7231
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c/0001-Link-against-libm-when-needed.patch
@@ -0,0 +1,53 @@
+From 93582ad85ef48c18ac12f00a9a9e124989b1fcab Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Fri, 1 May 2015 12:52:18 +0200
+Subject: [PATCH] Link against libm when needed
+
+In certain C libraries (e.g uClibc), isnan() and related functions are
+implemented in libm, so json-c needs to link against it. This commit
+therefore adds an AC_TRY_LINK() test to check whether a program
+calling isnan() can be properly linked with no special flags. If not,
+we assume linking against libm is needed.
+
+The json-c.pc.in file is also adjusted so that in the case of static
+linking against json-c, -lm is also used.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+Upstream-Status: Backport
+
+ configure.ac | 4 ++++
+ json-c.pc.in | 3 ++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c50f81b..30e7174 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -50,6 +50,10 @@ AC_CHECK_DECLS([isinf], [], [], [[#include <math.h>]])
+ AC_CHECK_DECLS([_isnan], [], [], [[#include <float.h>]])
+ AC_CHECK_DECLS([_finite], [], [], [[#include <float.h>]])
+
++if test "$ac_cv_have_decl_isnan" = "yes" ; then
++ AC_TRY_LINK([#include <math.h>], [float f = 0.0; return isnan(f)], [], [LIBS="$LIBS -lm"])
++fi
++
+ #check if .section.gnu.warning accepts long strings (for __warn_references)
+ AC_LANG_PUSH([C])
+
+diff --git a/json-c.pc.in b/json-c.pc.in
+index 037739d..05bfbc8 100644
+--- a/json-c.pc.in
++++ b/json-c.pc.in
+@@ -6,6 +6,7 @@ includedir=@includedir@
+ Name: json-c
+ Description: JSON implementation in C
+ Version: @VERSION@
+-Requires:
++Requires:
++Libs.private: @LIBS@
+ Libs: -L${libdir} -ljson-c
+ Cflags: -I${includedir}/json-c
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb
index 1a5c3948e..a15455c9b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
file://0001-json_tokener-requires-INF-and-NAN.patch \
+ file://0001-Link-against-libm-when-needed.patch \
"
SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491"
@@ -27,3 +28,5 @@ do_configure_prepend() {
# Clean up autoconf cruft that should not be in the tarball
rm -f ${S}/config.status
}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
index 48a2f935b..9b65a991d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/kconfig-frontends/kconfig-frontends_3.12.0.0.bb
@@ -11,14 +11,14 @@ HOMEPAGE = "http://ymorin.is-a-geek.org/projects/kconfig-frontends"
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=9b8cf60ff39767ff04b671fca8302408"
SECTION = "devel"
-DEPENDS += "ncurses flex bison gperf-native pkgconfig-native"
+DEPENDS += "ncurses flex bison gperf-native"
RDEPENDS_${PN} += "python bash"
SRC_URI = "http://ymorin.is-a-geek.org/download/${BPN}/${BP}.tar.xz"
SRC_URI[md5sum] = "b939280dcc83f8feabd87a1d5f9b00c2"
SRC_URI[sha256sum] = "ea2615a62c74bea6ce3b38402f00c7513858f307f6ba7aa9fdbf0bbc12bcf407"
-inherit autotools
+inherit autotools pkgconfig
do_configure_prepend () {
mkdir -p scripts/.autostuff/m4
}
@@ -32,7 +32,7 @@ EXTRA_OECONF += "--disable-gconf --disable-qconf"
# Some packages have the version preceeding the .so instead properly
# versioned .so.<version>, so we need to reorder and repackage.
-SOLIBS = "-${@d.getVar('PV',1)[:-2]}.so"
+SOLIBS = "-${@d.getVar('PV', True)[:-2]}.so"
FILES_SOLIBSDEV = "${libdir}/libkconfig-parser.so"
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
index 0204d347b..b26831046 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
@@ -35,11 +35,6 @@ do_install () {
install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/
}
-SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
-
-libtoolcross_sysroot_preprocess () {
- sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
- sysroot_stage_dir ${D}${target_datadir} ${SYSROOT_DESTDIR}${target_datadir}
-}
+SYSROOT_DIRS += "${bindir_crossscripts} ${target_datadir}"
SSTATE_SCAN_FILES += "libtoolize *-libtool"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index 3851ec7f8..8858f6eef 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -5,7 +5,11 @@ RDEPENDS_${PN} += "bash"
#
# We want the results of libtool-cross preserved - don't stage anything ourselves.
#
-SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
+SYSROOT_DIRS_BLACKLIST += " \
+ ${bindir} \
+ ${datadir}/aclocal \
+ ${datadir}/libtool/build-aux \
+"
do_install_append () {
sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
@@ -18,10 +22,3 @@ do_install_append () {
-e 's@^\(postdep_objects="\).*@\1"@' \
-i ${D}${bindir}/libtool
}
-
-libtool_sysroot_preprocess () {
- rm -rf ${SYSROOT_DESTDIR}${bindir}/*
- rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
- rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/build-aux/*
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb b/import-layers/yocto-poky/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb
index a8a90fc82..a5deb2e2d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.69.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=077ef64ec3ac257fb0d786531cf26931"
DEPENDS = "groff-native openjade-native"
-SRC_URI = "${DEBIAN_MIRROR}/main/l/linuxdoc-tools/linuxdoc-tools_${PV}.orig.tar.gz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/l/${BPN}/${BPN}_${PV}.orig.tar.gz \
file://disable_sgml2rtf.patch \
file://disable_txt_doc.patch \
file://disable_tex_doc.patch \
@@ -14,6 +14,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/l/linuxdoc-tools/linuxdoc-tools_${PV}.orig.tar.
SRC_URI[md5sum] = "1d13d500918a7a145b0edc2f16f61dd1"
SRC_URI[sha256sum] = "7103facee18a2ea97186ca459d743d22f7f89ad4b5cd1dfd1c34f83d6bfd4101"
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/l/linuxdoc-tools/"
inherit autotools-brokensep native
do_configure () {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make-3.81/make_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-devtools/make/make-3.81/make_fix_for_automake-1.12.patch
index 9b2e96431..102fe79ab 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/make/make-3.81/make_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make-3.81/make_fix_for_automake-1.12.patch
@@ -11,7 +11,7 @@ this patch avoids these kinds of errors:
| ERROR: autoreconf execution failed.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: make-3.81/configure.in
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make-4.1/0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch b/import-layers/yocto-poky/meta/recipes-devtools/make/make-4.1/0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch
deleted file mode 100644
index 7a5f4ba05..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/make/make-4.1/0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 292da6f6867b75a5af7ddbb639a1feae022f438f Mon Sep 17 00:00:00 2001
-From: Paul Smith <psmith@gnu.org>
-Date: Mon, 20 Oct 2014 01:54:56 -0400
-Subject: [PATCH] * main.c (main): [SV 43434] Handle NULL returns from
- ttyname().
-
-Upstream-Status: Backport
-
-From: http://git.savannah.gnu.org/cgit/make.git/commit/?id=292da6f6867b75a5af7ddbb639a1feae022f438f
-
----
- main.c | 15 ++++++++++-----
- makeint.h | 3 ++-
- 2 files changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/main.c b/main.c
-index b2d169c..0cdb8a8 100644
---- a/main.c
-+++ b/main.c
-@@ -1429,13 +1429,18 @@ main (int argc, char **argv, char **envp)
- #ifdef HAVE_ISATTY
- if (isatty (fileno (stdout)))
- if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
-- define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)),
-- o_default, 0)->export = v_export;
--
-+ {
-+ const char *tty = TTYNAME (fileno (stdout));
-+ define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME,
-+ o_default, 0)->export = v_export;
-+ }
- if (isatty (fileno (stderr)))
- if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
-- define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)),
-- o_default, 0)->export = v_export;
-+ {
-+ const char *tty = TTYNAME (fileno (stderr));
-+ define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME,
-+ o_default, 0)->export = v_export;
-+ }
- #endif
-
- /* Reset in case the switches changed our minds. */
-diff --git a/makeint.h b/makeint.h
-index 6223936..2009f41 100644
---- a/makeint.h
-+++ b/makeint.h
-@@ -436,10 +436,11 @@ extern struct rlimit stack_limit;
- /* The number of bytes needed to represent the largest integer as a string. */
- #define INTSTR_LENGTH CSTRLEN ("18446744073709551616")
-
-+#define DEFAULT_TTYNAME "true"
- #ifdef HAVE_TTYNAME
- # define TTYNAME(_f) ttyname (_f)
- #else
--# define TTYNAME(_f) "true"
-+# define TTYNAME(_f) DEFAULT_TTYNAME
- #endif
-
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make_4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/make/make_4.1.bb
deleted file mode 100644
index 78fe0b547..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/make/make_4.1.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-LICENSE = "GPLv3 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
-require make.inc
-
-SRC_URI += "file://0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch"
-
-EXTRA_OECONF += "--without-guile"
-
-SRC_URI[md5sum] = "57a7a224a822f94789a587ccbcedff69"
-SRC_URI[sha256sum] = "0bc7613389650ee6a24554b52572a272f7356164fd2c4132b0bcf13123e4fca5"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/make/make_4.2.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/make/make_4.2.1.bb
new file mode 100644
index 000000000..c6e6a0cd5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/make/make_4.2.1.bb
@@ -0,0 +1,12 @@
+LICENSE = "GPLv3 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://tests/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
+require make.inc
+
+EXTRA_OECONF += "--without-guile"
+
+SRC_URI[md5sum] = "15b012617e7c44c0ed482721629577ac"
+SRC_URI[sha256sum] = "d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/makedevs/makedevs/makedevs.c b/import-layers/yocto-poky/meta/recipes-devtools/makedevs/makedevs/makedevs.c
index 771f33ef5..cba768141 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/makedevs/makedevs/makedevs.c
+++ b/import-layers/yocto-poky/meta/recipes-devtools/makedevs/makedevs/makedevs.c
@@ -360,7 +360,7 @@ static int interpret_table_entry(char *line)
unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0;
unsigned long start = 0, increment = 1, count = 0;
- if (0 > sscanf(line, "%40s %c %lo %40s %40s %lu %lu %lu %lu %lu", path,
+ if (0 > sscanf(line, "%4095s %c %lo %40s %40s %lu %lu %lu %lu %lu", path,
&type, &mode, usr_buf, grp_buf, &major, &minor, &start,
&increment, &count))
{
@@ -510,7 +510,7 @@ int main(int argc, char **argv)
umask (0);
if (argc==1) {
- fprintf(stderr, helptext);
+ fputs( helptext , stderr );
exit(1);
}
@@ -525,7 +525,7 @@ int main(int argc, char **argv)
error_msg_and_die("%s: not a proper device table file", optarg);
break;
case 'h':
- printf(helptext);
+ puts(helptext);
exit(0);
case 'r':
case 'd': /* for compatibility with mkfs.jffs, genext2fs, etc... */
@@ -553,13 +553,13 @@ int main(int argc, char **argv)
printf("%s: %s\n", app_name, VERSION);
exit(0);
default:
- fprintf(stderr, helptext);
+ fputs(helptext,stderr);
exit(1);
}
}
if (argv[optind] != NULL) {
- fprintf(stderr, helptext);
+ fputs(helptext,stderr);
exit(1);
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
index 769270972..a162eb7d1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage/cross-compile.patch
@@ -1,13 +1,43 @@
-make the tool to be cross compilable.
+From dc2712119d6832e24a9b7bed9ed4ce5ae03ce0a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 14 Jul 2012 14:14:07 -0700
+Subject: [PATCH] mkelfimage: Fix cross build
+
+Make the tool to be cross compilable, by separating the variables for build
+tools from those for the target. Also modified to obey LDFLAGS.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
Upstream-Status: Pending
-Index: mkelfImage/configure.ac
-===================================================================
---- mkelfImage.orig/configure.ac 2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/configure.ac 2012-07-14 14:10:47.800916083 -0700
-@@ -70,6 +70,9 @@
+---
+ Makefile.conf.in | 3 +++
+ configure.ac | 7 +++++--
+ linux-i386/Makefile | 2 +-
+ linux-ia64/Makefile | 2 +-
+ main/Makefile | 4 ++--
+ 5 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.conf.in b/Makefile.conf.in
+index 4645e44..dcb6cf2 100644
+--- a/Makefile.conf.in
++++ b/Makefile.conf.in
+@@ -17,6 +17,9 @@ DEFS=@DEFS@
+ LIBS=@LIBS@
+ HOST_CC=@HOST_CC@
+ HOST_CFLAGS=@HOST_CFLAGS@ $(DEFS)
++CC=@CC@
++CFLAGS=@CFLAGS@ $(DEFS)
++LDFLAGS=@LDFLAGS@
+
+ I386_CC =@I386_CC@
+ I386_LD =@I386_LD@
+diff --git a/configure.ac b/configure.ac
+index 652b952..0f2ac72 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,6 +70,9 @@ if test "with_default" != no ; then
AC_MSG_ERROR([cc not found])
fi
eval "${with_default}_CC='$CC'"
@@ -17,55 +47,60 @@ Index: mkelfImage/configure.ac
AC_PROG_CPP
if test "$CPP" = no; then
AC_MSG_ERROR([cpp not found])
-@@ -172,7 +175,6 @@
+@@ -172,8 +175,8 @@ fi
dnl ---Output variables...
-HOST_CC=$CC
- HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
+-HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)"
++CFLAGS="${CFLAGS:--O2} -Wall \$(CPPFLAGS)"
++HOST_CFLAGS="${HOST_CFLAGS:--O2} -Wall \$(HOST_CPPFLAGS)"
dnl TODO: figure out how to set these appropriately for compilers other than gcc
-Index: mkelfImage/linux-i386/Makefile
-===================================================================
---- mkelfImage.orig/linux-i386/Makefile 2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/linux-i386/Makefile 2012-07-14 14:04:49.032898671 -0700
-@@ -4,7 +4,7 @@
+ I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)"
+diff --git a/linux-i386/Makefile b/linux-i386/Makefile
+index 51531d6..7e8aa3c 100644
+--- a/linux-i386/Makefile
++++ b/linux-i386/Makefile
+@@ -4,7 +4,7 @@ LI386_DEP=Makefile Makefile.conf $(LI386_DIR)/Makefile
$(LI386_OBJ)/mkelf-linux-i386.o: $(LI386_DIR)/mkelf-linux-i386.c $(LI386_DIR)/convert.bin.c $(LI386_DEP)
$(MKDIR) -p $(@D)
- $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+ $(CC) $(HOST_CFLAGS) -c -g $< -o $@
++ $(CC) $(CFLAGS) -c -g $< -o $@
ifdef I386_CC
-Index: mkelfImage/linux-ia64/Makefile
-===================================================================
---- mkelfImage.orig/linux-ia64/Makefile 2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/linux-ia64/Makefile 2012-07-14 14:04:49.032898671 -0700
-@@ -4,7 +4,7 @@
+diff --git a/linux-ia64/Makefile b/linux-ia64/Makefile
+index 38f5d8c..5df8870 100644
+--- a/linux-ia64/Makefile
++++ b/linux-ia64/Makefile
+@@ -4,7 +4,7 @@ LIA64_DEP=Makefile Makefile.conf $(LIA64_DIR)/Makefile
$(LIA64_OBJ)/mkelf-linux-ia64.o: $(LIA64_DIR)/mkelf-linux-ia64.c $(LIA64_DIR)/convert.bin.c $(LIA64_DEP)
$(MKDIR) -p $(@D)
- $(HOST_CC) $(HOST_CFLAGS) -c -g $< -o $@
-+ $(CC) $(HOST_CFLAGS) -c -g $< -o $@
++ $(CC) $(CFLAGS) -c -g $< -o $@
ifdef IA64_CC
-Index: mkelfImage/main/Makefile
-===================================================================
---- mkelfImage.orig/main/Makefile 2012-07-14 14:04:48.964898667 -0700
-+++ mkelfImage/main/Makefile 2012-07-14 14:04:49.032898671 -0700
-@@ -4,11 +4,11 @@
+diff --git a/main/Makefile b/main/Makefile
+index 403b0a4..cd53613 100644
+--- a/main/Makefile
++++ b/main/Makefile
+@@ -4,11 +4,11 @@ MKELF_OBJS=$(OBJDIR)/main/mkelfImage.o \
$(OBJDIR)/sbin/mkelfImage: $(MKELF_OBJS) $(DEPS)
$(MKDIR) -p $(@D)
- $(HOST_CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
-+ $(CC) $(HOST_CFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(MKELF_OBJS) -o $@ $(LIBS)
$(OBJDIR)/main/mkelfImage.o: main/mkelfImage.c include/mkelfImage.h $(DEPS)
$(MKDIR) -p $(@D)
- $(HOST_CC) $(HOST_CFLAGS) -c $< -o $@
-+ $(CC) $(HOST_CFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) -c $< -o $@
$(OBJDIR)/man/man8/mkelfImage.8: main/mkelfImage.man
$(MKDIR) -p $(@D)
+--
+2.8.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
index 92435cd1c..2bcc8d7bd 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
@@ -13,8 +13,8 @@ http://review.coreboot.org/gitweb?p=coreboot.git;a=commit;h=34fc4ab80b507739e258
DEPENDS += "zlib"
SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
- file://cross-compile.patch \
- "
+ file://cross-compile.patch \
+ "
SRC_URI_append_class-native = " \
file://fix-makefile-to-find-libz.patch \
"
@@ -24,8 +24,11 @@ CLEANBROKEN = "1"
S = "${WORKDIR}/git/util/mkelfImage"
CFLAGS += "-fno-stack-protector"
-CACHED_CONFIGUREVARS += "HOST_CC='${BUILD_CC}'"
-EXTRA_OEMAKE += "HOST_CPPFLAGS='${BUILD_CPPFLAGS}'"
+CACHED_CONFIGUREVARS += "\
+ HOST_CC='${BUILD_CC}' \
+ HOST_CFLAGS='${BUILD_CFLAGS}' \
+ HOST_CPPFLAGS='${BUILD_CPPFLAGS}' \
+"
inherit autotools-brokensep
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
deleted file mode 100644
index 59fec29a0..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Shared library optimisation tool"
-DESCRIPTION = "mklibs produces cut-down shared libraries that contain only the routines required by a particular set of executables."
-HOMEPAGE = "https://launchpad.net/mklibs"
-SECTION = "devel"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64"
-DEPENDS = "python-native"
-
-SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.xz \
- file://ac_init_fix.patch\
- file://fix_STT_GNU_IFUNC.patch\
- file://sysrooted-ldso.patch \
- file://avoid-failure-on-symbol-provided-by-application.patch \
- file://show-GNU-unique-symbols-as-provided-symbols.patch \
- file://fix_cross_compile.patch \
-"
-
-SRC_URI[md5sum] = "e1dafe5f962caa9dc5f2651c0723812a"
-SRC_URI[sha256sum] = "1db24ae779d21ccfed49f22e49a2b7ee43ec0e9197bc206d81cd02f96e91e125"
-
-inherit autotools gettext native pythonnative
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.41.bb b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.41.bb
new file mode 100644
index 000000000..b3c1b5ba7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.41.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Shared library optimisation tool"
+DESCRIPTION = "mklibs produces cut-down shared libraries that contain only the routines required by a particular set of executables."
+HOMEPAGE = "https://launchpad.net/mklibs"
+SECTION = "devel"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64"
+DEPENDS = "python-native"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160207T221625Z/pool/main/m/${BPN}/${BPN}_${PV}.tar.xz \
+ file://ac_init_fix.patch\
+ file://fix_STT_GNU_IFUNC.patch\
+ file://sysrooted-ldso.patch \
+ file://avoid-failure-on-symbol-provided-by-application.patch \
+ file://show-GNU-unique-symbols-as-provided-symbols.patch \
+ file://fix_cross_compile.patch \
+"
+
+SRC_URI[md5sum] = "6b2979876a611717df3d49e7f9cf291d"
+SRC_URI[sha256sum] = "058c7349f8ec8a03b529c546a95cd6426741bd819f1e1211f499273eb4bf5d89"
+
+inherit autotools gettext native pythonnative
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 64b8910a2..0a8da19e0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -1,10 +1,10 @@
SUMMARY = "Userspace tools for MMC/SD devices"
HOMEPAGE = "http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git/"
LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=17;md5=d7747fc87f1eb22b946ef819969503f0"
+LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
SRCBRANCH ?= "master"
-SRCREV = "44f94b925894577f9ffcf2c418dd013a5e582648"
+SRCREV = "bb779acfc385d135b32a6998c1d1fceef0491400"
PV = "0.1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
index cd9ae06ce..8a3afaf62 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -39,7 +39,7 @@ FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/j
FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
# git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
# git/.compr.c.dep:47: *** missing separator. Stop.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch
new file mode 100644
index 000000000..1f8f8351c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools/0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch
@@ -0,0 +1,34 @@
+From 5cc8d1f96ab6d3459e13631d8356f87381562352 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 2 Jun 2016 09:49:44 +0300
+Subject: [PATCH] Continue even if fs size is not divisible by
+ sectors-per-track
+
+Filesystem with a size that is not divisible by sectors-per-track is
+not broken or invalid: it might be unoptimized on media where
+heads and cylinders actually matter but that should be it.
+
+Preserve the warning but make mtools continue even if fs size is not
+divisible by sectors-per-track.
+
+Upstream-Status: Submitted [info-mtools@gnu.org]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ init.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/init.c b/init.c
+index c9152e0..4e16a01 100644
+--- a/init.c
++++ b/init.c
+@@ -338,7 +338,6 @@ Stream_t *fs_init(char drive, int mode, int *isRop)
+ fprintf(stderr,
+ "Add mtools_skip_check=1 to your .mtoolsrc file "
+ "to skip this test\n");
+- exit(1);
+ }
+
+ /* full cylinder buffering */
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_3.9.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_3.9.9.bb
index 3423917d0..2904ff4f9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_3.9.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_3.9.9.bb
@@ -33,7 +33,9 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/mtools-${PV}.tar.gz
file://mtools-makeinfo.patch \
file://mtools.patch \
file://no-x11.patch \
- file://fix-broken-lz.patch"
+ file://fix-broken-lz.patch \
+ file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
+ "
inherit autotools texinfo
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb
index efde547e2..b0efc9ecf 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb
@@ -29,7 +29,9 @@ SRC_URI[sha256sum] = "59e9cf80885399c4f229e5d87e49c0c2bfeec044e1386d59fcd0b0aead
SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \
file://mtools-makeinfo.patch \
- file://no-x11.gplv3.patch"
+ file://no-x11.gplv3.patch \
+ file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \
+ "
inherit autotools texinfo
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.11.08.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.11.08.bb
deleted file mode 100644
index e0724e68a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.11.08.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "General-purpose x86 assembler"
-SECTION = "devel"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
-COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
-
-
-SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 "
-
-SRC_URI[md5sum] = "7aae5cb8e03fac48029c82a7470ab066"
-SRC_URI[sha256sum] = "9da3a0291a0bdc06305b7ba194f1e2c2b55ae6f11210b4af43729868149d5445"
-
-inherit autotools-brokensep
-
-do_configure_prepend () {
- if [ -f ${S}/aclocal.m4 ] && [ ! -f ${S}/acinclude.m4 ]; then
- mv ${S}/aclocal.m4 ${S}/acinclude.m4
- fi
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -d ${D}${mandir}/man1
-
- oe_runmake 'INSTALLROOT=${D}' install
-}
-
-BBCLASSEXTEND = "native"
-
-DEPENDS = "groff-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb
new file mode 100644
index 000000000..9c4b60f84
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/nasm/nasm_2.12.02.bb
@@ -0,0 +1,29 @@
+SUMMARY = "General-purpose x86 assembler"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe"
+COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
+
+SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 "
+
+SRC_URI[md5sum] = "d15843c3fb7db39af80571ee27ec6fad"
+SRC_URI[sha256sum] = "00b0891c678c065446ca59bcee64719d0096d54d6886e6e472aeee2e170ae324"
+
+inherit autotools-brokensep
+
+do_configure_prepend () {
+ if [ -f ${S}/aclocal.m4 ] && [ ! -f ${S}/acinclude.m4 ]; then
+ mv ${S}/aclocal.m4 ${S}/acinclude.m4
+ fi
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${mandir}/man1
+
+ oe_runmake 'INSTALLROOT=${D}' install
+}
+
+BBCLASSEXTEND = "native"
+
+DEPENDS = "groff-native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
index bc250080f..8b15b0c7e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
@@ -44,10 +44,10 @@ CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--datadir=${datadi
oe_runconf[vardepsexclude] += "CONFIGUREOPTS"
CFLAGS =+ "-I${S}/include"
+CXXFLAGS += "-fno-tree-dse"
SSTATEPOSTINSTFUNCS += "openjade_sstate_postinst"
SYSROOT_PREPROCESS_FUNCS += "openjade_sysroot_preprocess"
-CLEANFUNCS += "openjade_sstate_clean"
# configure.in needs to be reloacted to trigger reautoconf
do_extraunpack () {
@@ -103,6 +103,15 @@ openjade_sstate_postinst() {
${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade \
--add ${sysconfdir}/sgml/sgml-docbook.cat \
${sysconfdir}/sgml/openjade-${PV}.cat
+ cat << EOF > ${SSTATE_INST_POSTRM}
+#!/bin/sh
+# Ensure that the catalog file sgml-docbook.cat is properly
+# updated when the package is removed from sstate cache.
+files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
+for f in \$files; do
+ [ ! -f \$f ] || sed -i '/\/sgml\/openjade-${PV}.cat/d' \$f
+done
+EOF
fi
}
@@ -110,12 +119,3 @@ openjade_sysroot_preprocess () {
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade
}
-
-openjade_sstate_clean () {
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is removed from sstate cache.
- files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
- for f in $files; do
- [ ! -f $f ] || sed -i '/\/sgml\/openjade-${PV}.cat/d' $f
- done
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch
deleted file mode 100644
index 5cbb55a7d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 8e424296ce2af4a5a7392c38a31f8723f9b9fbda Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <denys@ti.com>
-Date: Thu, 7 Apr 2016 20:43:13 -0400
-Subject: [PATCH] opkg-build: re-do find/ls code to not fail on filenames with
- spaces
-
-Signed-off-by: Denys Dmytriyenko <denys@ti.com>
----
- opkg-build | 9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/opkg-build b/opkg-build
-index a9ccad2..07305b2 100755
---- a/opkg-build
-+++ b/opkg-build
-@@ -6,7 +6,6 @@
- # 2003-04-25 rea@sr.unh.edu
- # Updated to work on Familiar Pre0.7rc1, with busybox tar.
- # Note it Requires: binutils-ar (since the busybox ar can't create)
--# For UID debugging it needs a better "find".
- set -e
-
- version=1.0
-@@ -47,12 +46,12 @@ pkg_appears_sane() {
-
- PKG_ERROR=0
-
-- tilde_files=`find . -name '*~'`
-+ tilde_files=`find . -name '*~' -ls -printf '\\\n'`
- if [ -n "$tilde_files" ]; then
- if [ "$noclean" = "1" ]; then
- echo "*** Warning: The following files have names ending in '~'.
- You probably want to remove them: " >&2
-- ls -ld $tilde_files
-+ echo -e $tilde_files
- if [ $? -ne 0 ]; then
- echo "*** Error: Fail to list files have names ending in '~'."
- exit 1
-@@ -64,12 +63,12 @@ You probably want to remove them: " >&2
- fi
- fi
-
-- large_uid_files=`find . -uid +99 || true`
-+ large_uid_files=`find . -uid +99 -ls -printf '\\\n' || true`
-
- if [ "$ogargs" = "" ] && [ -n "$large_uid_files" ]; then
- echo "*** Warning: The following files have a UID greater than 99.
- You probably want to chown these to a system user: " >&2
-- ls -ld $large_uid_files
-+ echo -e $large_uid_files
- if [ $? -ne 0 ]; then
- echo "*** Error: Fail to list files have a UID greater than 99."
- exit 1
---
-2.2.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch
deleted file mode 100644
index 6c66902ef..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-We have an issue when ls segfaults in some cases [1] so it's
-better to detect the failure at this level instead of continue
-the build process.
-
-[YOCTO #8926]
-
-Upstream-Status: Submitted [2]
-
-[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8926#c0
-[2] https://groups.google.com/forum/#!topic/opkg-devel/cmX02bgHZms
-
-Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
----
- opkg-build | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/opkg-build b/opkg-build
-index 98008b6..a9ccad2 100755
---- a/opkg-build
-+++ b/opkg-build
-@@ -53,6 +53,10 @@ pkg_appears_sane() {
- echo "*** Warning: The following files have names ending in '~'.
- You probably want to remove them: " >&2
- ls -ld $tilde_files
-+ if [ $? -ne 0 ]; then
-+ echo "*** Error: Fail to list files have names ending in '~'."
-+ exit 1
-+ fi
- echo >&2
- else
- echo "*** Removing the following files: $tilde_files"
-@@ -66,6 +70,10 @@ You probably want to remove them: " >&2
- echo "*** Warning: The following files have a UID greater than 99.
- You probably want to chown these to a system user: " >&2
- ls -ld $large_uid_files
-+ if [ $? -ne 0 ]; then
-+ echo "*** Error: Fail to list files have a UID greater than 99."
-+ exit 1
-+ fi
- echo >&2
- fi
-
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 8873b2870..a7aec45f8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -1,18 +1,16 @@
SUMMARY = "Additional utilities for the opkg package manager"
SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system"
SECTION = "base"
-HOMEPAGE = "http://code.google.com/p/opkg/"
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
-SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
-PV = "0.1.8+git${SRCPV}"
+SRCREV = "3ffece9bf19a844edacc563aa092fd1fbfcffeee"
+PV = "0.3.2+git${SRCPV}"
-SRC_URI = "git://git.yoctoproject.org/opkg-utils \
- file://opkg-build-Exit-when-fail-to-list-files.patch \
- file://0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch"
+SRC_URI = "git://git.yoctoproject.org/opkg-utils"
SRC_URI_append_class-native = " file://tar_ignore_error.patch"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-configure.ac-use-pkg-config-for-libsolv.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-configure.ac-use-pkg-config-for-libsolv.patch
deleted file mode 100644
index e67ec7479..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-configure.ac-use-pkg-config-for-libsolv.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 2a43027f7ecf2bb3ce73f95bcf575c56bc495d07 Mon Sep 17 00:00:00 2001
-From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-Date: Wed, 9 Dec 2015 17:38:05 -0600
-Subject: [PATCH] configure.ac: use pkg-config for libsolv
-
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
----
- configure.ac | 12 +-----------
- 1 file changed, 1 insertion(+), 11 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 52e1025..d17dc5c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -159,17 +159,7 @@ if test "x$want_solver" != "xno"; then
- AC_MSG_ERROR(Specify which solver with --enable-solver=<SOLVER>)],
- [libsolv],
- [AC_MSG_RESULT(libsolv)
--
-- SOLVER_CFLAGS="-I/usr/local/include/"
-- SOLVER_LIBS="-lsolv -lsolvext"
-- AC_CHECK_LIB([solv],
-- [solver_solve],
-- [],
-- [AC_MSG_ERROR(libsolv not found)])
-- dnl TODO: remove previous 6 lines and uncomment line below to use
-- dnl pkg-config once there is a release of libsolv with pkg-config:
-- dnl PKG_CHECK_MODULES(SOLVER, libsolv)
--
-+ PKG_CHECK_MODULES(SOLVER, libsolv)
- AC_DEFINE(HAVE_SOLVER_LIBSOLV,1,[Define if you want to use libsolv])],
- # default
- [AC_MSG_RESULT(no)
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libsolv_solver_set_arch_policy-use-correct-logic-dur.patch b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libsolv_solver_set_arch_policy-use-correct-logic-dur.patch
deleted file mode 100644
index 1ab1790d6..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libsolv_solver_set_arch_policy-use-correct-logic-dur.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 3e562bed7dced25eb3e9174ca9395324b6c873c1 Mon Sep 17 00:00:00 2001
-From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-Date: Wed, 9 Dec 2015 13:36:14 -0600
-Subject: [PATCH] libsolv_solver_set_arch_policy: use correct logic during
- archs resizing
-
-If there are more than INITIAL_ARCH_LIST_SIZE archs defined in the
-configuration, libsolv_solver_set_arch_policy crashes due to flawed
-logic when resizing the archs array.
-
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
----
- libopkg/opkg_solver_libsolv.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libopkg/opkg_solver_libsolv.c b/libopkg/opkg_solver_libsolv.c
-index 1cdcf1f..b5af0fa 100644
---- a/libopkg/opkg_solver_libsolv.c
-+++ b/libopkg/opkg_solver_libsolv.c
-@@ -66,8 +66,10 @@ static void libsolv_solver_set_arch_policy(libsolv_solver_t *libsolv_solver)
- nv_pair_list_elt_t *arch_info;
-
- list_for_each_entry(arch_info, &opkg_config->arch_list.head, node) {
-- if (arch_count > arch_list_size)
-- archs = xrealloc(archs, arch_list_size *= 2);
-+ if (arch_count >= arch_list_size) {
-+ arch_list_size *= 2;
-+ archs = xrealloc(archs, arch_list_size * sizeof(arch_data_t));
-+ }
-
- archs[arch_count].arch = ((nv_pair_t *)(arch_info->data))->name;
- archs[arch_count].priority = atoi(((nv_pair_t *)
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.1.bb
deleted file mode 100644
index 577f49534..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.1.bb
+++ /dev/null
@@ -1,75 +0,0 @@
-SUMMARY = "Open Package Manager"
-SUMMARY_libopkg = "Open Package Manager library"
-SECTION = "base"
-HOMEPAGE = "http://code.google.com/p/opkg/"
-BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
-
-DEPENDS = "libarchive"
-
-PE = "1"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
- file://opkg-configure.service \
- file://opkg.conf \
- file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
- file://0001-libsolv_solver_set_arch_policy-use-correct-logic-dur.patch \
- file://0001-configure.ac-use-pkg-config-for-libsolv.patch \
-"
-
-SRC_URI[md5sum] = "43735e5dc1ebf46bd6ce56a7cdfdc720"
-SRC_URI[sha256sum] = "d2c6c02a8384ec21168a1f0a186cb5e9f577d1452f491d02ed3e56b2ea8b87df"
-
-inherit autotools pkgconfig systemd
-
-SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
-
-target_localstatedir := "${localstatedir}"
-OPKGLIBDIR = "${target_localstatedir}/lib"
-
-PACKAGECONFIG ??= ""
-
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
-PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
-PACKAGECONFIG[libsolv] = "--enable-solver=libsolv,--disable-solver,libsolv"
-
-do_install_append () {
- install -d ${D}${sysconfdir}/opkg
- install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
- echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
-
- # We need to create the lock directory
- install -d ${D}${OPKGLIBDIR}/opkg
-
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- -e 's,@BINDIR@,${bindir},g' \
- -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
- ${D}${systemd_unitdir}/system/opkg-configure.service
- fi
-}
-
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
-RCONFLICTS_${PN} = "opkg-collateral"
-RPROVIDES_${PN} = "opkg-collateral"
-
-PACKAGES =+ "libopkg"
-
-FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
-FILES_${PN} += "${systemd_unitdir}/system/"
-
-BBCLASSEXTEND = "native nativesdk"
-
-CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.3.bb
new file mode 100644
index 000000000..bce72fcd2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.3.bb
@@ -0,0 +1,73 @@
+SUMMARY = "Open Package Manager"
+SUMMARY_libopkg = "Open Package Manager library"
+SECTION = "base"
+HOMEPAGE = "http://code.google.com/p/opkg/"
+BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
+
+DEPENDS = "libarchive"
+
+PE = "1"
+
+SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
+ file://opkg-configure.service \
+ file://opkg.conf \
+ file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
+"
+
+SRC_URI[md5sum] = "a4613038c8afc7d8d482f5c53f137bdf"
+SRC_URI[sha256sum] = "19db9e73121a5e4c91fa228b0a6a4c55cc3591056130cfb3c66c30aa32f8d00e"
+
+inherit autotools pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
+
+target_localstatedir := "${localstatedir}"
+OPKGLIBDIR = "${target_localstatedir}/lib"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
+PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
+PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
+PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/opkg
+ install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
+ echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
+
+ # We need to create the lock directory
+ install -d ${D}${OPKGLIBDIR}/opkg
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@BINDIR@,${bindir},g' \
+ -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
+ ${D}${systemd_unitdir}/system/opkg-configure.service
+ fi
+}
+
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
+RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
+RCONFLICTS_${PN} = "opkg-collateral"
+RPROVIDES_${PN} = "opkg-collateral"
+
+PACKAGES =+ "libopkg"
+
+FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
+FILES_${PN} += "${systemd_unitdir}/system/"
+
+BBCLASSEXTEND = "native nativesdk"
+
+CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.24.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.24.bb
deleted file mode 100644
index 520f88d92..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.24.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Optimised Inner Loop Runtime Compiler"
-HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html"
-LICENSE = "BSD-2-Clause & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "9e793ec34c0e20339659dd4bbbf62135"
-SRC_URI[sha256sum] = "338cd493b5247300149821c6312bdf7422a3593ae98691fc75d7e4fe727bd39b"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGES =+ "orc-examples"
-PACKAGES_DYNAMIC += "^liborc-.*"
-FILES_orc-examples = "${libdir}/orc/*"
-FILES_${PN} = "${bindir}/*"
-
-python populate_packages_prepend () {
- libdir = d.expand('${libdir}')
- do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
-}
-
-do_compile_prepend_class-native () {
- sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.25.bb b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.25.bb
new file mode 100644
index 000000000..897493a7d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/orc/orc_0.4.25.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Optimised Inner Loop Runtime Compiler"
+HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html"
+LICENSE = "BSD-2-Clause & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "8582a28b15f53110c88d8043d9f55bcf"
+SRC_URI[sha256sum] = "c1b1d54a58f26d483f0b3881538984789fe5d5460ab8fab74a1cacbd3d1c53d1"
+
+inherit autotools pkgconfig gtk-doc
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "orc-examples"
+PACKAGES_DYNAMIC += "^liborc-.*"
+FILES_orc-examples = "${libdir}/orc/*"
+FILES_${PN} = "${bindir}/*"
+
+python populate_packages_prepend () {
+ libdir = d.expand('${libdir}')
+ do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
+}
+
+do_compile_prepend_class-native () {
+ sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch
index 04222cbf7..63b80f6a1 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch
@@ -2,7 +2,7 @@ uuid.pc is generated at build time so should be installed from the current
directory, and not $S.
Upstream-Status: Pending [should be submitted]
-Signed-Off-By: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Ross Burton <ross.burton@intel.com>
Index: uuid-1.6.2/Makefile.in
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
index 08926ba6b..85a1bcf5c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb
@@ -16,8 +16,9 @@ LIC_FILES_CHKSUM = "file://README;beginline=30;endline=55;md5=b394fadb039bbfca6a
file://uuid_md5.c;beginline=1;endline=28;md5=9c1f4b2218546deae24c91be1dcf00dd"
PR = "r2"
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/o/ossp-uuid/"
-SRC_URI = "${DEBIAN_MIRROR}/main/o/${BPN}/${BPN}_${PV}.orig.tar.gz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/o/${BPN}/${BPN}_${PV}.orig.tar.gz \
file://0001-Change-library-name.patch \
file://0002-uuid-preserve-m-option-status-in-v-option-handling.patch \
file://0003-Fix-whatis-entries.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/packagegroups/packagegroup-core-device-devel.bb b/import-layers/yocto-poky/meta/recipes-devtools/packagegroups/packagegroup-core-device-devel.bb
index e83186005..edee474ec 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/packagegroups/packagegroup-core-device-devel.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/packagegroups/packagegroup-core-device-devel.bb
@@ -1,5 +1,4 @@
SUMMARY = "Provides a small set of tools for development on the device"
-LICENSE = "MIT"
PR = "r1"
@@ -11,8 +10,7 @@ RCONFLICTS_${PN} = "qemu-config"
RDEPENDS_${PN} = "\
distcc-config \
- oprofileui-server \
nfs-export-root \
bash \
+ binutils-symlinks \
"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch
new file mode 100644
index 000000000..49050a18d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch
@@ -0,0 +1,46 @@
+From e3658740ec100e4c8cf83295460b032979e1a99a Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Fri, 9 Sep 2016 18:21:32 -0300
+Subject: [PATCH] Increase maxSize to 64MB
+Organization: O.S. Systems Software LTDA.
+
+Fix error:
+
+/
+|ERROR: qemu-native-2.5.0-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
+|'--set-interpreter', '../build/tmp/sysroots-uninative/x86_64-linux/lib/
+|ld-linux-x86-64.so.2', '../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
+|sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64')'
+|failed with exit code 1 and the following output:
+|warning: working around a Linux kernel bug by creating a hole of 36032512
+|bytes in â€../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
+|sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64’
+|maximum file size exceeded
+\
+
+Similar issue is discussed here:
+https://github.com/NixOS/patchelf/issues/47
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+---
+ src/patchelf.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/patchelf.cc b/src/patchelf.cc
+index a59c12d..0fd7355 100644
+--- a/src/patchelf.cc
++++ b/src/patchelf.cc
+@@ -279,7 +279,7 @@ static void readFile(string fileName)
+ struct stat st;
+ if (stat(fileName.c_str(), &st) != 0) error("stat");
+ fileSize = st.st_size;
+- maxSize = fileSize + 32 * 1024 * 1024;
++ maxSize = fileSize + 64 * 1024 * 1024;
+
+ contents = (unsigned char *) malloc(fileSize + maxSize);
+ if (!contents) abort();
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch
new file mode 100644
index 000000000..9ee8a554a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch
@@ -0,0 +1,30 @@
+From 73526cb546ae6b00ea6169e40b01fb7b5f0dbb50 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Thu, 28 Jul 2016 11:05:06 -0300
+Subject: [PATCH] Skip empty section (fixes #66)
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+---
+ src/patchelf.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/patchelf.cc b/src/patchelf.cc
+index 136098f..2677a26 100644
+--- a/src/patchelf.cc
++++ b/src/patchelf.cc
+@@ -684,6 +684,9 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsExecutable()
+ for (unsigned int i = 1; i <= lastReplaced; ++i) {
+ Elf_Shdr & shdr(shdrs[i]);
+ string sectionName = getSectionName(shdr);
++ if (sectionName == "") {
++ continue;
++ }
+ debug("looking at section `%s'\n", sectionName.c_str());
+ /* !!! Why do we stop after a .dynstr section? I can't
+ remember! */
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
new file mode 100644
index 000000000..9fafec4b5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
@@ -0,0 +1,53 @@
+From 2a603acb65993698c21f1c6eb7664f93ad830d52 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Fri, 9 Sep 2016 16:00:42 -0300
+Subject: [PATCH] handle read-only files
+Organization: O.S. Systems Software LTDA.
+
+Patch from:
+https://github.com/darealshinji/patchelf/commit/40e66392bc4b96e9b4eda496827d26348a503509
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+---
+ src/patchelf.cc | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/src/patchelf.cc b/src/patchelf.cc
+index 136098f..aea360e 100644
+--- a/src/patchelf.cc
++++ b/src/patchelf.cc
+@@ -388,7 +388,17 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
+
+ static void writeFile(string fileName)
+ {
+- int fd = open(fileName.c_str(), O_TRUNC | O_WRONLY);
++ struct stat st;
++ int fd;
++
++ if (stat(fileName.c_str(), &st) != 0)
++ error("stat");
++
++ if (chmod(fileName.c_str(), 0600) != 0)
++ error("chmod");
++
++ fd = open(fileName.c_str(), O_TRUNC | O_WRONLY);
++
+ if (fd == -1)
+ error("open");
+
+@@ -397,6 +407,10 @@ static void writeFile(string fileName)
+
+ if (close(fd) != 0)
+ error("close");
++
++ if (chmod(fileName.c_str(), st.st_mode) != 0)
++ error("chmod");
++
+ }
+
+
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/maxsize.patch b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/maxsize.patch
deleted file mode 100644
index cc04a89e6..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf/maxsize.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From f6886c2c33a1cf8771163919f3d20f6340c0ce38 Mon Sep 17 00:00:00 2001
-From: Eelco Dolstra <eelco.dolstra@logicblox.com>
-Date: Fri, 10 Jul 2015 18:12:37 +0200
-Subject: [PATCH] Quick fix for #47
-
-https://github.com/NixOS/patchelf/issues/47
-
-Avoid issues with holes in binaries such as qemu-pcc from qemu-native.
-
-Upstream-Status: Submitted
-RP
-2016/2/3
-
----
- src/patchelf.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/patchelf.cc b/src/patchelf.cc
-index 8566ed9..df75593 100644
---- a/src/patchelf.cc
-+++ b/src/patchelf.cc
-@@ -248,7 +248,7 @@ static void readFile(string fileName, mode_t * fileMode)
- if (stat(fileName.c_str(), &st) != 0) error("stat");
- fileSize = st.st_size;
- *fileMode = st.st_mode;
-- maxSize = fileSize + 8 * 1024 * 1024;
-+ maxSize = fileSize + 64 * 1024 * 1024;
-
- contents = (unsigned char *) malloc(fileSize + maxSize);
- if (!contents) abort(); \ No newline at end of file
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.8.bb b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.8.bb
deleted file mode 100644
index 8484a7e58..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.8.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
- file://maxsize.patch"
-LICENSE = "GPLv3"
-SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
-
-SRC_URI[md5sum] = "5b151e3c83b31f5931b4a9fc01635bfd"
-SRC_URI[sha256sum] = "c99f84d124347340c36707089ec8f70530abd56e7827c54d506eb4cc097a17e7"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-inherit autotools
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb
new file mode 100644
index 000000000..54e654bdc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.9.bb
@@ -0,0 +1,17 @@
+SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
+ file://Skip-empty-section-fixes-66.patch \
+ file://handle-read-only-files.patch \
+ file://Increase-maxSize-to-64MB.patch \
+"
+
+LICENSE = "GPLv3"
+SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
+
+SRC_URI[md5sum] = "d02687629c7e1698a486a93a0d607947"
+SRC_URI[sha256sum] = "a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.5.bb
deleted file mode 100644
index a887c037d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.5.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Security-focused ELF files checking tool"
-DESCRIPTION = "This is a small set of various PaX aware and related \
-utilities for ELF binaries. It can check ELF binary files and running \
-processes for issues that might be relevant when using ELF binaries \
-along with PaX, such as non-PIC code or executable stack and heap."
-HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-
-SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz \
-"
-
-SRC_URI[md5sum] = "bc3614322eaf88f167a608ae85d6b207"
-SRC_URI[sha256sum] = "2945b3e4df2e0dc95800bfbd3d88ab2243b2ee4ff064bbfc75734f6d9d986a89"
-
-RDEPENDS_${PN} += "bash"
-
-do_configure_prepend() {
- touch ${S}/NEWS ${S}/AUTHORS ${S}/ChangeLog ${S}/README
-}
-
-do_install() {
- oe_runmake PREFIX=${D}${prefix} DESTDIR=${D} install
-}
-
-BBCLASSEXTEND = "native"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
-"
-PACKAGECONFIG[libcap] = "--with-caps, --without-caps, libcap"
-PACKAGECONFIG[libseccomp] = "--with-seccomp, --without-seccomp, libseccomp"
-PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
-PACKAGECONFIG[pyelftools] = "--with-python, --without-python,, pyelftools"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.6.bb
new file mode 100644
index 000000000..5cc546301
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.6.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Security-focused ELF files checking tool"
+DESCRIPTION = "This is a small set of various PaX aware and related \
+utilities for ELF binaries. It can check ELF binary files and running \
+processes for issues that might be relevant when using ELF binaries \
+along with PaX, such as non-PIC code or executable stack and heap."
+HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
+
+SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "96f56a5a10ed50f2448c5ccebd27764f"
+SRC_URI[sha256sum] = "f5436c517bea40f7035ec29a6f34034c739b943f2e3a080d76df5dfd7fd41b12"
+
+RDEPENDS_${PN} += "bash"
+
+do_configure_prepend() {
+ touch ${S}/NEWS ${S}/AUTHORS ${S}/ChangeLog ${S}/README
+}
+
+do_install() {
+ oe_runmake PREFIX=${D}${prefix} DESTDIR=${D} install
+}
+
+BBCLASSEXTEND = "native"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
+"
+PACKAGECONFIG[libcap] = "--with-caps, --without-caps, libcap"
+PACKAGECONFIG[libseccomp] = "--with-seccomp, --without-seccomp, libseccomp"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
+PACKAGECONFIG[pyelftools] = "--with-python, --without-python,, pyelftools"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index 9561a5955..3acd82686 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -3,7 +3,7 @@ SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-1.0+"
LIC_FILES_CHKSUM = "file://README;beginline=2;endline=6;md5=c8767d7516229f07b26e42d1cf8b51f1"
-DEPENDS += "expat expat-native"
+DEPENDS += "expat"
SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
SRC_URI[md5sum] = "af4813fe3952362451201ced6fbce379"
@@ -32,4 +32,3 @@ do_compile_class-native() {
}
BBCLASSEXTEND="native"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.1.bb
index ed8222f24..1c21522be 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.1.bb
@@ -11,6 +11,7 @@ SRC_URI += "\
file://debian/errno_ver.diff \
file://dynaloaderhack.patch \
file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
+ file://perl-remove-nm-from-libswanted.patch \
"
SRC_URI[md5sum] = "6671e4829cbaf9cecafa9a84f141b0a3"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
index 948ea7cdd..d136c5c0e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-ptest.inc
@@ -5,10 +5,11 @@ SRC_URI += "file://run-ptest \
do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
+ sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/*
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
- tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
- --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
+ --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x )
sed -i -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
@@ -34,4 +35,4 @@ python populate_packages_prepend() {
'${PN}-ptest%s', '%s', recursive=True, match_path=True)
}
-RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc ${PN}-misc sed"
+RDEPENDS_${PN}-ptest += "${PN}-modules ${PN}-doc ${PN}-misc sed libssp"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc
index 830ecce53..2c497fe6a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc
@@ -18,8 +18,9 @@ RDEPENDS_${PN}-pod += "perl"
# Some additional dependencies that the above doesn't manage to figure out
RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix"
-DEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
+RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
RDEPENDS_${PN}-module-thread-queue += "${PN}-module-attributes"
+RDEPENDS_${PN}-module-overload += "${PN}-module-overloading"
# Depends list
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
index 59e016e4d..b2a7f2cc4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
@@ -8,7 +8,7 @@
# Package name : perl5
# Source directory : .
-# Configuration time: Thu Jun 18 05:37:27 UTC 2015
+# Configuration time: Fri May 6 20:13:46 PDT 2016
# Configured by : Open Embedded
# Target system : linux qemux86-64 3.19.5-yocto-standard #1 smp preempt tue jun 16 00:28:17 pdt 2015 x86_64 gnulinux
@@ -66,7 +66,7 @@ aphostname=''
api_revision='5'
api_subversion='0'
api_version='22'
-api_versionstring='5.22.1'
+api_versionstring='5.22.0'
ar='ar'
archlib='@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
@@ -96,7 +96,7 @@ ccsymbols=''
ccversion=''
cf_by='Open Embedded'
cf_email='Open Embedded@localhost.localdomain'
-cf_time='Thu Jun 18 05:37:27 UTC 2015'
+cf_time='Fri May 6 20:13:46 PDT 2016'
charbits='8'
charsize='1'
chgrp=''
@@ -1194,7 +1194,7 @@ vendorprefixexp='@EXECPREFIX@'
vendorscript='@USRBIN@'
vendorscriptexp='@USRBIN@'
version='5.22.1'
-version_patchlevel_string='version 22 subversion 0'
+version_patchlevel_string='version 22 subversion 1'
versiononly='undef'
vi=''
xlibpth='@LIBDIR@/386 @BASELIBDIR@386'
@@ -1204,7 +1204,7 @@ zcat=''
zip='zip'
PERL_REVISION=5
PERL_VERSION=22
-PERL_SUBVERSION=0
+PERL_SUBVERSION=1
PERL_API_REVISION=5
PERL_API_VERSION=22
PERL_API_SUBVERSION=0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
index 69ac43477..76501283e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/fix_bad_rpath.patch
@@ -1,5 +1,5 @@
Upstream-Status:Inappropriate [embedded specific]
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011/07/01
Fix these Package QA warnings before they are converted into fetal errors:
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-configure.sh b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-configure.sh
index e72ce49f9..25e7f8b96 100755
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-configure.sh
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-configure.sh
@@ -15,7 +15,7 @@ echo sh Configure -des \
-Dprefix=/usr \
-Dvendorprefix=/usr \
-Dsiteprefix=/usr \
- -Dotherlibdirs=/usr/lib/perl5/5.12.3 \
+ -Dotherlibdirs=/usr/lib/perl5/5.22.1 \
-Duseshrplib \
-Dusethreads \
-Duseithreads \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch
new file mode 100644
index 000000000..7b4a0015c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch
@@ -0,0 +1,74 @@
+From 652c8d4852a69f1bb4d387946f9b76350a1f0d0e Mon Sep 17 00:00:00 2001
+From: Tony Cook <tony@develop-help.com>
+Date: Tue, 15 Dec 2015 10:56:54 +1100
+Subject: [PATCH] perl: fix CVE-2015-8607
+
+ensure File::Spec::canonpath() preserves taint
+
+Previously the unix specific XS implementation of canonpath() would
+return an untainted path when supplied a tainted path.
+
+For the empty string case, newSVpvs() already sets taint as needed on
+its result.
+
+This issue was assigned CVE-2015-8607. [perl #126862]
+
+Backport patch from http://perl5.git.perl.org/perl.git/commitdiff/0b6f93036de171c12ba95d415e264d9cf7f4e1fd
+
+Upstream-Status: Backport
+CVE: CVE-2015-8607
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ dist/PathTools/Cwd.xs | 1 +
+ dist/PathTools/t/taint.t | 19 ++++++++++++++++++-
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/dist/PathTools/Cwd.xs b/dist/PathTools/Cwd.xs
+index 9d4dcf0..3d018dc 100644
+--- a/dist/PathTools/Cwd.xs
++++ b/dist/PathTools/Cwd.xs
+@@ -535,6 +535,7 @@ THX_unix_canonpath(pTHX_ SV *path)
+ *o = 0;
+ SvPOK_on(retval);
+ SvCUR_set(retval, o - SvPVX(retval));
++ SvTAINT(retval);
+ return retval;
+ }
+
+diff --git a/dist/PathTools/t/taint.t b/dist/PathTools/t/taint.t
+index 309b3e5..48f8c5b 100644
+--- a/dist/PathTools/t/taint.t
++++ b/dist/PathTools/t/taint.t
+@@ -12,7 +12,7 @@ use Test::More;
+ BEGIN {
+ plan(
+ ${^TAINT}
+- ? (tests => 17)
++ ? (tests => 21)
+ : (skip_all => "A perl without taint support")
+ );
+ }
+@@ -34,3 +34,20 @@ foreach my $func (@Functions) {
+
+ # Previous versions of Cwd tainted $^O
+ is !tainted($^O), 1, "\$^O should not be tainted";
++
++{
++ # [perl #126862] canonpath() loses taint
++ my $tainted = substr($ENV{PATH}, 0, 0);
++ # yes, getcwd()'s result should be tainted, and is tested above
++ # but be sure
++ ok tainted(File::Spec->canonpath($tainted . Cwd::getcwd)),
++ "canonpath() keeps taint on non-empty string";
++ ok tainted(File::Spec->canonpath($tainted)),
++ "canonpath() keeps taint on empty string";
++
++ (Cwd::getcwd() =~ /^(.*)/);
++ my $untainted = $1;
++ ok !tainted($untainted), "make sure our untainted value is untainted";
++ ok !tainted(File::Spec->canonpath($untainted)),
++ "canonpath() doesn't add taint to untainted string";
++}
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-1238.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-1238.patch
new file mode 100644
index 000000000..730ef178a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-1238.patch
@@ -0,0 +1,352 @@
+From 9987be3d24286d96d9dccec0433253ee8ad894b4 Mon Sep 17 00:00:00 2001
+From: Tony Cook <tony@develop-help.com>
+Date: Tue, 21 Jun 2016 10:02:02 +1000
+Subject: [PATCH] perl: fix CVE-2016-1238
+
+(perl #127834) remove . from the end of @INC if complex modules are loaded
+
+While currently Encode and Storable are know to attempt to load modules
+not included in the core, updates to other modules may lead to those
+also attempting to load new modules, so be safe and remove . for those
+as well.
+
+Backport patch from http://perl5.git.perl.org/perl.git/commitdiff/cee96d52c39b1e7b36e1c62d38bcd8d86e9a41ab
+
+Upstream-Status: Backport
+CVE: CVE-2016-1238
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ cpan/Archive-Tar/bin/ptar | 1 +
+ cpan/Archive-Tar/bin/ptardiff | 1 +
+ cpan/Archive-Tar/bin/ptargrep | 1 +
+ cpan/CPAN/scripts/cpan | 1 +
+ cpan/Digest-SHA/shasum | 1 +
+ cpan/Encode/bin/enc2xs | 1 +
+ cpan/Encode/bin/encguess | 1 +
+ cpan/Encode/bin/piconv | 1 +
+ cpan/Encode/bin/ucmlint | 1 +
+ cpan/Encode/bin/unidump | 1 +
+ cpan/ExtUtils-MakeMaker/bin/instmodsh | 1 +
+ cpan/IO-Compress/bin/zipdetails | 1 +
+ cpan/JSON-PP/bin/json_pp | 1 +
+ cpan/Test-Harness/bin/prove | 1 +
+ dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp | 1 +
+ dist/Module-CoreList/corelist | 1 +
+ ext/Pod-Html/bin/pod2html | 1 +
+ utils/c2ph.PL | 1 +
+ utils/h2ph.PL | 2 ++
+ utils/h2xs.PL | 2 ++
+ utils/libnetcfg.PL | 1 +
+ utils/perlbug.PL | 1 +
+ utils/perldoc.PL | 5 ++++-
+ utils/perlivp.PL | 2 ++
+ utils/splain.PL | 6 ++++++
+ 25 files changed, 36 insertions(+), 1 deletion(-)
+
+diff --git a/cpan/Archive-Tar/bin/ptar b/cpan/Archive-Tar/bin/ptar
+index 0eaffa7..9dc6402 100644
+--- a/cpan/Archive-Tar/bin/ptar
++++ b/cpan/Archive-Tar/bin/ptar
+@@ -1,6 +1,7 @@
+ #!/usr/bin/perl
+ use strict;
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use File::Find;
+ use Getopt::Std;
+ use Archive::Tar;
+diff --git a/cpan/Archive-Tar/bin/ptardiff b/cpan/Archive-Tar/bin/ptardiff
+index 66bd859..4668fa6 100644
+--- a/cpan/Archive-Tar/bin/ptardiff
++++ b/cpan/Archive-Tar/bin/ptardiff
+@@ -1,5 +1,6 @@
+ #!/usr/bin/perl
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use Archive::Tar;
+ use Getopt::Std;
+diff --git a/cpan/Archive-Tar/bin/ptargrep b/cpan/Archive-Tar/bin/ptargrep
+index 1a320f1..8dc6b4f 100644
+--- a/cpan/Archive-Tar/bin/ptargrep
++++ b/cpan/Archive-Tar/bin/ptargrep
+@@ -4,6 +4,7 @@
+ # archive. See 'ptargrep --help' for more documentation.
+ #
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use warnings;
+
+diff --git a/cpan/CPAN/scripts/cpan b/cpan/CPAN/scripts/cpan
+index 5f4320e..ccba47e 100644
+--- a/cpan/CPAN/scripts/cpan
++++ b/cpan/CPAN/scripts/cpan
+@@ -1,5 +1,6 @@
+ #!/usr/local/bin/perl
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use vars qw($VERSION);
+
+diff --git a/cpan/Digest-SHA/shasum b/cpan/Digest-SHA/shasum
+index 14ddd60..62a2b0e 100644
+--- a/cpan/Digest-SHA/shasum
++++ b/cpan/Digest-SHA/shasum
+@@ -13,6 +13,7 @@
+ ## "-0" option for reading bit strings, and
+ ## "-p" option for portable digests (to be deprecated).
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use warnings;
+ use Fcntl;
+diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs
+index 4d64e38..473a15c 100644
+--- a/cpan/Encode/bin/enc2xs
++++ b/cpan/Encode/bin/enc2xs
+@@ -4,6 +4,7 @@ BEGIN {
+ # with $ENV{PERL_CORE} set
+ # In case we need it in future...
+ require Config; import Config;
++ pop @INC if $INC[-1] eq '.';
+ }
+ use strict;
+ use warnings;
+diff --git a/cpan/Encode/bin/encguess b/cpan/Encode/bin/encguess
+index 5d7ac80..0be5c7c 100644
+--- a/cpan/Encode/bin/encguess
++++ b/cpan/Encode/bin/encguess
+@@ -1,5 +1,6 @@
+ #!./perl
+ use 5.008001;
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use warnings;
+ use Encode;
+diff --git a/cpan/Encode/bin/piconv b/cpan/Encode/bin/piconv
+index c1dad9e..60b2a59 100644
+--- a/cpan/Encode/bin/piconv
++++ b/cpan/Encode/bin/piconv
+@@ -1,6 +1,7 @@
+ #!./perl
+ # $Id: piconv,v 2.7 2014/05/31 09:48:48 dankogai Exp $
+ #
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use 5.8.0;
+ use strict;
+ use Encode ;
+diff --git a/cpan/Encode/bin/ucmlint b/cpan/Encode/bin/ucmlint
+index 622376d..25e0d67 100644
+--- a/cpan/Encode/bin/ucmlint
++++ b/cpan/Encode/bin/ucmlint
+@@ -3,6 +3,7 @@
+ # $Id: ucmlint,v 2.2 2008/03/12 09:51:11 dankogai Exp $
+ #
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ our $VERSION = do { my @r = (q$Revision: 2.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+
+diff --git a/cpan/Encode/bin/unidump b/cpan/Encode/bin/unidump
+index ae0da30..f190827 100644
+--- a/cpan/Encode/bin/unidump
++++ b/cpan/Encode/bin/unidump
+@@ -1,5 +1,6 @@
+ #!./perl
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use Encode;
+ use Getopt::Std;
+diff --git a/cpan/ExtUtils-MakeMaker/bin/instmodsh b/cpan/ExtUtils-MakeMaker/bin/instmodsh
+index e551434..b3b109f 100644
+--- a/cpan/ExtUtils-MakeMaker/bin/instmodsh
++++ b/cpan/ExtUtils-MakeMaker/bin/instmodsh
+@@ -1,5 +1,6 @@
+ #!/usr/bin/perl -w
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use IO::File;
+ use ExtUtils::Packlist;
+diff --git a/cpan/IO-Compress/bin/zipdetails b/cpan/IO-Compress/bin/zipdetails
+index 0249850..1b9c70a 100644
+--- a/cpan/IO-Compress/bin/zipdetails
++++ b/cpan/IO-Compress/bin/zipdetails
+@@ -5,6 +5,7 @@
+ # Display info on the contents of a Zip file
+ #
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use warnings ;
+
+diff --git a/cpan/JSON-PP/bin/json_pp b/cpan/JSON-PP/bin/json_pp
+index df9d243..896cd2f 100644
+--- a/cpan/JSON-PP/bin/json_pp
++++ b/cpan/JSON-PP/bin/json_pp
+@@ -1,5 +1,6 @@
+ #!/usr/bin/perl
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use Getopt::Long;
+
+diff --git a/cpan/Test-Harness/bin/prove b/cpan/Test-Harness/bin/prove
+index 6637cc4..d71b238 100644
+--- a/cpan/Test-Harness/bin/prove
++++ b/cpan/Test-Harness/bin/prove
+@@ -1,5 +1,6 @@
+ #!/usr/bin/perl -w
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use warnings;
+ use App::Prove;
+diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp b/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp
+index e2ac71a..d596cdf 100644
+--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp
++++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp
+@@ -1,5 +1,6 @@
+ #!perl
+ use 5.006;
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ eval {
+ require ExtUtils::ParseXS;
+diff --git a/dist/Module-CoreList/corelist b/dist/Module-CoreList/corelist
+index aa4a945..bbe61cc 100644
+--- a/dist/Module-CoreList/corelist
++++ b/dist/Module-CoreList/corelist
+@@ -130,6 +130,7 @@ requested perl versions.
+
+ =cut
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use Module::CoreList;
+ use Getopt::Long qw(:config no_ignore_case);
+ use Pod::Usage;
+diff --git a/ext/Pod-Html/bin/pod2html b/ext/Pod-Html/bin/pod2html
+index b022859..7d1d232 100644
+--- a/ext/Pod-Html/bin/pod2html
++++ b/ext/Pod-Html/bin/pod2html
+@@ -216,6 +216,7 @@ This program is distributed under the Artistic License.
+
+ =cut
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use Pod::Html;
+
+ pod2html @ARGV;
+diff --git a/utils/c2ph.PL b/utils/c2ph.PL
+index 13389ec..cef0b5c 100644
+--- a/utils/c2ph.PL
++++ b/utils/c2ph.PL
+@@ -280,6 +280,7 @@ Anyway, here it is. Should run on perl v4 or greater. Maybe less.
+
+ $RCSID = '$Id: c2ph,v 1.7 95/10/28 10:41:47 tchrist Exp Locker: tchrist $';
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use File::Temp;
+
+ ######################################################################
+diff --git a/utils/h2ph.PL b/utils/h2ph.PL
+index 55c1f72..300b756 100644
+--- a/utils/h2ph.PL
++++ b/utils/h2ph.PL
+@@ -36,6 +36,8 @@ $Config{startperl}
+
+ print OUT <<'!NO!SUBS!';
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
++
+ use strict;
+
+ use Config;
+diff --git a/utils/h2xs.PL b/utils/h2xs.PL
+index 268f680..f95ee0c 100644
+--- a/utils/h2xs.PL
++++ b/utils/h2xs.PL
+@@ -35,6 +35,8 @@ $Config{startperl}
+
+ print OUT <<'!NO!SUBS!';
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
++
+ use warnings;
+
+ =head1 NAME
+diff --git a/utils/libnetcfg.PL b/utils/libnetcfg.PL
+index 59a2de8..26d2f99 100644
+--- a/utils/libnetcfg.PL
++++ b/utils/libnetcfg.PL
+@@ -97,6 +97,7 @@ Jarkko Hietaniemi, conversion into libnetcfg for inclusion into Perl 5.8.
+
+ # $Id: Configure,v 1.8 1997/03/04 09:22:32 gbarr Exp $
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use strict;
+ use IO::File;
+ use Getopt::Std;
+diff --git a/utils/perlbug.PL b/utils/perlbug.PL
+index 885785a..ae8c343 100644
+--- a/utils/perlbug.PL
++++ b/utils/perlbug.PL
+@@ -57,6 +57,7 @@ print OUT <<'!NO!SUBS!';
+ my @patches = Config::local_patches();
+ my $patch_tags = join "", map /(\S+)/ ? "+$1 " : (), @patches;
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
+ use warnings;
+ use strict;
+ use Config;
+diff --git a/utils/perldoc.PL b/utils/perldoc.PL
+index e201de9..cd60bd4 100644
+--- a/utils/perldoc.PL
++++ b/utils/perldoc.PL
+@@ -44,7 +44,10 @@ $Config{startperl}
+ # This "$file" file was generated by "$0"
+
+ require 5;
+-BEGIN { \$^W = 1 if \$ENV{'PERLDOCDEBUG'} }
++BEGIN {
++ \$^W = 1 if \$ENV{'PERLDOCDEBUG'};
++ pop \@INC if \$INC[-1] eq '.';
++}
+ use Pod::Perldoc;
+ exit( Pod::Perldoc->run() );
+
+diff --git a/utils/perlivp.PL b/utils/perlivp.PL
+index cc49f96..696a44e 100644
+--- a/utils/perlivp.PL
++++ b/utils/perlivp.PL
+@@ -39,6 +39,8 @@ print OUT "\n# perlivp $^V\n";
+
+ print OUT <<'!NO!SUBS!';
+
++BEGIN { pop @INC if $INC[-1] eq '.' }
++
+ sub usage {
+ warn "@_\n" if @_;
+ print << " EOUSAGE";
+diff --git a/utils/splain.PL b/utils/splain.PL
+index 9c70b61..cae84a0 100644
+--- a/utils/splain.PL
++++ b/utils/splain.PL
+@@ -38,6 +38,12 @@ $Config{startperl}
+ if \$running_under_some_shell;
+ !GROK!THIS!
+
++print <<'!NO!SUBS!';
++
++BEGIN { pop @INC if $INC[-1] eq '.' }
++
++!NO!SUBS!
++
+ while (<IN>) {
+ print OUT unless /^package diagnostics/;
+ }
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-2381.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-2381.patch
new file mode 100644
index 000000000..99fa8d9a6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-2381.patch
@@ -0,0 +1,114 @@
+CVE: CVE-2016-2381
+Upstream-Status: Backport
+
+Backport patch to fix CVE-2016-2381 from
+
+http://perl5.git.perl.org/perl.git/commitdiff/ae37b791a73a9e78dedb89fb2429d2628cf58076
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From: Tony Cook <tony@develop-help.com>
+Date: Wed, 27 Jan 2016 00:52:15 +0000 (+1100)
+Subject: remove duplicate environment variables from environ
+X-Git-Tag: v5.23.9~170
+X-Git-Url: http://perl5.git.perl.org/perl.git/commitdiff_plain/ae37b791a73a9e78dedb89fb2429d2628cf58076
+
+remove duplicate environment variables from environ
+
+If we see duplicate environment variables while iterating over
+environ[]:
+
+a) make sure we use the same value in %ENV that getenv() returns.
+
+Previously on a duplicate, %ENV would have the last entry for the name
+from environ[], but a typical getenv() would return the first entry.
+
+Rather than assuming all getenv() implementations return the first entry
+explicitly call getenv() to ensure they agree.
+
+b) remove duplicate entries from environ
+
+Previously if there was a duplicate definition for a name in environ[]
+setting that name in %ENV could result in an unsafe value being passed
+to a child process, so ensure environ[] has no duplicates.
+
+CVE-2016-2381
+---
+
+diff --git a/perl.c b/perl.c
+index 4a324c6..5c71fd0 100644
+--- a/perl.c
++++ b/perl.c
+@@ -4329,23 +4329,70 @@ S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env)
+ }
+ if (env) {
+ char *s, *old_var;
++ STRLEN nlen;
+ SV *sv;
++ HV *dups = newHV();
++
+ for (; *env; env++) {
+ old_var = *env;
+
+ if (!(s = strchr(old_var,'=')) || s == old_var)
+ continue;
++ nlen = s - old_var;
+
+ #if defined(MSDOS) && !defined(DJGPP)
+ *s = '\0';
+ (void)strupr(old_var);
+ *s = '=';
+ #endif
+- sv = newSVpv(s+1, 0);
+- (void)hv_store(hv, old_var, s - old_var, sv, 0);
++ if (hv_exists(hv, old_var, nlen)) {
++ const char *name = savepvn(old_var, nlen);
++
++ /* make sure we use the same value as getenv(), otherwise code that
++ uses getenv() (like setlocale()) might see a different value to %ENV
++ */
++ sv = newSVpv(PerlEnv_getenv(name), 0);
++
++ /* keep a count of the dups of this name so we can de-dup environ later */
++ if (hv_exists(dups, name, nlen))
++ ++SvIVX(*hv_fetch(dups, name, nlen, 0));
++ else
++ (void)hv_store(dups, name, nlen, newSViv(1), 0);
++
++ Safefree(name);
++ }
++ else {
++ sv = newSVpv(s+1, 0);
++ }
++ (void)hv_store(hv, old_var, nlen, sv, 0);
+ if (env_is_not_environ)
+ mg_set(sv);
+ }
++ if (HvKEYS(dups)) {
++ /* environ has some duplicate definitions, remove them */
++ HE *entry;
++ hv_iterinit(dups);
++ while ((entry = hv_iternext_flags(dups, 0))) {
++ STRLEN nlen;
++ const char *name = HePV(entry, nlen);
++ IV count = SvIV(HeVAL(entry));
++ IV i;
++ SV **valp = hv_fetch(hv, name, nlen, 0);
++
++ assert(valp);
++
++ /* try to remove any duplicate names, depending on the
++ * implementation used in my_setenv() the iteration might
++ * not be necessary, but let's be safe.
++ */
++ for (i = 0; i < count; ++i)
++ my_setenv(name, 0);
++
++ /* and set it back to the value we set $ENV{name} to */
++ my_setenv(name, SvPV_nolen(*valp));
++ }
++ }
++ SvREFCNT_dec_NN(dups);
+ }
+ #endif /* USE_ENVIRON_ARRAY */
+ #endif /* !PERL_MICRO */
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch
new file mode 100644
index 000000000..2722af35b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch
@@ -0,0 +1,128 @@
+From 7cedaa8bc2ca9e63369d0e2d4c4c23af9febb93a Mon Sep 17 00:00:00 2001
+From: Father Chrysostomos <sprout@cpan.org>
+Date: Sat, 2 Jul 2016 22:56:51 -0700
+Subject: [PATCH] perl: fix CVE-2016-6185
+MIME-Version: 1.0
+
+Don't let XSLoader load relative paths
+
+[rt.cpan.org #115808]
+
+The logic in XSLoader for determining the library goes like this:
+
+ my $c = () = split(/::/,$caller,-1);
+ $modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename
+ my $file = "$modlibname/auto/$modpname/$modfname.bundle";
+
+(That last line varies by platform.)
+
+$caller is the calling package. $modlibname is the calling file. It
+removes as many path segments from $modlibname as there are segments
+in $caller. So if you have Foo/Bar/XS.pm calling XSLoader from the
+Foo::Bar package, the $modlibname will end up containing the path in
+@INC where XS.pm was found, followed by "/Foo". Usually the fallback
+to Dynaloader::bootstrap_inherit, which does an @INC search, makes
+things Just Work.
+
+But if our hypothetical Foo/Bar/XS.pm actually calls
+XSLoader::load from inside a string eval, then path ends up being
+"(eval 1)/auto/Foo/Bar/Bar.bundle".
+
+So if someone creates a directory named '(eval 1)' with a naughty
+binary file in it, it will be loaded if a script using Foo::Bar is run
+in the parent directory.
+
+This commit makes XSLoader fall back to Dynaloader's @INC search if
+the calling file has a relative path that is not found in @INC.
+
+Backport patch from http://perl5.git.perl.org/perl.git/commitdiff/08e3451d7
+
+Upstream-Status: Backport
+CVE: CVE-2016-6185
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ dist/XSLoader/XSLoader_pm.PL | 25 +++++++++++++++++++++++++
+ dist/XSLoader/t/XSLoader.t | 27 ++++++++++++++++++++++++++-
+ 2 files changed, 51 insertions(+), 1 deletion(-)
+
+diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL
+index 668411d..778e46b 100644
+--- a/dist/XSLoader/XSLoader_pm.PL
++++ b/dist/XSLoader/XSLoader_pm.PL
+@@ -104,6 +104,31 @@ print OUT <<'EOT';
+ my $modpname = join('/',@modparts);
+ my $c = () = split(/::/,$caller,-1);
+ $modlibname =~ s,[\\/][^\\/]+$,, while $c--; # Q&D basename
++ # Does this look like a relative path?
++ if ($modlibname !~ m|^[\\/]|) {
++ # Someone may have a #line directive that changes the file name, or
++ # may be calling XSLoader::load from inside a string eval. We cer-
++ # tainly do not want to go loading some code that is not in @INC,
++ # as it could be untrusted.
++ #
++ # We could just fall back to DynaLoader here, but then the rest of
++ # this function would go untested in the perl core, since all @INC
++ # paths are relative during testing. That would be a time bomb
++ # waiting to happen, since bugs could be introduced into the code.
++ #
++ # So look through @INC to see if $modlibname is in it. A rela-
++ # tive $modlibname is not a common occurrence, so this block is
++ # not hot code.
++ FOUND: {
++ for (@INC) {
++ if ($_ eq $modlibname) {
++ last FOUND;
++ }
++ }
++ # Not found. Fall back to DynaLoader.
++ goto \&XSLoader::bootstrap_inherit;
++ }
++ }
+ EOT
+
+ my $dl_dlext = quotemeta($Config::Config{'dlext'});
+diff --git a/dist/XSLoader/t/XSLoader.t b/dist/XSLoader/t/XSLoader.t
+index 2ff11fe..1e86faa 100644
+--- a/dist/XSLoader/t/XSLoader.t
++++ b/dist/XSLoader/t/XSLoader.t
+@@ -33,7 +33,7 @@ my %modules = (
+ 'Time::HiRes'=> q| ::can_ok( 'Time::HiRes' => 'usleep' ) |, # 5.7.3
+ );
+
+-plan tests => keys(%modules) * 3 + 9;
++plan tests => keys(%modules) * 3 + 10;
+
+ # Try to load the module
+ use_ok( 'XSLoader' );
+@@ -125,3 +125,28 @@ XSLoader::load("Devel::Peek");
+ EOS
+ or ::diag $@;
+ }
++
++SKIP: {
++ skip "File::Path not available", 1
++ unless eval { require File::Path };
++ my $name = "phooo$$";
++ File::Path::make_path("$name/auto/Foo/Bar");
++ open my $fh,
++ ">$name/auto/Foo/Bar/Bar.$Config::Config{'dlext'}";
++ close $fh;
++ my $fell_back;
++ local *XSLoader::bootstrap_inherit = sub {
++ $fell_back++;
++ # Break out of the calling subs
++ goto the_test;
++ };
++ eval <<END;
++#line 1 $name
++package Foo::Bar;
++XSLoader::load("Foo::Bar");
++END
++ the_test:
++ ok $fell_back,
++ 'XSLoader will not load relative paths based on (caller)[1]';
++ File::Path::remove_tree($name);
++}
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-conflict-between-skip_all-and-END.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-conflict-between-skip_all-and-END.patch
new file mode 100644
index 000000000..de946dbec
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-fix-conflict-between-skip_all-and-END.patch
@@ -0,0 +1,181 @@
+Some Perl tests fail when run on a cross-compiled target machine. Apply
+a slightly tweaked upstream patch to fix the problems. Notes:
+ 1. as of 2 Jun 2016, the original patch has been applied to the current
+ EUMM releases, but has not made it into perl core yet.
+ 2. when the base perl package is upgraded in Yocto, this patch may need
+ to be replaced by the original upstream version to correctly apply
+ to the current version of ExtUtils-MakeMaker at that time.
+
+[YOCTO #8656]
+
+Upstream-Status: Backport
+
+Signed-off-by: Bill Randle <william.c.randle@intel.com>
+
+From 4a07a3bd18363986112cf2b39dec3c2985353ffb Mon Sep 17 00:00:00 2001
+From: Francois Perrad <francois.perrad@gadz.org>
+Date: Mon, 22 Dec 2014 19:04:34 +0100
+Subject: [PATCH] fix conflict between skip_all and END section
+
+since the commit 430de781809a6be3bcd25a349dc40ce54405ab53
+the test suite fails in cross-compil environment (perl-5.21.6 & perl-5.21.7)
+like this :
+
+ $ ./perl harness -v ../cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t
+ ../cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t ..
+ 1..0 # SKIP cross-compiling and make not available
+ ok 1 - chdir updir
+ ok 2 - teardown
+ # Looks like you planned 0 tests but ran 2.
+ skipped: cross-compiling and make not available
+
+this commit restores the implicit call of plan() at import time of Test::More
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+---
+ cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t | 7 ++++---
+ cpan/ExtUtils-MakeMaker/t/PL_FILES.t | 4 ++--
+ cpan/ExtUtils-MakeMaker/t/basic.t | 4 ++--
+ cpan/ExtUtils-MakeMaker/t/echo.t | 6 +++---
+ cpan/ExtUtils-MakeMaker/t/min_perl_version.t | 4 ++--
+ cpan/ExtUtils-MakeMaker/t/pm_to_blib.t | 4 ++--
+ cpan/ExtUtils-MakeMaker/t/recurs.t | 4 ++--
+ cpan/ExtUtils-MakeMaker/t/several_authors.t | 4 ++--
+ 8 files changed, 19 insertions(+), 18 deletions(-)
+
+diff --git a/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t b/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t
+index f27b62c..3bbb3a6 100644
+--- a/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t
++++ b/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t
+@@ -15,12 +15,13 @@ $CLEANUP &&= 1; # so always 1 or numerically 0
+
+ use MakeMaker::Test::Utils;
+ use MakeMaker::Test::Setup::BFD;
+-use Test::More;
+ use Config;
+ use ExtUtils::MM;
+-plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
++use Test::More
++ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
+ ? (skip_all => "cross-compiling and make not available")
+- : (tests => 3 + $CLEANUP + @INSTDIRS * (15 + $CLEANUP));
++ : ();
++plan tests => 3 + $CLEANUP + @INSTDIRS * (15 + $CLEANUP);
+
+ my $Is_VMS = $^O eq 'VMS';
+
+diff --git a/cpan/ExtUtils-MakeMaker/t/PL_FILES.t b/cpan/ExtUtils-MakeMaker/t/PL_FILES.t
+index 0779dbb..85d53a5 100644
+--- a/cpan/ExtUtils-MakeMaker/t/PL_FILES.t
++++ b/cpan/ExtUtils-MakeMaker/t/PL_FILES.t
+@@ -11,9 +11,9 @@ use File::Temp qw[tempdir];
+ use MakeMaker::Test::Setup::PL_FILES;
+ use MakeMaker::Test::Utils;
+ use Config;
+-use Test::More;
+ use ExtUtils::MM;
+-plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
++use Test::More
++ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
+ ? (skip_all => "cross-compiling and make not available")
+ : (tests => 9);
+
+diff --git a/cpan/ExtUtils-MakeMaker/t/basic.t b/cpan/ExtUtils-MakeMaker/t/basic.t
+index 3dd66ad..eddf2e9 100644
+--- a/cpan/ExtUtils-MakeMaker/t/basic.t
++++ b/cpan/ExtUtils-MakeMaker/t/basic.t
+@@ -20,9 +20,9 @@ use utf8;
+ use MakeMaker::Test::Utils;
+ use MakeMaker::Test::Setup::BFD;
+ use Config;
+-use Test::More;
+ use ExtUtils::MM;
+-plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
++use Test::More
++ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
+ ? (skip_all => "cross-compiling and make not available")
+ : (tests => 171);
+ use File::Find;
+diff --git a/cpan/ExtUtils-MakeMaker/t/echo.t b/cpan/ExtUtils-MakeMaker/t/echo.t
+index 789b85f..c43bc47 100644
+--- a/cpan/ExtUtils-MakeMaker/t/echo.t
++++ b/cpan/ExtUtils-MakeMaker/t/echo.t
+@@ -14,11 +14,11 @@ use MakeMaker::Test::Utils;
+ use File::Temp;
+ use Cwd 'abs_path';
+
+-use Test::More;
+ use ExtUtils::MM;
+-plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
++use Test::More
++ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
+ ? (skip_all => "cross-compiling and make not available")
+- : ();
++ : (tests => 18);
+
+ #--------------------- Setup
+
+diff --git a/cpan/ExtUtils-MakeMaker/t/min_perl_version.t b/cpan/ExtUtils-MakeMaker/t/min_perl_version.t
+index c5d78d6..2ef118d 100644
+--- a/cpan/ExtUtils-MakeMaker/t/min_perl_version.t
++++ b/cpan/ExtUtils-MakeMaker/t/min_perl_version.t
+@@ -13,9 +13,9 @@ use TieOut;
+ use MakeMaker::Test::Utils;
+ use MakeMaker::Test::Setup::MPV;
+ use Config;
+-use Test::More;
+ use ExtUtils::MM;
+-plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
++use Test::More
++ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
+ ? (skip_all => "cross-compiling and make not available")
+ : (tests => 36);
+ use File::Path;
+diff --git a/cpan/ExtUtils-MakeMaker/t/pm_to_blib.t b/cpan/ExtUtils-MakeMaker/t/pm_to_blib.t
+index f1e348e..ebfa26c 100644
+--- a/cpan/ExtUtils-MakeMaker/t/pm_to_blib.t
++++ b/cpan/ExtUtils-MakeMaker/t/pm_to_blib.t
+@@ -12,9 +12,9 @@ use ExtUtils::MakeMaker;
+ use MakeMaker::Test::Utils;
+ use MakeMaker::Test::Setup::BFD;
+ use Config;
+-use Test::More;
+ use ExtUtils::MM;
+-plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
++use Test::More
++ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
+ ? (skip_all => "cross-compiling and make not available")
+ : 'no_plan';
+
+diff --git a/cpan/ExtUtils-MakeMaker/t/recurs.t b/cpan/ExtUtils-MakeMaker/t/recurs.t
+index 84c09a2..661e0db 100644
+--- a/cpan/ExtUtils-MakeMaker/t/recurs.t
++++ b/cpan/ExtUtils-MakeMaker/t/recurs.t
+@@ -14,9 +14,9 @@ use File::Temp qw[tempdir];
+ use MakeMaker::Test::Utils;
+ use MakeMaker::Test::Setup::Recurs;
+ use Config;
+-use Test::More;
+ use ExtUtils::MM;
+-plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
++use Test::More
++ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
+ ? (skip_all => "cross-compiling and make not available")
+ : (tests => 26);
+
+diff --git a/cpan/ExtUtils-MakeMaker/t/several_authors.t b/cpan/ExtUtils-MakeMaker/t/several_authors.t
+index 1a75a3e..869e9f0 100644
+--- a/cpan/ExtUtils-MakeMaker/t/several_authors.t
++++ b/cpan/ExtUtils-MakeMaker/t/several_authors.t
+@@ -13,9 +13,9 @@ use TieOut;
+ use MakeMaker::Test::Utils;
+ use MakeMaker::Test::Setup::SAS;
+ use Config;
+-use Test::More;
+ use ExtUtils::MM;
+-plan !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
++use Test::More
++ !MM->can_run(make()) && $ENV{PERL_CORE} && $Config{'usecrosscompile'}
+ ? (skip_all => "cross-compiling and make not available")
+ : (tests => 20);
+ use File::Path;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-remove-nm-from-libswanted.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-remove-nm-from-libswanted.patch
new file mode 100644
index 000000000..c489f05bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-remove-nm-from-libswanted.patch
@@ -0,0 +1,30 @@
+From 4732711e2548b6d734ca831d65dbcf501a89774e Mon Sep 17 00:00:00 2001
+From: Andreas Koenig <andk@cpan.org>
+Date: Sun, 3 Jan 2016 08:40:33 +0100
+Subject: [PATCH] Remove nm from libswanted
+
+Nm stood for "New Math" library in the context of 1994. 2014 a conflicting
+library libnm appeared that has a network manager context.
+
+Upstream-Status: Backport [commit 4732711e on branch blead, tag v5.25.0]
+
+---
+ Configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Configure b/Configure
+index 0e71b4b..cfbdaa1 100755
+--- a/Configure
++++ b/Configure
+@@ -1464,7 +1464,7 @@ libswanted_uselargefiles=''
+ : set usesocks on the Configure command line to enable socks.
+ : List of libraries we want.
+ : If anyone needs extra -lxxx, put those in a hint file.
+-libswanted="cl pthread socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld"
++libswanted="cl pthread socket bind inet nsl ndbm gdbm dbm db malloc dl ld"
+ libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
+ : We probably want to search /usr/shlib before most other libraries.
+ : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
+--
+2.9.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
new file mode 100644
index 000000000..84b0b88f2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl/perl-test-customized.patch
@@ -0,0 +1,61 @@
+The OE core recipies customize some ExtUtils-MakeMaker modules,
+which causes their MD5 sum to mismatch the provided table and the
+corresponding tests to fail. Also, we patch several test files with
+a backported patch. Update list of hashes to reflect the patched files.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Bill Randle <william.c.randle@intel.com>
+
+Index: perl-5.22.1/t/porting/customized.dat
+===================================================================
+--- perl-5.22.1.orig/t/porting/customized.dat 2015-10-31 13:36:16.000000000 +0000
++++ perl-5.22.1/t/porting/customized.dat 2016-06-02 12:50:10.381030204 -0700
+@@ -1,8 +1,8 @@
+ CPAN cpan/CPAN/lib/CPAN.pm ce62c43d72f101c011184dbbc59e21c2790826f0
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm 7f4dfd0fe884bd42412bcf04ca80ef97b39c1d54
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm bef099988b15fb0b2a1f5ac48c01af1f7f36d329
+-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm 8168e18f0e3ce3ece4bb7e7c72d57ec07c67c402
+-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 7115e97a53559cb3ec061dd6f7f344e522724c4a
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm a08ecf80c8f0a234243817713b2a5ab0dcae3c0a
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 3d7abd674b15ed323f743594ef0bd09db76b1aee
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Config.pm f8db8d4245bf0684b8210c811f50d7cfb1a27d78
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/FAQ.pod 757bffb47857521311f8f3bde43ebe165f8d5191
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker/Locale.pm 82be06851deb84c6419ad003ce9b6d1957f395f3
+@@ -14,7 +14,7 @@
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Mksymlists.pm ab80029ab16d38d4f2e41dc88d2ceb9f3790e477
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM.pm 453e0abbc4bb38db4c0820ad5c4846f313b66291
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_AIX.pm c1b1babda8f43ae7a2caba1cb4f70f92af5a0e34
+-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm 6f90d94ad3e7aa0045a3b1a10a1bb18391f89f57
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm 21bde53290bf1a4da4457290b65bd1b0ca6f1d16
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_BeOS.pm cab2b3ce08b71a4ce89aa630f236eb08b852439d
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Cygwin.pm 61fced0faf518bf87c265fcb51ed330ba354623f
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Darwin.pm ae0ef51a7b6dd0b05aa61c779df7167dda5f5119
+@@ -23,7 +23,7 @@
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_NW5.pm 433135eecb85b4b1d90d3027432f329436c78447
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_OS2.pm 1fbb5605bfb47feee4083feba8aa85e659628f70
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_QNX.pm 5b66d1f485a6034d96fc24ba1665b1bad9e447f1
+-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 8cef99a9bd370ecfd07ddb0efbdcbb4101255e45
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 860d520234d7c9036d91f0b143a1dddf2a5e8cb7
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_UWIN.pm 939572fde3d59ba77c2e677fe2df2bed4bed5898
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VMS.pm 09c2049bfd25b735e2a5bcf56a6cff7b4827f9c8
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_VOS.pm d65d63f8217a55c36f62e249814988974f593c79
+@@ -31,8 +31,16 @@
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win95.pm 12df38eacceeed73cab94c423236bfaed0fbbfec
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MY.pm 22fe9596a0237252f45399a36abc83b7813bc328
+ ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/testlib.pm 7fbc42ca2ebc6c677b79ae5fd5647243cf069463
+-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/basic.t 6cdc7701b50e586bc9c4cfb1616de8eb0b1baf34
+-ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/pm_to_blib.t 71ebcee355691ce374fcad251b12d8b2412462b3
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/basic.t d78fdec7a4512dc8d2a7abd62b8104530af8ecf9
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/echo.t 9427f4adebbb13b57b4a76fef2972adf63c9bd96
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t ef356c196bb5c3c428ae309d7f989bdd6d79b86d
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t 3e6d4d6eb2eab42e983ac70eb5737a759af0916f
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/INST.t e553fa0d53c894c8d36aafb69edd55b38a9355f8
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/min_perl_version.t e930ec9217de5a1785d0247c30b159e6f7f5673f
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/PL_FILES.t 7e49ab6c4d467826d22023fa03d77b85f935b58e
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/pm_to_blib.t a04c96eecfab17e4094604e0fb998dd93cf93b93
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/recurs.t 94cce3bff875a878ed27816b3f5df2ca4225c714
++ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/t/several_authors.t f811d993c0835c66dc501ed55083acb29bf33bf7
+ Text::ParseWords cpan/Text-ParseWords/t/ParseWords.t 9bae51c9b944cd5c0bbabe9d397e573976a2be8e
+ Win32API::File cpan/Win32API-File/buffers.h 02d230ac9ac7091365128161a0ed671898baefae
+ Win32API::File cpan/Win32API-File/cFile.h fca7e383e76979c3ac3adf12d11d1bcd2618e489
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.22.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.22.1.bb
index bf8b3b60b..792a65b5b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.22.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/perl/perl_5.22.1.bb
@@ -63,6 +63,12 @@ SRC_URI += " \
file://ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch \
file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
file://perl-errno-generation-gcc5.patch \
+ file://perl-fix-conflict-between-skip_all-and-END.patch \
+ file://perl-test-customized.patch \
+ file://perl-fix-CVE-2016-2381.patch \
+ file://perl-fix-CVE-2016-6185.patch \
+ file://perl-fix-CVE-2015-8607.patch \
+ file://perl-fix-CVE-2016-1238.patch \
"
# Fix test case issues
@@ -340,7 +346,9 @@ FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore"
ALLOW_EMPTY_perl-modules = "1"
PACKAGES_append = " perl-modules "
-python populate_packages_prepend () {
+PACKAGESPLITFUNCS_prepend = "split_perl_packages "
+
+python split_perl_packages () {
libdir = d.expand('${libdir}/perl/${PV}')
do_split_packages(d, libdir, 'auto/([^.]*)/[^/]*\.(so|ld|ix|al)', 'perl-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch
new file mode 100644
index 000000000..14c8293a5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-gdate-Move-warning-pragma-outside-of-function.patch
@@ -0,0 +1,39 @@
+From 946d36266d8a30f04fe34d3183bf4929141934d2 Mon Sep 17 00:00:00 2001
+From: coypu <coypu@sdf.org>
+Date: Wed, 2 Mar 2016 19:38:48 +0200
+Subject: [PATCH] gdate: Move warning pragma outside of function
+
+Commit 0817af40e8c74c721c30f6ef482b1f53d12044c7 breaks the build on
+older versions of GCC, which don't allow pragma inside functions.
+
+https://bugzilla.gnome.org/761550
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ glib/glib/gdate.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/glib/glib/gdate.c b/glib/glib/gdate.c
+index 1978cf7..20e6c4a 100644
+--- a/glib/glib/gdate.c
++++ b/glib/glib/gdate.c
+@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
+ *
+ * Returns: number of characters written to the buffer, or 0 the buffer was too small
+ */
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat-nonliteral"
++
+ gsize
+ g_date_strftime (gchar *s,
+ gsize slen,
+@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s,
+ return retval;
+ #endif
+ }
++
++#pragma GCC diagnostic pop
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch
new file mode 100644
index 000000000..80310cd37
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch
@@ -0,0 +1,41 @@
+From e404e27de77d8b993c4cc87013d707200b3a5547 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 17 May 2016 13:26:27 +0300
+Subject: [PATCH] glib-gettext.m4: Update AM_GLIB_GNU_GETTEXT to match glib
+
+This avoids
+ error: m4_copy: won't overwrite defined macro: glib_DEFUN
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Pending
+
+---
+ glib/m4macros/glib-gettext.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/glib/m4macros/glib-gettext.m4 b/glib/m4macros/glib-gettext.m4
+index 5217fd8..155b1d8 100644
+--- a/glib/m4macros/glib-gettext.m4
++++ b/glib/m4macros/glib-gettext.m4
+@@ -313,7 +313,7 @@ msgstr ""
+ # on various variables needed by the Makefile.in.in installed by
+ # glib-gettextize.
+ dnl
+-glib_DEFUN([GLIB_GNU_GETTEXT],
++AU_DEFUN([GLIB_GNU_GETTEXT],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+
+ GLIB_LC_MESSAGES
+@@ -383,7 +383,8 @@ glib_DEFUN([GLIB_GNU_GETTEXT],
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+- ])
++ ],
++ [[$0: This macro is deprecated. You should use upstream gettext instead.]])
+
+ # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+ # -------------------------------
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
index d34f608f1..ff8254cfc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -12,12 +12,14 @@ DEPENDS = "glib-2.0"
DEPENDS_class-native = ""
DEPENDS_class-nativesdk = ""
-SRCREV = "5914edfe9604abfedd220103cbac382fc4d268bb"
-PV = "0.29+git${SRCPV}"
+SRCREV = "87152c05be88ca8be71a3a563f275b3686d32c28"
+PV = "0.29.1+git${SRCPV}"
SRC_URI = "git://anongit.freedesktop.org/pkg-config \
file://pkg-config-native.in \
file://fix-glib-configure-libtool-usage.patch \
+ file://0001-gdate-Move-warning-pragma-outside-of-function.patch \
+ file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \
"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
index e223ef689..0856b1c66 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/prelink/prelink_git.bb
@@ -8,7 +8,7 @@ and executables, so that far fewer relocations need to be resolved at \
runtime and thus programs come up faster."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
-SRCREV = "927979bbd115eeb8a75db3231906ef6aca4c4eb6"
+SRCREV = "ef20628dd78b92e1a3123afc67b64cf010bdd9e4"
PV = "1.0+git${SRCPV}"
#
@@ -44,6 +44,99 @@ BBCLASSEXTEND = "native"
EXTRA_OECONF = "--disable-selinux --with-pkgversion=${PV}-${PR} \
--with-bugurl=http://bugzilla.yoctoproject.org/"
+
+#
+# For target prelink we need to ensure paths match the lib path layout
+# including for any configured multilibs
+#
+python do_linkerpaths () {
+ values = all_multilib_tune_list(["TUNE_ARCH", "baselib", "ABIEXTENSION"], d)
+
+ arches = values["TUNE_ARCH"]
+ baselibs = values["baselib"]
+ abis = values["ABIEXTENSION"]
+
+ def replace_lines(f, search, replacement, d, firstonly = False, secondonly = False):
+ f = d.expand(f)
+ if search == replacement:
+ return
+ bb.debug(2, "Replacing %s with %s in %s" % (search, replacement, f))
+ with open(f, "r") as data:
+ lines = data.readlines()
+ with open(f, "w") as data:
+ for line in lines:
+ if not secondonly and not firstonly:
+ line = line.replace(search, replacement)
+ elif secondonly and search in line:
+ secondonly = False
+ elif firstonly and search and search in line:
+ line = line.replace(search, replacement)
+ search = None
+ data.write(line)
+
+ def replace_lines_rtld(f, search, replacement, section, d):
+ f = d.expand(f)
+ bb.debug(2, "Replacing %s with %s in %s" % (search, replacement, f))
+ with open(f, "r") as data:
+ lines = data.readlines()
+ found = False
+ found2 = False
+ with open(f, "w") as data:
+ for line in lines:
+ if section in line:
+ if section == "else" and "if" in line:
+ found = False
+ else:
+ found = True
+ if found and "dst_LIB =" in line:
+ found2 = True
+ elif "}" in line:
+ found = False
+ found2 = False
+ if found2:
+ line = line.replace(search, replacement)
+ data.write(line)
+
+ for i, arch in enumerate(arches):
+ tune_baselib = baselibs[i]
+ abi = abis[i]
+
+ bits = 32
+ if arch == "powerpc":
+ replace_lines("${S}/src/arch-ppc.c", "/lib/ld.so.1", "/" + tune_baselib + "/ld.so.1", d)
+ elif arch == "powerpc64":
+ replace_lines("${S}/src/arch-ppc64.c", "/lib64/ld64.so.1", "/" + tune_baselib + "/ld64.so.1", d)
+ bits = 64
+ elif arch == "x86_64":
+ if abi == "x32":
+ replace_lines("${S}/src/arch-x86_64.c", "/libx32/ld-linux-x32.so.2", "/" + tune_baselib + "/ld-linux-x32.so.2", d)
+ else:
+ replace_lines("${S}/src/arch-x86_64.c", "/lib64/ld-linux-x86-64.so.2", "/" + tune_baselib + "/ld-linux-x86-64.so.2", d)
+ bits = 64
+ elif arch == "arm":
+ replace_lines("${S}/src/arch-arm.c", "/lib/ld-linux.so.3", "/" + tune_baselib + "/ld-linux.so.3", d)
+ replace_lines("${S}/src/arch-arm.c", "/lib/ld-linux-armhf.so.3", "/" + tune_baselib + "/ld-linux-armhf.so.3", d)
+ elif arch == "mips" or arch == "mipsel":
+ replace_lines("${S}/src/arch-mips.c", "/lib/ld.so.1", "/" + tune_baselib + "/ld.so.1", d, firstonly=True)
+ replace_lines("${S}/src/arch-mips.c", "/lib32/ld.so.1", "/" + tune_baselib + "/ld.so.1", d)
+ elif arch == "mips64" or arch == "mips64el":
+ replace_lines("${S}/src/arch-mips.c", "/lib/ld.so.1", "/" + tune_baselib + "/ld.so.1", d, secondonly=True)
+ replace_lines("${S}/src/arch-mips.c", "/lib64/ld.so.1", "/" + tune_baselib + "/ld.so.1", d)
+ bits = 64
+ elif arch.endswith("86"):
+ replace_lines("${S}/src/arch-i386.c", "/lib/ld-linux.so.2", "/" + tune_baselib + "/ld-linux.so.2", d)
+ if bits == 32 and tune_baselib != "lib":
+ replace_lines_rtld("${S}/src/rtld/rtld.c", "lib", tune_baselib, "else", d)
+ if bits == 64 and tune_baselib != "lib64":
+ replace_lines_rtld("${S}/src/rtld/rtld.c", "lib64", tune_baselib, "use_64bit", d)
+}
+
+python () {
+ overrides = d.getVar("OVERRIDES", True).split(":")
+ if "class-target" in overrides:
+ bb.build.addtask('do_linkerpaths', 'do_configure', 'do_patch', d)
+}
+
do_configure_prepend () {
# Disable documentation!
echo "all:" > ${S}/doc/Makefile.am
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch
new file mode 100644
index 000000000..6c694ceb0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch
@@ -0,0 +1,48 @@
+From befc6dbd6469d428c9e0830dbe51bdf7ac39d9ae Mon Sep 17 00:00:00 2001
+From: Seebs <seebs@seebs.net>
+Date: Thu, 22 Sep 2016 14:35:04 -0500
+Subject: [PATCH] Don't send SIGUSR1 to init.
+
+If the parent exits due to child process being slow, getppid() will return
+1, and we'll send SIGUSR1 to init, which can break things like dumbinit
+which aren't adequately protected against non-root processes sending them
+signals.
+
+Signed-off-by: Seebs <seebs@seebs.net>
+
+Upstream-Status: Backport (commit befc6dbd6469d428c9e0830dbe51bdf7ac39d9ae)
+
+[YOCTO #10324]
+
+This resolves an issue where a docker container running builds would die
+due to it's 'mini init' being signaled by pseudo.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ pseudo_server.c | 11 ++++++++---
+
+diff --git a/pseudo_server.c b/pseudo_server.c
+index 65102dd..8731d20 100644
+--- a/pseudo_server.c
++++ b/pseudo_server.c
+@@ -358,9 +358,14 @@ pseudo_server_start(int daemonize) {
+ signal(SIGTERM, quit_now);
+ /* tell parent process to stop waiting */
+ if (daemonize) {
+- pseudo_diag("Setup complete, sending SIGUSR1 to pid %d.\n",
+- getppid());
+- kill(getppid(), SIGUSR1);
++ pid_t ppid = getppid();
++ if (ppid == 1) {
++ pseudo_diag("Setup complete, but parent is init, not sending SIGUSR1.\n");
++ } else {
++ pseudo_diag("Setup complete, sending SIGUSR1 to pid %d.\n",
++ ppid);
++ kill(ppid, SIGUSR1);
++ }
+ }
+ pseudo_server_loop();
+ return 0;
+--
+2.5.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch
new file mode 100644
index 000000000..d4b9f6a0f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch
@@ -0,0 +1,54 @@
+From eead8a505245a292c43f070c0e836cdfeb7bd7bd Mon Sep 17 00:00:00 2001
+From: Seebs <seebs@seebs.net>
+Date: Wed, 28 Sep 2016 17:05:17 -0500
+Subject: [PATCH 1/2] Quiet diagnostics during startup for pseudo -d
+
+When the client spawns a pseudo server, it starts out sending diagnostics
+to stderr. This can be spammy in some cases with races during startup;
+everything resolves, but we get scary-looking diagnostics. So shove
+those into a log file.
+
+Signed-off-by: Seebs <seebs@seebs.net>
+
+Upstream-Status: Backport
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ ChangeLog.txt | 5 +++++
+ pseudo_server.c | 4 +++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog.txt b/ChangeLog.txt
+index d6359ca..4cc24de 100644
+--- a/ChangeLog.txt
++++ b/ChangeLog.txt
+@@ -1,3 +1,8 @@
++2016-09-28:
++ * (seebs) Send errors to log when daemonizing, but do that a lot
++ sooner to prevent startup messages which can show up spuriously
++ with multiple clients.
++
+ 2016-07-28:
+ * (seebs) Fix performance issue on deletion with xattr changes.
+
+diff --git a/pseudo_server.c b/pseudo_server.c
+index 8731d20..7c2db2f 100644
+--- a/pseudo_server.c
++++ b/pseudo_server.c
+@@ -162,6 +162,9 @@ pseudo_server_start(int daemonize) {
+ * SIGUSR1, or until too much time has passed. */
+ if (daemonize) {
+ int child;
++
++ /* make startup messages go away when invoked-as-daemon */
++ pseudo_debug_logfile(PSEUDO_LOGFILE, 2);
+ child = fork();
+ if (child == -1) {
+ pseudo_diag("Couldn't fork child process: %s\n",
+@@ -231,7 +234,6 @@ pseudo_server_start(int daemonize) {
+ setsid();
+ fclose(stdin);
+ fclose(stdout);
+- pseudo_debug_logfile(PSEUDO_LOGFILE, 2);
+ /* and then just execute the server code normally. */
+ /* Any logging will presumably go to logfile, but
+ * exit status will make it back to the parent for
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch
new file mode 100644
index 000000000..dd6fd87ae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch
@@ -0,0 +1,53 @@
+From 7a0632cad851826d804db0540d9a59773e6bf29c Mon Sep 17 00:00:00 2001
+From: Seebs <seebs@seebs.net>
+Date: Wed, 28 Sep 2016 22:12:29 -0500
+Subject: [PATCH 2/2] Use correct file descriptor
+
+So it turns out that pseudo_logfile() was returning 0 or -1, and
+pseudo_debug_logfile() was expecting it to be the correct file descriptor
+to use. And it's basically a mystery that any of that ever worked.
+
+Signed-off-by: Seebs <seebs@seebs.net>
+
+Upstream-Status: Backport
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ ChangeLog.txt | 3 +++
+ pseudo_util.c | 3 ++-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog.txt b/ChangeLog.txt
+index 4cc24de..49a6c36 100644
+--- a/ChangeLog.txt
++++ b/ChangeLog.txt
+@@ -2,6 +2,9 @@
+ * (seebs) Send errors to log when daemonizing, but do that a lot
+ sooner to prevent startup messages which can show up spuriously
+ with multiple clients.
++ * (seebs) return file descriptor from pseudo_logfile, so we set
++ pseudo_util_debug_fd to the right value instead of to stdin.
++ Nice bug.
+
+ 2016-07-28:
+ * (seebs) Fix performance issue on deletion with xattr changes.
+diff --git a/pseudo_util.c b/pseudo_util.c
+index 0c156cf..a60c74b 100644
+--- a/pseudo_util.c
++++ b/pseudo_util.c
+@@ -1569,7 +1569,7 @@ pseudo_logfile(char *filename, char *defname, int prefer_fd) {
+ if (fd == -1)
+ return -1;
+ else
+- return 0;
++ return fd;
+ }
+
+ int
+@@ -1579,6 +1579,7 @@ pseudo_debug_logfile(char *defname, int prefer_fd) {
+
+ fd = pseudo_logfile(filename, defname, prefer_fd);
+ if (fd > -1) {
++ pseudo_diag("debug_logfile: fd %d\n", fd);
+ pseudo_util_debug_fd = fd;
+ return 0;
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0003-Fix-renameat-parallel-to-previous-fix-to-rename.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0003-Fix-renameat-parallel-to-previous-fix-to-rename.patch
new file mode 100644
index 000000000..739c03ee6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/0003-Fix-renameat-parallel-to-previous-fix-to-rename.patch
@@ -0,0 +1,64 @@
+From d9ab3a0acc94151048498b1ea4d69e7707df1526 Mon Sep 17 00:00:00 2001
+From: Seebs <seebs@seebs.net>
+Date: Fri, 30 Sep 2016 10:56:35 -0500
+Subject: [PATCH 3/3] Fix renameat (parallel to previous fix to rename)
+
+There was a bug in rename(), which was duplicated when renameat() was
+implemented, and which got fixed two years ago for rename(), but no
+one ever uses renameat() so it didn't get fixed there. Thanks
+to Anton Gerasimov <anton@advancedtelematic.com> for the bug report
+and patch.
+
+Signed-off-by: Seebs <seebs@seebs.net>
+
+Upstream-Status: Backport
+Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
+
+---
+ ChangeLog.txt | 4 ++++
+ ports/unix/guts/renameat.c | 7 ++++++-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog.txt b/ChangeLog.txt
+index 65b9759..ca04cc0 100644
+--- a/ChangeLog.txt
++++ b/ChangeLog.txt
+@@ -1,3 +1,7 @@
++2016-09-30:
++ * (seebs) Fix rename at, matching fix from ee00f63d for rename. Bug
++ and fix provided by Anton Gerasimov <anton@advancedtelematic.com>.
++
+ 2016-09-28:
+ * (seebs) Send errors to log when daemonizing, but do that a lot
+ sooner to prevent startup messages which can show up spuriously
+diff --git a/ports/unix/guts/renameat.c b/ports/unix/guts/renameat.c
+index ade0509..d5e36fa 100644
+--- a/ports/unix/guts/renameat.c
++++ b/ports/unix/guts/renameat.c
+@@ -11,6 +11,7 @@
+ int oldrc, newrc;
+ int save_errno;
+ int old_db_entry = 0;
++ int may_unlinked = 0;
+
+ pseudo_debug(PDBGF_FILE, "renameat: %d,%s->%d,%s\n",
+ olddirfd, oldpath ? oldpath : "<nil>",
+@@ -44,10 +45,14 @@
+ /* as with unlink, we have to mark that the file may get deleted */
+ msg = pseudo_client_op(OP_MAY_UNLINK, 0, -1, newdirfd, newpath, newrc ? NULL : &newbuf);
+ if (msg && msg->result == RESULT_SUCCEED)
++ may_unlinked = 1;
++ msg = pseudo_client_op(OP_STAT, 0, -1, olddirfd, oldpath, oldrc ? NULL : &oldbuf);
++ if (msg && msg->result == RESULT_SUCCEED)
+ old_db_entry = 1;
++
+ rc = real_renameat(olddirfd, oldpath, newdirfd, newpath);
+ save_errno = errno;
+- if (old_db_entry) {
++ if (may_unlinked) {
+ if (rc == -1) {
+ /* since we failed, that wasn't really unlinked -- put
+ * it back.
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/Fix-xattr-performance.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/Fix-xattr-performance.patch
new file mode 100644
index 000000000..4e072e6c4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/Fix-xattr-performance.patch
@@ -0,0 +1,117 @@
+From 0d9071f3090bbd7880558f3b488b236ac19b44fc Mon Sep 17 00:00:00 2001
+From: seebs <seebs@seebs.net>
+Date: Thu, 28 Jul 2016 14:02:12 -0500
+Subject: [PATCH 1/2] Fix xattr performance
+
+When deleting files, we *do* know the inode and attribute, most of the
+time, so we pass those in whenever possible. The full purge of unmatched
+xattrs should not happen when the correct dev/ino are believed to be known.
+
+Signed-off-by: Seebs <seebs@seebs.net>
+
+[YOCTO #9929]
+Upstream-Status: Backport (0d9071f3090bbd7880558f3b488b236ac19b44fc)
+Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
+---
+ ChangeLog.txt | 3 +++
+ pseudo.c | 11 ++++++++---
+ pseudo_db.c | 15 +++++++++------
+ pseudo_db.h | 2 +-
+ 4 files changed, 21 insertions(+), 10 deletions(-)
+
+diff --git a/ChangeLog.txt b/ChangeLog.txt
+index 131f163..d6359ca 100644
+--- a/ChangeLog.txt
++++ b/ChangeLog.txt
+@@ -1,3 +1,6 @@
++2016-07-28:
++ * (seebs) Fix performance issue on deletion with xattr changes.
++
+ 2016-07-08:
+ * (RP) release 1.8.1
+ * (joshuagl) Fix log table creation issue
+diff --git a/pseudo.c b/pseudo.c
+index 52f649f..db1c400 100644
+--- a/pseudo.c
++++ b/pseudo.c
+@@ -600,7 +600,12 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
+ if (by_path.deleting != 0) {
+ pseudo_debug(PDBGF_FILE, "inode mismatch for '%s' -- old one was marked for deletion, deleting.\n",
+ msg->path);
+- pdb_did_unlink_file(msg->path, by_path.deleting);
++ /* in this case, we don't trust the
++ * existing entries, so we will do the
++ * more expensive sweep for stray
++ * xattrs.
++ */
++ pdb_did_unlink_file(msg->path, NULL, by_path.deleting);
+ } else {
+ pseudo_diag("inode mismatch: '%s' ino %llu in db, %llu in request.\n",
+ msg->path,
+@@ -698,7 +703,7 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
+ if (by_ino.deleting != 0) {
+ pseudo_debug(PDBGF_FILE, "inode mismatch for '%s' -- old one was marked for deletion, deleting.\n",
+ msg->path);
+- pdb_did_unlink_file(path_by_ino, by_ino.deleting);
++ pdb_did_unlink_file(path_by_ino, &by_ino, by_ino.deleting);
+ } else {
+ pseudo_diag("path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n",
+ msg->nlink,
+@@ -930,7 +935,7 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
+ }
+ break;
+ case OP_DID_UNLINK:
+- pdb_did_unlink_file(msg->path, msg->client);
++ pdb_did_unlink_file(msg->path, msg, msg->client);
+ break;
+ case OP_CANCEL_UNLINK:
+ pdb_cancel_unlink_file(msg);
+diff --git a/pseudo_db.c b/pseudo_db.c
+index 289bb29..e7dd193 100644
+--- a/pseudo_db.c
++++ b/pseudo_db.c
+@@ -1848,7 +1848,7 @@ pdb_did_unlink_files(int deleting) {
+
+ /* confirm deletion of a specific file by a given client */
+ int
+-pdb_did_unlink_file(char *path, int deleting) {
++pdb_did_unlink_file(char *path, pseudo_msg_t *msg, int deleting) {
+ static sqlite3_stmt *delete_exact;
+ int rc, exact;
+ char *sql_delete_exact = "DELETE FROM files WHERE path = ? AND deleting = ?;";
+@@ -1878,11 +1878,14 @@ pdb_did_unlink_file(char *path, int deleting) {
+ exact = sqlite3_changes(file_db);
+ pseudo_debug(PDBGF_DB, "(exact %d)\n", exact);
+ sqlite3_reset(delete_exact);
+- sqlite3_clear_bindings(delete_exact);
+- /* we have to clean everything because we don't know for sure the
+- * device/inode...
+- */
+- pdb_clear_unused_xattrs();
++ if (msg) {
++ pdb_clear_xattrs(msg);
++ } else {
++ /* we have to clean everything because we don't know for sure the
++ * device/inode...
++ */
++ pdb_clear_unused_xattrs();
++ }
+ return rc != SQLITE_DONE;
+ }
+
+diff --git a/pseudo_db.h b/pseudo_db.h
+index a54f3c1..1b2599c 100644
+--- a/pseudo_db.h
++++ b/pseudo_db.h
+@@ -39,7 +39,7 @@ typedef struct {
+
+ extern int pdb_maybe_backup(void);
+ extern int pdb_cancel_unlink_file(pseudo_msg_t *msg);
+-extern int pdb_did_unlink_file(char *path, int deleting);
++extern int pdb_did_unlink_file(char *path, pseudo_msg_t *msg, int deleting);
+ extern int pdb_did_unlink_files(int deleting);
+ extern int pdb_link_file(pseudo_msg_t *msg);
+ extern int pdb_may_unlink_file(pseudo_msg_t *msg, int deleting);
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-group b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-group
index 81bf73231..bb3dbca60 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-group
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-group
@@ -1,2 +1,3 @@
root:*:0:
mail:*:8:
+nobody:*:99:
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-passwd b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-passwd
index c1458dc0f..0889c5704 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-passwd
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/fallback-passwd
@@ -1 +1,2 @@
root::0:0:root:/home/root:/bin/sh
+nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/handle-remove-xattr.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/handle-remove-xattr.patch
deleted file mode 100644
index 8b7f30c66..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/handle-remove-xattr.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From a24cf102967a4966bfabe36c3542fb65f35bf539 Mon Sep 17 00:00:00 2001
-From: Peter Seebach <peter.seebach@windriver.com>
-Date: Wed, 23 Mar 2016 11:55:25 -0500
-Subject: actually handle remove_xattr correctly
-
-The path is required but wasn't being extracted from the client's message,
-resulting in xattr removal never working. This does not fully address some
-deeper problems with the xattr implementation, but at least the common
-removal case works.
-
-Upstream-Status: Backport
-
-Index: pseudo-1.7.5/ChangeLog.txt
-===================================================================
---- pseudo-1.7.5.orig/ChangeLog.txt
-+++ pseudo-1.7.5/ChangeLog.txt
-@@ -1,3 +1,7 @@
-+2016-03-22:
-+ * (seebs) extract path from message for remove_xattr so it
-+ actually works.
-+
- 2016-02-09:
- * (seebs) 1.7.5 release
-
-Index: pseudo-1.7.5/pseudo.c
-===================================================================
---- pseudo-1.7.5.orig/pseudo.c
-+++ pseudo-1.7.5/pseudo.c
-@@ -543,6 +543,7 @@ pseudo_op(pseudo_msg_t *msg, const char
- case OP_GET_XATTR:
- case OP_LIST_XATTR:
- case OP_REPLACE_XATTR:
-+ case OP_REMOVE_XATTR:
- case OP_SET_XATTR:
- /* In a rename there are two paths, null separated in msg->path */
- initial_len = strlen(msg->path);
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/moreretries.patch b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/moreretries.patch
index c1e555236..adea2665b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/moreretries.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/files/moreretries.patch
@@ -4,15 +4,15 @@ server shutdowns.
Upstream-Status: Pending
RP 2016/2/28
-Index: pseudo-1.7.5/pseudo_client.c
+Index: git/pseudo_client.c
===================================================================
---- pseudo-1.7.5.orig/pseudo_client.c
-+++ pseudo-1.7.5/pseudo_client.c
-@@ -1214,7 +1214,7 @@ pseudo_client_setup(void) {
- return 1;
+--- git.orig/pseudo_client.c
++++ git/pseudo_client.c
+@@ -1282,7 +1282,7 @@ pseudo_client_setup(void) {
+ }
}
--#define PSEUDO_RETRIES 50
+-#define PSEUDO_RETRIES 20
+#define PSEUDO_RETRIES 250
static pseudo_msg_t *
pseudo_client_request(pseudo_msg_t *msg, size_t len, const char *path) {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
index 0de7b3615..18ce9f925 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
@@ -26,6 +26,8 @@ do_configure () {
NO32LIBS ??= "1"
NO32LIBS_class-nativesdk = "1"
+PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
+
# Compile for the local machine arch...
do_compile () {
if [ "${SITEINFO_BITS}" = "64" ]; then
@@ -112,10 +114,15 @@ do_install () {
oe_runmake 'DESTDIR=${D}' ${MAKEOPTS} 'LIB=lib/pseudo/lib$(MARK64)' install
}
-# Two below are the same
-# If necessary install for the alternative machine arch. This is only
-# necessary in a native build.
do_install_append_class-native () {
+ install -d ${D}${sysconfdir}
+ # The fallback files should never be modified
+ install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
+ install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group
+
+ # Two native/nativesdk entries below are the same
+ # If necessary install for the alternative machine arch. This is only
+ # necessary in a native build.
maybe_make32
if $make32; then
mkdir -p ${D}${prefix}/lib/pseudo/lib
@@ -129,6 +136,7 @@ do_install_append_class-nativesdk () {
mkdir -p ${D}${prefix}/lib/pseudo/lib
cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
fi
+ chrpath -d ${D}${prefix}/lib/pseudo/lib*/libpseudo.so
}
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.6.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.6.7.bb
deleted file mode 100644
index b8c20ad65..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.6.7.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require pseudo.inc
-
-SRC_URI = " \
- http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz2 \
- file://fallback-passwd \
- file://fallback-group \
-"
-
-SRC_URI[md5sum] = "4cd39502f9bd0e734dee80e08b28a5f1"
-SRC_URI[sha256sum] = "9f2caca5f1579a376a509cd81a81156fc208650add9f0af275da9e911f18f291"
-
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
-
-do_install_append_class-native () {
- install -d ${D}${sysconfdir}
- # The fallback files should never be modified
- install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
- install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb
deleted file mode 100644
index d90e64445..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require pseudo.inc
-
-SRC_URI = " \
- http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz2 \
- file://0001-configure-Prune-PIE-flags.patch \
- file://fallback-passwd \
- file://fallback-group \
- file://moreretries.patch \
- file://handle-remove-xattr.patch \
-"
-
-SRC_URI[md5sum] = "c10209938f03128d0c193f041ff3596d"
-SRC_URI[sha256sum] = "fd89cadec984d3b8202aca465898b1bb4350e0d63ba9aa9ac899f6f50270e688"
-
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
-
-do_install_append_class-native () {
- install -d ${D}${sysconfdir}
- # The fallback files should never be modified
- install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
- install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb
new file mode 100644
index 000000000..fb70034b4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb
@@ -0,0 +1,16 @@
+require pseudo.inc
+
+SRC_URI = "http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz2 \
+ file://0001-configure-Prune-PIE-flags.patch \
+ file://fallback-passwd \
+ file://fallback-group \
+ file://moreretries.patch \
+ file://Fix-xattr-performance.patch \
+ file://0001-Don-t-send-SIGUSR1-to-init.patch \
+ file://0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch \
+ file://0002-Use-correct-file-descriptor.patch \
+ file://0003-Fix-renameat-parallel-to-previous-fix-to-rename.patch \
+ "
+
+SRC_URI[md5sum] = "ee38e4fb62ff88ad067b1a5a3825bac7"
+SRC_URI[sha256sum] = "dac4ad2d21228053151121320f629d41dd5c0c87695ac4e7aea286c414192ab5"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
index abff1cfd3..8110b1a19 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -1,11 +1,15 @@
require pseudo.inc
-SRCREV = "786c6d3813622d18e12d36c4aa722af6a417c8fa"
-PV = "1.7.5+git${SRCPV}"
+SRCREV = "befc6dbd6469d428c9e0830dbe51bdf7ac39d9ae"
+PV = "1.8.1+git${SRCPV}"
DEFAULT_PREFERENCE = "-1"
-SRC_URI = "git://git.yoctoproject.org/pseudo"
+SRC_URI = "git://git.yoctoproject.org/pseudo \
+ file://0001-configure-Prune-PIE-flags.patch \
+ file://fallback-passwd \
+ file://fallback-group \
+ file://moreretries.patch"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
index 5b134edf0..5b134edf0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h
new file mode 100644
index 000000000..109deb043
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/aarch64/_numpyconfig.h
@@ -0,0 +1,32 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_SIZEOF_OFF_T 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x0000000A
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/aarch64/config.h
index c30b868f2..c30b868f2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/aarch64/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/arm/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/arm/config.h
index 17ef186d5..17ef186d5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/arm/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/arm/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/arm/numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h
index c4bf6547f..c4bf6547f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/arm/numpyconfig.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/arm/numpyconfig.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/armeb/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/armeb/config.h
index 17ef186d5..17ef186d5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/armeb/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/armeb/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/armeb/numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h
index c4bf6547f..c4bf6547f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/armeb/numpyconfig.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/armeb/numpyconfig.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch
new file mode 100644
index 000000000..8be6e4d21
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/fix_shebang_f2py.patch
@@ -0,0 +1,29 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Avoids using python from the HOSTs native sysroot for f2py,
+uses TARGET env python instead.
+
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+
+Index: numpy-1.11.0/numpy/f2py/setup.py
+===================================================================
+--- numpy-1.11.0.orig/numpy/f2py/setup.py
++++ numpy-1.11.0/numpy/f2py/setup.py
+@@ -37,10 +37,13 @@ def _get_f2py_shebang():
+ should be ``#!python`` rather than ``#!`` followed by the contents of
+ ``sys.executable``.
+ """
+- if set(('bdist_wheel', 'bdist_egg', 'bdist_wininst',
+- 'bdist_rpm')).intersection(sys.argv):
+- return '#!python'
+- return '#!' + sys.executable
++ #if set(('bdist_wheel', 'bdist_egg', 'bdist_wininst',
++ # 'bdist_rpm')).intersection(sys.argv):
++ # return '#!python'
++ #return '#!' + sys.executable
++
++ # On OE, we need to avoid using the HOSTs python-native, we return env python instead
++ return '#!/usr/bin/env python'
+
+
+ def configuration(parent_package='', top_path=None):
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips/_numpyconfig.h
new file mode 100644
index 000000000..4c465c216
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips/_numpyconfig.h
@@ -0,0 +1,32 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 8
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
+#define NPY_SIZEOF_PY_INTPTR_T 4
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_SIZEOF_OFF_T 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x0000000A
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips/config.h
index 2f6135adc..2f6135adc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64/_numpyconfig.h
new file mode 100644
index 000000000..debb39009
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64/_numpyconfig.h
@@ -0,0 +1,32 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_SIZEOF_OFF_T 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x0000000A
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64/config.h
index c30b868f2..c30b868f2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64n32/_numpyconfig.h
index 8e2b5d094..8e2b5d094 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64n32/_numpyconfig.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64n32/config.h
index c30b868f2..c30b868f2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mips64n32/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mipsel/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mipsel/config.h
index 17ef186d5..17ef186d5 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mipsel/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mipsel/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mipsel/numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mipsel/numpyconfig.h
new file mode 100644
index 000000000..0b7cd51af
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/mipsel/numpyconfig.h
@@ -0,0 +1,18 @@
+/* cat ./src.linux-i686-2.5/numpy/core/include/numpy/numpyconfig.h */
+/*
+ * * This file is generated by numpy/core/setup.pyc. DO NOT EDIT
+ * */
+#define NPY_SIZEOF_SHORT 2
+#define NPY_SIZEOF_INT 4
+#define NPY_SIZEOF_LONG 4
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_LONGDOUBLE 12
+#define NPY_SIZEOF_PY_INTPTR_T 4
+#define NPY_NO_SMP 0
+
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_OFF_T 8
+/* #define CHAR_BIT 8 */
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h
new file mode 100644
index 000000000..6e7262ad9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc/_numpyconfig.h
@@ -0,0 +1,32 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
+#define NPY_SIZEOF_PY_INTPTR_T 4
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_SIZEOF_OFF_T 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x0000000A
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc/config.h
index f65d39d5d..f65d39d5d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h
new file mode 100644
index 000000000..debb39009
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc64/_numpyconfig.h
@@ -0,0 +1,32 @@
+#define NPY_HAVE_ENDIAN_H 1
+#define NPY_SIZEOF_SHORT SIZEOF_SHORT
+#define NPY_SIZEOF_INT SIZEOF_INT
+#define NPY_SIZEOF_LONG SIZEOF_LONG
+#define NPY_SIZEOF_FLOAT 4
+#define NPY_SIZEOF_COMPLEX_FLOAT 8
+#define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_COMPLEX_DOUBLE 16
+#define NPY_SIZEOF_LONGDOUBLE 16
+#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
+#define NPY_SIZEOF_PY_INTPTR_T 8
+#define NPY_SIZEOF_PY_LONG_LONG 8
+#define NPY_SIZEOF_LONGLONG 8
+#define NPY_SIZEOF_OFF_T 8
+#define NPY_NO_SMP 0
+#define NPY_HAVE_DECL_ISNAN
+#define NPY_HAVE_DECL_ISINF
+#define NPY_HAVE_DECL_ISFINITE
+#define NPY_HAVE_DECL_SIGNBIT
+#define NPY_USE_C99_COMPLEX 1
+#define NPY_HAVE_COMPLEX_DOUBLE 1
+#define NPY_HAVE_COMPLEX_FLOAT 1
+#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_USE_C99_FORMATS 1
+#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
+#define NPY_ABI_VERSION 0x01000009
+#define NPY_API_VERSION 0x0000000A
+
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS 1
+#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc64/config.h
index c30b868f2..c30b868f2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/powerpc64/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
index eb8a71a2e..eb8a71a2e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/remove-build-path-in-comments.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h
index b33036164..b33036164 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86-64/_numpyconfig.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86-64/config.h
index 0ce63b7d2..0ce63b7d2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86-64/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86/config.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86/config.h
index 08e41e3d9..08e41e3d9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86/config.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86/config.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86/numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86/numpyconfig.h
index ff7938cd9..ff7938cd9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/x86/numpyconfig.h
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/files/x86/numpyconfig.h
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.1.bb
new file mode 100644
index 000000000..c5af720a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python-numpy_1.11.1.bb
@@ -0,0 +1,104 @@
+SUMMARY = "A sophisticated Numeric Processing Package for Python"
+SECTION = "devel/python"
+LICENSE = "PSF"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7e51a5677b22b865abbfb3dff6ffb2d0"
+
+SRCNAME = "numpy"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
+ file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
+ file://remove-build-path-in-comments.patch \
+ file://fix_shebang_f2py.patch \
+ ${CONFIGFILESURI} "
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/"
+
+CONFIGFILESURI ?= ""
+
+CONFIGFILESURI_aarch64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_arm = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_armeb = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_mipsel = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_x86 = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_x86-64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64n32 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+
+S = "${WORKDIR}/numpy-${PV}"
+
+inherit setuptools
+
+# Make the build fail and replace *config.h with proper one
+# This is a ugly, ugly hack - Koen
+do_compile_prepend_class-target() {
+ ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
+ true
+ cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
+}
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
+
+SRC_URI[md5sum] = "2f44a895a8104ffac140c3a70edbd450"
+SRC_URI[sha256sum] = "dc4082c43979cc856a2bf352a8297ea109ccb3244d783ae067eb2ee5b0d577cd"
+
+# install what is needed for numpy.test()
+RDEPENDS_${PN} = "python-unittest \
+ python-difflib \
+ python-pprint \
+ python-pickle \
+ python-shell \
+ python-nose \
+ python-doctest \
+ python-datetime \
+ python-distutils \
+ python-misc \
+ python-mmap \
+ python-netclient \
+ python-numbers \
+ python-pydoc \
+ python-pkgutil \
+ python-email \
+ python-subprocess \
+ python-compression \
+ python-ctypes \
+ python-threading \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.0.bb
new file mode 100644
index 000000000..3cca2239d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python-numpy/python3-numpy_1.11.0.bb
@@ -0,0 +1,105 @@
+SUMMARY = "A sophisticated Numeric Processing Package for Python"
+SECTION = "devel/python"
+LICENSE = "PSF"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7e51a5677b22b865abbfb3dff6ffb2d0"
+
+SRCNAME = "numpy"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
+ file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
+ file://remove-build-path-in-comments.patch \
+ file://fix_shebang_f2py.patch \
+ ${CONFIGFILESURI} "
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/"
+
+CONFIGFILESURI ?= ""
+
+CONFIGFILESURI_aarch64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_arm = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_armeb = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_mipsel = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_x86 = " \
+ file://config.h \
+ file://numpyconfig.h \
+"
+CONFIGFILESURI_x86-64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64n32 = " \
+ file://config.h \
+ file://_numpyconfig.h \
+"
+
+S = "${WORKDIR}/numpy-${PV}"
+
+inherit setuptools3
+
+# Make the build fail and replace *config.h with proper one
+# This is a ugly, ugly hack - Koen
+do_compile_prepend_class-target() {
+ ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build ${DISTUTILS_BUILD_ARGS} || \
+ true
+ cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
+}
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
+
+SRC_URI[md5sum] = "bc56fb9fc2895aa4961802ffbdb31d0b"
+SRC_URI[sha256sum] = "a1d1268d200816bfb9727a7a27b78d8e37ecec2e4d5ebd33eb64e2789e0db43e"
+
+# install what is needed for numpy.test()
+RDEPENDS_${PN} = "python3-unittest \
+ python3-difflib \
+ python3-pprint \
+ python3-pickle \
+ python3-shell \
+ python3-nose \
+ python3-doctest \
+ python3-datetime \
+ python3-distutils \
+ python3-misc \
+ python3-mmap \
+ python3-netclient \
+ python3-numbers \
+ python3-pydoc \
+ python3-pkgutil \
+ python3-email \
+ python3-subprocess \
+ python3-compression \
+ python3-ctypes \
+ python3-threading \
+ python3-textutils \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
index 335c3ffdb..304611432 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -5,14 +5,18 @@
-PROVIDES+="${PN}-2to3 ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
+PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
RDEPENDS_${PN}-2to3="${PN}-core"
FILES_${PN}-2to3="${libdir}/python3.5/lib2to3 "
+SUMMARY_${PN}-argparse="Python command line argument parser"
+RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
+FILES_${PN}-argparse="${libdir}/python3.5/argparse.* "
+
SUMMARY_${PN}-asyncio="Python Asynchronous I/O, event loop, coroutines and tasks"
RDEPENDS_${PN}-asyncio="${PN}-core"
FILES_${PN}-asyncio="${libdir}/python3.5/asyncio "
@@ -30,19 +34,19 @@ RDEPENDS_${PN}-compile="${PN}-core"
FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/compileall.* "
SUMMARY_${PN}-compression="Python high-level compression support"
-RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs"
-FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so "
+RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell"
+FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so "
SUMMARY_${PN}-core="Python interpreter and core modules"
RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
-FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/ConfigParser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
+FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
RDEPENDS_${PN}-crypt="${PN}-core"
FILES_${PN}-crypt="${libdir}/python3.5/hashlib.* ${libdir}/python3.5/md5.* ${libdir}/python3.5/sha.* ${libdir}/python3.5/lib-dynload/crypt.*.so ${libdir}/python3.5/lib-dynload/_hashlib.*.so ${libdir}/python3.5/lib-dynload/_sha256.*.so ${libdir}/python3.5/lib-dynload/_sha512.*.so "
SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core"
+RDEPENDS_${PN}-ctypes="${PN}-core ${PN}-subprocess"
FILES_${PN}-ctypes="${libdir}/python3.5/ctypes ${libdir}/python3.5/lib-dynload/_ctypes.*.so ${libdir}/python3.5/lib-dynload/_ctypes_test.*.so "
SUMMARY_${PN}-curses="Python curses support"
@@ -51,7 +55,7 @@ FILES_${PN}-curses="${libdir}/python3.5/curses ${libdir}/python3.5/lib-dynload/_
SUMMARY_${PN}-datetime="Python calendar and time support"
RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/lib-dynload/datetime.*.so "
+FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/datetime.* ${libdir}/python3.5/lib-dynload/_datetime.*.so "
SUMMARY_${PN}-db="Python file-based database support"
RDEPENDS_${PN}-db="${PN}-core"
@@ -85,6 +89,10 @@ SUMMARY_${PN}-email="Python email support"
RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
FILES_${PN}-email="${libdir}/python3.5/imaplib.* ${libdir}/python3.5/email "
+SUMMARY_${PN}-enum="Python support for enumerations"
+RDEPENDS_${PN}-enum="${PN}-core"
+FILES_${PN}-enum="${libdir}/python3.5/enum.* "
+
SUMMARY_${PN}-fcntl="Python's fcntl interface"
RDEPENDS_${PN}-fcntl="${PN}-core"
FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so "
@@ -106,7 +114,7 @@ RDEPENDS_${PN}-image="${PN}-core"
FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/imghdr.* ${libdir}/python3.5/lib-dynload/imageop.*.so ${libdir}/python3.5/lib-dynload/rgbimg.*.so "
SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core"
+RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
FILES_${PN}-importlib="${libdir}/python3.5/importlib "
SUMMARY_${PN}-io="Python low-level I/O"
@@ -118,8 +126,8 @@ RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
FILES_${PN}-json="${libdir}/python3.5/json ${libdir}/python3.5/lib-dynload/_json.*.so "
SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core"
-FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/weakref.* "
+RDEPENDS_${PN}-lang="${PN}-core ${PN}-importlib"
+FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/contextlib.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/operator.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/weakref.* "
SUMMARY_${PN}-logging="Python logging support"
RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
@@ -130,7 +138,7 @@ RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
FILES_${PN}-mailbox="${libdir}/python3.5/mailbox.* "
SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core"
+RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
FILES_${PN}-math="${libdir}/python3.5/lib-dynload/cmath.*.so ${libdir}/python3.5/lib-dynload/math.*.so ${libdir}/python3.5/lib-dynload/_random.*.so ${libdir}/python3.5/random.* ${libdir}/python3.5/sets.* "
SUMMARY_${PN}-mime="Python MIME handling APIs"
@@ -193,10 +201,18 @@ SUMMARY_${PN}-resource="Python resource control interface"
RDEPENDS_${PN}-resource="${PN}-core"
FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so "
+SUMMARY_${PN}-selectors="Python High-level I/O multiplexing"
+RDEPENDS_${PN}-selectors="${PN}-core"
+FILES_${PN}-selectors="${libdir}/python3.5/selectors.* "
+
SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re"
+RDEPENDS_${PN}-shell="${PN}-core ${PN}-re ${PN}-compression"
FILES_${PN}-shell="${libdir}/python3.5/cmd.* ${libdir}/python3.5/commands.* ${libdir}/python3.5/dircache.* ${libdir}/python3.5/fnmatch.* ${libdir}/python3.5/glob.* ${libdir}/python3.5/popen2.* ${libdir}/python3.5/shlex.* ${libdir}/python3.5/shutil.* "
+SUMMARY_${PN}-signal="Python set handlers for asynchronous events support"
+RDEPENDS_${PN}-signal="${PN}-core ${PN}-enum"
+FILES_${PN}-signal="${libdir}/python3.5/signal.* "
+
SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.5/smtpd.* "
@@ -214,8 +230,8 @@ RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
FILES_${PN}-stringold="${libdir}/python3.5/lib-dynload/strop.*.so ${libdir}/python3.5/string.* ${libdir}/python3.5/stringold.* "
SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle"
-FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* "
+RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors"
+FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* ${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so "
SUMMARY_${PN}-syslog="Python syslog interface"
RDEPENDS_${PN}-syslog="${PN}-core"
@@ -235,7 +251,7 @@ FILES_${PN}-textutils="${libdir}/python3.5/lib-dynload/_csv.*.so ${libdir}/pytho
SUMMARY_${PN}-threading="Python threading & synchronization support"
RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/Queue.* "
+FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/queue.* "
SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
RDEPENDS_${PN}-tkinter="${PN}-core"
@@ -258,7 +274,7 @@ RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc "
SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
+RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
ALLOW_EMPTY_${PN}-modules = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
new file mode 100644
index 000000000..2c5cb4d19
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async.inc
@@ -0,0 +1,15 @@
+SUMMARY = "Python framework to process interdependent tasks in a pool of workers"
+HOMEPAGE = "http://github.com/gitpython-developers/async"
+SECTION = "devel/python"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/a/async/async-${PV}.tar.gz"
+SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
+SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/async/"
+
+S = "${WORKDIR}/async-${PV}"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb
index ad0a61776..d855e42a7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb
@@ -1,19 +1,5 @@
-SUMMARY = "Python framework to process interdependent tasks in a pool of workers"
-HOMEPAGE = "http://github.com/gitpython-developers/async"
-SECTION = "devel/python"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e"
-
-SRC_URI = "http://pypi.python.org/packages/source/a/async/async-${PV}.tar.gz"
-SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
-SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/async/"
-
-S = "${WORKDIR}/async-${PV}"
+require python-async.inc
inherit setuptools
RDEPENDS_${PN} += "python-threading python-lang"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-dbus_1.2.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-dbus_1.2.0.bb
deleted file mode 100644
index b314dce1c..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-dbus_1.2.0.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Python bindings for the DBus inter-process communication system"
-SECTION = "devel/python"
-HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0b83047ce9e948b67c0facc5f233476a"
-DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
-"
-
-SRC_URI[md5sum] = "b09cd2d1a057cc432ce944de3fc06bf7"
-SRC_URI[sha256sum] = "e12c6c8b2bf3a9302f75166952cbe41d6b38c3441bbc6767dbd498942316c6df"
-S = "${WORKDIR}/dbus-python-${PV}"
-
-inherit distutils-base autotools pkgconfig
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python-docutils-native"
-PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python-docutils-native python-epydoc-native"
-
-export BUILD_SYS
-export HOST_SYS
-
-export STAGING_LIBDIR
-export STAGING_INCDIR
-
-RDEPENDS_${PN} = "python-io python-logging python-stringold python-threading python-xml"
-
-FILES_${PN}-dev += "${libdir}/pkgconfig"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-docutils_0.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-docutils_0.12.bb
deleted file mode 100644
index 8cda88d27..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-docutils_0.12.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "Text processing system for documentation"
-HOMEPAGE = "http://docutils.sourceforge.net"
-SECTION = "devel/python"
-LICENSE = "PSF & BSD-2-Clause & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=a722fbdc20347db7b69223594dd54574"
-
-DEPENDS = "python"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
-SRC_URI[md5sum] = "4622263b62c5c771c03502afa3157768"
-SRC_URI[sha256sum] = "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa"
-
-S = "${WORKDIR}/docutils-${PV}"
-
-inherit distutils
-
-BBCLASSEXTEND = "native"
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
new file mode 100644
index 000000000..13c097abf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git.inc
@@ -0,0 +1,21 @@
+SUMMARY = "Python library used to interact with Git repositories"
+DESCRIPTION = "GitPython provides object model read and write access to \
+a git repository. Access repository information conveniently, alter the \
+index directly, handle remotes, or go down to low-level object database \
+access with big-files support."
+HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "aa0ba9df0abe4c8f35dd7bb9be85d56e"
+SRC_URI[sha256sum] = "d8e7adaacceedd3d043e6cd2544f57dbe00c53fc26374880b7cea67f3188aa68"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/"
+UPSTREAM_CHECK_REGEX = "/GitPython/(?P<pver>(\d+[\.\-_]*)+)"
+
+S = "${WORKDIR}/GitPython-${PV}"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_1.0.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_1.0.2.bb
deleted file mode 100644
index f00f805a8..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_1.0.2.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Python library used to interact with Git repositories"
-DESCRIPTION = "GitPython provides object model read and write access to \
-a git repository. Access repository information conveniently, alter the \
-index directly, handle remotes, or go down to low-level object database \
-access with big-files support."
-HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
-DEPENDS = "python-gitdb"
-
-SRC_URI = "http://pypi.python.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "d92d96a8da0fc77cf141d3e16084e094"
-SRC_URI[sha256sum] = "85de72556781480a38897a77de5b458ae3838b0fd589593679a1b5f34d181d84"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/"
-UPSTREAM_CHECK_REGEX = "/GitPython/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/GitPython-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} += "python-gitdb python-lang python-io python-shell python-math python-re python-subprocess python-stringold python-unixadmin"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.0.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.0.7.bb
new file mode 100644
index 000000000..e49dbea54
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-git_2.0.7.bb
@@ -0,0 +1,7 @@
+require python-git.inc
+
+DEPENDS = "python-gitdb"
+
+inherit setuptools
+
+RDEPENDS_${PN} += "python-gitdb python-lang python-io python-shell python-math python-re python-subprocess python-stringold python-unixadmin"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
new file mode 100644
index 000000000..08193fbf2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb.inc
@@ -0,0 +1,16 @@
+SUMMARY = "A pure-Python git object database"
+HOMEPAGE = "http://github.com/gitpython-developers/gitdb"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "44e4366b8bdfd306b075c3a52c96ae1a"
+SRC_URI[sha256sum] = "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/gitdb/"
+
+S = "${WORKDIR}/gitdb-${PV}"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
index c82df1ef7..177739579 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
@@ -1,21 +1,7 @@
-SUMMARY = "A pure-Python git object database"
-HOMEPAGE = "http://github.com/gitpython-developers/gitdb"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=59e5ecb13339a936eedf83282eaf4528"
-DEPENDS = "python-async python-smmap"
-
-SRC_URI = "https://pypi.python.org/packages/source/g/gitdb/gitdb-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "44e4366b8bdfd306b075c3a52c96ae1a"
-SRC_URI[sha256sum] = "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
+require python-gitdb.inc
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/gitdb/"
-
-S = "${WORKDIR}/gitdb-${PV}"
+DEPENDS = "python-async python-smmap"
inherit distutils
RDEPENDS_${PN} += "python-smmap python-async python-mmap python-lang python-zlib python-io python-shell"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch
deleted file mode 100644
index 2575306be..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 07d4f095a9e22ae676a8d68073101131e65012dc Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 15 Nov 2011 13:16:54 +0100
-Subject: [PATCH] python imaging setup.py: force paths for zlib, freetype and jpeg and don't add host paths
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- setup.py | 14 +++-----------
- 1 files changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 5d4d53a..b1a22ec 100644
---- a/setup.py
-+++ b/setup.py
-@@ -34,10 +34,10 @@ def libinclude(root):
- # TIFF_ROOT = libinclude("/opt/tiff")
-
- TCL_ROOT = None
--JPEG_ROOT = None
--ZLIB_ROOT = None
-+JPEG_ROOT = os.environ['STAGING_LIBDIR']
-+ZLIB_ROOT = os.environ['STAGING_LIBDIR']
- TIFF_ROOT = None
--FREETYPE_ROOT = None
-+FREETYPE_ROOT = os.environ['STAGING_LIBDIR'], os.environ['STAGING_INCDIR']
- LCMS_ROOT = None
-
- # FIXME: add mechanism to explicitly *disable* the use of a library
-@@ -147,7 +147,6 @@ class pil_build_ext(build_ext):
- add_directory(library_dirs, "/opt/local/lib")
- add_directory(include_dirs, "/opt/local/include")
-
-- add_directory(library_dirs, "/usr/local/lib")
- # FIXME: check /opt/stuff directories here?
-
- prefix = sysconfig.get_config_var("prefix")
-@@ -207,13 +206,6 @@ class pil_build_ext(build_ext):
- if os.path.isfile(os.path.join(tcl_dir, "tk.h")):
- add_directory(include_dirs, tcl_dir)
-
-- # standard locations
-- add_directory(library_dirs, "/usr/local/lib")
-- add_directory(include_dirs, "/usr/local/include")
--
-- add_directory(library_dirs, "/usr/lib")
-- add_directory(include_dirs, "/usr/include")
--
- #
- # insert new dirs *before* default libs, to avoid conflicts
- # between Python PYD stub libs and real libraries
---
-1.7.2.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch
deleted file mode 100644
index 4960ed466..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-At least lcms wasn't deterministicly detected from sysroot.
-
-This will allow to export LCMS_ENABLED=False when lcms isn't in PACKAGECONFIG.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-diff -uNr Imaging-1.1.7.orig/setup.py Imaging-1.1.7/setup.py
---- Imaging-1.1.7.orig/setup.py 2013-07-22 10:17:02.081457075 +0200
-+++ Imaging-1.1.7/setup.py 2013-07-22 13:10:09.029707492 +0200
-@@ -39,6 +39,12 @@
- TIFF_ROOT = None
- FREETYPE_ROOT = os.environ['STAGING_LIBDIR'], os.environ['STAGING_INCDIR']
- LCMS_ROOT = None
-+TCL_ENABLED = os.getenv('TCL_ENABLED', "True")
-+JPEG_ENABLED = os.getenv('JPEG_ENABLED', "True")
-+ZLIB_ENABLED = os.getenv('ZLIB_ENABLED', "True")
-+TIFF_ENABLED = os.getenv('TIFF_ENABLED', "True")
-+FREETYPE_ENABLED = os.getenv('FREETYPE_ENABLED', "True")
-+LCMS_ENABLED = os.getenv('LCMS_ENABLED', "True")
-
- # FIXME: add mechanism to explicitly *disable* the use of a library
-
-@@ -220,22 +226,22 @@
- zlib = jpeg = tiff = freetype = tcl = tk = lcms = None
- feature = feature()
-
-- if find_include_file(self, "zlib.h"):
-+ if ZLIB_ENABLED == 'True' and find_include_file(self, "zlib.h"):
- if find_library_file(self, "z"):
- feature.zlib = "z"
- elif sys.platform == "win32" and find_library_file(self, "zlib"):
- feature.zlib = "zlib" # alternative name
-
-- if find_include_file(self, "jpeglib.h"):
-+ if JPEG_ENABLED == 'True' and find_include_file(self, "jpeglib.h"):
- if find_library_file(self, "jpeg"):
- feature.jpeg = "jpeg"
- elif sys.platform == "win32" and find_library_file(self, "libjpeg"):
- feature.jpeg = "libjpeg" # alternative name
-
-- if find_library_file(self, "tiff"):
-+ if TIFF_ENABLED == 'True' and find_library_file(self, "tiff"):
- feature.tiff = "tiff"
-
-- if find_library_file(self, "freetype"):
-+ if FREETYPE_ENABLED == 'True' and find_library_file(self, "freetype"):
- # look for freetype2 include files
- freetype_version = 0
- for dir in self.compiler.include_dirs:
-@@ -256,11 +262,11 @@
- if dir:
- add_directory(self.compiler.include_dirs, dir, 0)
-
-- if find_include_file(self, "lcms.h"):
-+ if LCMS_ENABLED == 'True' and find_include_file(self, "lcms.h"):
- if find_library_file(self, "lcms"):
- feature.lcms = "lcms"
-
-- if _tkinter and find_include_file(self, "tk.h"):
-+ if TCL_ENABLED == 'True' and _tkinter and find_include_file(self, "tk.h"):
- # the library names may vary somewhat (e.g. tcl84 or tcl8.4)
- version = TCL_VERSION[0] + TCL_VERSION[2]
- if find_library_file(self, "tcl" + version):
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/fix-freetype-includes.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/fix-freetype-includes.patch
deleted file mode 100644
index 9ecc63a0d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging/fix-freetype-includes.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From c6040f618d8f2706a7b46d1cdf37d1a587f9701f Mon Sep 17 00:00:00 2001
-From: Andrew Stromnov <stromnov@gmail.com>
-Date: Thu, 28 Nov 2013 16:58:43 +0400
-Subject: [PATCH] fix compiling with FreeType 2.5.1
-
----
- _imagingft.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/_imagingft.c b/_imagingft.c
-index 47d50bd..f19555b 100644
---- a/_imagingft.c
-+++ b/_imagingft.c
-@@ -59,7 +59,11 @@ struct {
- const char* message;
- } ft_errors[] =
-
-+#if defined(USE_FREETYPE_2_1)
-+#include FT_ERRORS_H
-+#else
- #include <freetype/fterrors.h>
-+#endif
-
- /* -------------------------------------------------------------------- */
- /* font objects */
---
-1.8.5.1
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging_1.1.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging_1.1.7.bb
deleted file mode 100644
index a67832827..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-imaging_1.1.7.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "Python Imaging Library (PIL)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://README;beginline=92;endline=120;md5=c4371af4579f1e489cf881c1443dd4ec"
-DEPENDS = "freetype jpeg tiff"
-SRCNAME = "Imaging"
-PR = "r5"
-
-SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \
- file://0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch \
- file://allow.to.disable.some.features.patch \
- file://fix-freetype-includes.patch"
-
-SRC_URI[md5sum] = "fc14a54e1ce02a0225be8854bfba478e"
-SRC_URI[sha256sum] = "895bc7c2498c8e1f9b99938f1a40dc86b3f149741f105cf7c7bd2e0725405211"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-# There isn't enable/disable option, and lcms is in meta-oe, at least make it explicit when enabled
-# setup.py already has FIXME: add mechanism to explicitly *disable* the use of a library
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[lcms] = ",,lcms"
-
-inherit distutils
-
-do_compile() {
- export STAGING_LIBDIR=${STAGING_LIBDIR}
- export STAGING_INCDIR=${STAGING_INCDIR}
- export LCMS_ENABLED=${@bb.utils.contains('PACKAGECONFIG', 'lcms', 'True', 'False', d)}
- distutils_do_compile
-}
-
-do_install() {
- export STAGING_LIBDIR=${STAGING_LIBDIR}
- export STAGING_INCDIR=${STAGING_INCDIR}
- export LCMS_ENABLED=${@bb.utils.contains('PACKAGECONFIG', 'lcms', 'True', 'False', d)}
- distutils_do_install
- install -d ${D}${datadir}/doc/${BPN}/html/
- install -m 0644 ${S}/README ${D}${datadir}/doc/${BPN}/
- install -m 0644 ${S}/Docs/* ${D}${datadir}/doc/${BPN}/html/
-
- # get rid of #!/usr/local/bin/python
- sed -i -e 's:/usr/local/bin/:${bindir}/env :g' ${D}${bindir}/*
-}
-
-RDEPENDS_${PN} += "python-lang python-stringold"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
new file mode 100644
index 000000000..85ec21768
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako.inc
@@ -0,0 +1,15 @@
+SUMMARY = "Templating library for Python"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1bb21fa2d2f7a534c884b990430a6863"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "c5fc31a323dd4990683d2f2da02d4e20"
+SRC_URI[sha256sum] = "fed99dbe4d0ddb27a33ee4910d8708aca9ef1fe854e668387a9ab9a90cbf9059"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/"
+UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)"
+
+S = "${WORKDIR}/Mako-${PV}"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.3.bb
deleted file mode 100644
index 9efd700dc..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.3.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Templating library for Python"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=deb3ff8e4c17aaf7b80889b6b2bf4c83"
-
-SRC_URI = "https://pypi.python.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "a78f20f6366a8a0659ce5532f8614e53"
-SRC_URI[sha256sum] = "7644bc0ee35965d2e146dde31827b8982ed70a58281085fac42869a09764d38c"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/"
-UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/Mako-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "python-threading \
- python-netclient \
- python-html \
-"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.4.bb
new file mode 100644
index 000000000..230044e1a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.4.bb
@@ -0,0 +1,17 @@
+require python-mako.inc
+
+inherit setuptools
+
+RDEPENDS_${PN} = "python-threading \
+ python-netclient \
+ python-html \
+"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
+
+# The same utility is packaged in python3-mako, so it would conflict
+do_install_append() {
+ rm -f ${D}${bindir}/mako-render
+ rmdir ${D}${bindir}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
deleted file mode 100644
index f89aaff7b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-# The proper prefix is inside our staging area.
-# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
-# Signed-off-by: Phil Blundell <philb@gnu.org>
-
---- Python-2.6.6/Lib/distutils/sysconfig.py.orig 2012-01-03 14:02:03.027005296 +0000
-+++ Python-2.6.6/Lib/distutils/sysconfig.py 2012-01-03 14:02:31.517601081 +0000
-@@ -19,8 +19,8 @@
- from distutils.errors import DistutilsPlatformError
-
- # These are needed in a couple of spots, so just compute them once.
--PREFIX = os.path.normpath(sys.prefix)
--EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
-+EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
-
- # Path to the base directory of the project. On Windows the binary may
- # live in project/PCBuild9. If we're dealing with an x64 Windows build,
-@@ -70,7 +70,7 @@
- sys.exec_prefix -- i.e., ignore 'plat_specific'.
- """
- if prefix is None:
-- prefix = plat_specific and EXEC_PREFIX or PREFIX
-+ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
-
- if os.name == "posix":
- if python_build:
-@@ -115,12 +115,16 @@
- If 'prefix' is supplied, use it instead of sys.prefix or
- sys.exec_prefix -- i.e., ignore 'plat_specific'.
- """
-+ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
- if prefix is None:
-- prefix = plat_specific and EXEC_PREFIX or PREFIX
-+ if plat_specific:
-+ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
-+ else:
-+ prefix = PREFIX
-
- if os.name == "posix":
- libpython = os.path.join(prefix,
-- "lib", "python" + get_python_version())
-+ lib_basename, "python" + get_python_version())
- if standard_lib:
- return libpython
- else:
-@@ -216,7 +220,7 @@
- else:
- # The name of the config.h file changed in 2.2
- config_h = 'pyconfig.h'
-- return os.path.join(inc_dir, config_h)
-+ return os.path.join(inc_dir, config_h).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
-
-
- def get_makefile_filename():
-@@ -225,7 +229,7 @@
- return os.path.join(os.path.dirname(os.path.realpath(sys.executable)),
- "Makefile")
- lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
-- return os.path.join(lib_dir, "config", "Makefile")
-+ return os.path.join(lib_dir, "config", "Makefile").replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
-
-
- def parse_config_h(fp, g=None):
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
index 5279e7c3b..a592ea40a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
@@ -4,8 +4,8 @@ Avoids parallel make races linking errors when making Parser/PGEN
- Implements Richard Purdie's idea
-Signed-Off-By: Richard Purdie <richard.purdie@linuxfoundation.org>
-Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Index: Python-2.7.9/Makefile.pre.in
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/debug.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/debug.patch
index 5ec10d6b2..361788264 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/debug.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/debug.patch
@@ -1,24 +1,27 @@
Upstream-Status: Pending
-Index: Python-2.6.1/Lib/distutils/unixccompiler.py
+Index: Python-2.7.12/Lib/distutils/unixccompiler.py
===================================================================
---- Python-2.6.1.orig/Lib/distutils/unixccompiler.py 2009-11-13 16:04:54.000000000 +0000
-+++ Python-2.6.1/Lib/distutils/unixccompiler.py 2009-11-13 16:06:27.000000000 +0000
-@@ -300,6 +300,8 @@
- dylib_f = self.library_filename(lib, lib_type='dylib')
- static_f = self.library_filename(lib, lib_type='static')
+--- Python-2.7.12.orig/Lib/distutils/unixccompiler.py
++++ Python-2.7.12/Lib/distutils/unixccompiler.py
+@@ -278,6 +278,8 @@ class UnixCCompiler(CCompiler):
+
+
+ print "Looking in %s for %s" % (lib, dirs)
+
for dir in dirs:
shared = os.path.join(dir, shared_f)
dylib = os.path.join(dir, dylib_f)
-@@ -309,10 +311,13 @@
+@@ -298,12 +300,16 @@ class UnixCCompiler(CCompiler):
# assuming that *all* Unix C compilers do. And of course I'm
# ignoring even GCC's "-static" option. So sue me.
if os.path.exists(dylib):
+ print "Found %s" % (dylib)
return dylib
+ elif os.path.exists(xcode_stub):
++ print "Found %s" % (xcode_stub)
+ return xcode_stub
elif os.path.exists(shared):
+ print "Found %s" % (shared)
return shared
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
index 8ca89e7c5..916b40f4a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/multilib.patch
@@ -1,6 +1,6 @@
Rebased for Python 2.7.9
-Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
2011/09/29
The python recipe building was failing because python-native
@@ -10,12 +10,12 @@ recipe.
Upstream-Status: Inappropriate [oe-specific]
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Index: Python-2.7.9/Include/pythonrun.h
+Index: Python-2.7.12/Include/pythonrun.h
===================================================================
---- Python-2.7.9.orig/Include/pythonrun.h
-+++ Python-2.7.9/Include/pythonrun.h
+--- Python-2.7.12.orig/Include/pythonrun.h
++++ Python-2.7.12/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -24,10 +24,10 @@ Index: Python-2.7.9/Include/pythonrun.h
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.9/Lib/distutils/command/install.py
+Index: Python-2.7.12/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.9.orig/Lib/distutils/command/install.py
-+++ Python-2.7.9/Lib/distutils/command/install.py
+--- Python-2.7.12.orig/Lib/distutils/command/install.py
++++ Python-2.7.12/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -46,11 +46,11 @@ Index: Python-2.7.9/Lib/distutils/command/install.py
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.9/Lib/pydoc.py
+Index: Python-2.7.12/Lib/pydoc.py
===================================================================
---- Python-2.7.9.orig/Lib/pydoc.py
-+++ Python-2.7.9/Lib/pydoc.py
-@@ -383,7 +383,7 @@ class Doc:
+--- Python-2.7.12.orig/Lib/pydoc.py
++++ Python-2.7.12/Lib/pydoc.py
+@@ -384,7 +384,7 @@ class Doc:
docloc = os.environ.get("PYTHONDOCS",
"http://docs.python.org/library")
@@ -59,10 +59,10 @@ Index: Python-2.7.9/Lib/pydoc.py
"python"+sys.version[0:3])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-2.7.9/Lib/site.py
+Index: Python-2.7.12/Lib/site.py
===================================================================
---- Python-2.7.9.orig/Lib/site.py
-+++ Python-2.7.9/Lib/site.py
+--- Python-2.7.12.orig/Lib/site.py
++++ Python-2.7.12/Lib/site.py
@@ -288,13 +288,19 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -86,10 +86,10 @@ Index: Python-2.7.9/Lib/site.py
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
-Index: Python-2.7.9/Lib/test/test_dl.py
+Index: Python-2.7.12/Lib/test/test_dl.py
===================================================================
---- Python-2.7.9.orig/Lib/test/test_dl.py
-+++ Python-2.7.9/Lib/test/test_dl.py
+--- Python-2.7.12.orig/Lib/test/test_dl.py
++++ Python-2.7.12/Lib/test/test_dl.py
@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
@@ -104,10 +104,10 @@ Index: Python-2.7.9/Lib/test/test_dl.py
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.9/Lib/trace.py
+Index: Python-2.7.12/Lib/trace.py
===================================================================
---- Python-2.7.9.orig/Lib/trace.py
-+++ Python-2.7.9/Lib/trace.py
+--- Python-2.7.12.orig/Lib/trace.py
++++ Python-2.7.12/Lib/trace.py
@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -121,11 +121,11 @@ Index: Python-2.7.9/Lib/trace.py
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.9/Makefile.pre.in
+Index: Python-2.7.12/Makefile.pre.in
===================================================================
---- Python-2.7.9.orig/Makefile.pre.in
-+++ Python-2.7.9/Makefile.pre.in
-@@ -87,6 +87,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.12.orig/Makefile.pre.in
++++ Python-2.7.12/Makefile.pre.in
+@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -133,7 +133,7 @@ Index: Python-2.7.9/Makefile.pre.in
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -106,7 +107,7 @@ LIBDIR= @libdir@
+@@ -111,7 +112,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -142,7 +142,7 @@ Index: Python-2.7.9/Makefile.pre.in
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -597,6 +598,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -669,6 +670,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -150,7 +150,7 @@ Index: Python-2.7.9/Makefile.pre.in
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -639,7 +641,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
+@@ -720,7 +722,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -159,25 +159,25 @@ Index: Python-2.7.9/Makefile.pre.in
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.9/Modules/getpath.c
+Index: Python-2.7.12/Modules/getpath.c
===================================================================
---- Python-2.7.9.orig/Modules/getpath.c
-+++ Python-2.7.9/Modules/getpath.c
-@@ -116,9 +116,11 @@
- #define EXEC_PREFIX PREFIX
+--- Python-2.7.12.orig/Modules/getpath.c
++++ Python-2.7.12/Modules/getpath.c
+@@ -100,6 +100,13 @@
+ #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
+#define LIB_PYTHON LIB "/python" VERSION
+
- #ifndef PYTHONPATH
--#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
-- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
++#ifndef PYTHONPATH
+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
-+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
- #endif
-
++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
++#endif
++
#ifndef LANDMARK
-@@ -129,7 +131,7 @@ static char prefix[MAXPATHLEN+1];
+ #define LANDMARK "os.py"
+ #endif
+@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1];
static char exec_prefix[MAXPATHLEN+1];
static char progpath[MAXPATHLEN+1];
static char *module_search_path = NULL;
@@ -186,10 +186,10 @@ Index: Python-2.7.9/Modules/getpath.c
static void
reduce(char *dir)
-Index: Python-2.7.9/Python/getplatform.c
+Index: Python-2.7.12/Python/getplatform.c
===================================================================
---- Python-2.7.9.orig/Python/getplatform.c
-+++ Python-2.7.9/Python/getplatform.c
+--- Python-2.7.12.orig/Python/getplatform.c
++++ Python-2.7.12/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -204,10 +204,10 @@ Index: Python-2.7.9/Python/getplatform.c
+{
+ return LIB;
+}
-Index: Python-2.7.9/Python/sysmodule.c
+Index: Python-2.7.12/Python/sysmodule.c
===================================================================
---- Python-2.7.9.orig/Python/sysmodule.c
-+++ Python-2.7.9/Python/sysmodule.c
+--- Python-2.7.12.orig/Python/sysmodule.c
++++ Python-2.7.12/Python/sysmodule.c
@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
@@ -217,11 +217,11 @@ Index: Python-2.7.9/Python/sysmodule.c
SET_SYS_FROM_STRING("executable",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
-Index: Python-2.7.9/configure.ac
+Index: Python-2.7.12/configure.ac
===================================================================
---- Python-2.7.9.orig/configure.ac
-+++ Python-2.7.9/configure.ac
-@@ -736,6 +736,11 @@ SunOS*)
+--- Python-2.7.12.orig/configure.ac
++++ Python-2.7.12/configure.ac
+@@ -756,6 +756,11 @@ SunOS*)
;;
esac
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/nohostlibs.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/nohostlibs.patch
index 8a452e94d..078060b49 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/nohostlibs.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native/nohostlibs.patch
@@ -2,8 +2,8 @@ Upstream-Status: Inappropriate [embedded specific]
2014/12/15
Rebased for python-2.7.9
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Index: Python-2.7.9/setup.py
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.11.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.11.bb
deleted file mode 100644
index 4c204a4f0..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.11.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-require python.inc
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
-PR = "${INC_PR}.1"
-
-SRC_URI += "\
- file://05-enable-ctypes-cross-build.patch \
- file://10-distutils-fix-swig-parameter.patch \
- file://11-distutils-never-modify-shebang-line.patch \
- file://12-distutils-prefix-is-inside-staging-area.patch \
- file://debug.patch \
- file://unixccompiler.patch \
- file://nohostlibs.patch \
- file://multilib.patch \
- file://add-md5module-support.patch \
- file://builddir.patch \
- file://parallel-makeinst-create-bindir.patch \
- file://revert_use_of_sysconfigdata.patch \
- file://avoid_parallel_make_races_on_pgen.patch \
- "
-S = "${WORKDIR}/Python-${PV}"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
-
-inherit native
-
-RPROVIDES += "python-distutils-native python-compression-native python-textutils-native python-codecs-native python-core-native python-unittest-native"
-
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN}"
-
-EXTRA_OEMAKE = '\
- BUILD_SYS="" \
- HOST_SYS="" \
- LIBC="" \
- STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
- STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
-'
-
-do_configure_append() {
- autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
- install -d ${D}${bindir}/${PN}
- install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
- # Make sure we use /usr/bin/env python
- for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
- sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
- done
-
- # Add a symlink to the native Python so that scripts can just invoke
- # "nativepython" and get the right one without needing absolute paths
- # (these often end up too long for the #! parser in the kernel as the
- # buffer is 128 bytes long).
- ln -s python-native/python ${D}${bindir}/nativepython
-
- # We don't want modules in ~/.local being used in preference to those
- # installed in the native sysroot, so disable user site support.
- sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.12.bb
new file mode 100644
index 000000000..de83cbd76
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-native_2.7.12.bb
@@ -0,0 +1,61 @@
+require python.inc
+
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native"
+PR = "${INC_PR}.1"
+
+SRC_URI += "\
+ file://05-enable-ctypes-cross-build.patch \
+ file://10-distutils-fix-swig-parameter.patch \
+ file://11-distutils-never-modify-shebang-line.patch \
+ file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \
+ file://debug.patch \
+ file://unixccompiler.patch \
+ file://nohostlibs.patch \
+ file://multilib.patch \
+ file://add-md5module-support.patch \
+ file://builddir.patch \
+ file://parallel-makeinst-create-bindir.patch \
+ file://revert_use_of_sysconfigdata.patch \
+ "
+
+S = "${WORKDIR}/Python-${PV}"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
+
+inherit native
+
+RPROVIDES += "python-distutils-native python-compression-native python-textutils-native python-codecs-native python-core-native python-unittest-native"
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
+
+EXTRA_OEMAKE = '\
+ LIBC="" \
+ STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+ STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+'
+
+do_configure_append() {
+ autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ install -d ${D}${bindir}/${PN}
+ install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+ # Make sure we use /usr/bin/env python
+ for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
+ done
+
+ # Add a symlink to the native Python so that scripts can just invoke
+ # "nativepython" and get the right one without needing absolute paths
+ # (these often end up too long for the #! parser in the kernel as the
+ # buffer is 128 bytes long).
+ ln -s python-native/python ${D}${bindir}/nativepython
+
+ # We don't want modules in ~/.local being used in preference to those
+ # installed in the native sysroot, so disable user site support.
+ sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
index ec6158fab..3757f3a8b 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
@@ -5,7 +5,7 @@ SECTION = "devel/python"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-SRC_URI = "http://pypi.python.org/packages/source/n/nose/nose-${PV}.tar.gz"
+SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h
deleted file mode 100644
index 191e5a19e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#define NPY_HAVE_ENDIAN_H 1
-#define NPY_SIZEOF_SHORT SIZEOF_SHORT
-#define NPY_SIZEOF_INT SIZEOF_INT
-#define NPY_SIZEOF_LONG SIZEOF_LONG
-#define NPY_SIZEOF_FLOAT 4
-#define NPY_SIZEOF_COMPLEX_FLOAT 8
-#define NPY_SIZEOF_DOUBLE 8
-#define NPY_SIZEOF_COMPLEX_DOUBLE 16
-#define NPY_SIZEOF_LONGDOUBLE 16
-#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
-#define NPY_SIZEOF_PY_INTPTR_T 8
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_NO_SMP 0
-#define NPY_HAVE_DECL_ISNAN
-#define NPY_HAVE_DECL_ISINF
-#define NPY_HAVE_DECL_ISFINITE
-#define NPY_HAVE_DECL_SIGNBIT
-#define NPY_USE_C99_COMPLEX 1
-#define NPY_HAVE_COMPLEX_DOUBLE 1
-#define NPY_HAVE_COMPLEX_FLOAT 1
-#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
-#define NPY_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_USE_C99_FORMATS 1
-#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
-#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch
deleted file mode 100644
index 29768f34d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Dont punish musl for glibc's trignometeric functions problems
-additionally ensure that glibc specific macros are not used
-unconditionally
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: numpy-1.10.4/numpy/core/src/private/npy_config.h
-===================================================================
---- numpy-1.10.4.orig/numpy/core/src/private/npy_config.h
-+++ numpy-1.10.4/numpy/core/src/private/npy_config.h
-@@ -75,10 +75,12 @@
-
- #if defined(HAVE_FEATURES_H)
- #include <features.h>
-+#ifdef __GLIBC__
- #define TRIG_OK __GLIBC_PREREQ(2, 16)
- #else
- #define TRIG_OK 0
- #endif
-+#endif
-
- #if !TRIG_OK
- #undef HAVE_CASIN
-Index: numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src
-===================================================================
---- numpy-1.10.4.orig/numpy/core/src/npymath/ieee754.c.src
-+++ numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src
-@@ -612,7 +612,7 @@ void npy_set_floatstatus_invalid(void)
- }
-
-
--#elif defined(__GLIBC__) || defined(__APPLE__) || \
-+#elif defined(__linux__) || defined(__APPLE__) || \
- defined(__CYGWIN__) || defined(__MINGW32__) || \
- (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
- # include <fenv.h>
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h
deleted file mode 100644
index 05d2b8b94..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#define NPY_HAVE_ENDIAN_H 1
-#define NPY_SIZEOF_SHORT SIZEOF_SHORT
-#define NPY_SIZEOF_INT SIZEOF_INT
-#define NPY_SIZEOF_LONG SIZEOF_LONG
-#define NPY_SIZEOF_FLOAT 4
-#define NPY_SIZEOF_COMPLEX_FLOAT 8
-#define NPY_SIZEOF_DOUBLE 8
-#define NPY_SIZEOF_COMPLEX_DOUBLE 16
-#define NPY_SIZEOF_LONGDOUBLE 8
-#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
-#define NPY_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_SIZEOF_PY_INTPTR_T 4
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_NO_SMP 0
-#define NPY_HAVE_DECL_ISNAN
-#define NPY_HAVE_DECL_ISINF
-#define NPY_HAVE_DECL_ISFINITE
-#define NPY_HAVE_DECL_SIGNBIT
-#define NPY_USE_C99_COMPLEX 1
-#define NPY_HAVE_COMPLEX_DOUBLE 1
-#define NPY_HAVE_COMPLEX_FLOAT 1
-#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
-#define NPY_USE_C99_FORMATS 1
-#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
-#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
deleted file mode 100644
index 8e2b5d094..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#define NPY_HAVE_ENDIAN_H 1
-#define NPY_SIZEOF_SHORT SIZEOF_SHORT
-#define NPY_SIZEOF_INT SIZEOF_INT
-#define NPY_SIZEOF_LONG SIZEOF_LONG
-#define NPY_SIZEOF_FLOAT 4
-#define NPY_SIZEOF_COMPLEX_FLOAT 8
-#define NPY_SIZEOF_DOUBLE 8
-#define NPY_SIZEOF_COMPLEX_DOUBLE 16
-#define NPY_SIZEOF_LONGDOUBLE 16
-#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
-#define NPY_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_SIZEOF_PY_INTPTR_T 8
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_NO_SMP 0
-#define NPY_HAVE_DECL_ISNAN
-#define NPY_HAVE_DECL_ISINF
-#define NPY_HAVE_DECL_ISFINITE
-#define NPY_HAVE_DECL_SIGNBIT
-#define NPY_USE_C99_COMPLEX 1
-#define NPY_HAVE_COMPLEX_DOUBLE 1
-#define NPY_HAVE_COMPLEX_FLOAT 1
-#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
-#define NPY_USE_C99_FORMATS 1
-#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
-#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mipsel/numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mipsel/numpyconfig.h
deleted file mode 100644
index c4bf6547f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/mipsel/numpyconfig.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* cat ./src.linux-i686-2.5/numpy/core/include/numpy/numpyconfig.h */
-/*
- * * This file is generated by numpy/core/setup.pyc. DO NOT EDIT
- * */
-#define NPY_SIZEOF_SHORT 2
-#define NPY_SIZEOF_INT 4
-#define NPY_SIZEOF_LONG 4
-#define NPY_SIZEOF_FLOAT 4
-#define NPY_SIZEOF_DOUBLE 8
-#define NPY_SIZEOF_LONGDOUBLE 12
-#define NPY_SIZEOF_PY_INTPTR_T 4
-#define NPY_NO_SMP 0
-
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_SIZEOF_PY_LONG_LONG 8
-/* #define CHAR_BIT 8 */
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h
deleted file mode 100644
index 0f45d5bd4..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#define NPY_HAVE_ENDIAN_H 1
-#define NPY_SIZEOF_SHORT SIZEOF_SHORT
-#define NPY_SIZEOF_INT SIZEOF_INT
-#define NPY_SIZEOF_LONG SIZEOF_LONG
-#define NPY_SIZEOF_FLOAT 4
-#define NPY_SIZEOF_COMPLEX_FLOAT 8
-#define NPY_SIZEOF_DOUBLE 8
-#define NPY_SIZEOF_COMPLEX_DOUBLE 16
-#define NPY_SIZEOF_LONGDOUBLE 16
-#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
-#define NPY_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_SIZEOF_PY_INTPTR_T 4
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_NO_SMP 0
-#define NPY_HAVE_DECL_ISNAN
-#define NPY_HAVE_DECL_ISINF
-#define NPY_HAVE_DECL_ISFINITE
-#define NPY_HAVE_DECL_SIGNBIT
-#define NPY_USE_C99_COMPLEX 1
-#define NPY_HAVE_COMPLEX_DOUBLE 1
-#define NPY_HAVE_COMPLEX_FLOAT 1
-#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
-#define NPY_USE_C99_FORMATS 1
-#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
-#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h b/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h
deleted file mode 100644
index 8e2b5d094..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#define NPY_HAVE_ENDIAN_H 1
-#define NPY_SIZEOF_SHORT SIZEOF_SHORT
-#define NPY_SIZEOF_INT SIZEOF_INT
-#define NPY_SIZEOF_LONG SIZEOF_LONG
-#define NPY_SIZEOF_FLOAT 4
-#define NPY_SIZEOF_COMPLEX_FLOAT 8
-#define NPY_SIZEOF_DOUBLE 8
-#define NPY_SIZEOF_COMPLEX_DOUBLE 16
-#define NPY_SIZEOF_LONGDOUBLE 16
-#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
-#define NPY_ENABLE_SEPARATE_COMPILATION 1
-#define NPY_SIZEOF_PY_INTPTR_T 8
-#define NPY_SIZEOF_PY_LONG_LONG 8
-#define NPY_SIZEOF_LONGLONG 8
-#define NPY_NO_SMP 0
-#define NPY_HAVE_DECL_ISNAN
-#define NPY_HAVE_DECL_ISINF
-#define NPY_HAVE_DECL_ISFINITE
-#define NPY_HAVE_DECL_SIGNBIT
-#define NPY_USE_C99_COMPLEX 1
-#define NPY_HAVE_COMPLEX_DOUBLE 1
-#define NPY_HAVE_COMPLEX_FLOAT 1
-#define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
-#define NPY_USE_C99_FORMATS 1
-#define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
-#define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x0000000A
-
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy_1.10.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy_1.10.4.bb
deleted file mode 100644
index 8a562dcb9..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-numpy_1.10.4.bb
+++ /dev/null
@@ -1,102 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9f4e88b5748e8313caaf33d081ce65a3"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \
- file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
- file://remove-build-path-in-comments.patch \
- file://add-glibc-check.patch \
- ${CONFIGFILESURI} "
-
-CONFIGFILESURI ?= ""
-
-CONFIGFILESURI_aarch64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_arm = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_armeb = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_mipsel = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86 = " \
- file://config.h \
- file://numpyconfig.h \
-"
-CONFIGFILESURI_x86-64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips64 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips64n32 = " \
- file://config.h \
- file://_numpyconfig.h \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit distutils
-
-# Make the build fail and replace *config.h with proper one
-# This is a ugly, ugly hack - Koen
-do_compile_prepend_class-target() {
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
- true
- cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
-}
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-
-SRC_URI[md5sum] = "90bb9034652cefbada19cf7d141a6a61"
-SRC_URI[sha256sum] = "f7f91842056a7cf680b0eaf8cefc5e46c69e2521e651128d2e6aaaccec8652ae"
-
-# install what is needed for numpy.test()
-RDEPENDS_${PN} = "python-unittest \
- python-difflib \
- python-pprint \
- python-pickle \
- python-shell \
- python-nose \
- python-doctest \
- python-datetime \
- python-distutils \
- python-misc \
- python-mmap \
- python-netclient \
- python-numbers \
- python-pydoc \
- python-pkgutil \
- python-email \
- python-subprocess \
- python-compression \
- python-ctypes \
- python-threading \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.0.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.0.1.bb
deleted file mode 100644
index 7f142a385..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.0.1.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "A Pure Python Expect like Module for Python"
-HOMEPAGE = "http://pexpect.readthedocs.org/"
-SECTION = "devel/python"
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=66c2378a96b307d56bfb3a9e58edafa8"
-
-SRC_URI = "https://pypi.python.org/packages/source/p/pexpect/pexpect-${PV}.tar.gz"
-SRC_URI[md5sum] = "056df81e6ca7081f1015b4b147b977b7"
-SRC_URI[sha256sum] = "232795ebcaaf2e120396dbbaa3a129eda51757eeaae1911558f4ef8ee414fc6c"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect"
-
-S = "${WORKDIR}/pexpect-${PV}"
-
-inherit distutils
-
-RDEPENDS_${PN} = "\
- python-core \
- python-io \
- python-terminal \
- python-resource \
- python-fcntl \
-"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.0.bb
new file mode 100644
index 000000000..82e0fa886
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.2.0.bb
@@ -0,0 +1,28 @@
+SUMMARY = "A Pure Python Expect like Module for Python"
+HOMEPAGE = "http://pexpect.readthedocs.org/"
+SECTION = "devel/python"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1c7a725251880af8c6a148181665385b"
+
+SRCNAME = "pexpect"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+SRC_URI[md5sum] = "8071ec5df0f3d515daedafad672d1632"
+SRC_URI[sha256sum] = "bf6816b8cc8d301a499e7adf338828b39bc7548eb64dbed4dd410ed93d95f853"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect"
+
+S = "${WORKDIR}/pexpect-${PV}"
+
+inherit setuptools
+
+RDEPENDS_${PN} = "\
+ python-core \
+ python-io \
+ python-terminal \
+ python-resource \
+ python-fcntl \
+ python-ptyprocess \
+"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb
new file mode 100644
index 000000000..931e5a7d4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-ptyprocess_0.5.1.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Run a subprocess in a pseudo terminal"
+HOMEPAGE = "http://ptyprocess.readthedocs.io/en/latest/"
+SECTION = "devel/python"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=cfdcd51fa7d5808da4e74346ee394490"
+
+SRCNAME = "ptyprocess"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+SRC_URI[md5sum] = "94e537122914cc9ec9c1eadcd36e73a1"
+SRC_URI[sha256sum] = "0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/ptyprocess"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit setuptools
+
+RDEPENDS_${PN} = "\
+ python-core \
+"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycairo_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
deleted file mode 100644
index 70fe25c1a..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Python bindings for the Cairo canvas library"
-HOMEPAGE = "http://cairographics.org/pycairo"
-BUGTRACKER = "http://bugs.freedesktop.org"
-SECTION = "python-devel"
-LICENSE = "LGPLv2.1 & MPL-1.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421 \
- file://COPYING-LGPL-2.1;md5=fad9b3332be894bab9bc501572864b29 \
- file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325"
-
-# cairo >= 1.8.8
-DEPENDS = "cairo"
-PR = "r2"
-
-SRC_URI = "http://cairographics.org/releases/py2cairo-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "20337132c4ab06c1146ad384d55372c5"
-SRC_URI[sha256sum] = "d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431"
-
-S = "${WORKDIR}/py2cairo-${PV}"
-
-inherit distutils pkgconfig
-
-BBCLASSEXTEND = "native"
-
-do_configure() {
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
-}
-
-do_compile() {
- ./waf build ${PARALLEL_MAKE}
-}
-
-do_install() {
- ./waf install
- sed \
- -e 's:@prefix@:${prefix}:' \
- -e 's:@VERSION@:${PV}:' \
- -e 's:@includedir@:${includedir}:' \
- pycairo.pc.in > pycairo.pc
- install -m 0644 pycairo.pc ${D}${libdir}/pkgconfig/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pygobject_3.18.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pygobject_3.18.2.bb
deleted file mode 100644
index a9871fe26..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pygobject_3.18.2.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Python GObject bindings"
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-
-inherit autotools pkgconfig gnomebase distutils-base gobject-introspection
-
-DEPENDS += "python glib-2.0 gnome-common"
-
-SRCNAME="pygobject"
-SRC_URI = " \
- http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
- file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \
-"
-
-SRC_URI[md5sum] = "0a956f3e785e23b0f136832f2e57a862"
-SRC_URI[sha256sum] = "2a3cad1517916b74e131e6002c3824361aee0671ffb0d55ded119477fc1c2c5f"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF = "--disable-cairo --with-python=python2.7"
-
-RDEPENDS_${PN} += "python-setuptools python-importlib"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb
deleted file mode 100644
index e8ef1aa12..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require python-pyrex_${PV}.bb
-inherit native pythonnative
-DEPENDS = "python-native"
-RDEPENDS_${PN} = ""
-PR = "r3"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch
deleted file mode 100644
index c58c3280e..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Index: Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
-===================================================================
---- Pyrex-0.9.8.4.orig/Pyrex/Distutils/extension.py
-+++ Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
-@@ -15,7 +15,7 @@ except ImportError:
- warnings = None
-
- class Extension(_Extension.Extension):
-- _Extension.Extension.__doc__ + \
-+ _Extension.Extension.__doc__ or "" + \
- """pyrex_include_dirs : [string]
- list of directories to search for Pyrex header files (.pxd) (in
- Unix form for portability)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex_0.9.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
deleted file mode 100644
index c4dd2e69b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Language for writing Python extension modules"
-DESCRIPTION = "Pyrex is a language specially designed for writing Python extension modules. \
-It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
-and the messy, low-level world of C."
-SECTION = "devel/python"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=771d472f53f933033f57eeee7808e5bd"
-SRCNAME = "Pyrex"
-PR = "r4"
-
-SRC_URI = "\
- http://www.cosc.canterbury.ac.nz/greg.ewing/python/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
- file://pyrex-fix-optimized-mode.patch \
-"
-
-SRC_URI[md5sum] = "515dee67d15d4393841e2d60e8341947"
-SRC_URI[sha256sum] = "5f87df06831d0b3412eb4bc9d3fc2ee7bfae1b913d7da8c23ab2bf5699fb6b50"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils
-
-FILES_${PN} += "${datadir}${base_libdir}/${PYTHON_DIR}/site-packages/Pyrex/Compiler/Lexicon.pickle"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.5.0.bb
index dae89ab5d..dae89ab5d 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.4.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.5.0.bb
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.4.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.4.1.bb
deleted file mode 100644
index 096cf5c96..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.4.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=23bc1530c55e9f0d1b709056bcea237d"
-SRCNAME = "scons"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "9a0ddf33d9839f04380e0fae87cc4b40"
-SRC_URI[sha256sum] = "8fc4f42928c69bcbb33e1be94b646f2c700b659693fabc778c192d4d22f753a7"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/scons/files/scons/"
-UPSTREAM_CHECK_REGEX = "/scons/(?P<pver>(\d+[\.\-_]*)+)/"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils
-
-RDEPENDS_${PN} = "\
- python-fcntl \
- python-io \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.0.bb
new file mode 100644
index 000000000..8543c4182
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-scons_2.5.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3a885dff6d14e4cd876d9008a09a42de"
+SRCNAME = "scons"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "bda5530a70a41a7831d83c8b191c021e"
+SRC_URI[sha256sum] = "01f1b3d6023516a8e1b5e77799e5a82a23b32953b1102d339059ffeca8600493"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/SCons/"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit setuptools
+
+RDEPENDS_${PN} = "\
+ python-fcntl \
+ python-io \
+ python-json \
+ python-subprocess \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
index 0917e88ab..92ca9a002 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
@@ -1,21 +1,21 @@
SUMMARY = "Download, build, install, upgrade, and uninstall Python packages"
HOMEPAGE = "https://pypi.python.org/pypi/setuptools"
SECTION = "devel/python"
-LICENSE = "PSF | ZPL-2.0"
+LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://setup.py;beginline=78;endline=78;md5=8a314270dd7a8dbca741775415f1716e"
+LIC_FILES_CHKSUM = "file://setup.py;beginline=134;endline=134;md5=3e8df024d6c1442d18e84acf8fbbc475"
SRCNAME = "setuptools"
-SRC_URI = "http://pypi.python.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+SRC_URI = "https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
-SRC_URI[md5sum] = "c5a7d90c1e0acf8c4ec5c2bf31bc25b5"
-SRC_URI[sha256sum] = "214bf29933f47cf25e6faa569f710731728a07a19cae91ea64f826051f68a8cf"
+SRC_URI[md5sum] = "869f3029dcc66a64ba39875e2a2f044a"
+SRC_URI[sha256sum] = "19aad19471052d5daefe96f2c1fa2e88dcdb17488bf8708d7e6356881ea833cb"
UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools"
S = "${WORKDIR}/${SRCNAME}-${PV}"
do_install_prepend() {
- install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
+ install -d ${D}${PYTHON_SITEPACKAGES_DIR}
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_19.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_19.4.bb
deleted file mode 100644
index c17203923..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_19.4.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require python-setuptools.inc
-
-PROVIDES = "python-distribute"
-
-DEPENDS += "python"
-DEPENDS_class-native += "python-native"
-
-inherit distutils
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
-RDEPENDS_${PN} = "\
- python-stringold \
- python-email \
- python-shell \
- python-distutils \
- python-compression \
- python-pkgutil \
- python-plistlib \
- python-numbers \
- python-html \
- python-netserver \
- python-ctypes \
- python-subprocess \
- python-unittest \
- python-compile \
-"
-
-RDEPENDS_${PN}_class-native = "\
- python-distutils \
- python-compression \
-"
-
-RREPLACES_${PN} = "python-distribute"
-RPROVIDES_${PN} = "python-distribute"
-RCONFLICTS_${PN} = "python-distribute"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_22.0.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_22.0.5.bb
new file mode 100644
index 000000000..526474c7e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-setuptools_22.0.5.bb
@@ -0,0 +1,38 @@
+require python-setuptools.inc
+
+PROVIDES = "python-distribute"
+
+DEPENDS += "python"
+DEPENDS_class-native += "python-native"
+
+inherit distutils
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
+
+RDEPENDS_${PN} = "\
+ python-stringold \
+ python-email \
+ python-shell \
+ python-distutils \
+ python-compression \
+ python-pkgutil \
+ python-plistlib \
+ python-numbers \
+ python-html \
+ python-netserver \
+ python-ctypes \
+ python-subprocess \
+ python-unittest \
+ python-compile \
+"
+
+RDEPENDS_${PN}_class-native = "\
+ python-distutils \
+ python-compression \
+"
+
+RREPLACES_${PN} = "python-distribute"
+RPROVIDES_${PN} = "python-distribute"
+RCONFLICTS_${PN} = "python-distribute"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
new file mode 100644
index 000000000..bd12fa94a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six.inc
@@ -0,0 +1,16 @@
+SUMMARY = "Python 2 and 3 compatibility library"
+HOMEPAGE = "https://pypi.python.org/pypi/six/"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6f00d4a50713fa859858dd9abaa35b21"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/s/six/six-${PV}.tar.gz"
+SRC_URI[md5sum] = "34eed507548117b2ab523ab14b2f8b55"
+SRC_URI[sha256sum] = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/six/"
+UPSTREAM_CHECK_REGEX = "/six/(?P<pver>(\d+[\.\-_]*)+)"
+
+BBCLASSEXTEND = "native nativesdk"
+
+S = "${WORKDIR}/six-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb
new file mode 100644
index 000000000..4350485f7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-six_1.10.0.bb
@@ -0,0 +1,4 @@
+inherit setuptools
+require python-six.inc
+
+RDEPENDS_${PN} += "python-io"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
new file mode 100644
index 000000000..2f14a124e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
@@ -0,0 +1,38 @@
+channels/rpm_sys: use md5sum instead of mtime as the digest
+
+Use the internal getFileDigest() function (which defaults to md5) instead of
+mtime for getting the file digest. On some systems mtime proved to be
+unreliable because of delayed update. This caused smart to miss rpm db updates
+and thus get its understanding of installed packages out of sync.
+
+Upstream-Status: Pending
+
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ smart/channels/rpm_sys.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/smart/channels/rpm_sys.py b/smart/channels/rpm_sys.py
+index b9fda27..6f1fe94 100644
+--- a/smart/channels/rpm_sys.py
++++ b/smart/channels/rpm_sys.py
+@@ -22,6 +22,7 @@
+ from smart.backends.rpm.header import RPMDBLoader
+ from smart.backends.rpm.base import getTS, rpm_join_dbpath
+ from smart.channel import PackageChannel
++from smart.util.filetools import getFileDigest
+ from smart import *
+ import os
+
+@@ -35,7 +36,7 @@ class RPMSysChannel(PackageChannel):
+ dbdir = rpm_join_dbpath(sysconf.get("rpm-root", "/"),
+ sysconf.get("rpm-dbpath", "var/lib/rpm"))
+ path = os.path.join(dbdir, "Packages")
+- digest = os.path.getmtime(path)
++ digest = getFileDigest(path)
+ if digest == self._digest:
+ return True
+ self.removeLoaders()
+--
+2.6.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
new file mode 100644
index 000000000..5e80804bf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
@@ -0,0 +1,47 @@
+From 01e51afd03131947f8d74b9a23fdbc0078249499 Mon Sep 17 00:00:00 2001
+From: Mariano Lopez <mariano.lopez@linux.intel.com>
+Date: Wed, 3 Aug 2016 07:47:09 +0000
+Subject: [PATCH] fetcher.py: Add debugging when targetpath is empty
+
+There are several errors when openining files or manipulating
+path strings, those errors point targetpath passed to
+setSucceeded() is empty. This patch won't solve the problems,
+but will add debugging to give an idea why is failing.
+
+Upstream-Status: Inappropriate [debugging]
+
+Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
+---
+ smart/fetcher.py | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/smart/fetcher.py b/smart/fetcher.py
+index dd3ff6b..64aa979 100644
+--- a/smart/fetcher.py
++++ b/smart/fetcher.py
+@@ -594,6 +594,22 @@ class FetchItem(object):
+ self._eta = None
+
+ def setSucceeded(self, targetpath, fetchedsize=0):
++ # It seems the in some odd cases targetpath here
++ # is empty, this will lead to bugs in several places
++ if not targetpath:
++ import traceback
++ tb_str = ""
++ for threadId, stack in sys._current_frames().items():
++ tb_str += '\nThreadID: %s' % threadId
++ for filename, lineno, name, line in traceback.extract_stack(stack):
++ tb_str += '\nFile: "%s", line %d, in %s' % (filename, lineno, name)
++ if line:
++ tb_str += "\n %s" % line.strip()
++ error_string = ["No file path specified",
++ "URL: %s" % self._url,
++ "Status: %s" % self._status,
++ "Traceback: %s" % tb_str]
++ raise Error, _("\n".join(error_string))
+ if self._status is not FAILED:
+ self._status = SUCCEEDED
+ self._targetpath = targetpath
+--
+2.6.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
index ec98e03c0..5aedc8826 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
@@ -36,7 +36,7 @@ index 9bbd952..ba6405a 100644
finally:
del getTS.ts
cb.grabOutput(False)
-+ if probs and sysconf.has("attempt-install", soft=True):
++ if (probs is not None) and sysconf.has("attempt-install", soft=True):
+ def remove_conflict(pkgNEVR):
+ for key in changeset.keys():
+ if pkgNEVR == str(key):
@@ -67,8 +67,8 @@ index 9bbd952..ba6405a 100644
+ retry = 0
+
prog.setDone()
-- if probs:
-+ if probs and (not retry):
+- if probs is not None:
++ if (probs is not None) and (not retry):
raise Error, "\n".join([x[0] for x in probs])
prog.stop()
+ if retry and len(changeset):
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
new file mode 100644
index 000000000..da23e7ce4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
@@ -0,0 +1,33 @@
+From 6d2363a705697f615d9e5af5d6703b291e618b46 Mon Sep 17 00:00:00 2001
+From: Daniel Klauer <daniel.klauer@gin.de>
+Date: Thu, 12 May 2016 17:55:01 +0200
+Subject: [PATCH] Fix channel command --remove-all option parsing
+
+Option.take_action() stores a list of options given for validation later.
+It strips leading dashes and turns remaining dashes into underscores.
+This list is what ensure_action() will compare its arguments against,
+thus we must use underscores here.
+
+Upstream-Status: Pending
+
+Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
+---
+ smart/commands/channel.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/smart/commands/channel.py b/smart/commands/channel.py
+index 108f3f1..6234f69 100644
+--- a/smart/commands/channel.py
++++ b/smart/commands/channel.py
+@@ -164,7 +164,7 @@ def main(ctrl, opts):
+ opts.check_args_of_option("edit", 0)
+ opts.check_args_of_option("enable", -1)
+ opts.check_args_of_option("disable", -1)
+- opts.ensure_action("channel", ["add", "set", "remove", "remove-all",
++ opts.ensure_action("channel", ["add", "set", "remove", "remove_all",
+ "list", "show", "yaml", "enable", "disable"])
+ opts.check_remaining_args()
+
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
deleted file mode 100644
index b82265b3f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-improve-error-reporting.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-Improve error reporting in smart
-
-Add code to check proper command line arguments for various
-smart commands. Exit with error if erroneous/additional arguments
-are given in the command line.
-
-Upstream-Status: Pending
-
-Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
-
-diff --git a/smart/util/optparse.py b/smart/util/optparse.py
-index 6fff1bc..f445a3b 100644
---- a/smart/util/optparse.py
-+++ b/smart/util/optparse.py
-@@ -70,6 +70,8 @@ import sys, os
- import types
- import textwrap
- from gettext import gettext as _
-+from smart import Error
-+import re
-
- def _repr(self):
- return "<%s at 0x%x: %s>" % (self.__class__.__name__, id(self), self)
-@@ -710,6 +712,12 @@ class Option:
- self.action, self.dest, opt, value, values, parser)
-
- def take_action(self, action, dest, opt, value, values, parser):
-+ # Keep all the options in the command line in the '_given_opts' array
-+ # This will be used later to validate the command line
-+ given_opts = getattr(parser.values, "_given_opts", [])
-+ user_opt = re.sub(r"^\-*", "", opt).replace("-", "_")
-+ given_opts.append(user_opt)
-+ setattr(parser.values, "_given_opts", given_opts)
- if action == "store":
- setattr(values, dest, value)
- elif action == "store_const":
-@@ -821,6 +829,54 @@ class Values:
- setattr(self, attr, value)
- return getattr(self, attr)
-
-+ # Check if the given option has the specified number of arguments
-+ # Raise an error if the option has an invalid number of arguments
-+ # A negative number for 'nargs' means "at least |nargs| arguments are needed"
-+ def check_args_of_option(self, opt, nargs, err=None):
-+ given_opts = getattr(self, "_given_opts", [])
-+ if not opt in given_opts:
-+ return
-+ values = getattr(self, opt, [])
-+ if type(values) != type([]):
-+ return
-+ if nargs < 0:
-+ nargs = -nargs
-+ if len(values) >= nargs:
-+ return
-+ if not err:
-+ if nargs == 1:
-+ err = _("Option '%s' requires at least one argument") % opt
-+ else:
-+ err = _("Option '%s' requires at least %d arguments") % (opt, nargs)
-+ raise Error, err
-+ elif nargs == 0:
-+ if len( values ) == 0:
-+ return
-+ raise Error, err
-+ else:
-+ if len(values) == nargs:
-+ return
-+ if not err:
-+ if nargs == 1:
-+ err = _("Option '%s' requires one argument") % opt
-+ else:
-+ err = _("Option '%s' requires %d arguments") % (opt, nargs)
-+ raise Error, err
-+
-+ # Check that at least one of the options in 'actlist' was given as an argument
-+ # to the command 'cmdname'
-+ def ensure_action(self, cmdname, actlist):
-+ given_opts = getattr(self, "_given_opts", [])
-+ for action in actlist:
-+ if action in given_opts:
-+ return
-+ raise Error, _("No action specified for command '%s'") % cmdname
-+
-+ # Check if there are any other arguments left after parsing the command line and
-+ # raise an error if such arguments are found
-+ def check_remaining_args(self):
-+ if self.args:
-+ raise Error, _("Invalid argument(s) '%s'" % str(self.args))
-
- class OptionContainer:
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-locale.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-locale.patch
new file mode 100644
index 000000000..0f1dfb91d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-locale.patch
@@ -0,0 +1,27 @@
+rpm or commands run by rpm can use output which isn't strictly acsii such
+as quotation characters around expression which are character 0xe2.
+
+Use utf-8 as an encoding rather than whatever the system suggests to
+ensure smart copes with this rather than erroring with unicode errors.
+
+RP 2016/5/19
+Upstream-Status: Pending
+
+
+Index: git/smart/backends/rpm/pm.py
+===================================================================
+--- git.orig/smart/backends/rpm/pm.py
++++ git/smart/backends/rpm/pm.py
+@@ -32,11 +32,7 @@ from smart.pm import PackageManager
+ from smart import sysconf, iface, Error, _
+
+
+-try:
+- ENCODING = locale.getpreferredencoding()
+-except locale.Error:
+- ENCODING = "ascii"
+-
++ENCODING = "utf-8"
+
+ def get_public_key(header):
+ return header.sprintf("%|DSAHEADER?{%{DSAHEADER:pgpsig}}:"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
new file mode 100644
index 000000000..bb8c3afdb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
@@ -0,0 +1,57 @@
+From 0c55d7e18f40465e95e8e4bf22af01f5d4477d3c Mon Sep 17 00:00:00 2001
+From: Daniel Klauer <daniel.klauer@gin.de>
+Date: Wed, 11 May 2016 17:22:49 +0200
+Subject: [PATCH] rpm: Don't ignore transaction error with empty problems list
+
+SmartPM could misinterpret RPM transaction error as success,
+if ts.run() (RPM Python API) returns an empty problems list,
+because of incorrect check for None which treated empty list
+to be the same as None when it has different meaning.
+
+ts.run() returns:
+* None in case of success
+* problems list in case of error, may be empty
+(look at rpmts_Run() in rpm-5.4.14/python/rpmts-py.c [1])
+
+"if mylist" is not good enough to check for error here, because it will
+treat an empty list as "false" because its len() == 0 [2].
+
+ts.check() seems to be different (it's ok for it to return an empty list),
+but for consistency it should be made clear that it can return either None,
+an empty list or a non-empty list.
+
+[1] http://rpm5.org/cvs/fileview?f=rpm/python/rpmts-py.c&v=1.111.2.3
+[2] https://docs.python.org/2/library/stdtypes.html#truth-value-testing
+
+Upstream-Status: Pending
+
+Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
+---
+ smart/backends/rpm/pm.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
+index 9bbd952..635f726 100644
+--- a/smart/backends/rpm/pm.py
++++ b/smart/backends/rpm/pm.py
+@@ -208,7 +208,7 @@ class RPMPackageManager(PackageManager):
+ force = sysconf.get("rpm-force", False)
+ if not force:
+ probs = ts.check()
+- if probs:
++ if (probs is not None) and (len(probs) != 0):
+ problines = []
+ for prob in probs:
+ name1 = "%s-%s-%s" % prob[0]
+@@ -247,7 +247,7 @@ class RPMPackageManager(PackageManager):
+ del getTS.ts
+ cb.grabOutput(False)
+ prog.setDone()
+- if probs:
++ if probs is not None:
+ raise Error, "\n".join([x[0] for x in probs])
+ prog.stop()
+
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-nodig.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-nodig.patch
deleted file mode 100644
index fefb29a66..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-nodig.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-RPM5 has removed support for RPMVSF_NOSIGNATURES
-
-Patch smart to no longer use this flag
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
---- a/smart/backends/rpm/base.py
-+++ b/smart/backends/rpm/base.py
-@@ -63,11 +63,11 @@ def getTS(new=False):
- if sysconf.get("rpm-dbpath"):
- rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
- getTS.ts = rpm.ts(getTS.root)
-- if not sysconf.get("rpm-check-signatures", False):
-- if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-- getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-- else:
-- raise Error, _("rpm requires checking signatures")
-+ #if not sysconf.get("rpm-check-signatures", False):
-+ # if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-+ # getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-+ # else:
-+ # raise Error, _("rpm requires checking signatures")
- rpm_dbpath = sysconf.get("rpm-dbpath", "var/lib/rpm")
- dbdir = rpm_join_dbpath(getTS.root, rpm_dbpath)
- if not os.path.isdir(dbdir):
-@@ -89,11 +89,11 @@ def getTS(new=False):
- if sysconf.get("rpm-dbpath"):
- rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
- ts = rpm.ts(getTS.root)
-- if not sysconf.get("rpm-check-signatures", False):
-- if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-- ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-- else:
-- raise Error, _("rpm requires checking signatures")
-+ #if not sysconf.get("rpm-check-signatures", False):
-+ # if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
-+ # ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
-+ # else:
-+ # raise Error, _("rpm requires checking signatures")
- return ts
- else:
- return getTS.ts
-diff --git a/smart/plugins/yumchannelsync.py b/smart/plugins/yumchannelsync.py
---- a/smart/plugins/yumchannelsync.py
-+++ b/smart/plugins/yumchannelsync.py
-@@ -56,8 +56,8 @@ def _getreleasever():
-
- rpmroot = sysconf.get("rpm-root", "/")
- ts = rpmUtils.transaction.initReadOnlyTransaction(root=rpmroot)
-- if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'):
-- ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
-+ #if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'):
-+ # ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
- releasever = None
- # HACK: we're hard-coding the most used distros, will add more if needed
- idx = ts.dbMatch('provides', 'fedora-release')
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
new file mode 100644
index 000000000..4067a90a0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
@@ -0,0 +1,112 @@
+From 5b79e28bd70a0ec5b34c5ff19b66cbbdd1e48835 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Fri, 18 Mar 2016 13:34:07 +0800
+Subject: [PATCH] Make smartpm to support check signatures of rpmv5.
+
+The original support for 'rpm-check-signatures' has been
+disabled for the RPMv5 does not support '_RPMVSF_NOSIGNATURES'
+now. This fix replaces the '_RPMVSF_NOSIGNATURES' with
+rpm VS flags set:RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|
+RPMVSF_NODSA|RPMVSF_NORSA.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+---
+ smart/backends/rpm/base.py | 43 +++++++++++++++++++++++++++++++----------
+ smart/backends/rpm/pm.py | 2 +-
+ smart/plugins/yumchannelsync.py | 5 +++--
+ 3 files changed, 37 insertions(+), 13 deletions(-)
+
+diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
+index 85f4d49..dbd6165 100644
+--- a/smart/backends/rpm/base.py
++++ b/smart/backends/rpm/base.py
+@@ -63,11 +63,23 @@ def getTS(new=False):
+ if sysconf.get("rpm-dbpath"):
+ rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
+ getTS.ts = rpm.ts(getTS.root)
+- if not sysconf.get("rpm-check-signatures", False):
+- if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
+- getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
+- else:
+- raise Error, _("rpm requires checking signatures")
++
++ # _RPMVSF_NOSIGNATURES is not supported in RPMv5, so here uses
++ # RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|RPMVSF_NODSA|RPMVSF_NORSA
++ # to replace '_RPMVSF_NOSIGNATURES' to continue to support check
++ # rpm signatures
++
++ #if not sysconf.get("rpm-check-signatures", False):
++ # if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
++ # getTS.ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
++ # else:
++ # raise Error, _("rpm requires checking signatures")
++ if sysconf.get("rpm-check-signatures") == False:
++ getTS.ts.setVSFlags(rpm.RPMVSF_NODSAHEADER|rpm.RPMVSF_NORSAHEADER|\
++ rpm.RPMVSF_NODSA|rpm.RPMVSF_NORSA)
++ else:
++ getTS.ts.setVSFlags(0)
++
+ rpm_dbpath = sysconf.get("rpm-dbpath", "var/lib/rpm")
+ dbdir = rpm_join_dbpath(getTS.root, rpm_dbpath)
+ if not os.path.isdir(dbdir):
+@@ -89,11 +101,22 @@ def getTS(new=False):
+ if sysconf.get("rpm-dbpath"):
+ rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
+ ts = rpm.ts(getTS.root)
+- if not sysconf.get("rpm-check-signatures", False):
+- if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
+- ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
+- else:
+- raise Error, _("rpm requires checking signatures")
++
++ # _RPMVSF_NOSIGNATURES is not supported in RPMv5, so here uses
++ # RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|RPMVSF_NODSA|RPMVSF_NORSA
++ # to replace '_RPMVSF_NOSIGNATURES' to continue to support check
++ # rpm signatures
++
++ #if not sysconf.get("rpm-check-signatures", False):
++ # if hasattr(rpm, '_RPMVSF_NOSIGNATURES'):
++ # ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
++ # else:
++ # raise Error, _("rpm requires checking signatures")
++ if sysconf.get("rpm-check-signatures") == False:
++ ts.setVSFlags(rpm.RPMVSF_NODSAHEADER|rpm.RPMVSF_NORSAHEADER|\
++ rpm.RPMVSF_NODSA|rpm.RPMVSF_NORSA)
++ else:
++ ts.setVSFlags(0)
+ return ts
+ else:
+ return getTS.ts
+diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
+index b57a844..7b651b5 100644
+--- a/smart/backends/rpm/pm.py
++++ b/smart/backends/rpm/pm.py
+@@ -180,7 +180,7 @@ class RPMPackageManager(PackageManager):
+ fd = os.open(path, os.O_RDONLY)
+ try:
+ h = ts.hdrFromFdno(fd)
+- if sysconf.get("rpm-check-signatures", False):
++ if sysconf.get("rpm-check-signatures", True):
+ if get_public_key(h) == '(none)':
+ raise rpm.error('package is not signed')
+ except rpm.error, e:
+diff --git a/smart/plugins/yumchannelsync.py b/smart/plugins/yumchannelsync.py
+index f8107e6..2dc5482 100644
+--- a/smart/plugins/yumchannelsync.py
++++ b/smart/plugins/yumchannelsync.py
+@@ -56,8 +56,9 @@ def _getreleasever():
+
+ rpmroot = sysconf.get("rpm-root", "/")
+ ts = rpmUtils.transaction.initReadOnlyTransaction(root=rpmroot)
+- if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'):
+- ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
++ #_RPMVSF_NOSIGNATURES is not supported in RPMv5
++ #if hasattr(rpm, '_RPMVSF_NOSIGNATURES') and hasattr(rpm, '_RPMVSF_NODIGESTS'):
++ # ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
+ releasever = None
+ # HACK: we're hard-coding the most used distros, will add more if needed
+ idx = ts.dbMatch('provides', 'fedora-release')
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm_git.bb
index d9a908db2..861910cc2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smartpm_git.bb
@@ -13,16 +13,20 @@ SRCNAME = "smart"
SRC_URI = "\
git://github.com/smartpm/smart.git \
- file://smartpm-rpm5-nodig.patch \
file://smart-recommends.patch \
- file://smart-improve-error-reporting.patch \
file://smart-channelsdir.patch \
+ file://smart-rpm-transaction-failure-check.patch \
file://smart-attempt.patch \
file://smart-attempt-fix.patch \
file://smart-add-for-rpm-ignoresize-check.patch \
file://smart-already-installed-message.patch \
file://smart-set-noprogress-for-pycurl.patch \
file://smart-cache.py-getPackages-matches-name-version.patch \
+ file://smart-channel-remove-all.patch \
+ file://smart-locale.patch \
+ file://smartpm-rpm5-support-check-signatures.patch \
+ file://smart-add-deugging-when-targetpath-is-empty.patch \
+ file://channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch \
"
SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"
@@ -53,41 +57,41 @@ inherit distutils
do_install_append() {
# We don't support the following items
- rm -rf ${D}${libdir}/python*/site-packages/smart/backends/slack
- rm -rf ${D}${libdir}/python*/site-packages/smart/backends/arch
- rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt
+ rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/slack
+ rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/arch
+ rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt
# Temporary, debian support in OE is missing the python module
- rm -f ${D}${libdir}/python*/site-packages/smart/plugins/aptchannelsync.py*
- rm -f ${D}${libdir}/python*/site-packages/smart/plugins/debdir.py*
- rm -rf ${D}${libdir}/python*/site-packages/smart/backends/deb
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/aptchannelsync.py*
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/debdir.py*
+ rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/deb
# Disable automatic channel detection
- rm -f ${D}${libdir}/python*/site-packages/smart/plugins/detectsys.py*
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/detectsys.py*
# Disable landscape support
- rm -f ${D}${libdir}/python*/site-packages/smart/plugins/landscape.py*
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/landscape.py*
# Disable urpmi channel support
- rm -f ${D}${libdir}/python*/site-packages/smart/plugins/urpmichannelsync.py*
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/urpmichannelsync.py*
# Disable yum channel support
- rm -f ${D}${libdir}/python*/site-packages/smart/plugins/yumchannelsync.py*
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/yumchannelsync.py*
# Disable zypper channel support
- rm -f ${D}${libdir}/python*/site-packages/smart/plugins/zyppchannelsync.py*
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/zyppchannelsync.py*
if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'rpm', 'rpm', '', d)}" ]; then
- rm -f ${D}${libdir}/python*/site-packages/smart/plugins/rpmdir.py*
- rm -rf ${D}${libdir}/python*/site-packages/smart/backends/rpm
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/smart/plugins/rpmdir.py*
+ rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm
fi
if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'qt4', 'qt4', '', d)}" ]; then
- rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/qt4
+ rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4
fi
if [ -z "${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'gtk', '', d)}" ]; then
- rm -rf ${D}${libdir}/python*/site-packages/smart/interfaces/gtk
+ rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk
fi
}
@@ -127,10 +131,10 @@ RDEPENDS_${PN}-interface-gtk = "gtk+ ${PN}-interface-images"
FILES_smartpm = "${bindir}/smart"
-FILES_${PN}-backend-rpm = "${libdir}/python*/site-packages/smart/backends/rpm"
+FILES_${PN}-backend-rpm = "${PYTHON_SITEPACKAGES_DIR}/smart/backends/rpm"
-FILES_${PN}-interface-qt4 = "${libdir}/python*/site-packages/smart/interfaces/qt4"
-FILES_${PN}-interface-gtk = "${libdir}/python*/site-packages/smart/interfaces/gtk"
+FILES_${PN}-interface-qt4 = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/qt4"
+FILES_${PN}-interface-gtk = "${PYTHON_SITEPACKAGES_DIR}/smart/interfaces/gtk"
FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images"
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
new file mode 100644
index 000000000..d67e6b541
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap.inc
@@ -0,0 +1,19 @@
+SUMMARY = "Python implementation of a sliding window memory map manager"
+DESCRIPTION = "A pure Python implementation of a sliding memory map to \
+help unifying memory mapped access on 32 and 64 bit systems and to help \
+managing resources more efficiently."
+HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
+SECTION = "devel/python"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665b9a75d6afb7709"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/s/smmap/smmap-${PV}.tar.gz"
+SRC_URI[md5sum] = "d7932d5ace206bf4ae15198cf36fb6ab"
+SRC_URI[sha256sum] = "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/smmap/"
+UPSTREAM_CHECK_REGEX = "/smmap/(?P<pver>(\d+[\.\-_]*)+)"
+
+S = "${WORKDIR}/smmap-${PV}"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb
index 5f9cf452e..c118dd8d6 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb
@@ -1,23 +1,5 @@
-SUMMARY = "Python implementation of a sliding window memory map manager"
-DESCRIPTION = "A pure Python implementation of a sliding memory map to \
-help unifying memory mapped access on 32 and 64 bit systems and to help \
-managing resources more efficiently."
-HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
-SECTION = "devel/python"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e910b35b0ef4e1f665b9a75d6afb7709"
-
-SRC_URI = "http://pypi.python.org/packages/source/s/smmap/smmap-${PV}.tar.gz"
-SRC_URI[md5sum] = "d7932d5ace206bf4ae15198cf36fb6ab"
-SRC_URI[sha256sum] = "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/smmap/"
-UPSTREAM_CHECK_REGEX = "/smmap/(?P<pver>(\d+[\.\-_]*)+)"
-
-S = "${WORKDIR}/smmap-${PV}"
+require python-smmap.inc
inherit setuptools
RDEPENDS_${PN} += "python-codecs python-mmap python-lang"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc b/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
index f4818c6a8..79a431c7e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python.inc
@@ -5,12 +5,12 @@ SECTION = "devel/python"
# bump this on every change in contrib/python/generate-manifest-2.7.py
INC_PR = "r1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
-SRC_URI[md5sum] = "1dbcc848b4cd8399a8199d000f9f823c"
-SRC_URI[sha256sum] = "962b4c45af50124ea61f11a30deb4342fc0bc21126790fa1d7f6c79809413f46"
+SRC_URI[md5sum] = "57dffcee9cee8bb2ab5f82af1d8e9a69"
+SRC_URI[sha256sum] = "d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978"
# python recipe is actually python 2.x
# also, exclude pre-releases for both python 2.x and 3.x
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch
new file mode 100644
index 000000000..502f84980
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch
@@ -0,0 +1,51 @@
+From 4cdf2e9df13c6327fcc94d53e4953005543aef3d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 6 Apr 2016 17:43:02 +0300
+Subject: [PATCH 01/10] distutils: set the prefix to be inside staging
+ directory
+
+The proper prefix is inside our staging area.
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+Signed-off-by: Phil Blundell <philb@gnu.org>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Lib/distutils/sysconfig.py | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index de7da1d..f3aacf7 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -75,7 +75,7 @@ def get_python_inc(plat_specific=0, prefix=None):
+ sys.exec_prefix -- i.e., ignore 'plat_specific'.
+ """
+ if prefix is None:
+- prefix = plat_specific and EXEC_PREFIX or PREFIX
++ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
+
+ if os.name == "posix":
+ if python_build:
+@@ -115,12 +115,16 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
+ If 'prefix' is supplied, use it instead of sys.prefix or
+ sys.exec_prefix -- i.e., ignore 'plat_specific'.
+ """
++ lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
+ if prefix is None:
+- prefix = plat_specific and EXEC_PREFIX or PREFIX
++ if plat_specific:
++ prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
++ else:
++ prefix = PREFIX
+
+ if os.name == "posix":
+ libpython = os.path.join(prefix,
+- "lib", "python" + get_python_version())
++ lib_basename, "python" + get_python_version())
+ if standard_lib:
+ return libpython
+ else:
+--
+2.8.0.rc3
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
index 1257ca655..b2a8c3b5a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
@@ -7,13 +7,13 @@ Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Rebased for python-2.7.9
-Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-Index: Python-2.7.9/Makefile.pre.in
+Index: Python-2.7.12/Makefile.pre.in
===================================================================
---- Python-2.7.9.orig/Makefile.pre.in
-+++ Python-2.7.9/Makefile.pre.in
-@@ -234,6 +234,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
+--- Python-2.7.12.orig/Makefile.pre.in
++++ Python-2.7.12/Makefile.pre.in
+@@ -246,6 +246,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
@@ -21,7 +21,7 @@ Index: Python-2.7.9/Makefile.pre.in
PSRCS= \
Parser/acceler.c \
-@@ -445,7 +446,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
+@@ -513,7 +514,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(BUILDPYTHON) pybuilddir.txt
@@ -30,16 +30,16 @@ Index: Python-2.7.9/Makefile.pre.in
# Create build directory and generate the sysconfig build-time data there.
# pybuilddir.txt contains the name of the build dir and is used for
-@@ -611,7 +612,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p
- $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
- @$(MKDIR_P) Include
- $(MAKE) $(PGEN)
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
- $(MAKE) $(GRAMMAR_H)
- touch $(GRAMMAR_C)
-@@ -1043,27 +1044,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+@@ -684,7 +685,7 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
+ @$(MKDIR_P) Include
+ # Avoid copying the file onto itself for an in-tree build
+ if test "$(cross_compiling)" != "yes"; then \
+- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
+ else \
+ cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \
+ mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \
+@@ -1133,27 +1134,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
fi
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
@@ -73,11 +73,11 @@ Index: Python-2.7.9/Makefile.pre.in
# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
-Index: Python-2.7.9/setup.py
+Index: Python-2.7.12/setup.py
===================================================================
---- Python-2.7.9.orig/setup.py
-+++ Python-2.7.9/setup.py
-@@ -334,6 +334,7 @@ class PyBuildExt(build_ext):
+--- Python-2.7.12.orig/setup.py
++++ Python-2.7.12/setup.py
+@@ -350,6 +350,7 @@ class PyBuildExt(build_ext):
self.failed.append(ext.name)
self.announce('*** WARNING: renaming "%s" since importing it'
' failed: %s' % (ext.name, why), level=3)
@@ -85,7 +85,7 @@ Index: Python-2.7.9/setup.py
assert not self.inplace
basename, tail = os.path.splitext(ext_filename)
newname = basename + "_failed" + tail
-@@ -558,6 +559,9 @@ class PyBuildExt(build_ext):
+@@ -574,6 +575,9 @@ class PyBuildExt(build_ext):
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
index e452cb6ac..435b31901 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch
@@ -11,7 +11,7 @@ Nitin A Kamble <nitin.a.kamble@intel.com>
2011/09/29
Rebased for python 2.7.2
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/CVE-2016-5636.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/CVE-2016-5636.patch
new file mode 100644
index 000000000..9a3747145
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/CVE-2016-5636.patch
@@ -0,0 +1,44 @@
+
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1453357424 28800
+# Node ID 985fc64c60d6adffd1138b6cc46df388ca91ca5d
+# Parent 7ec954b9fc54448a35b56d271340ba109eb381b9
+prevent buffer overflow in get_data (closes #26171)
+
+Upstream-Status: Backport
+https://hg.python.org/cpython/rev/985fc64c60d6
+
+CVE: CVE-2016-5636
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: Python-2.7.11/Misc/NEWS
+===================================================================
+--- Python-2.7.11.orig/Misc/NEWS
++++ Python-2.7.11/Misc/NEWS
+@@ -7,6 +7,9 @@ What's New in Python 2.7.11?
+
+ *Release date: 2015-12-05*
+
++- Issue #26171: Fix possible integer overflow and heap corruption in
++ zipimporter.get_data().
++
+ Library
+ -------
+
+Index: Python-2.7.11/Modules/zipimport.c
+===================================================================
+--- Python-2.7.11.orig/Modules/zipimport.c
++++ Python-2.7.11/Modules/zipimport.c
+@@ -895,6 +895,11 @@ get_data(char *archive, PyObject *toc_en
+ PyMarshal_ReadShortFromFile(fp); /* local header size */
+ file_offset += l; /* Start of file data */
+
++ if (data_size > LONG_MAX - 1) {
++ fclose(fp);
++ PyErr_NoMemory();
++ return NULL;
++ }
+ raw_data = PyString_FromStringAndSize((char *)NULL, compress == 0 ?
+ data_size : data_size + 1);
+ if (raw_data == NULL) {
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch
index e9bae324f..8012245af 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/avoid_parallel_make_races_on_pgen.patch
@@ -4,8 +4,8 @@ Avoids parallel make races linking errors when making Parser/PGEN
- Implements Richard Purdie's idea
-Signed-Off-By: Richard Purdie <richard.purdie@linuxfoundation.org>
-Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Index: Python-2.7.9/Makefile.pre.in
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
index e4262d9ef..5f7309367 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch
@@ -4,15 +4,15 @@ This patch fixes issuing with different libdir like lib64.
This patch makes the native python binary modules findable
in the install process of the host python.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Date: 2012/03/14
Updated for python 2.7.3
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Date: 2012/05/01
Rebased for python-2.7.9
-Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Index: Python-2.7.9/Lib/sysconfig.py
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
index 0bfa0d2cf..b169133d7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/multilib.patch
@@ -1,11 +1,11 @@
Rebased for python-2.7.9
-Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-Index: Python-2.7.9/configure.ac
+Index: Python-2.7.12/configure.ac
===================================================================
---- Python-2.7.9.orig/configure.ac
-+++ Python-2.7.9/configure.ac
-@@ -736,6 +736,10 @@ SunOS*)
+--- Python-2.7.12.orig/configure.ac
++++ Python-2.7.12/configure.ac
+@@ -756,6 +756,10 @@ SunOS*)
;;
esac
@@ -16,10 +16,10 @@ Index: Python-2.7.9/configure.ac
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
-Index: Python-2.7.9/Include/pythonrun.h
+Index: Python-2.7.12/Include/pythonrun.h
===================================================================
---- Python-2.7.9.orig/Include/pythonrun.h
-+++ Python-2.7.9/Include/pythonrun.h
+--- Python-2.7.12.orig/Include/pythonrun.h
++++ Python-2.7.12/Include/pythonrun.h
@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -28,10 +28,10 @@ Index: Python-2.7.9/Include/pythonrun.h
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-2.7.9/Lib/distutils/command/install.py
+Index: Python-2.7.12/Lib/distutils/command/install.py
===================================================================
---- Python-2.7.9.orig/Lib/distutils/command/install.py
-+++ Python-2.7.9/Lib/distutils/command/install.py
+--- Python-2.7.12.orig/Lib/distutils/command/install.py
++++ Python-2.7.12/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
@@ -50,10 +50,10 @@ Index: Python-2.7.9/Lib/distutils/command/install.py
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-2.7.9/Lib/distutils/sysconfig.py
+Index: Python-2.7.12/Lib/distutils/sysconfig.py
===================================================================
---- Python-2.7.9.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.9/Lib/distutils/sysconfig.py
+--- Python-2.7.12.orig/Lib/distutils/sysconfig.py
++++ Python-2.7.12/Lib/distutils/sysconfig.py
@@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
@@ -68,11 +68,11 @@ Index: Python-2.7.9/Lib/distutils/sysconfig.py
if standard_lib:
return libpython
else:
-Index: Python-2.7.9/Lib/pydoc.py
+Index: Python-2.7.12/Lib/pydoc.py
===================================================================
---- Python-2.7.9.orig/Lib/pydoc.py
-+++ Python-2.7.9/Lib/pydoc.py
-@@ -383,7 +383,7 @@ class Doc:
+--- Python-2.7.12.orig/Lib/pydoc.py
++++ Python-2.7.12/Lib/pydoc.py
+@@ -384,7 +384,7 @@ class Doc:
docloc = os.environ.get("PYTHONDOCS",
"http://docs.python.org/library")
@@ -81,10 +81,10 @@ Index: Python-2.7.9/Lib/pydoc.py
"python"+sys.version[0:3])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-2.7.9/Lib/site.py
+Index: Python-2.7.12/Lib/site.py
===================================================================
---- Python-2.7.9.orig/Lib/site.py
-+++ Python-2.7.9/Lib/site.py
+--- Python-2.7.12.orig/Lib/site.py
++++ Python-2.7.12/Lib/site.py
@@ -288,13 +288,18 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -107,10 +107,10 @@ Index: Python-2.7.9/Lib/site.py
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
-Index: Python-2.7.9/Lib/sysconfig.py
+Index: Python-2.7.12/Lib/sysconfig.py
===================================================================
---- Python-2.7.9.orig/Lib/sysconfig.py
-+++ Python-2.7.9/Lib/sysconfig.py
+--- Python-2.7.12.orig/Lib/sysconfig.py
++++ Python-2.7.12/Lib/sysconfig.py
@@ -7,10 +7,10 @@ from os.path import pardir, realpath
_INSTALL_SCHEMES = {
@@ -139,10 +139,10 @@ Index: Python-2.7.9/Lib/sysconfig.py
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
-Index: Python-2.7.9/Lib/test/test_dl.py
+Index: Python-2.7.12/Lib/test/test_dl.py
===================================================================
---- Python-2.7.9.orig/Lib/test/test_dl.py
-+++ Python-2.7.9/Lib/test/test_dl.py
+--- Python-2.7.12.orig/Lib/test/test_dl.py
++++ Python-2.7.12/Lib/test/test_dl.py
@@ -4,10 +4,11 @@
import unittest
from test.test_support import verbose, import_module
@@ -157,11 +157,11 @@ Index: Python-2.7.9/Lib/test/test_dl.py
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
-Index: Python-2.7.9/Lib/test/test_site.py
+Index: Python-2.7.12/Lib/test/test_site.py
===================================================================
---- Python-2.7.9.orig/Lib/test/test_site.py
-+++ Python-2.7.9/Lib/test/test_site.py
-@@ -241,12 +241,16 @@ class HelperFunctionsTests(unittest.Test
+--- Python-2.7.12.orig/Lib/test/test_site.py
++++ Python-2.7.12/Lib/test/test_site.py
+@@ -246,12 +246,16 @@ class HelperFunctionsTests(unittest.Test
self.assertEqual(dirs[2], wanted)
elif os.sep == '/':
# OS X non-framwework builds, Linux, FreeBSD, etc
@@ -181,10 +181,10 @@ Index: Python-2.7.9/Lib/test/test_site.py
else:
# other platforms
self.assertEqual(len(dirs), 2)
-Index: Python-2.7.9/Lib/trace.py
+Index: Python-2.7.12/Lib/trace.py
===================================================================
---- Python-2.7.9.orig/Lib/trace.py
-+++ Python-2.7.9/Lib/trace.py
+--- Python-2.7.12.orig/Lib/trace.py
++++ Python-2.7.12/Lib/trace.py
@@ -754,10 +754,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -198,11 +198,11 @@ Index: Python-2.7.9/Lib/trace.py
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-2.7.9/Makefile.pre.in
+Index: Python-2.7.12/Makefile.pre.in
===================================================================
---- Python-2.7.9.orig/Makefile.pre.in
-+++ Python-2.7.9/Makefile.pre.in
-@@ -87,6 +87,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
+--- Python-2.7.12.orig/Makefile.pre.in
++++ Python-2.7.12/Makefile.pre.in
+@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -210,7 +210,7 @@ Index: Python-2.7.9/Makefile.pre.in
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -106,7 +107,7 @@ LIBDIR= @libdir@
+@@ -111,7 +112,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -219,7 +219,7 @@ Index: Python-2.7.9/Makefile.pre.in
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-@@ -598,6 +599,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -670,6 +671,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -227,7 +227,7 @@ Index: Python-2.7.9/Makefile.pre.in
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
-@@ -640,7 +642,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
+@@ -721,7 +723,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -236,25 +236,25 @@ Index: Python-2.7.9/Makefile.pre.in
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-2.7.9/Modules/getpath.c
+Index: Python-2.7.12/Modules/getpath.c
===================================================================
---- Python-2.7.9.orig/Modules/getpath.c
-+++ Python-2.7.9/Modules/getpath.c
-@@ -116,9 +116,11 @@
- #define EXEC_PREFIX PREFIX
+--- Python-2.7.12.orig/Modules/getpath.c
++++ Python-2.7.12/Modules/getpath.c
+@@ -100,6 +100,13 @@
+ #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
+#define LIB_PYTHON LIB "/python" VERSION
+
- #ifndef PYTHONPATH
--#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
-- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
++#ifndef PYTHONPATH
+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
- #endif
-
++#endif
++
#ifndef LANDMARK
-@@ -129,7 +131,7 @@ static char prefix[MAXPATHLEN+1];
+ #define LANDMARK "os.py"
+ #endif
+@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1];
static char exec_prefix[MAXPATHLEN+1];
static char progpath[MAXPATHLEN+1];
static char *module_search_path = NULL;
@@ -263,10 +263,10 @@ Index: Python-2.7.9/Modules/getpath.c
static void
reduce(char *dir)
-Index: Python-2.7.9/Python/getplatform.c
+Index: Python-2.7.12/Python/getplatform.c
===================================================================
---- Python-2.7.9.orig/Python/getplatform.c
-+++ Python-2.7.9/Python/getplatform.c
+--- Python-2.7.12.orig/Python/getplatform.c
++++ Python-2.7.12/Python/getplatform.c
@@ -10,3 +10,13 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -281,10 +281,10 @@ Index: Python-2.7.9/Python/getplatform.c
+{
+ return LIB;
+}
-Index: Python-2.7.9/Python/sysmodule.c
+Index: Python-2.7.12/Python/sysmodule.c
===================================================================
---- Python-2.7.9.orig/Python/sysmodule.c
-+++ Python-2.7.9/Python/sysmodule.c
+--- Python-2.7.12.orig/Python/sysmodule.c
++++ Python-2.7.12/Python/sysmodule.c
@@ -1437,6 +1437,8 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python/python-fix-CVE-2016-1000110.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python/python-fix-CVE-2016-1000110.patch
new file mode 100644
index 000000000..97888e2b0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python/python-fix-CVE-2016-1000110.patch
@@ -0,0 +1,162 @@
+From cb25fbd5abc0f4eb07dbb8ea819e9c26bda4fc99 Mon Sep 17 00:00:00 2001
+From: Senthil Kumaran <senthil@uthcode.com>
+Date: Sat, 30 Jul 2016 05:49:53 -0700
+Subject: [PATCH] python: fix CVE-2016-1000110
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Prevent HTTPoxy attack (CVE-2016-1000110)
+
+Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which
+indicates that the script is in CGI mode.
+
+Issue reported and patch contributed by RĂ©mi Rampin.
+
+Backport patch from https://hg.python.org/cpython/rev/ba915d561667/
+
+Upstream-Status: Backport
+CVE: CVE-2016-1000110
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ Doc/howto/urllib2.rst | 5 +++++
+ Doc/library/urllib.rst | 10 ++++++++++
+ Doc/library/urllib2.rst | 5 +++++
+ Lib/test/test_urllib.py | 12 ++++++++++++
+ Lib/urllib.py | 9 +++++++++
+ Misc/ACKS | 1 +
+ Misc/NEWS | 4 ++++
+ 7 files changed, 46 insertions(+)
+
+diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst
+index 6bb06d4..5cf2c0c 100644
+--- a/Doc/howto/urllib2.rst
++++ b/Doc/howto/urllib2.rst
+@@ -525,6 +525,11 @@ setting up a `Basic Authentication`_ handler: ::
+ through a proxy. However, this can be enabled by extending urllib2 as
+ shown in the recipe [#]_.
+
++.. note::
++
++ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see
++ the documentation on :func:`~urllib.getproxies`.
++
+
+ Sockets and Layers
+ ==================
+diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst
+index 3b5dc16..bddcba9 100644
+--- a/Doc/library/urllib.rst
++++ b/Doc/library/urllib.rst
+@@ -295,6 +295,16 @@ Utility functions
+ If both lowercase and uppercase environment variables exist (and disagree),
+ lowercase is preferred.
+
++ .. note::
++
++ If the environment variable ``REQUEST_METHOD`` is set, which usually
++ indicates your script is running in a CGI environment, the environment
++ variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
++ because that variable can be injected by a client using the "Proxy:"
++ HTTP header. If you need to use an HTTP proxy in a CGI environment,
++ either use ``ProxyHandler`` explicitly, or make sure the variable name
++ is in lowercase (or at least the ``_proxy`` suffix).
++
+ .. note::
+ urllib also exposes certain utility functions like splittype, splithost and
+ others parsing URL into various components. But it is recommended to use
+diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst
+index 8a4c80e..b808b98 100644
+--- a/Doc/library/urllib2.rst
++++ b/Doc/library/urllib2.rst
+@@ -229,6 +229,11 @@ The following classes are provided:
+
+ To disable autodetected proxy pass an empty dictionary.
+
++ .. note::
++
++ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set;
++ see the documentation on :func:`~urllib.getproxies`.
++
+
+ .. class:: HTTPPasswordMgr()
+
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index 434d533..27a1d38 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -170,6 +170,18 @@ class ProxyTests(unittest.TestCase):
+ self.assertTrue(urllib.proxy_bypass_environment('anotherdomain.com:8888'))
+ self.assertTrue(urllib.proxy_bypass_environment('newdomain.com:1234'))
+
++ def test_proxy_cgi_ignore(self):
++ try:
++ self.env.set('HTTP_PROXY', 'http://somewhere:3128')
++ proxies = urllib.getproxies_environment()
++ self.assertEqual('http://somewhere:3128', proxies['http'])
++ self.env.set('REQUEST_METHOD', 'GET')
++ proxies = urllib.getproxies_environment()
++ self.assertNotIn('http', proxies)
++ finally:
++ self.env.unset('REQUEST_METHOD')
++ self.env.unset('HTTP_PROXY')
++
+ def test_proxy_bypass_environment_host_match(self):
+ bypass = urllib.proxy_bypass_environment
+ self.env.set('NO_PROXY',
+diff --git a/Lib/urllib.py b/Lib/urllib.py
+index 139fab9..c3ba2c9 100644
+--- a/Lib/urllib.py
++++ b/Lib/urllib.py
+@@ -1380,12 +1380,21 @@ def getproxies_environment():
+ If you need a different way, you can pass a proxies dictionary to the
+ [Fancy]URLopener constructor.
+ """
++ # Get all variables
+ proxies = {}
+ for name, value in os.environ.items():
+ name = name.lower()
+ if value and name[-6:] == '_proxy':
+ proxies[name[:-6]] = value
+
++ # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY
++ # (non-all-lowercase) as it may be set from the web server by a "Proxy:"
++ # header from the client
++ # If "proxy" is lowercase, it will still be used thanks to the next block
++ if 'REQUEST_METHOD' in os.environ:
++ proxies.pop('http', None)
++
++ # Get lowercase variables
+ for name, value in os.environ.items():
+ if name[-6:] == '_proxy':
+ name = name.lower()
+diff --git a/Misc/ACKS b/Misc/ACKS
+index ee3a465..9c374b7 100644
+--- a/Misc/ACKS
++++ b/Misc/ACKS
+@@ -1121,6 +1121,7 @@ Burton Radons
+ Jeff Ramnani
+ Varpu Rantala
+ Brodie Rao
++RĂ©mi Rampin
+ Senko Rasic
+ Antti Rasinen
+ Nikolaus Rath
+diff --git a/Misc/NEWS b/Misc/NEWS
+index 4ab3a70..cc2f65b 100644
+--- a/Misc/NEWS
++++ b/Misc/NEWS
+@@ -187,6 +187,10 @@ Library
+ - Issue #26644: Raise ValueError rather than SystemError when a negative
+ length is passed to SSLSocket.recv() or read().
+
++- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
++ HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates
++ that the script is in CGI mode.
++
+ - Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes
+ instead of up to 1024.
+
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
new file mode 100644
index 000000000..54a30f549
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-async_0.6.2.bb
@@ -0,0 +1,6 @@
+require python-async.inc
+
+inherit setuptools3
+
+RDEPENDS_${PN} += "python3-threading python3-lang"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
new file mode 100644
index 000000000..de5a01c7f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-dbus_1.2.4.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Python bindings for the DBus inter-process communication system"
+SECTION = "devel/python"
+HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0b83047ce9e948b67c0facc5f233476a"
+DEPENDS = "expat dbus dbus-glib virtual/libintl"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
+"
+
+SRC_URI[md5sum] = "7372a588c83a7232b4e08159bfd48fe5"
+SRC_URI[sha256sum] = "e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc"
+S = "${WORKDIR}/dbus-python-${PV}"
+
+inherit distutils3-base autotools pkgconfig
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native"
+PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native"
+
+RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml"
+
+FILES_${PN}-dev += "${libdir}/pkgconfig"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.12.bb
new file mode 100644
index 000000000..e78fa3bbc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-docutils_0.12.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Text processing system for documentation"
+HOMEPAGE = "http://docutils.sourceforge.net"
+SECTION = "devel/python"
+LICENSE = "PSF & BSD-2-Clause & GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=a722fbdc20347db7b69223594dd54574"
+
+DEPENDS = "python3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
+SRC_URI[md5sum] = "4622263b62c5c771c03502afa3157768"
+SRC_URI[sha256sum] = "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb89596fa"
+
+S = "${WORKDIR}/docutils-${PV}"
+
+inherit distutils3
+
+BBCLASSEXTEND = "native"
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.0.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.0.7.bb
new file mode 100644
index 000000000..c9fe9baa2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-git_2.0.7.bb
@@ -0,0 +1,7 @@
+require python-git.inc
+
+DEPENDS = "python3-gitdb"
+
+inherit setuptools3
+
+RDEPENDS_${PN} += "python3-gitdb python3-lang python3-io python3-shell python3-math python3-re python3-subprocess python3-stringold python3-unixadmin python3-enum python3-logging python3-datetime python3-netclient"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
new file mode 100644
index 000000000..80d9d469a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-gitdb_0.6.4.bb
@@ -0,0 +1,7 @@
+require python-gitdb.inc
+
+DEPENDS = "python3-async python3-smmap"
+
+inherit distutils3
+
+RDEPENDS_${PN} += "python3-smmap python3-async python3-mmap python3-lang python3-io python3-shell python3-crypt python3-compression"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.4.bb
new file mode 100644
index 000000000..2b50ffd08
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-mako_1.0.4.bb
@@ -0,0 +1,11 @@
+require python-mako.inc
+
+inherit setuptools3
+
+RDEPENDS_${PN} = "python3-threading \
+ python3-netclient \
+ python3-html \
+"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.1.bb
deleted file mode 100644
index 7bad11aaf..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.1.bb
+++ /dev/null
@@ -1,79 +0,0 @@
-require recipes-devtools/python/python.inc
-
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.5"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://12-distutils-prefix-is-inside-staging-area.patch \
-file://python-config.patch \
-file://000-cross-compile.patch \
-file://020-dont-compile-python-files.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://110-enable-zlib.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://python-3.3-multilib.patch \
-file://03-fix-tkinter-detection.patch \
-file://avoid_warning_about_tkinter.patch \
-file://shutil-follow-symlink-fix.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://sysroot-include-headers.patch \
-file://unixccompiler.patch \
-${DISTRO_SRC_URI} \
-file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
-file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
-file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
-"
-SRC_URI[md5sum] = "e9ea6f2623fffcdd871b7b19113fde80"
-SRC_URI[sha256sum] = "c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
-
-# exclude pre-releases for both python 2.x and 3.x
-UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-
-S = "${WORKDIR}/Python-${PV}"
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
-
-inherit native
-
-RPROVIDES += "python3-distutils-native python3-compression-native python3-textutils-native python3-core-native"
-
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
-
-EXTRA_OEMAKE = '\
- BUILD_SYS="" \
- HOST_SYS="" \
- LIBC="" \
- STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
- STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
-'
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
- autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_install() {
- install -d ${D}${libdir}/pkgconfig
- oe_runmake 'DESTDIR=${D}' install
- if [ -e ${WORKDIR}/sitecustomize.py ]; then
- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
- fi
- install -d ${D}${bindir}/${PN}
- install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
- # Make sure we use /usr/bin/env python
- for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
- sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
- done
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb
new file mode 100644
index 000000000..594f15c7c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.2.bb
@@ -0,0 +1,98 @@
+require recipes-devtools/python/python.inc
+
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.5"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+file://12-distutils-prefix-is-inside-staging-area.patch \
+file://python-config.patch \
+file://000-cross-compile.patch \
+file://020-dont-compile-python-files.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://130-readline-setup.patch \
+file://150-fix-setupterm.patch \
+file://python-3.3-multilib.patch \
+file://03-fix-tkinter-detection.patch \
+file://avoid_warning_about_tkinter.patch \
+file://shutil-follow-symlink-fix.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://sysroot-include-headers.patch \
+file://unixccompiler.patch \
+${DISTRO_SRC_URI} \
+file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
+file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
+"
+
+SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e"
+SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+
+# exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
+
+S = "${WORKDIR}/Python-${PV}"
+
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
+
+inherit native
+
+RPROVIDES += " \
+ python3-compression-native \
+ python3-core-native \
+ python3-distutils-native \
+ python3-email-native \
+ python3-importlib-native \
+ python3-io-native \
+ python3-json-native \
+ python3-lang-native \
+ python3-misc-native \
+ python3-netclient-native \
+ python3-netserver-native \
+ python3-numbers-native \
+ python3-pkgutil-native \
+ python3-pprint-native \
+ python3-re-native \
+ python3-shell-native \
+ python3-subprocess-native \
+ python3-textutils-native \
+ python3-threading-native \
+ python3-unittest-native \
+"
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
+
+EXTRA_OEMAKE = '\
+ LIBC="" \
+ STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+ STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+'
+
+# No ctypes option for python 3
+PYTHONLSBOPTS = ""
+
+do_configure_append() {
+ autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_install() {
+ install -d ${D}${libdir}/pkgconfig
+ oe_runmake 'DESTDIR=${D}' install
+ if [ -e ${WORKDIR}/sitecustomize.py ]; then
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+ fi
+ install -d ${D}${bindir}/${PN}
+ install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+ # Make sure we use /usr/bin/env python
+ for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+ sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
+ done
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
new file mode 100644
index 000000000..99bba4403
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-nose_1.3.7.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Extends Python unittest to make testing easier"
+DESCRIPTION = "nose extends the test loading and running features of unittest, \
+making it easier to write, find and run tests."
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/n/nose/nose-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
+SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
+UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
+
+S = "${WORKDIR}/nose-${PV}"
+
+inherit setuptools3
+
+RDEPENDS_${PN}_class-target = "\
+ python3-unittest \
+ "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_8.0.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_8.0.0.bb
deleted file mode 100644
index 834ecda6d..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_8.0.0.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "The PyPA recommended tool for installing Python packages"
-sHOMEPAGEsss = "https://pypi.python.org/pypi/pip"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
-
-SRCNAME = "pip"
-DEPENDS += "python3 python3-setuptools-native"
-
-SRC_URI = " \
- http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
-"
-SRC_URI[md5sum] = "5601c4323464add1482291634142894d"
-SRC_URI[sha256sum] = "90112b296152f270cb8dddcd19b7b87488d9e002e8cf622e14c4da9c2f6319b1"
-
-UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils3
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
-do_install_prepend() {
- install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
-}
-
-# Use setuptools site.py instead, avoid shared state issue
-do_install_append() {
- rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/site.py
- rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/__pycache__/site.cpython-*.pyc
-
- # Install as pip3 and leave pip2 as default
- rm ${D}/${bindir}/pip
-
- # Installed eggs need to be passed directly to the interpreter via a pth file
- echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth
-}
-
-RDEPENDS_${PN} = "\
- python3-compile \
- python3-io \
- python3-json \
- python3-netserver \
- python3-setuptools \
- python3-unixadmin \
- python3-xmlrpc \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_8.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_8.1.2.bb
new file mode 100644
index 000000000..eefb4cb79
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pip_8.1.2.bb
@@ -0,0 +1,47 @@
+SUMMARY = "The PyPA recommended tool for installing Python packages"
+sHOMEPAGEsss = "https://pypi.python.org/pypi/pip"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
+
+SRCNAME = "pip"
+DEPENDS += "python3 python3-setuptools-native"
+
+SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "87083c0b9867963b29f7aba3613e8f4a"
+SRC_URI[sha256sum] = "4d24b03ffa67638a3fa931c09fd9e0273ffa904e95ebebe7d4b1a54c93d7b732"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit distutils3
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
+
+do_install_prepend() {
+ install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+}
+
+# Use setuptools site.py instead, avoid shared state issue
+do_install_append() {
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/site.py
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/__pycache__/site.cpython-*.pyc
+
+ # Install as pip3 and leave pip2 as default
+ rm ${D}/${bindir}/pip
+
+ # Installed eggs need to be passed directly to the interpreter via a pth file
+ echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth
+}
+
+RDEPENDS_${PN} = "\
+ python3-compile \
+ python3-io \
+ python3-json \
+ python3-netserver \
+ python3-setuptools \
+ python3-unixadmin \
+ python3-xmlrpc \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
new file mode 100644
index 000000000..f9031b3bc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Python bindings for the Cairo canvas library"
+HOMEPAGE = "http://cairographics.org/pycairo"
+BUGTRACKER = "http://bugs.freedesktop.org"
+SECTION = "python-devel"
+LICENSE = "LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+# cairo >= 1.8.8
+DEPENDS = "cairo"
+PR = "r2"
+
+SRC_URI = "http://cairographics.org/releases/pycairo-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "e6fd3f2f1e6a72e0db0868c4985669c5"
+SRC_URI[sha256sum] = "9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be"
+
+S = "${WORKDIR}/pycairo-${PV}"
+
+inherit distutils3 pkgconfig
+
+BBCLASSEXTEND = "native"
+
+do_configure() {
+ PYTHON=${PYTHON} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
+}
+
+do_compile() {
+ ./waf build ${PARALLEL_MAKE}
+}
+
+do_install() {
+ ./waf install
+ sed \
+ -e 's:@prefix@:${prefix}:' \
+ -e 's:@VERSION@:${PV}:' \
+ -e 's:@includedir@:${includedir}:' \
+ py3cairo.pc.in > py3cairo.pc
+ install -m 0644 py3cairo.pc ${D}${libdir}/pkgconfig/
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
index a391f7e74..a391f7e74 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.20.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.20.1.bb
new file mode 100644
index 000000000..cda16f17a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-pygobject_3.20.1.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Python GObject bindings"
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
+
+inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection upstream-version-is-even
+
+DEPENDS += "python3 glib-2.0"
+
+SRCNAME="pygobject"
+SRC_URI = " \
+ http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
+ file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \
+"
+
+SRC_URI[md5sum] = "4354c6283b135f859563b72457f6a321"
+SRC_URI[sha256sum] = "3d261005d6fed6a92ac4c25f283792552f7dad865d1b7e0c03c2b84c04dbd745"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF = "--disable-cairo"
+
+RDEPENDS_${PN} += "python3-setuptools python3-importlib"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_19.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_19.4.bb
deleted file mode 100644
index fb2931c3f..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_19.4.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-require python-setuptools.inc
-
-DEPENDS += "python3"
-DEPENDS_class-native += "python3-native"
-
-inherit distutils3
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
-# The installer puts the wrong path in the setuptools.pth file. Correct it.
-do_install_append() {
- rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
- mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
- echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
-}
-
-RDEPENDS_${PN} = "\
- python3-distutils \
- python3-compression \
-"
-RDEPENDS_${PN}_class-target = "\
- python3-ctypes \
- python3-distutils \
- python3-email \
- python3-importlib \
- python3-numbers \
- python3-compression \
- python3-shell \
- python3-subprocess \
- python3-textutils \
- python3-pkgutil \
- python3-threading \
- python3-misc \
- python3-unittest \
- python3-xml \
-"
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
new file mode 100644
index 000000000..65af6f0da
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
@@ -0,0 +1,37 @@
+require python-setuptools.inc
+
+DEPENDS += "python3"
+DEPENDS_class-native += "python3-native"
+
+inherit distutils3
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${PYTHON_SITEPACKAGES_DIR}"
+
+# The installer puts the wrong path in the setuptools.pth file. Correct it.
+do_install_append() {
+ rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+ mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
+ echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+}
+
+RDEPENDS_${PN} = "\
+ python3-distutils \
+ python3-compression \
+"
+RDEPENDS_${PN}_class-target = "\
+ python3-ctypes \
+ python3-distutils \
+ python3-email \
+ python3-importlib \
+ python3-numbers \
+ python3-compression \
+ python3-shell \
+ python3-subprocess \
+ python3-textutils \
+ python3-pkgutil \
+ python3-threading \
+ python3-misc \
+ python3-unittest \
+ python3-xml \
+"
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb
new file mode 100644
index 000000000..38a47b77d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-six_1.10.0.bb
@@ -0,0 +1,4 @@
+inherit setuptools3
+require python-six.inc
+
+RDEPENDS_${PN} += "python3-io"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
new file mode 100644
index 000000000..9f8a26d79
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3-smmap_0.9.0.bb
@@ -0,0 +1,5 @@
+require python-smmap.inc
+
+inherit setuptools3
+
+RDEPENDS_${PN} += "python3-codecs python3-mmap python3-lang"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch
index 28fe70adb..2d822218f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch
@@ -9,19 +9,19 @@ Upstream-Status: Inappropriate[Configuration Specific]
Makefile.pre.in | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
-Index: Python-3.5.1/Makefile.pre.in
+Index: Python-3.5.2/Makefile.pre.in
===================================================================
---- Python-3.5.1.orig/Makefile.pre.in
-+++ Python-3.5.1/Makefile.pre.in
+--- Python-3.5.2.orig/Makefile.pre.in
++++ Python-3.5.2/Makefile.pre.in
@@ -220,6 +220,7 @@ LIBOBJS= @LIBOBJS@
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
+HOSTPYTHON= $(BUILDPYTHON)
+ cross_compiling=@cross_compiling@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
- _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
-@@ -276,6 +277,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
+@@ -279,6 +280,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
@@ -29,7 +29,7 @@ Index: Python-3.5.1/Makefile.pre.in
PSRCS= \
Parser/acceler.c \
-@@ -506,7 +508,7 @@ build_all_generate_profile:
+@@ -509,7 +511,7 @@ build_all_generate_profile:
run_profile_task:
: # FIXME: can't run for a cross build
@@ -38,16 +38,16 @@ Index: Python-3.5.1/Makefile.pre.in
build_all_merge_profile:
$(LLVM_PROF_MERGER)
-@@ -779,7 +781,7 @@ $(IO_OBJS): $(IO_H)
-
- $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
- @$(MKDIR_P) Include
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): $(GRAMMAR_H)
- touch $(GRAMMAR_C)
-
-@@ -968,7 +970,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/pyth
+@@ -792,7 +794,7 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
+ @$(MKDIR_P) Include
+ # Avoid copying the file onto itself for an in-tree build
+ if test "$(cross_compiling)" != "yes"; then \
+- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
+ else \
+ cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \
+ mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \
+@@ -990,7 +992,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/pyth
######################################################################
TESTOPTS= $(EXTRATESTOPTS)
@@ -56,7 +56,7 @@ Index: Python-3.5.1/Makefile.pre.in
TESTRUNNER= $(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
TESTTIMEOUT= 3600
-@@ -1455,7 +1457,7 @@ frameworkinstallstructure: $(LDLIBRARY)
+@@ -1481,7 +1483,7 @@ frameworkinstallstructure: $(LDLIBRARY)
fi; \
done
$(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
@@ -65,7 +65,7 @@ Index: Python-3.5.1/Makefile.pre.in
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1521,7 +1523,7 @@ config.status: $(srcdir)/configure
+@@ -1547,7 +1549,7 @@ config.status: $(srcdir)/configure
# Run reindent on the library
reindent:
@@ -74,7 +74,7 @@ Index: Python-3.5.1/Makefile.pre.in
# Rerun configure with the same options as it was run last time,
# provided the config.status script exists
-@@ -1656,7 +1658,7 @@ funny:
+@@ -1683,7 +1685,7 @@ funny:
# Perform some verification checks on any modified files.
patchcheck: all
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/110-enable-zlib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/110-enable-zlib.patch
deleted file mode 100644
index fb92a1916..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/110-enable-zlib.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Enable zlib in python
-
--Khem
-
-Upstream-Status: Inappropriate [OE-Specific]
-
----
- Modules/Setup.dist | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/Modules/Setup.dist
-+++ b/Modules/Setup.dist
-@@ -354,7 +354,7 @@ _symtable symtablemodule.c
- # Andrew Kuchling's zlib module.
- # This require zlib 1.1.3 (or later).
- # See http://www.gzip.org/zlib/
--#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
-+zlib zlibmodule.c -lz
-
- # Interface to the Expat XML parser
- #
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
index 8b93c1cf4..c53ec0cfc 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
@@ -1,4 +1,4 @@
-From d4dd67daa1555bf13272cc071706338572539bad Mon Sep 17 00:00:00 2001
+From 7630ab22578746d3d790d0598c0d279cf7afed97 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 14 May 2013 15:00:26 -0700
Subject: [PATCH 01/20] python3: Add target and native recipes
@@ -14,27 +14,14 @@ Upstream-Status: Inappropriate [embedded specific]
# Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
+ Lib/distutils/sysconfig.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
-index 573724d..418b478 100644
+index 573724d..390c485 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
-@@ -17,10 +17,11 @@ import sys
- from .errors import DistutilsPlatformError
-
- # These are needed in a couple of spots, so just compute them once.
--PREFIX = os.path.normpath(sys.prefix)
--EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
--BASE_PREFIX = os.path.normpath(sys.base_prefix)
--BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
-+PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
-+EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
-+BASE_PREFIX = os.path.normpath(sys.base_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
-+BASE_EXEC_PREFIX= os.path.normpath(sys.base_exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
-+
-
- # Path to the base directory of the project. On Windows the binary may
- # live in project/PCBuild/win32 or project/PCBuild/amd64.
-@@ -84,7 +85,9 @@ def get_python_inc(plat_specific=0, prefix=None):
+@@ -84,7 +84,9 @@ def get_python_inc(plat_specific=0, prefix=None):
If 'prefix' is supplied, use it instead of sys.base_prefix or
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
"""
@@ -45,7 +32,7 @@ index 573724d..418b478 100644
prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
if os.name == "posix":
if python_build:
-@@ -125,6 +128,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
+@@ -125,6 +127,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
If 'prefix' is supplied, use it instead of sys.base_prefix or
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
"""
@@ -56,7 +43,7 @@ index 573724d..418b478 100644
if prefix is None:
if standard_lib:
prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
-@@ -133,7 +140,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
+@@ -133,7 +139,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
if os.name == "posix":
libpython = os.path.join(prefix,
@@ -65,24 +52,6 @@ index 573724d..418b478 100644
if standard_lib:
return libpython
else:
-@@ -233,7 +240,7 @@ def get_config_h_filename():
- else:
- inc_dir = get_python_inc(plat_specific=1)
-
-- return os.path.join(inc_dir, 'pyconfig.h')
-+ return os.path.join(inc_dir, 'pyconfig.h'.replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ))
-
-
- def get_makefile_filename():
-@@ -242,7 +249,7 @@ def get_makefile_filename():
- return os.path.join(_sys_home or project_base, "Makefile")
- lib_dir = get_python_lib(plat_specific=0, standard_lib=1)
- config_file = 'config-{}{}'.format(get_python_version(), build_flags)
-- return os.path.join(lib_dir, config_file, 'Makefile')
-+ return os.path.join(lib_dir, config_file, 'Makefile').replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
-
-
- def parse_config_h(fp, g=None):
--
-2.7.0
+2.8.0.rc3
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/CVE-2016-5636.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/CVE-2016-5636.patch
new file mode 100644
index 000000000..0d494d20f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/CVE-2016-5636.patch
@@ -0,0 +1,44 @@
+
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1453357506 28800
+# Node ID 10dad6da1b28ea4af78ad9529e469fdbf4ebbc8f
+# Parent a3ac2cd93db9d5336dfd7b5b27efde2c568d8794# Parent 01ddd608b85c85952537d95a43bbabf4fb655057
+merge 3.4 (#26171)
+
+Upstream-Status: Backport
+CVE: CVE-2016-5636
+
+https://hg.python.org/cpython/raw-rev/10dad6da1b28
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: Python-3.5.1/Misc/NEWS
+===================================================================
+--- Python-3.5.1.orig/Misc/NEWS
++++ Python-3.5.1/Misc/NEWS
+@@ -91,6 +91,9 @@ Core and Builtins
+ Python.h header to fix a compilation error with OpenMP. PyThreadState_GET()
+ becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies.
+
++- Issue #26171: Fix possible integer overflow and heap corruption in
++ zipimporter.get_data().
++
+ Library
+ -------
+
+Index: Python-3.5.1/Modules/zipimport.c
+===================================================================
+--- Python-3.5.1.orig/Modules/zipimport.c
++++ Python-3.5.1/Modules/zipimport.c
+@@ -1112,6 +1112,11 @@ get_data(PyObject *archive, PyObject *to
+ }
+ file_offset += l; /* Start of file data */
+
++ if (data_size > LONG_MAX - 1) {
++ fclose(fp);
++ PyErr_NoMemory();
++ return NULL;
++ }
+ bytes_size = compress == 0 ? data_size : data_size + 1;
+ if (bytes_size == 0)
+ bytes_size++;
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch
index cd1a978eb..0610565d3 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/fix_for_using_different_libdir.patch
@@ -4,11 +4,11 @@ This patch fixes issuing with different libdir like lib64.
This patch makes the native python binary modules findable
in the install process of the host python.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Date: 2012/03/14
Updated for python 2.7.3
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Date: 2012/05/01
Index: Python-3.3.0rc2/Lib/sysconfig.py
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index 44ec424cd..056e8e763 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -7,10 +7,10 @@ get the sys.lib from python itself and do not use hardcoded value of 'lib'
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-Index: Python-3.5.0/Include/pythonrun.h
+Index: Python-3.5.2/Include/pythonrun.h
===================================================================
---- Python-3.5.0.orig/Include/pythonrun.h
-+++ Python-3.5.0/Include/pythonrun.h
+--- Python-3.5.2.orig/Include/pythonrun.h
++++ Python-3.5.2/Include/pythonrun.h
@@ -23,6 +23,9 @@ typedef struct {
} PyCompilerFlags;
#endif
@@ -21,10 +21,10 @@ Index: Python-3.5.0/Include/pythonrun.h
#ifndef Py_LIMITED_API
PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
-Index: Python-3.5.0/Lib/distutils/command/install.py
+Index: Python-3.5.2/Lib/distutils/command/install.py
===================================================================
---- Python-3.5.0.orig/Lib/distutils/command/install.py
-+++ Python-3.5.0/Lib/distutils/command/install.py
+--- Python-3.5.2.orig/Lib/distutils/command/install.py
++++ Python-3.5.2/Lib/distutils/command/install.py
@@ -19,6 +19,8 @@ from site import USER_BASE
from site import USER_SITE
HAS_USER_SITE = True
@@ -43,23 +43,23 @@ Index: Python-3.5.0/Lib/distutils/command/install.py
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-Index: Python-3.5.0/Lib/pydoc.py
+Index: Python-3.5.2/Lib/pydoc.py
===================================================================
---- Python-3.5.0.orig/Lib/pydoc.py
-+++ Python-3.5.0/Lib/pydoc.py
-@@ -393,7 +393,7 @@ class Doc:
+--- Python-3.5.2.orig/Lib/pydoc.py
++++ Python-3.5.2/Lib/pydoc.py
+@@ -384,7 +384,7 @@ class Doc:
+ docmodule = docclass = docroutine = docother = docproperty = docdata = fail
- docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
+ def getdocloc(self, object,
+- basedir=os.path.join(sys.base_exec_prefix, "lib",
++ basedir=os.path.join(sys.base_exec_prefix, sys.lib,
+ "python%d.%d" % sys.version_info[:2])):
+ """Return the location of module docs or None"""
-- basedir = os.path.join(sys.base_exec_prefix, "lib",
-+ basedir = os.path.join(sys.base_exec_prefix, sys.lib,
- "python%d.%d" % sys.version_info[:2])
- if (isinstance(object, type(os)) and
- (object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-3.5.0/Lib/trace.py
+Index: Python-3.5.2/Lib/trace.py
===================================================================
---- Python-3.5.0.orig/Lib/trace.py
-+++ Python-3.5.0/Lib/trace.py
+--- Python-3.5.2.orig/Lib/trace.py
++++ Python-3.5.2/Lib/trace.py
@@ -749,10 +749,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
@@ -73,11 +73,11 @@ Index: Python-3.5.0/Lib/trace.py
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
-Index: Python-3.5.0/Makefile.pre.in
+Index: Python-3.5.2/Makefile.pre.in
===================================================================
---- Python-3.5.0.orig/Makefile.pre.in
-+++ Python-3.5.0/Makefile.pre.in
-@@ -101,6 +101,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS
+--- Python-3.5.2.orig/Makefile.pre.in
++++ Python-3.5.2/Makefile.pre.in
+@@ -106,6 +106,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -86,7 +86,7 @@ Index: Python-3.5.0/Makefile.pre.in
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
-@@ -120,7 +122,7 @@ LIBDIR= @libdir@
+@@ -125,7 +127,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -95,7 +95,7 @@ Index: Python-3.5.0/Makefile.pre.in
ABIFLAGS= @ABIFLAGS@
# Detailed destination directories
-@@ -729,6 +731,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -755,6 +757,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
@@ -103,7 +103,7 @@ Index: Python-3.5.0/Makefile.pre.in
-o $@ $(srcdir)/Modules/getpath.c
Programs/python.o: $(srcdir)/Programs/python.c
-@@ -798,7 +801,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(O
+@@ -835,7 +838,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(O
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -112,25 +112,25 @@ Index: Python-3.5.0/Makefile.pre.in
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-3.5.0/Modules/getpath.c
+Index: Python-3.5.2/Modules/getpath.c
===================================================================
---- Python-3.5.0.orig/Modules/getpath.c
-+++ Python-3.5.0/Modules/getpath.c
-@@ -117,9 +117,11 @@
- #define EXEC_PREFIX PREFIX
+--- Python-3.5.2.orig/Modules/getpath.c
++++ Python-3.5.2/Modules/getpath.c
+@@ -105,6 +105,13 @@
+ #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
+#define LIB_PYTHON LIB "/python" VERSION
+
- #ifndef PYTHONPATH
--#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
-- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
++#ifndef PYTHONPATH
+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
-+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
- #endif
-
++ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
++#endif
++
#ifndef LANDMARK
-@@ -130,6 +132,7 @@ static wchar_t prefix[MAXPATHLEN+1];
+ #define LANDMARK L"os.py"
+ #endif
+@@ -113,6 +120,7 @@ static wchar_t prefix[MAXPATHLEN+1];
static wchar_t exec_prefix[MAXPATHLEN+1];
static wchar_t progpath[MAXPATHLEN+1];
static wchar_t *module_search_path = NULL;
@@ -138,10 +138,10 @@ Index: Python-3.5.0/Modules/getpath.c
/* Get file status. Encode the path to the locale encoding. */
-Index: Python-3.5.0/Python/getplatform.c
+Index: Python-3.5.2/Python/getplatform.c
===================================================================
---- Python-3.5.0.orig/Python/getplatform.c
-+++ Python-3.5.0/Python/getplatform.c
+--- Python-3.5.2.orig/Python/getplatform.c
++++ Python-3.5.2/Python/getplatform.c
@@ -10,3 +10,23 @@ Py_GetPlatform(void)
{
return PLATFORM;
@@ -166,11 +166,11 @@ Index: Python-3.5.0/Python/getplatform.c
+{
+ return LIB;
+}
-Index: Python-3.5.0/Python/sysmodule.c
+Index: Python-3.5.2/Python/sysmodule.c
===================================================================
---- Python-3.5.0.orig/Python/sysmodule.c
-+++ Python-3.5.0/Python/sysmodule.c
-@@ -1767,6 +1767,10 @@ _PySys_Init(void)
+--- Python-3.5.2.orig/Python/sysmodule.c
++++ Python-3.5.2/Python/sysmodule.c
+@@ -1790,6 +1790,10 @@ _PySys_Init(void)
PyUnicode_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyUnicode_FromString(Py_GetPlatform()));
@@ -181,11 +181,11 @@ Index: Python-3.5.0/Python/sysmodule.c
SET_SYS_FROM_STRING("executable",
PyUnicode_FromWideChar(
Py_GetProgramFullPath(), -1));
-Index: Python-3.5.0/setup.py
+Index: Python-3.5.2/setup.py
===================================================================
---- Python-3.5.0.orig/setup.py
-+++ Python-3.5.0/setup.py
-@@ -472,7 +472,7 @@ class PyBuildExt(build_ext):
+--- Python-3.5.2.orig/setup.py
++++ Python-3.5.2/setup.py
+@@ -492,7 +492,7 @@ class PyBuildExt(build_ext):
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
if not cross_compiling:
@@ -194,7 +194,7 @@ Index: Python-3.5.0/setup.py
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia
if cross_compiling:
-@@ -530,8 +530,7 @@ class PyBuildExt(build_ext):
+@@ -550,8 +550,7 @@ class PyBuildExt(build_ext):
# be assumed that no additional -I,-L directives are needed.
if not cross_compiling:
lib_dirs = self.compiler.library_dirs + [
@@ -204,7 +204,7 @@ Index: Python-3.5.0/setup.py
]
inc_dirs = self.compiler.include_dirs + ['/usr/include']
else:
-@@ -716,11 +715,11 @@ class PyBuildExt(build_ext):
+@@ -743,11 +742,11 @@ class PyBuildExt(build_ext):
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
@@ -218,10 +218,10 @@ Index: Python-3.5.0/setup.py
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
-Index: Python-3.5.0/Lib/sysconfig.py
+Index: Python-3.5.2/Lib/sysconfig.py
===================================================================
---- Python-3.5.0.orig/Lib/sysconfig.py
-+++ Python-3.5.0/Lib/sysconfig.py
+--- Python-3.5.2.orig/Lib/sysconfig.py
++++ Python-3.5.2/Lib/sysconfig.py
@@ -20,10 +20,10 @@ __all__ = [
_INSTALL_SCHEMES = {
@@ -264,11 +264,11 @@ Index: Python-3.5.0/Lib/sysconfig.py
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data': '{userbase}',
-Index: Python-3.5.0/configure.ac
+Index: Python-3.5.2/configure.ac
===================================================================
---- Python-3.5.0.orig/configure.ac
-+++ Python-3.5.0/configure.ac
-@@ -858,6 +858,41 @@ PLATDIR=plat-$MACHDEP
+--- Python-3.5.2.orig/configure.ac
++++ Python-3.5.2/configure.ac
+@@ -876,6 +876,41 @@ PLATDIR=plat-$MACHDEP
AC_SUBST(PLATDIR)
AC_SUBST(PLATFORM_TRIPLET)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch
new file mode 100644
index 000000000..ab1b7230e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/python3-fix-CVE-2016-1000110.patch
@@ -0,0 +1,148 @@
+From aab3e8c432b90508ac14755128f5a687be2fdf43 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Thu, 22 Sep 2016 16:39:49 +0800
+Subject: [PATCH] python3: fix CVE-2016-1000110
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Ignore the HTTP_PROXY variable when REQUEST_METHOD environment is set, which
+indicates that the script is in CGI mode.
+
+Issue #27568 Reported and patch contributed by RĂ©mi Rampin. [#27568]
+
+Backport patch from https://hg.python.org/cpython/rev/a0ac52ed8f79
+
+Upstream-Status: Backport
+CVE: CVE-2016-1000110
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ Doc/howto/urllib2.rst | 5 +++++
+ Doc/library/urllib.request.rst | 17 ++++++++++++++++-
+ Lib/test/test_urllib.py | 14 +++++++++++++-
+ Lib/urllib/request.py | 6 ++++++
+ Misc/NEWS | 4 ++++
+ 5 files changed, 44 insertions(+), 2 deletions(-)
+
+diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst
+index 24a4156..d2c7991 100644
+--- a/Doc/howto/urllib2.rst
++++ b/Doc/howto/urllib2.rst
+@@ -538,6 +538,11 @@ setting up a `Basic Authentication`_ handler: ::
+ through a proxy. However, this can be enabled by extending urllib.request as
+ shown in the recipe [#]_.
+
++.. note::
++
++ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see
++ the documentation on :func:`~urllib.request.getproxies`.
++
+
+ Sockets and Layers
+ ==================
+diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
+index 1338906..1291aeb 100644
+--- a/Doc/library/urllib.request.rst
++++ b/Doc/library/urllib.request.rst
+@@ -173,6 +173,16 @@ The :mod:`urllib.request` module defines the following functions:
+ If both lowercase and uppercase environment variables exist (and disagree),
+ lowercase is preferred.
+
++ .. note::
++
++ If the environment variable ``REQUEST_METHOD`` is set, which usually
++ indicates your script is running in a CGI environment, the environment
++ variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
++ because that variable can be injected by a client using the "Proxy:" HTTP
++ header. If you need to use an HTTP proxy in a CGI environment, either use
++ ``ProxyHandler`` explicitly, or make sure the variable name is in
++ lowercase (or at least the ``_proxy`` suffix).
++
+
+ The following classes are provided:
+
+@@ -280,6 +290,11 @@ The following classes are provided:
+ list of hostname suffixes, optionally with ``:port`` appended, for example
+ ``cern.ch,ncsa.uiuc.edu,some.host:8080``.
+
++ .. note::
++
++ ``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set;
++ see the documentation on :func:`~urllib.request.getproxies`.
++
+
+ .. class:: HTTPPasswordMgr()
+
+@@ -1138,7 +1153,7 @@ the returned bytes object to string once it determines or guesses
+ the appropriate encoding.
+
+ The following W3C document, https://www.w3.org/International/O-charset\ , lists
+-the various ways in which a (X)HTML or a XML document could have specified its
++the various ways in which an (X)HTML or an XML document could have specified its
+ encoding information.
+
+ As the python.org website uses *utf-8* encoding as specified in its meta tag, we
+diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
+index 5d05f8d..247598a 100644
+--- a/Lib/test/test_urllib.py
++++ b/Lib/test/test_urllib.py
+@@ -1,4 +1,4 @@
+-"""Regresssion tests for what was in Python 2's "urllib" module"""
++"""Regression tests for what was in Python 2's "urllib" module"""
+
+ import urllib.parse
+ import urllib.request
+@@ -232,6 +232,18 @@ class ProxyTests(unittest.TestCase):
+ self.assertTrue(urllib.request.proxy_bypass_environment('anotherdomain.com:8888'))
+ self.assertTrue(urllib.request.proxy_bypass_environment('newdomain.com:1234'))
+
++ def test_proxy_cgi_ignore(self):
++ try:
++ self.env.set('HTTP_PROXY', 'http://somewhere:3128')
++ proxies = urllib.request.getproxies_environment()
++ self.assertEqual('http://somewhere:3128', proxies['http'])
++ self.env.set('REQUEST_METHOD', 'GET')
++ proxies = urllib.request.getproxies_environment()
++ self.assertNotIn('http', proxies)
++ finally:
++ self.env.unset('REQUEST_METHOD')
++ self.env.unset('HTTP_PROXY')
++
+ def test_proxy_bypass_environment_host_match(self):
+ bypass = urllib.request.proxy_bypass_environment
+ self.env.set('NO_PROXY',
+diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
+index 1731fe3..3be327d 100644
+--- a/Lib/urllib/request.py
++++ b/Lib/urllib/request.py
+@@ -2412,6 +2412,12 @@ def getproxies_environment():
+ name = name.lower()
+ if value and name[-6:] == '_proxy':
+ proxies[name[:-6]] = value
++ # CVE-2016-1000110 - If we are running as CGI script, forget HTTP_PROXY
++ # (non-all-lowercase) as it may be set from the web server by a "Proxy:"
++ # header from the client
++ # If "proxy" is lowercase, it will still be used thanks to the next block
++ if 'REQUEST_METHOD' in os.environ:
++ proxies.pop('http', None)
+ for name, value in os.environ.items():
+ if name[-6:] == '_proxy':
+ name = name.lower()
+diff --git a/Misc/NEWS b/Misc/NEWS
+index 4ad2551..2fcc95b 100644
+--- a/Misc/NEWS
++++ b/Misc/NEWS
+@@ -329,6 +329,10 @@ Library
+ - Issue #26644: Raise ValueError rather than SystemError when a negative
+ length is passed to SSLSocket.recv() or read().
+
++- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
++ HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates
++ that the script is in CGI mode.
++
+ - Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes
+ instead of up to 1024.
+
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/unixccompiler.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/unixccompiler.patch
index 7b90f1388..3e2b1d1c2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/unixccompiler.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/unixccompiler.patch
@@ -18,9 +18,9 @@ Index: Python-3.3.2/Lib/distutils/unixccompiler.py
def library_dir_option(self, dir):
- return "-L" + dir
-+ if dir.startswith("."):
-+ return "-L" + dir
-+ return "-L=" + dir
++ if dir.startswith("/"):
++ return "-L=" + dir
++ return "-L" + dir
def _is_gcc(self, compiler_name):
return "gcc" in compiler_name or "g++" in compiler_name
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/use_packed_importlib.patch b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/use_packed_importlib.patch
index 6c4b0cda9..70708a0ad 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3/use_packed_importlib.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3/use_packed_importlib.patch
@@ -6,7 +6,7 @@ importlib*.h files, this is impossible to do on a cross-compile environment,
this avoids executing the binary and forces it to use the packed importlib*.h files.
-Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
+Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Index: Python-3.5.0/Makefile.pre.in
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.1.bb
deleted file mode 100644
index 2fbb3cbc3..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.1.bb
+++ /dev/null
@@ -1,226 +0,0 @@
-require recipes-devtools/python/python.inc
-
-DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.5"
-PYTHON_BINABI= "${PYTHON_MAJMIN}m"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://python-config.patch \
-file://000-cross-compile.patch \
-file://020-dont-compile-python-files.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://110-enable-zlib.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \
-${DISTRO_SRC_URI} \
-"
-
-SRC_URI += "\
- file://03-fix-tkinter-detection.patch \
- file://avoid_warning_about_tkinter.patch \
- file://cgi_py.patch \
- file://host_include_contamination.patch \
- file://python-3.3-multilib.patch \
- file://shutil-follow-symlink-fix.patch \
- file://sysroot-include-headers.patch \
- file://unixccompiler.patch \
- file://avoid-ncursesw-include-path.patch \
- file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
- file://python3-setup.py-no-host-headers-libs.patch \
- file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
- file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
- file://setup.py-find-libraries-in-staging-dirs.patch \
- file://use_packed_importlib.patch \
- file://configure.ac-fix-LIBPL.patch \
- "
-SRC_URI[md5sum] = "e9ea6f2623fffcdd871b7b19113fde80"
-SRC_URI[sha256sum] = "c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"
-
-# exclude pre-releases for both python 2.x and 3.x
-UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python3native pkgconfig
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
- ac_cv_have_lchflags=no \
- ac_cv_have_long_long_format=yes \
- ac_cv_buggy_getaddrinfo=no \
- ac_cv_file__dev_ptmx=yes \
- ac_cv_file__dev_ptc=no \
-"
-
-TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
-SDK_CC_ARCH += "-DNDEBUG -fno-inline"
-EXTRA_OEMAKE += "CROSS_COMPILE=yes"
-EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
-
-export CROSS_COMPILE = "${TARGET_PREFIX}"
-export _PYTHON_PROJECT_BASE = "${B}"
-export _PYTHON_PROJECT_SRC = "${S}"
-export CCSHARED = "-fPIC"
-
-# Fix ctypes cross compilation
-export CROSSPYTHONPATH = "${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
- rm -f ${S}/Makefile.orig
- autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_compile() {
- # regenerate platform specific files, because they depend on system headers
- cd ${S}/Lib/plat-linux*
- include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- ${S}/Tools/scripts/h2py.py -i '(u_long)' \
- ${STAGING_INCDIR}/dlfcn.h \
- ${STAGING_INCDIR}/linux/cdrom.h \
- ${STAGING_INCDIR}/netinet/in.h \
- ${STAGING_INCDIR}/sys/types.h
- sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
- cd -
-
-
- # remove any bogus LD_LIBRARY_PATH
- sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
- if [ ! -f Makefile.orig ]; then
- install -m 0644 Makefile Makefile.orig
- fi
- sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
- -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
- -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
- -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
- -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
- -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
- -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
- Makefile
- # save copy of it now, because if we do it in do_install and
- # then call do_install twice we get Makefile.orig == Makefile.sysroot
- install -m 0644 Makefile Makefile.sysroot
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- OPT="${CFLAGS}" libpython3.so
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- OPT="${CFLAGS}"
-}
-
-do_install() {
- # make install needs the original Makefile, or otherwise the inclues would
- # go to ${D}${STAGING...}/...
- install -m 0644 Makefile.orig Makefile
-
- install -d ${D}${libdir}/pkgconfig
- install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
-
- # rerun the build once again with original makefile this time
- # run install in a separate step to avoid compile/install race
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- DESTDIR=${D} LIBDIR=${libdir}
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- LIB=${baselib} \
- ARCH=${TARGET_ARCH} \
- DESTDIR=${D} LIBDIR=${libdir} install
-
- # avoid conflict with 2to3 from Python 2
- rm -f ${D}/${bindir}/2to3
-
- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
- if [ -e ${WORKDIR}/sitecustomize.py ]; then
- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
- fi
-
- oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
-}
-
-do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
- # copy back the old Makefile to fix target package
- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
- # Remove references to buildmachine paths in target Makefile and _sysconfigdata
- sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-crypt = "openssl"
-RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
-
-FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
-FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
-
-PACKAGES =+ "${PN}-pyvenv"
-FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
-
-# package libpython3
-PACKAGES =+ "libpython3 libpython3-staticdev"
-FILES_libpython3 = "${libdir}/libpython*.so.*"
-FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
-INSANE_SKIP_${PN}-dev += "dev-elf"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "${PN}-core"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb
new file mode 100644
index 000000000..e6cbb9c56
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python3_3.5.2.bb
@@ -0,0 +1,224 @@
+require recipes-devtools/python/python.inc
+
+DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.5"
+PYTHON_BINABI= "${PYTHON_MAJMIN}m"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+file://python-config.patch \
+file://000-cross-compile.patch \
+file://020-dont-compile-python-files.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://130-readline-setup.patch \
+file://150-fix-setupterm.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \
+${DISTRO_SRC_URI} \
+"
+
+SRC_URI += "\
+ file://03-fix-tkinter-detection.patch \
+ file://avoid_warning_about_tkinter.patch \
+ file://cgi_py.patch \
+ file://host_include_contamination.patch \
+ file://python-3.3-multilib.patch \
+ file://shutil-follow-symlink-fix.patch \
+ file://sysroot-include-headers.patch \
+ file://unixccompiler.patch \
+ file://avoid-ncursesw-include-path.patch \
+ file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+ file://python3-setup.py-no-host-headers-libs.patch \
+ file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+ file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
+ file://setup.py-find-libraries-in-staging-dirs.patch \
+ file://configure.ac-fix-LIBPL.patch \
+ file://python3-fix-CVE-2016-1000110.patch \
+ "
+SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e"
+SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6b60258130e4ed10d3101517eb5b9385"
+
+# exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python3native pkgconfig
+
+CONFIGUREOPTS += " --with-system-ffi "
+
+CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
+ ac_cv_have_lchflags=no \
+ ac_cv_have_long_long_format=yes \
+ ac_cv_buggy_getaddrinfo=no \
+ ac_cv_file__dev_ptmx=yes \
+ ac_cv_file__dev_ptc=no \
+"
+
+TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
+SDK_CC_ARCH += "-DNDEBUG -fno-inline"
+EXTRA_OEMAKE += "CROSS_COMPILE=yes"
+EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
+
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+export _PYTHON_PROJECT_BASE = "${B}"
+export _PYTHON_PROJECT_SRC = "${S}"
+export CCSHARED = "-fPIC"
+
+# Fix cross compilation of different modules
+export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/:${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
+
+# No ctypes option for python 3
+PYTHONLSBOPTS = ""
+
+do_configure_append() {
+ rm -f ${S}/Makefile.orig
+ autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_compile() {
+ # regenerate platform specific files, because they depend on system headers
+ cd ${S}/Lib/plat-linux*
+ include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ ${S}/Tools/scripts/h2py.py -i '(u_long)' \
+ ${STAGING_INCDIR}/dlfcn.h \
+ ${STAGING_INCDIR}/linux/cdrom.h \
+ ${STAGING_INCDIR}/netinet/in.h \
+ ${STAGING_INCDIR}/sys/types.h
+ sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+ cd -
+
+
+ # remove any bogus LD_LIBRARY_PATH
+ sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+ if [ ! -f Makefile.orig ]; then
+ install -m 0644 Makefile Makefile.orig
+ fi
+ sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
+ -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+ -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+ -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+ -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+ -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+ -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+ Makefile
+ # save copy of it now, because if we do it in do_install and
+ # then call do_install twice we get Makefile.orig == Makefile.sysroot
+ install -m 0644 Makefile Makefile.sysroot
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ OPT="${CFLAGS}" libpython3.so
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ OPT="${CFLAGS}"
+}
+
+do_install() {
+ # make install needs the original Makefile, or otherwise the inclues would
+ # go to ${D}${STAGING...}/...
+ install -m 0644 Makefile.orig Makefile
+
+ install -d ${D}${libdir}/pkgconfig
+ install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
+
+ # rerun the build once again with original makefile this time
+ # run install in a separate step to avoid compile/install race
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ DESTDIR=${D} LIBDIR=${libdir}
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ LIB=${baselib} \
+ ARCH=${TARGET_ARCH} \
+ DESTDIR=${D} LIBDIR=${libdir} install
+
+ # avoid conflict with 2to3 from Python 2
+ rm -f ${D}/${bindir}/2to3
+
+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
+
+ if [ -e ${WORKDIR}/sitecustomize.py ]; then
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+ fi
+
+ oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
+}
+
+do_install_append_class-nativesdk () {
+ create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+ # copy back the old Makefile to fix target package
+ install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+ install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
+ # Remove references to buildmachine paths in target Makefile and _sysconfigdata
+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+}
+
+require python-${PYTHON_MAJMIN}-manifest.inc
+
+# manual dependency additions
+RPROVIDES_${PN}-core = "${PN}"
+RRECOMMENDS_${PN}-core = "${PN}-readline"
+RRECOMMENDS_${PN}-crypt = "openssl"
+RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
+
+FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
+FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
+FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
+
+PACKAGES =+ "${PN}-pyvenv"
+FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
+
+# package libpython3
+PACKAGES =+ "libpython3 libpython3-staticdev"
+FILES_libpython3 = "${libdir}/libpython*.so.*"
+FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
+INSANE_SKIP_${PN}-dev += "dev-elf"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+RDEPENDS_${PN}-misc += "${PN}-core ${PN}-email ${PN}-codecs ${PN}-textutils ${PN}-argparse"
+RDEPENDS_${PN}-modules += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.11.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.11.bb
deleted file mode 100644
index 606f15362..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.11.bb
+++ /dev/null
@@ -1,173 +0,0 @@
-require python.inc
-DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}"
-
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI += "\
- file://01-use-proper-tools-for-cross-build.patch \
- file://03-fix-tkinter-detection.patch \
- file://06-avoid_usr_lib_termcap_path_in_linking.patch \
- ${DISTRO_SRC_URI} \
- file://multilib.patch \
- file://cgi_py.patch \
- file://setup_py_skip_cross_import_check.patch \
- file://add-md5module-support.patch \
- file://host_include_contamination.patch \
- file://fix_for_using_different_libdir.patch \
- file://setuptweaks.patch \
- file://check-if-target-is-64b-not-host.patch \
- file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
- file://avoid_warning_about_tkinter.patch \
- file://avoid_warning_for_sunos_specific_module.patch \
- file://python-2.7.3-remove-bsdb-rpath.patch \
- file://fix-makefile-for-ptest.patch \
- file://run-ptest \
- file://parallel-makeinst-create-bindir.patch \
- file://use_sysroot_ncurses_instead_of_host.patch \
- file://avoid_parallel_make_races_on_pgen.patch \
- file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
-"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python-dir pythonnative
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
-
-do_configure_append() {
- rm -f ${S}/Makefile.orig
- autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_compile() {
- # regenerate platform specific files, because they depend on system headers
- cd ${S}/Lib/plat-linux2
- include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
- ${S}/Tools/scripts/h2py.py -i '(u_long)' \
- ${STAGING_INCDIR}/dlfcn.h \
- ${STAGING_INCDIR}/linux/cdrom.h \
- ${STAGING_INCDIR}/netinet/in.h \
- ${STAGING_INCDIR}/sys/types.h
- sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
- cd -
-
- # remove any bogus LD_LIBRARY_PATH
- sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
- if [ ! -f Makefile.orig ]; then
- install -m 0644 Makefile Makefile.orig
- fi
- sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
- -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
- -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
- -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
- -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
- -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
- -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
- Makefile
- # save copy of it now, because if we do it in do_install and
- # then call do_install twice we get Makefile.orig == Makefile.sysroot
- install -m 0644 Makefile Makefile.sysroot
-
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${B}"
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- OPT="${CFLAGS}"
-}
-
-do_install() {
- # make install needs the original Makefile, or otherwise the inclues would
- # go to ${D}${STAGING...}/...
- install -m 0644 Makefile.orig Makefile
-
- export CROSS_COMPILE="${TARGET_PREFIX}"
- export PYTHONBUILDDIR="${B}"
-
- # After swizzling the makefile, we need to run the build again.
- # install can race with the build so we have to run this first, then install
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- DESTDIR=${D} LIBDIR=${libdir}
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- DESTDIR=${D} LIBDIR=${libdir} install
-
- install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
- if [ -e ${WORKDIR}/sitecustomize.py ]; then
- install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
- fi
-
- oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
-}
-
-do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
- # copy back the old Makefile to fix target package
- install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
- # Remove references to buildmachine paths in target Makefile and _sysconfigdata
- sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
-RRECOMMENDS_${PN}-crypt = "openssl"
-
-# package libpython2
-PACKAGES =+ "lib${BPN}2"
-FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-RDEPENDS_${PN}-ptest = "${PN}-modules"
-#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
-inherit ptest
-
-# This must come after inherit ptest for the override to take effect
-do_install_ptest() {
- cp ${B}/Makefile ${D}${PTEST_PATH}
- sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
- -e s:LIBDIR:${libdir}:g \
- -i ${D}${PTEST_PATH}/run-ptest
-}
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.12.bb b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.12.bb
new file mode 100644
index 000000000..9fe35db2d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/python/python_2.7.12.bb
@@ -0,0 +1,171 @@
+require python.inc
+DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
+PR = "${INC_PR}"
+
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI += "\
+ file://01-use-proper-tools-for-cross-build.patch \
+ file://03-fix-tkinter-detection.patch \
+ file://06-avoid_usr_lib_termcap_path_in_linking.patch \
+ ${DISTRO_SRC_URI} \
+ file://multilib.patch \
+ file://cgi_py.patch \
+ file://setup_py_skip_cross_import_check.patch \
+ file://add-md5module-support.patch \
+ file://host_include_contamination.patch \
+ file://fix_for_using_different_libdir.patch \
+ file://setuptweaks.patch \
+ file://check-if-target-is-64b-not-host.patch \
+ file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
+ file://avoid_warning_about_tkinter.patch \
+ file://avoid_warning_for_sunos_specific_module.patch \
+ file://python-2.7.3-remove-bsdb-rpath.patch \
+ file://fix-makefile-for-ptest.patch \
+ file://run-ptest \
+ file://parallel-makeinst-create-bindir.patch \
+ file://use_sysroot_ncurses_instead_of_host.patch \
+ file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+ file://python-fix-CVE-2016-1000110.patch \
+"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python-dir pythonnative
+
+CONFIGUREOPTS += " --with-system-ffi "
+
+EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
+
+do_configure_append() {
+ rm -f ${S}/Makefile.orig
+ autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_compile() {
+ # regenerate platform specific files, because they depend on system headers
+ cd ${S}/Lib/plat-linux2
+ include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
+ ${S}/Tools/scripts/h2py.py -i '(u_long)' \
+ ${STAGING_INCDIR}/dlfcn.h \
+ ${STAGING_INCDIR}/linux/cdrom.h \
+ ${STAGING_INCDIR}/netinet/in.h \
+ ${STAGING_INCDIR}/sys/types.h
+ sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+ cd -
+
+ # remove any bogus LD_LIBRARY_PATH
+ sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+ if [ ! -f Makefile.orig ]; then
+ install -m 0644 Makefile Makefile.orig
+ fi
+ sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
+ -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+ -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+ -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+ -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+ -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+ -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+ Makefile
+ # save copy of it now, because if we do it in do_install and
+ # then call do_install twice we get Makefile.orig == Makefile.sysroot
+ install -m 0644 Makefile Makefile.sysroot
+
+ export CROSS_COMPILE="${TARGET_PREFIX}"
+ export PYTHONBUILDDIR="${B}"
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ OPT="${CFLAGS}"
+}
+
+do_install() {
+ # make install needs the original Makefile, or otherwise the inclues would
+ # go to ${D}${STAGING...}/...
+ install -m 0644 Makefile.orig Makefile
+
+ export CROSS_COMPILE="${TARGET_PREFIX}"
+ export PYTHONBUILDDIR="${B}"
+
+ # After swizzling the makefile, we need to run the build again.
+ # install can race with the build so we have to run this first, then install
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ DESTDIR=${D} LIBDIR=${libdir}
+
+ oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+ HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+ CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+ STAGING_LIBDIR=${STAGING_LIBDIR} \
+ STAGING_INCDIR=${STAGING_INCDIR} \
+ STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+ DESTDIR=${D} LIBDIR=${libdir} install
+
+ install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+ if [ -e ${WORKDIR}/sitecustomize.py ]; then
+ install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+ fi
+
+ oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
+}
+
+do_install_append_class-nativesdk () {
+ create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+ # copy back the old Makefile to fix target package
+ install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+ # Remove references to buildmachine paths in target Makefile and _sysconfigdata
+ sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+ python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+}
+
+require python-${PYTHON_MAJMIN}-manifest.inc
+
+# manual dependency additions
+RPROVIDES_${PN}-core = "${PN}"
+RRECOMMENDS_${PN}-core = "${PN}-readline"
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
+RRECOMMENDS_${PN}-crypt = "openssl"
+
+# package libpython2
+PACKAGES =+ "lib${BPN}2"
+FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+RDEPENDS_${PN}-modules += "${PN}-misc"
+RDEPENDS_${PN}-ptest = "${PN}-modules"
+#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
+inherit ptest
+
+# This must come after inherit ptest for the override to take effect
+do_install_ptest() {
+ cp ${B}/Makefile ${D}${PTEST_PATH}
+ sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
+ -e s:LIBDIR:${libdir}:g \
+ -i ${D}${PTEST_PATH}/run-ptest
+}
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
index 51d1c5969..943ca5f89 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb
@@ -1,15 +1,16 @@
SUMMARY = "Qemu helper scripts"
LICENSE = "GPLv2"
-RDEPENDS_${PN} = "nativesdk-qemu"
-PR = "r9"
+RDEPENDS_${PN} = "nativesdk-qemu nativesdk-python3-subprocess \
+ nativesdk-python3-shell nativesdk-python3-fcntl \
+ "
+PR = "r9"
LIC_FILES_CHKSUM = "file://${WORKDIR}/tunctl.c;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999 \
- file://${COREBASE}/scripts/runqemu;endline=18;md5=77fbe442a88b1bcdc29c3ba67733b21b"
+ file://${COREBASE}/scripts/runqemu;endline=19;md5=a8ad1905c709a2deaa057608ebaf705a"
SRC_URI = "file://${COREBASE}/scripts/runqemu \
- file://${COREBASE}/scripts/runqemu-internal \
file://${COREBASE}/scripts/runqemu-addptable2image \
file://${COREBASE}/scripts/runqemu-gen-tapdevs \
file://${COREBASE}/scripts/runqemu-ifup \
@@ -18,7 +19,6 @@ SRC_URI = "file://${COREBASE}/scripts/runqemu \
file://${COREBASE}/scripts/runqemu-extract-sdk \
file://${COREBASE}/scripts/runqemu-export-rootfs \
file://tunctl.c \
- file://raw2flash.c \
"
S = "${WORKDIR}"
@@ -27,8 +27,6 @@ inherit nativesdk
do_compile() {
${CC} tunctl.c -o tunctl
- ${CC} raw2flash.c -o raw2flash.spitz
- ${CC} raw2flash.c -o flash2raw.spitz -Dflash2raw
}
do_install() {
@@ -36,12 +34,4 @@ do_install() {
install -m 0755 ${WORKDIR}${COREBASE}/scripts/oe-* ${D}${bindir}/
install -m 0755 ${WORKDIR}${COREBASE}/scripts/runqemu* ${D}${bindir}/
install tunctl ${D}${bindir}/
- install raw2flash.spitz ${D}${bindir}/
- install flash2raw.spitz ${D}${bindir}/
- ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.akita
- ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.borzoi
- ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.terrier
- ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.akita
- ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.borzoi
- ln -fs flash2raw.spitz ${D}${bindir}/flash2raw.terrier
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c
deleted file mode 100644
index 19faf629b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu-helper/raw2flash.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright (c) 2006 OpenedHand Ltd.
- *
- * This file is licensed under GNU GPL v2.
- */
-#include <string.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <stdlib.h>
-
-#define TFR(_) _
-#define VERBOSE
-#define PBAR_LEN 40
-
-#define PARTITION_START 0x00700000
-
-static const int ecc_pos8[] = {
- 0x0, 0x1, 0x2,
-};
-
-static const int ecc_pos16[] = {
- 0x0, 0x1, 0x2, 0x3, 0x6, 0x7,
-};
-
-static const int ecc_pos64[] = {
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
- 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
-};
-
-static const int ecc_akita[] = {
- 0x05, 0x01, 0x02, 0x03, 0x06, 0x07, 0x15, 0x11,
- 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23,
- 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37,
-};
-
-struct jffs_marker_s {
- int pos;
- uint8_t value;
-};
-
-static const struct jffs_marker_s free_pos8[] = {
- { 0x03, 0xff }, { 0x04, 0xff }, { 0x06, 0x85 }, { 0x07, 0x19 },
- { -1 },
-};
-
-static const struct jffs_marker_s free_pos16[] = {
- { 0x08, 0x85 }, { 0x09, 0x19 }, { 0x0a, 0x03 }, { 0x0b, 0x20 },
- { 0x0c, 0x08 }, { 0x0d, 0x00 }, { 0x0e, 0x00 }, { 0x0f, 0x00 },
- { -1 },
-};
-
-static const struct jffs_marker_s free_pos64[] = {
- { 0x02, 0xff }, { 0x03, 0xff }, { 0x04, 0xff }, { 0x05, 0xff },
- { 0x06, 0xff }, { 0x07, 0xff }, { 0x08, 0xff }, { 0x09, 0xff },
- { 0x0a, 0xff }, { 0x0b, 0xff }, { 0x0c, 0xff }, { 0x0d, 0xff },
- { 0x0e, 0xff }, { 0x0f, 0xff }, { 0x10, 0x85 }, { 0x11, 0x19 },
- { 0x12, 0x03 }, { 0x13, 0x20 }, { 0x14, 0x08 }, { 0x15, 0x00 },
- { 0x16, 0x00 }, { 0x17, 0x00 }, { 0x18, 0xff }, { 0x19, 0xff },
- { 0x1a, 0xff }, { 0x1b, 0xff }, { 0x1c, 0xff }, { 0x1d, 0xff },
- { 0x1e, 0xff }, { 0x1f, 0xff }, { 0x20, 0xff }, { 0x21, 0xff },
- { 0x22, 0xff }, { 0x23, 0xff }, { 0x24, 0xff }, { 0x25, 0xff },
- { 0x26, 0xff }, { 0x27, 0xff },
- { -1 },
-};
-
-static const struct jffs_marker_s free_akita[] = {
- { 0x08, 0x85 }, { 0x09, 0x19 }, { 0x0a, 0x03 }, { 0x0b, 0x20 },
- { 0x0c, 0x08 }, { 0x0d, 0x00 }, { 0x0e, 0x00 }, { 0x0f, 0x00 },
- { 0x10, 0xff },
- { -1 },
-};
-
-#define LEN(array) (sizeof(array) / sizeof(*array))
-
-static const struct ecc_style_s {
- int page_size;
- int oob_size;
- int eccbytes;
- int eccsize;
- const int *eccpos;
- int romsize;
- const struct jffs_marker_s *freepos;
-} spitz = {
- 0x200, 0x10, 0x100, LEN(ecc_pos16), ecc_pos16, 0x01000000, free_pos16
-}, akita = {
- 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
-}, borzoi = {
- 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
-}, terrier = {
- 0x800, 0x40, 0x100, LEN(ecc_akita), ecc_akita, 0x08000000, free_akita
-};
-
-struct ecc_state_s {
- int count;
- uint8_t cp;
- uint8_t lp[2];
- const struct ecc_style_s *style;
-};
-
-#ifndef flash2raw
-/*
- * Pre-calculated 256-way 1 byte column parity. Table borrowed from Linux.
- */
-static const uint8_t ecc_precalc_table[] = {
- 0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a,
- 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00,
- 0x65, 0x30, 0x33, 0x66, 0x3c, 0x69, 0x6a, 0x3f,
- 0x3f, 0x6a, 0x69, 0x3c, 0x66, 0x33, 0x30, 0x65,
- 0x66, 0x33, 0x30, 0x65, 0x3f, 0x6a, 0x69, 0x3c,
- 0x3c, 0x69, 0x6a, 0x3f, 0x65, 0x30, 0x33, 0x66,
- 0x03, 0x56, 0x55, 0x00, 0x5a, 0x0f, 0x0c, 0x59,
- 0x59, 0x0c, 0x0f, 0x5a, 0x00, 0x55, 0x56, 0x03,
- 0x69, 0x3c, 0x3f, 0x6a, 0x30, 0x65, 0x66, 0x33,
- 0x33, 0x66, 0x65, 0x30, 0x6a, 0x3f, 0x3c, 0x69,
- 0x0c, 0x59, 0x5a, 0x0f, 0x55, 0x00, 0x03, 0x56,
- 0x56, 0x03, 0x00, 0x55, 0x0f, 0x5a, 0x59, 0x0c,
- 0x0f, 0x5a, 0x59, 0x0c, 0x56, 0x03, 0x00, 0x55,
- 0x55, 0x00, 0x03, 0x56, 0x0c, 0x59, 0x5a, 0x0f,
- 0x6a, 0x3f, 0x3c, 0x69, 0x33, 0x66, 0x65, 0x30,
- 0x30, 0x65, 0x66, 0x33, 0x69, 0x3c, 0x3f, 0x6a,
- 0x6a, 0x3f, 0x3c, 0x69, 0x33, 0x66, 0x65, 0x30,
- 0x30, 0x65, 0x66, 0x33, 0x69, 0x3c, 0x3f, 0x6a,
- 0x0f, 0x5a, 0x59, 0x0c, 0x56, 0x03, 0x00, 0x55,
- 0x55, 0x00, 0x03, 0x56, 0x0c, 0x59, 0x5a, 0x0f,
- 0x0c, 0x59, 0x5a, 0x0f, 0x55, 0x00, 0x03, 0x56,
- 0x56, 0x03, 0x00, 0x55, 0x0f, 0x5a, 0x59, 0x0c,
- 0x69, 0x3c, 0x3f, 0x6a, 0x30, 0x65, 0x66, 0x33,
- 0x33, 0x66, 0x65, 0x30, 0x6a, 0x3f, 0x3c, 0x69,
- 0x03, 0x56, 0x55, 0x00, 0x5a, 0x0f, 0x0c, 0x59,
- 0x59, 0x0c, 0x0f, 0x5a, 0x00, 0x55, 0x56, 0x03,
- 0x66, 0x33, 0x30, 0x65, 0x3f, 0x6a, 0x69, 0x3c,
- 0x3c, 0x69, 0x6a, 0x3f, 0x65, 0x30, 0x33, 0x66,
- 0x65, 0x30, 0x33, 0x66, 0x3c, 0x69, 0x6a, 0x3f,
- 0x3f, 0x6a, 0x69, 0x3c, 0x66, 0x33, 0x30, 0x65,
- 0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a,
- 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00,
-};
-
-/* Update ECC parity count */
-static inline uint8_t ecc_digest(struct ecc_state_s *s, uint8_t sample) {
- uint8_t idx = ecc_precalc_table[sample];
-
- s->cp ^= idx & 0x3f;
- if (idx & 0x40) {
- s->lp[0] ^= ~(s->count & 0xff);
- s->lp[1] ^= s->count & 0xff;
- }
- s->count ++;
-
- return sample;
-}
-
-static void buffer_digest(struct ecc_state_s *ecc,
- const uint8_t *buf, uint8_t *out) {
- int i, lp_a[2];
-
- ecc->lp[0] = 0x00;
- ecc->lp[1] = 0x00;
- ecc->cp = 0x00;
- ecc->count = 0;
- for (i = 0; i < ecc->style->eccbytes; i ++)
- ecc_digest(ecc, buf[i]);
-
-# define BSHR(byte, from, to) ((ecc->lp[byte] >> (from - to)) & (1 << to))
- lp_a[0] =
- BSHR(0, 4, 0) | BSHR(0, 5, 2) |
- BSHR(0, 6, 4) | BSHR(0, 7, 6) |
- BSHR(1, 4, 1) | BSHR(1, 5, 3) |
- BSHR(1, 6, 5) | BSHR(1, 7, 7);
-
-# define BSHL(byte, from, to) ((ecc->lp[byte] << (to - from)) & (1 << to))
- lp_a[1] =
- BSHL(0, 0, 0) | BSHL(0, 1, 2) |
- BSHL(0, 2, 4) | BSHL(0, 3, 6) |
- BSHL(1, 0, 1) | BSHL(1, 1, 3) |
- BSHL(1, 2, 5) | BSHL(1, 3, 7);
-
- out[0] = ~lp_a[1];
- out[1] = ~lp_a[0];
- out[2] = (~ecc->cp << 2) | 0x03;
-}
-
-static void jffs2_format(const struct ecc_state_s *ecc, uint8_t oob[]) {
- const struct jffs_marker_s *byte;
- for (byte = ecc->style->freepos; byte->pos >= 0; byte ++)
- oob[byte->pos] = byte->value;
-}
-
-static void buffer_fill(const struct ecc_state_s *ecc, uint8_t buffer[],
- int *len, int *partition, int count, uint8_t jffs_buffer[]) {
- int ret;
-
- switch (*partition) {
- case 0:
- if (count < PARTITION_START) {
- memcpy(buffer, jffs_buffer + count,
- ecc->style->eccbytes);
- *len = ecc->style->eccbytes;
- break;
- }
- *partition = 1;
- case 1:
- if (count - PARTITION_START < PARTITION_START) {
- memcpy(buffer, jffs_buffer + count - PARTITION_START,
- ecc->style->eccbytes);
- *len = ecc->style->eccbytes;
- break;
- }
-
- while (*len < ecc->style->eccbytes) {
- ret = TFR(read(0, buffer + *len, 0x800 - *len));
- if (ret <= 0)
- break;
- *len += ret;
- }
-
- if (*len == 0)
- *partition = 2;
- else if (*len < ecc->style->eccbytes) {
- fprintf(stderr, "\nWarning: %i stray bytes\n", *len);
- memset(buffer + *len, 0xff,
- ecc->style->eccbytes - *len);
- *len = ecc->style->eccbytes;
- break;
- } else
- break;
- case 2:
- memset(buffer, 0xff, ecc->style->eccbytes);
- *len = ecc->style->eccbytes;
- break;
- }
-}
-
-int main(int argc, char *argv[], char *envp[]) {
- struct ecc_state_s ecc;
- uint8_t buffer[0x1000], ecc_payload[0x40], regs[3], *jffs;
- int ret, len, eccbyte, count, partition;
-
- /* Check if we're called by "raw2flash.spitz" or similar */
- len = strlen(argv[0]);
- if (!strcasecmp(argv[0] + len - 5, "akita"))
- ecc.style = &akita;
- else if (!strcasecmp(argv[0] + len - 6, "borzoi"))
- ecc.style = &borzoi;
- else if (!strcasecmp(argv[0] + len - 7, "terrier"))
- ecc.style = &terrier;
- else
- ecc.style = &spitz;
-
-# ifdef VERBOSE
- fprintf(stderr, "[");
-# endif
-
- /* Skip first 10 bytes */
- TFR(read(0, buffer, 0x10));
-
- len = 0;
- jffs = (uint8_t *) malloc(PARTITION_START);
- while (len < PARTITION_START) {
- ret = TFR(read(0, jffs + len, PARTITION_START - len));
- if (ret <= 0)
- break;
- len += ret;
- }
-
- /* Convert data from stdin */
- partition = len = eccbyte = count = 0;
- memset(ecc_payload, 0xff, ecc.style->oob_size);
- jffs2_format(&ecc, ecc_payload);
- while (count < ecc.style->romsize) {
- buffer_fill(&ecc, buffer, &len, &partition, count, jffs);
- buffer_digest(&ecc, buffer, regs);
-
- ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[0];
- ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[1];
- ecc_payload[ecc.style->eccpos[eccbyte ++]] = regs[2];
-
- TFR(write(1, buffer, ecc.style->eccbytes));
- count += ecc.style->eccbytes;
- len -= ecc.style->eccbytes;
- memmove(buffer, buffer + ecc.style->eccbytes, len);
-
- if (eccbyte >= ecc.style->eccsize) {
- TFR(write(1, ecc_payload, ecc.style->oob_size));
- eccbyte = 0;
- memset(ecc_payload, 0xff, ecc.style->oob_size);
- if (partition < 2)
- jffs2_format(&ecc, ecc_payload);
- }
-
-# ifdef VERBOSE
- if (count * PBAR_LEN / ecc.style->romsize >
- (count - ecc.style->eccbytes) *
- PBAR_LEN / ecc.style->romsize)
- fprintf(stderr, "#");
-# endif
- }
-
-# ifdef VERBOSE
- fprintf(stderr, "]\n");
-# endif
- free(jffs);
- return 0;
-}
-#else
-int main(int argc, char *argv[], char *envp[]) {
- struct ecc_state_s ecc;
- uint8_t buffer[0x1000];
- int ret, len, count;
-
- /* Check if we're called by "flash2raw.spitz" or similar */
- len = strlen(argv[0]);
- if (!strcasecmp(argv[0] + len - 5, "akita"))
- ecc.style = &akita;
- else if (!strcasecmp(argv[0] + len - 6, "borzoi"))
- ecc.style = &borzoi;
- else if (!strcasecmp(argv[0] + len - 7, "terrier"))
- ecc.style = &terrier;
- else
- ecc.style = &spitz;
-
-# ifdef VERBOSE
- fprintf(stderr, "[");
-# endif
-
- /* Convert data from stdin */
- count = 0;
- while (count < ecc.style->romsize) {
- len = 0;
- while (len < ecc.style->page_size) {
- ret = TFR(read(0, buffer + len,
- ecc.style->page_size - len));
- if (ret <= 0)
- break;
- len += ret;
- }
- if (len == 0)
- break;
- if (len < ecc.style->page_size) {
- fprintf(stderr, "\nWarning: %i stray bytes\n", len);
- }
-
- TFR(write(1, buffer, ecc.style->page_size));
-
- count += len;
- len = 0;
- while (len < ecc.style->oob_size) {
- ret = TFR(read(0, buffer, ecc.style->oob_size - len));
- if (ret <= 0)
- break;
- len += ret;
- }
-
-# ifdef VERBOSE
- if (count * PBAR_LEN / ecc.style->romsize >
- (count - ecc.style->page_size) *
- PBAR_LEN / ecc.style->romsize)
- fprintf(stderr, "#");
-# endif
- }
-
-# ifdef VERBOSE
- fprintf(stderr, "]\n");
-# endif
- return 0;
-}
-#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
index 269c898c4..b46e7f72e 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
@@ -2,7 +2,7 @@ SUMMARY = "Fast open source processor emulator"
HOMEPAGE = "http://qemu.org"
LICENSE = "GPLv2 & LGPLv2.1"
DEPENDS = "glib-2.0 zlib pixman"
-RDEPENDS_${PN}_class-target += "bash python"
+RDEPENDS_${PN}_class-target += "bash"
RDEPENDS_${PN}-ptest = "bash make"
require qemu-targets.inc
@@ -21,6 +21,7 @@ SRC_URI = "\
file://wacom.patch \
file://add-ptest-in-makefile.patch \
file://run-ptest \
+ file://0001-target-mips-add-24KEc-CPU-definition.patch \
"
SRC_URI_append_class-native = "\
@@ -30,8 +31,12 @@ SRC_URI_append_class-native = "\
EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-bluez --disable-libiscsi --with-system-pixman --extra-cflags='${CFLAGS}'"
-EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror \
- "
+EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror"
+
+EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
+
+LDFLAGS_append_class-native = " -fuse-ld=bfd"
+
export LIBTOOL="${HOST_SYS}-libtool"
do_configure_prepend_class-native() {
@@ -39,13 +44,12 @@ do_configure_prepend_class-native() {
BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
- # link with system dbus on Ubuntu 15.10
- # FIXME: remove below 4 lines when oe dbus is upgraded
- if [ -r /etc/lsb-release -a "$(lsb_release -is)$(lsb_release -rs)" = "Ubuntu15.10" ] ; then
- libs=$(PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_PATH=$BHOST_PKGCONFIG_PATH PATH=/usr/bin:/bin pkg-config --libs dbus-1 || echo "")
- [ -n "$libs" ] && export LDFLAGS="$libs $LDFLAGS"
- fi
fi
+
+ # Alter target makefiles to accept CFLAGS set via env
+ sed -i -r \
+ -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
+ "${S}"/Makefile "${S}"/Makefile.target
}
KVMENABLE = "--enable-kvm"
@@ -72,7 +76,7 @@ do_install_ptest() {
cp -rL ${B}/tests ${D}${PTEST_PATH}
find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm -rf {}
- cp ${S}/tests/Makefile ${D}${PTEST_PATH}/tests
+ cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
}
do_install () {
@@ -103,9 +107,8 @@ PACKAGECONFIG ??= " \
"
PACKAGECONFIG_class-native ??= "fdt alsa uuid"
PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
-NATIVEDEPS = ""
-NATIVEDEPS_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libxext-native', '',d)}"
-PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl ${NATIVEDEPS},"
+
+PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
@@ -117,7 +120,7 @@ PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux,"
PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
-PACKAGECONFIG[gtk+] = "--enable-gtk --enable-vte,--disable-gtk --disable-vte,gtk+ libvte,"
+PACKAGECONFIG[gtk+] = "--enable-gtk --with-gtkabi=3.0 --enable-vte,--disable-gtk --disable-vte,gtk+3 vte"
PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,gcrypt,"
@@ -129,6 +132,7 @@ PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,mesa"
PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
+PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
EXTRA_OECONF += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', '--audio-drv-list=oss,alsa', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch
new file mode 100644
index 000000000..c4dbee7d7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch
@@ -0,0 +1,54 @@
+From 926bc194f918d46bd93557b15da8153b6a94a1d5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
+Date: Mon, 25 Jul 2016 23:58:22 +0100
+Subject: [PATCH] target-mips: add 24KEc CPU definition
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Define a new CPU definition supporting 24KEc cores, similar to
+the existing 24Kc, but with added support for DSP instructions
+and MIPS16e (and without FPU).
+
+Signed-off-by: André Draszik <git@andred.net>
+---
+Upstream-Status: Submitted [http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg05778.html]
+ target-mips/translate_init.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c
+index 39ed5c4..6ae23e4 100644
+--- a/target-mips/translate_init.c
++++ b/target-mips/translate_init.c
+@@ -256,6 +256,28 @@ static const mips_def_t mips_defs[] =
+ .mmu_type = MMU_TYPE_R4000,
+ },
+ {
++ .name = "24KEc",
++ .CP0_PRid = 0x00019600,
++ .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) |
++ (MMU_TYPE_R4000 << CP0C0_MT),
++ .CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU) |
++ (0 << CP0C1_IS) | (3 << CP0C1_IL) | (1 << CP0C1_IA) |
++ (0 << CP0C1_DS) | (3 << CP0C1_DL) | (1 << CP0C1_DA) |
++ (1 << CP0C1_CA),
++ .CP0_Config2 = MIPS_CONFIG2,
++ .CP0_Config3 = MIPS_CONFIG3 | (1 << CP0C3_DSPP) | (0 << CP0C3_VInt),
++ .CP0_LLAddr_rw_bitmask = 0,
++ .CP0_LLAddr_shift = 4,
++ .SYNCI_Step = 32,
++ .CCRes = 2,
++ /* we have a DSP, but no FPU */
++ .CP0_Status_rw_bitmask = 0x1378FF1F,
++ .SEGBITS = 32,
++ .PABITS = 32,
++ .insn_flags = CPU_MIPS32R2 | ASE_MIPS16 | ASE_DSP,
++ .mmu_type = MMU_TYPE_R4000,
++ },
++ {
+ .name = "24Kf",
+ .CP0_PRid = 0x00019300,
+ .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) |
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-1568.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-1568.patch
deleted file mode 100644
index 56fd346ae..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-1568.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 4ab0359a8ae182a7ac5c99609667273167703fab Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Mon, 11 Jan 2016 14:10:42 -0500
-Subject: [PATCH] ide: ahci: reset ncq object to unused on error
-
-When processing NCQ commands, AHCI device emulation prepares a
-NCQ transfer object; To which an aio control block(aiocb) object
-is assigned in 'execute_ncq_command'. In case, when the NCQ
-command is invalid, the 'aiocb' object is not assigned, and NCQ
-transfer object is left as 'used'. This leads to a use after
-free kind of error in 'bdrv_aio_cancel_async' via 'ahci_reset_port'.
-Reset NCQ transfer object to 'unused' to avoid it.
-
-[Maintainer edit: s/ACHI/AHCI/ in the commit message. --js]
-
-Reported-by: Qinghao Tang <luodalongde@gmail.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Reviewed-by: John Snow <jsnow@redhat.com>
-Message-id: 1452282511-4116-1-git-send-email-ppandit@redhat.com
-Signed-off-by: John Snow <jsnow@redhat.com>
-
-Upstream-Status: Backport
-
-http://git.qemu.org/?p=qemu.git;a=commit;h=4ab0359a8ae182a7ac5c99609667273167703fab
-
-CVE: CVE-2016-1568
-[Yocto # 9013]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- hw/ide/ahci.c | 1 +
- 1 file changed, 1 insertion(+)
-
-Index: qemu-2.5.0/hw/ide/ahci.c
-===================================================================
---- qemu-2.5.0.orig/hw/ide/ahci.c
-+++ qemu-2.5.0/hw/ide/ahci.c
-@@ -910,6 +910,7 @@ static void ncq_err(NCQTransferState *nc
- ide_state->error = ABRT_ERR;
- ide_state->status = READY_STAT | ERR_STAT;
- ncq_tfs->drive->port_regs.scr_err |= (1 << ncq_tfs->tag);
-+ ncq_tfs->used = 0;
- }
-
- static void ncq_finish(NCQTransferState *ncq_tfs)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-2197.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-2197.patch
deleted file mode 100644
index 946435c43..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-2197.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From: Prasad J Pandit <address@hidden>
-
-When IDE AHCI emulation uses Frame Information Structures(FIS)
-engine for data transfer, the mapped FIS buffer address is stored
-in a static 'bounce.buffer'. When a request is made to map another
-memory region, address_space_map() returns NULL because
-'bounce.buffer' is in_use. It leads to a null pointer dereference
-error while doing 'dma_memory_unmap'. Add a check to avoid it.
-
-Reported-by: Zuozhi fzz <address@hidden>
-Signed-off-by: Prasad J Pandit <address@hidden>
-
-Upstream-Status: Backport
-https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg05740.html
-
-CVE: CVE-2016-2197
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- hw/ide/ahci.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
- Update as per review
- -> https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg05715.html
-
-Index: qemu-2.5.0/hw/ide/ahci.c
-===================================================================
---- qemu-2.5.0.orig/hw/ide/ahci.c
-+++ qemu-2.5.0/hw/ide/ahci.c
-@@ -661,9 +661,11 @@ static bool ahci_map_fis_address(AHCIDev
-
- static void ahci_unmap_fis_address(AHCIDevice *ad)
- {
-- dma_memory_unmap(ad->hba->as, ad->res_fis, 256,
-- DMA_DIRECTION_FROM_DEVICE, 256);
-- ad->res_fis = NULL;
-+ if (ad->res_fis) {
-+ dma_memory_unmap(ad->hba->as, ad->res_fis, 256,
-+ DMA_DIRECTION_FROM_DEVICE, 256);
-+ ad->res_fis = NULL;
-+ }
- }
-
- static bool ahci_map_clb_address(AHCIDevice *ad)
-@@ -677,9 +679,11 @@ static bool ahci_map_clb_address(AHCIDev
-
- static void ahci_unmap_clb_address(AHCIDevice *ad)
- {
-- dma_memory_unmap(ad->hba->as, ad->lst, 1024,
-- DMA_DIRECTION_FROM_DEVICE, 1024);
-- ad->lst = NULL;
-+ if (ad->lst) {
-+ dma_memory_unmap(ad->hba->as, ad->lst, 1024,
-+ DMA_DIRECTION_FROM_DEVICE, 1024);
-+ ad->lst = NULL;
-+ }
- }
-
- static void ahci_write_fis_sdb(AHCIState *s, NCQTransferState *ncq_tfs)
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-2198.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-2198.patch
deleted file mode 100644
index f1201f061..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-2198.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Prasad J Pandit <address@hidden>
-
-USB Ehci emulation supports host controller capability registers.
-But its mmio '.write' function was missing, which lead to a null
-pointer dereference issue. Add a do nothing 'ehci_caps_write'
-definition to avoid it; Do nothing because capability registers
-are Read Only(RO).
-
-Reported-by: Zuozhi Fzz <address@hidden>
-Signed-off-by: Prasad J Pandit <address@hidden>
-
-Upstream-Status: Backport
-https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg05899.html
-
-CVE: CVE-2016-2198
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- hw/usb/hcd-ehci.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-Index: qemu-2.5.0/hw/usb/hcd-ehci.c
-===================================================================
---- qemu-2.5.0.orig/hw/usb/hcd-ehci.c
-+++ qemu-2.5.0/hw/usb/hcd-ehci.c
-@@ -893,6 +893,11 @@ static uint64_t ehci_caps_read(void *ptr
- return s->caps[addr];
- }
-
-+static void ehci_caps_write(void *ptr, hwaddr addr,
-+ uint64_t val, unsigned size)
-+{
-+}
-+
- static uint64_t ehci_opreg_read(void *ptr, hwaddr addr,
- unsigned size)
- {
-@@ -2310,6 +2315,7 @@ static void ehci_frame_timer(void *opaqu
-
- static const MemoryRegionOps ehci_mmio_caps_ops = {
- .read = ehci_caps_read,
-+ .write = ehci_caps_write,
- .valid.min_access_size = 1,
- .valid.max_access_size = 4,
- .impl.min_access_size = 1,
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
index a99f72098..2ce3478e4 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
@@ -4,14 +4,14 @@ Add subpackage -ptest which runs all unit test cases for qemu.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
- tests/Makefile | 10 ++++++++++
- 1 file changed, 10 insertions(+)
+ tests/Makefile.include | 8 ++++++++
+ 1 file changed, 8 insertions(+)
-diff --git a/tests/Makefile b/tests/Makefile
-index 88f7105..3f40b4b 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -405,3 +405,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
+diff --git a/tests/Makefile.include b/tests/Makefile.include
+index 14be491..0fce37a 100644
+--- a/tests/Makefile.include
++++ b/tests/Makefile.include
+@@ -776,3 +776,11 @@ all: $(QEMU_IOTESTS_HELPERS-y)
-include $(wildcard tests/*.d)
-include $(wildcard tests/libqos/*.d)
@@ -23,7 +23,6 @@ index 88f7105..3f40b4b 100644
+ nf=$$(echo $$f | sed 's/tests\//\.\//g'); \
+ $$nf; \
+ done
-+
---
-1.7.9.5
+--
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
index 41726b1c8..123833f82 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
@@ -29,9 +29,9 @@ index 39a42d6..9b8abe5 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -59,6 +59,10 @@ static SDL_Cursor *guest_sprite = NULL;
- static SDL_PixelFormat host_format;
static int scaling_active = 0;
static Notifier mouse_mode_notifier;
+ static int idle_counter;
+#ifndef True
+#define True 1
+#endif
@@ -40,7 +40,7 @@ index 39a42d6..9b8abe5 100644
static void sdl_update(DisplayChangeListener *dcl,
int x, int y, int w, int h)
@@ -384,14 +388,16 @@ static void sdl_grab_start(void)
- SDL_WarpMouse(guest_x, guest_y);
+ }
} else
sdl_hide_cursor();
- SDL_WM_GrabInput(SDL_GRAB_ON);
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
index 13a6ea23b..cee6a676a 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
@@ -67,9 +67,9 @@ diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
#include <sys/vfs.h>
#include <sys/ioctl.h>
@@ -26,7 +25,11 @@
- #include "virtio-9p-marshal.h"
- #include "hw/9pfs/virtio-9p-proxy.h"
- #include "fsdev/virtio-9p-marshal.h"
+ #include "9p-iov-marshal.h"
+ #include "hw/9pfs/9p-proxy.h"
+ #include "fsdev/9p-iov-marshal.h"
-
+/*
+ * Include this one last due to some versions of it being buggy:
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
new file mode 100644
index 000000000..173394fd0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
@@ -0,0 +1,13 @@
+--- a/configure
++++ b/configure
+@@ -4468,10 +4468,6 @@ fi
+ if test "$gcov" = "yes" ; then
+ CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
+ LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
+-elif test "$fortify_source" = "yes" ; then
+- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
+-elif test "$debug" = "no"; then
+- CFLAGS="-O2 $CFLAGS"
+ fi
+
+ ##########################################
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.5.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.5.0.bb
deleted file mode 100644
index e9d9a8dce..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.5.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require qemu.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
- file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-
-SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
- file://qemu-enlarge-env-entry-size.patch \
- file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
- file://no-valgrind.patch \
- file://CVE-2016-1568.patch \
- file://CVE-2016-2197.patch \
- file://CVE-2016-2198.patch \
- file://pathlimit.patch \
- "
-SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
-SRC_URI[md5sum] = "f469f2330bbe76e3e39db10e9ac4f8db"
-SRC_URI[sha256sum] = "3443887401619fe33bfa5d900a4f2d6a79425ae2b7e43d5b8c36eb7a683772d4"
-
-COMPATIBLE_HOST_class-target_mips64 = "null"
-
-do_install_append() {
- # Prevent QA warnings about installed ${localstatedir}/run
- if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.7.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.7.0.bb
new file mode 100644
index 000000000..619b8ed44
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemu_2.7.0.bb
@@ -0,0 +1,23 @@
+require qemu.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+ file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
+
+SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
+ file://qemu-enlarge-env-entry-size.patch \
+ file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
+ file://no-valgrind.patch \
+ file://pathlimit.patch \
+ file://qemu-2.5.0-cflags.patch \
+"
+
+SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
+SRC_URI[md5sum] = "08d4d06d1cb598efecd796137f4844ab"
+SRC_URI[sha256sum] = "326e739506ba690daf69fc17bd3913a6c313d9928d743bd8eddb82f403f81e53"
+
+COMPATIBLE_HOST_class-target_mips64 = "null"
+
+do_install_append() {
+ # Prevent QA warnings about installed ${localstatedir}/run
+ if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index 7f4c6d934..53b302d65 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -41,10 +41,6 @@ EOF
chmod +x ${D}${bindir_crossscripts}/qemuwrapper
}
-SYSROOT_PREPROCESS_FUNCS += "qemuwrapper_sysroot_preprocess"
-
-qemuwrapper_sysroot_preprocess () {
- sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
-}
+SYSROOT_DIRS += "${bindir_crossscripts}"
INHIBIT_DEFAULT_DEPS = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt.inc b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt.inc
index 4e393c4d8..512b798d7 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/quilt/quilt.inc
@@ -48,10 +48,10 @@ do_compile_ptest() {
}
do_install_ptest() {
- tar -cf - bin/ --exclude \*.in | ( cd ${D}${PTEST_PATH} && tar -xf - )
- tar -cf - compat/ --exclude \*.in | ( cd ${D}${PTEST_PATH} && tar -xf - )
- tar -cf - quilt/ --exclude \*.in | ( cd ${D}${PTEST_PATH} && tar -xf - )
- tar -cf - test/ --exclude mail.test --exclude delete.test | ( cd ${D}${PTEST_PATH} && tar -xf - && chmod 777 test)
+ tar -c --exclude=\*.in bin/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ tar -c --exclude=\*.in compat/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ tar -c --exclude=\*.in quilt/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ tar -c --exclude=mail.test --exclude=delete.test test/ | ( cd ${D}${PTEST_PATH} && tar -xf - && chmod 777 test)
cp ${WORKDIR}/Makefile ${D}${PTEST_PATH}
cp ${WORKDIR}/test.sh ${D}${PTEST_PATH}
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch
new file mode 100644
index 000000000..77dc5b67d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-system.h-query.c-support-nosignature.patch
@@ -0,0 +1,63 @@
+From d8fcc3cbeec4defb5babde5bd09ea294dd3fd08b Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 3 Jul 2016 19:01:59 -0700
+Subject: [PATCH] system.h/query.c: support nosignature
+
+* Define SUPPORT_NOSIGNATURES to 1 in system.h
+* !QVA_ISSET(qva->qva_flags, SIGNATURE) -> QVA_ISSET(qva->qva_flags, SIGNATURE),
+ otherwise, when use --nosignature would read database and verify
+ signature, this is not expected.
+
+Upstream-Status: Submitted [Sent email to rpm-devel@rpm5.org]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ lib/query.c | 6 +++---
+ system.h | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/query.c b/lib/query.c
+index 50a7453..b761d76 100644
+--- a/lib/query.c
++++ b/lib/query.c
+@@ -954,19 +954,19 @@ JBJDEBUG((stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, qva, argv));
+ vsflags = (rpmVSFlags) rpmExpandNumeric("%{?_vsflags_query}");
+ vsflags = (rpmVSFlags) 0; /* XXX FIXME: ignore default disablers. */
+ #if defined(SUPPORT_NOSIGNATURES)
+- if (!QVA_ISSET(qva->qva_flags, DIGEST)) {
++ if (QVA_ISSET(qva->qva_flags, DIGEST)) {
+ VSF_SET(vsflags, NOSHA1HEADER);
+ VSF_SET(vsflags, NOMD5HEADER);
+ VSF_SET(vsflags, NOSHA1);
+ VSF_SET(vsflags, NOMD5);
+ }
+- if (!QVA_ISSET(qva->qva_flags, SIGNATURE)) {
++ if (QVA_ISSET(qva->qva_flags, SIGNATURE)) {
+ VSF_SET(vsflags, NODSAHEADER);
+ VSF_SET(vsflags, NORSAHEADER);
+ VSF_SET(vsflags, NODSA);
+ VSF_SET(vsflags, NORSA);
+ }
+- if (!QVA_ISSET(qva->qva_flags, HDRCHK)) {
++ if (QVA_ISSET(qva->qva_flags, HDRCHK)) {
+ VSF_SET(vsflags, NOHDRCHK);
+ }
+ VSF_CLR(vsflags, NEEDPAYLOAD); /* XXX needed? */
+diff --git a/system.h b/system.h
+index 2ff8906..ad4619a 100644
+--- a/system.h
++++ b/system.h
+@@ -787,9 +787,9 @@ static inline const char *rcsid(const char *p) { \
+ #define SUPPORT_I18NSTRING_TYPE 1
+
+ /**
+- * Eliminate signature/digest disablers.
++ * Signature/digest disablers.
+ */
+-#undef SUPPORT_NOSIGNATURES
++#define SUPPORT_NOSIGNATURES 1
+
+ /**
+ * Permit ar(1) payloads. Disabled while rpmio/iosm.c is under development.
+--
+2.9.0
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
new file mode 100644
index 000000000..0a372c6da
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
@@ -0,0 +1,54 @@
+gcc6 has fixed a long standing c++ include issue where <cheader>
+was different from <header.h> inclusion via
+
+https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html
+
+and its also descibed in https://gcc.gnu.org/gcc-6/porting_to.html
+rpmio component uses some .cpp and .cc fies which need to use
+C stdlib.h from C library and not the C++ libstdc++ header
+therefore we pass _GLIBCXX_INCLUDE_NEXT_C_HEADERS so that it
+keeps the old behavior
+
+/a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/cstdlib:143:11: error: '::getenv' has not been declared
+ using ::getenv;
+ ^~~~~~
+In file included from ../../rpm-5.4.15/system.h:201:0,
+ from ../../rpm-5.4.15/rpmio/rpmjs.cpp:1:
+/a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/stdlib.h:62:12: error: 'std::getenv' has not been declared
+ using std::getenv;
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: rpm-5.4.15/rpmio/Makefile.am
+===================================================================
+--- rpm-5.4.15.orig/rpmio/Makefile.am
++++ rpm-5.4.15/rpmio/Makefile.am
+@@ -151,7 +151,7 @@ librpmio_la_SOURCES = \
+ groestl.c hamsi.c jh.c keccak.c lane.c luffa.c md2.c md6.c radiogatun.c\
+ salsa10.c salsa20.c shabal.c shavite3.c simd.c skein.c tib3.c tiger.c \
+ rpmgit.c rpmio-stub.c \
+- rpmjs.cpp rpmjsio.c rpmkeyring.c \
++ rpmjni.cc rpmjs.cpp rpmjsio.c rpmkeyring.c \
+ rpmnix.c rpmodbc.c rpmsql.c set.c \
+ ar.c \
+ argv.c \
+@@ -195,7 +195,6 @@ librpmio_la_SOURCES = \
+ rpmhook.c \
+ rpmio.c \
+ rpmiob.c \
+- rpmjni.cc \
+ rpmku.c \
+ rpmlog.c \
+ rpmltc.c \
+@@ -279,7 +278,9 @@ keccak.lo: $(top_srcdir)/rpmio/keccak.c
+ #rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.c
+ # @$(LTCOMPILE) -O0 -c $<
+ rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.cpp
+- @$(LTCOMPILE) -O0 -c $<
++ @$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $<
++rpmjni.lo: $(top_srcdir)/rpmio/rpmjni.cc
++ @$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $<
+
+ YACC = byacc -d
+ getdate.c: getdate.y
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
new file mode 100644
index 000000000..63af10024
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch
@@ -0,0 +1,25 @@
+We need to call rpmcliInit to ensure the rpm relocation code is called
+and it correctly honours the relocation environmental variables.
+
+when we export the wrsdk and source the sdk, then execute rpm2cpio xxx.rpm|cpio -t.
+we will get the following error :
+"rpm-5.4.14/rpmdb/dbconfig.c:493:
+db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+Index: rpm-5.4.15/tools/rpm2cpio.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpm2cpio.c 2012-04-27 01:46:51.000000000 +0800
++++ rpm-5.4.15/tools/rpm2cpio.c 2016-09-05 11:07:30.419903338 +0800
+@@ -87,6 +87,8 @@
+ #endif
+ (void) rpmtsSetVSFlags(ts, vsflags);
+
++ rpmcliInit(argc, argv, NULL);
++
+ /*@-mustmod@*/ /* LCL: segfault */
+ rc = rpmReadPackageFile(ts, fdi, "rpm2cpio", &h);
+ /*@=mustmod@*/
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
index 809e54e9c..3a6f8746c 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
@@ -5,32 +5,10 @@ Upstream-Status: Inappropriate [debugging]
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
diff --git a/rpmdb/signature.c b/rpmdb/signature.c
-index dce6c4e..a1d0f06 100644
+index 100204b..e56ab3d 100644
--- a/rpmdb/signature.c
+++ b/rpmdb/signature.c
-@@ -37,6 +37,7 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
- int temput;
- FD_t fd = NULL;
- unsigned int ran;
-+ int ret = 0;
-
- if (!prefix) prefix = "";
-
-@@ -44,8 +45,11 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
- if (!_initialized) {
- _initialized = 1;
- tempfn = rpmGenPath(prefix, tpmacro, NULL);
-- if (rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1))
-- goto errxit;
-+ ret = rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1);
-+ if (ret) {
-+ rpmlog(RPMLOG_ERR, _("error creating temporary directory %s: %d\n"), tempfn, ret);
-+ goto errxit;
-+ }
- }
-
- /* XXX should probably use mkstemp here */
-@@ -68,12 +72,16 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
+@@ -72,12 +72,16 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
#endif
temput = urlPath(tempfn, &tfn);
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch
new file mode 100644
index 000000000..f483f3ad9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-prevent-race-in-tmpdir-creation.patch
@@ -0,0 +1,41 @@
+rpmdb: prevent race in tmpdir creation
+
+If two (or more) instances of rpm are running at the same time they may
+be trying to create the same (base-)temporary directory at the same time
+which causes the other mkdir to fail with EEXIST. This patch prevents a
+failure caused by this race by ignoring EEXIST error on directory
+creation.
+
+Upstream-Status: Pending
+
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+
+diff --git a/rpmdb/signature.c b/rpmdb/signature.c
+index dce6c4e..100204b 100644
+--- a/rpmdb/signature.c
++++ b/rpmdb/signature.c
+@@ -37,6 +37,7 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
+ int temput;
+ FD_t fd = NULL;
+ unsigned int ran;
++ int ret = 0;
+
+ if (!prefix) prefix = "";
+
+@@ -44,8 +45,11 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
+ if (!_initialized) {
+ _initialized = 1;
+ tempfn = rpmGenPath(prefix, tpmacro, NULL);
+- if (rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1))
+- goto errxit;
++ ret = rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1);
++ if (ret && ret != EEXIST) {
++ rpmlog(RPMLOG_ERR, _("error creating temporary directory %s: %d\n"), tempfn, ret);
++ goto errxit;
++ }
+ }
+
+ /* XXX should probably use mkstemp here */
+--
+2.6.6
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
deleted file mode 100644
index 0991f6d52..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
+++ /dev/null
@@ -1,730 +0,0 @@
-SUMMARY = "The RPM package management system"
-DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
-package management system capable of installing, uninstalling, \
-verifying, querying, and updating software packages. Each software \
-package consists of an archive of files along with information about \
-the package like its version, a description, etc."
-
-SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages"
-DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries."
-
-SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
-DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
-development files will simplify the process of writing programs that \
-manipulate RPM packages and databases. These files are intended to \
-simplify the process of creating graphical package managers or any \
-other tools that need an intimate knowledge of RPM packages in order \
-to function."
-
-SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration"
-DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \
-and configuration common between RPM Package Manager."
-
-SUMMARY_${PN}-build = "Scripts and executable programs used to build packages"
-DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \
-that are used to build packages using the RPM Package Manager."
-
-SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
-DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
-written in the Python programming language to use the interface \
-supplied by the RPM Package Manager libraries."
-
-SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages"
-DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \
-written in the Perl programming language to use the interface \
-supplied by the RPM Package Manager libraries."
-
-HOMEPAGE = "http://rpm5.org/"
-LICENSE = "LGPLv2.1 & Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
-LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
-
-# We must have gettext-native, we need gettextize, which may not be provided
-DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
-DEPENDS_append_class-native = " file-replacement-native"
-
-# Apply various fixups that are unique to the CVS environment
-do_fixup_unpack () {
- # 'ln' isn't reliable, and 'mv' could break later builds
- rm -rf ${S}/syck ; cp -r ${WORKDIR}/syck ${S}/.
- rm -rf ${S}/lua ; cp -r ${WORKDIR}/lua ${S}/.
- rm -rf ${S}/popt ; cp -r ${WORKDIR}/popt ${S}/.
- rm -rf ${S}/beecrypt ; cp -r ${WORKDIR}/beecrypt ${S}/.
-}
-
-addtask fixup_unpack after do_unpack before do_patch
-
-# This recipe is really designed for development... to Try out the latest
-# community work in progress.
-DEFAULT_PREFERENCE = "-1"
-
-S = "${WORKDIR}/rpm"
-
-# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
-# in order to extract the distribution SRPM into a format we can extract...
-SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \
- cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=syck \
- cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=lua \
- cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=popt \
- cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=beecrypt \
- file://perfile_rpmdeps.sh \
- file://pythondeps.sh \
-"
-
-# Bug fixes
-SRC_URI += " \
- file://header-include-fix.patch \
- file://rpm-libsql-fix.patch \
- file://rpm-platform.patch \
- file://rpm-platform2.patch \
- file://rpm-tools-mtree-LDFLAGS.patch \
- file://rpm-canonarch.patch \
- file://rpm-no-loopmsg.patch \
- file://rpm-resolvedep.patch \
- file://rpm-packageorigin.patch \
- file://uclibc-support.patch \
- file://rpmatch.patch \
- file://makefile-am-exec-hook.patch \
- file://python-rpm-rpmsense.patch \
- file://debugedit-segv.patch \
- file://debugedit-valid-file-to-fix-segment-fault.patch \
- file://rpm-platform-file-fix.patch \
- file://rpm-lsb-compatibility.patch \
- file://rpm-tag-generate-endian-conversion-fix.patch \
- file://rpm-hardlink-segfault-fix.patch \
- file://rpm-payload-use-hashed-inode.patch \
- file://rpm-fix-logio-cp.patch \
- file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
- file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
- file://0001-define-EM_AARCH64.patch \
- file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
- file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
- file://rpm-mongodb-sasl.patch \
- file://rpm-fix-parseEmbedded.patch \
- file://rpm-rpmio-headers.patch \
- file://rpm-python-restore-origin.patch \
- file://rpm-keccak-sse-intrin.patch \
- file://rpm-atomic-ops.patch \
- file://rpm-gnu-atomic.patch \
- file://rpm-tagname-type.patch \
- file://rpm-python-tagname.patch \
- file://rpm-python-AddErase.patch \
- file://rpm-rpmpgp-popt.patch \
- file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
-"
-
-# OE specific changes
-SRC_URI += " \
- file://rpm-log-auto-rm.patch \
- file://rpm-db-reduce.patch \
- file://rpm-autogen.patch \
- file://rpm-showrc.patch \
- file://rpm-fileclass.patch \
- file://rpm-scriptletexechelper.patch \
- file://rpmdeps-oecore.patch \
- file://rpm-no-perl-urpm.patch \
- file://rpm-macros.patch \
- file://rpm-lua.patch \
- file://rpm-ossp-uuid.patch \
- file://rpm-uuid-include.patch \
- file://rpm-pkgconfigdeps.patch \
- file://no-ldflags-in-pkgconfig.patch \
- file://dbconvert.patch \
- file://rpm-db_buffer_small.patch \
- file://rpm-py-init.patch \
- file://rpm-reloc-macros.patch \
- file://rpm-db5-or-db6.patch \
- file://rpm-db60.patch \
- file://rpmqv_cc_b_gone.patch \
- file://rpm-realpath.patch \
- file://rpm-check-rootpath-reasonableness.patch \
- file://rpm-macros.in-disable-external-key-server.patch \
- file://configure.ac-check-for-both-gpg2-and-gpg.patch \
- file://rpm-disable-auto-stack-protector.patch \
- file://popt-disable-auto-stack-protector.patch \
- file://rpm-syck-fix-gram.patch \
- file://rpm-rpmdb-grammar.patch \
- file://rpm-disable-blaketest.patch \
- file://rpm-autogen-force.patch \
-"
-
-SRC_URI_append_libc-musl = "\
- file://0001-rpm-Fix-build-on-musl.patch \
-"
-# Uncomment the following line to enable platform score debugging
-# This is useful when identifying issues with Smart being unable
-# to process certain package feeds.
-#SRC_URI += "file://rpm-debug-platform.patch"
-
-inherit autotools gettext
-
-acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
-
-# The local distribution macro directory
-distromacrodir = "${libdir}/rpm/poky"
-
-# Specify the default rpm macros in terms of adjustable variables
-rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
-
-# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
-
-# Set the digest algorithm used for verifying file integrity
-# If this value changes, and two different packages have different values
-# the "same file" validation (two packages have a non-conflict file)
-# will fail. This may lead to upgrade problems. You should treat this
-# value as a distribution wide setting, and only change it when you intend
-# a full system upgrade!
-#
-# Defined file digest algorithm values (note: not all are available!):
-# 1 MD5 (legacy RPM default)
-# 2 SHA1
-# 3 RIPEMD-160
-# 5 MD2
-# 6 TIGER-192
-# 8 SHA256
-# 9 SHA384
-# 10 SHA512
-# 11 SHA224
-# 104 MD4
-# 105 RIPEMD-128
-# 106 CRC-32
-# 107 ADLER-32
-# 108 CRC-64 (ECMA-182 polynomial, untested uint64_t problems)
-# 109 Jenkins lookup3.c hashlittle()
-# 111 RIPEMD-256
-# 112 RIPEMD-320
-# 188 BLAKE2B
-# 189 BLAKE2BP
-# 190 BLAKE2S
-# 191 BLAKE2SP
-RPM_FILE_DIGEST_ALGO ?= "1"
-
-# All packages build with RPM5 contain a non-repudiable signature.
-# The purpose of this signature is not to show authenticity of a package,
-# but instead act as a secondary package wide validation that shows it
-# wasn't damaged by accident in transport. (When later you sign the package,
-# this signature may or may not be replaced as there are three signature
-# slots, one for DSA/RSA, one for ECSDA, and one reserved.)
-#
-# There is a known issue w/ RSA signatures that if they start with an 0x00
-# the signing and validation may fail.
-#
-# The following is the list of choices for the non-rpudiable signature
-# (note: not all of these are implemented):
-# DSA (default)
-# RSA (implies SHA1)
-# ECDSA (implies SHA256)
-# DSA/SHA1
-# DSA/SHA224
-# DSA/SHA256
-# DSA/SHA384
-# DSA/SHA512
-# RSA/SHA1
-# RSA/SHA224
-# RSA/SHA256
-# RSA/SHA384
-# RSA/SHA512
-# ECDSA/SHA224 (using NIST P-224)
-# ECDSA/SHA256 (using NIST P-256)
-# ECDSA/SHA384 (using NIST P-384)
-# ECDSA/SHA512 (using NIST P-521)
-RPM_SELF_SIGN_ALGO ?= "DSA"
-
-# Note: perl and sqlite w/o db specified does not currently work.
-# tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python"
-
-# Note: switching to internal popt may not work, as it will generate
-# a shared library which will intentionally not be packaged.
-#
-# If you intend to use the internal version, additional work may be required.
-PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
-
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
-PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
-PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
-
-WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
- --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
- --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
- --without-pythonembed"
-PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
-
-# Perl modules are not built, but they could be enabled fairly easily
-# the perl module creation and installation would need to be patched.
-# (currently has host perl contamination issues)
-WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm"
-WITHOUT_PERL = "--without-perl --without-perl-urpm"
-PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl,"
-
-# The --with-dbsql will only tell RPM to check for support, db
-# may or may not be built w/ the dbsql support.
-WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated"
-PACKAGECONFIG[db] = "${WITH_DB},--without-db,db,"
-
-PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3,"
-
-# This switch simply disables external beecrypt, RPM5 always uses beecrypt
-# for base64 processing and various digest algorithms.
-# Beecrypt is only the preferred crypto engine if it's the only engine enabled.
-PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt,"
-
-# --with-usecrypto= setting defined the item as the preferred system
-# crypto engine, which will take priority over the included beecrypt
-PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl,"
-PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss,"
-PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=gcrypt,--without-gcrypt,gcrypt,"
-
-PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils,"
-PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils,"
-
-WITH_SELINUX = "--with-selinux --with-sepol --with-semanage"
-WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage"
-PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux,"
-
-WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi"
-WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi"
-PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat,"
-
-PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat,"
-PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl,"
-
-PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas,"
-
-EXTRA_OECONF += "--verbose \
- --sysconfdir=${sysconfdir} \
- --with-file \
- --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \
- --with-syck=internal \
- --without-readline \
- --without-libtasn1 \
- --without-pakchois \
- --without-gnutls \
- --with-pcre \
- --enable-utf8 \
- --with-uuid \
- --with-attr \
- --with-acl \
- --with-pthreads \
- --without-cudf \
- --without-ficl \
- --without-aterm \
- --without-nix \
- --without-bash \
- --without-rc \
- --without-js \
- --without-gpsee \
- --without-ruby \
- --without-squirrel \
- --without-sasl2 \
- --with-build-extlibdep \
- --with-build-maxextlibdep \
- --without-valgrind \
- --disable-openmp \
- --enable-build-pic \
- --enable-build-versionscript \
- --enable-build-warnings \
- --enable-build-debug \
- --enable-maintainer-mode \
- --with-path-macros=${rpm_macros} \
- --with-path-lib=${libdir}/rpm \
- --with-bugreport=http://bugzilla.yoctoproject.org \
- --program-prefix= \
- YACC=byacc"
-
-CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
-
-LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
-
-PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale"
-
-SOLIBS = "5.4.so"
-
-# Based on %files section in the rpm.spec
-
-FILES_${PN} = "${bindir}/rpm \
- ${bindir}/rpmconstant \
- ${libdir}/rpm/rpm.* \
- ${libdir}/rpm/tgpg \
- ${libdir}/rpm/macros \
- ${libdir}/rpm/rpmpopt \
- ${libdir}/rpm/rpm2cpio \
- ${libdir}/rpm/vcheck \
- ${libdir}/rpm/helpers \
- ${libdir}/rpm/qf \
- ${libdir}/rpm/cpuinfo.yaml \
- ${libdir}/rpm/bin/mtree \
- ${libdir}/rpm/bin/rpmkey \
- ${libdir}/rpm/bin/rpmrepo \
- ${libdir}/rpm/bin/rpmrepo.real \
- ${libdir}/rpm/bin/rpmspecdump \
- ${libdir}/rpm/bin/rpmspecdump.real \
- ${libdir}/rpm/bin/wget \
- ${localstatedir}/cache \
- ${localstatedir}/cache/rpm \
- ${localstatedir}/cache/wdj \
- ${localstatedir}/lib \
- ${localstatedir}/lib/rpm \
- ${localstatedir}/lib/wdj \
- ${bindir}/rpm.real \
- ${bindir}/rpmconstant.real \
- ${bindir}/rpm2cpio.real \
- "
-
-FILES_${PN}-common = "${bindir}/rpm2cpio \
- ${bindir}/gendiff \
- ${sysconfdir}/rpm \
- ${localstatedir}/spool/repackage \
- "
-
-FILES_${PN}-libs = "${libdir}/librpm-*.so \
- ${libdir}/librpmconstant-*.so \
- ${libdir}/librpmdb-*.so \
- ${libdir}/librpmio-*.so \
- ${libdir}/librpmmisc-*.so \
- ${libdir}/librpmbuild-*.so \
- "
-
-FILES_${PN}-build = "${prefix}/src/rpm \
- ${bindir}/rpmbuild \
- ${bindir}/rpmbuild.real \
- ${libdir}/rpm/brp-* \
- ${libdir}/rpm/check-files \
- ${libdir}/rpm/cross-build \
- ${libdir}/rpm/find-debuginfo.sh \
- ${libdir}/rpm/find-lang.sh \
- ${libdir}/rpm/find-prov.pl \
- ${libdir}/rpm/find-provides.perl \
- ${libdir}/rpm/find-req.pl \
- ${libdir}/rpm/find-requires.perl \
- ${libdir}/rpm/getpo.sh \
- ${libdir}/rpm/http.req \
- ${libdir}/rpm/javadeps.sh \
- ${libdir}/rpm/mono-find-provides \
- ${libdir}/rpm/mono-find-requires \
- ${libdir}/rpm/executabledeps.sh \
- ${libdir}/rpm/libtooldeps.sh \
- ${libdir}/rpm/osgideps.pl \
- ${libdir}/rpm/perldeps.pl \
- ${libdir}/rpm/perl.prov \
- ${libdir}/rpm/perl.req \
- ${libdir}/rpm/php.prov \
- ${libdir}/rpm/php.req \
- ${libdir}/rpm/pkgconfigdeps.sh \
- ${libdir}/rpm/pythondeps.sh \
- ${libdir}/rpm/bin/debugedit \
- ${libdir}/rpm/bin/debugedit.real \
- ${libdir}/rpm/bin/rpmcache \
- ${libdir}/rpm/bin/rpmcache.real \
- ${libdir}/rpm/bin/rpmcmp \
- ${libdir}/rpm/bin/rpmcmp.real \
- ${libdir}/rpm/bin/rpmdeps \
- ${libdir}/rpm/bin/rpmdeps.real \
- ${libdir}/rpm/bin/rpmdeps-oecore \
- ${libdir}/rpm/bin/rpmdeps-oecore.real \
- ${libdir}/rpm/bin/rpmdigest \
- ${libdir}/rpm/bin/rpmdigest.real \
- ${libdir}/rpm/bin/abi-compliance-checker.pl \
- ${libdir}/rpm/bin/api-sanity-autotest.pl \
- ${libdir}/rpm/bin/chroot \
- ${libdir}/rpm/bin/cp \
- ${libdir}/rpm/bin/dbsql \
- ${libdir}/rpm/bin/find \
- ${libdir}/rpm/bin/install-sh \
- ${libdir}/rpm/bin/lua \
- ${libdir}/rpm/bin/luac \
- ${libdir}/rpm/bin/mkinstalldirs \
- ${libdir}/rpm/bin/rpmlua \
- ${libdir}/rpm/bin/rpmluac \
- ${libdir}/rpm/bin/sqlite3 \
- ${libdir}/rpm/macros.d/cmake \
- ${libdir}/rpm/macros.d/java \
- ${libdir}/rpm/macros.d/libtool \
- ${libdir}/rpm/macros.d/mandriva \
- ${libdir}/rpm/macros.d/mono \
- ${libdir}/rpm/macros.d/perl \
- ${libdir}/rpm/macros.d/php \
- ${libdir}/rpm/macros.d/pkgconfig \
- ${libdir}/rpm/macros.d/python \
- ${libdir}/rpm/macros.d/ruby \
- ${libdir}/rpm/macros.d/selinux \
- ${libdir}/rpm/macros.d/tcl \
- ${libdir}/rpm/macros.rpmbuild \
- ${libdir}/rpm/u_pkg.sh \
- ${libdir}/rpm/vpkg-provides.sh \
- ${libdir}/rpm/vpkg-provides2.sh \
- ${libdir}/rpm/perfile_rpmdeps.sh \
- ${distromacrodir} \
- "
-RDEPENDS_${PN} = "base-files run-postinsts"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RDEPENDS_${PN}-build = "file bash perl"
-
-RDEPENDS_python-rpm = "${PN} python"
-
-FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
-PROVIDES += "python-rpm"
-
-FILES_perl-module-rpm = "${libdir}/perl/*/* \
- "
-
-RDEPENDS_${PN}-dev += "bash"
-
-FILES_${PN}-dev = "${includedir}/rpm \
- ${libdir}/librpm.la \
- ${libdir}/librpm.so \
- ${libdir}/librpmconstant.la \
- ${libdir}/librpmconstant.so \
- ${libdir}/librpmdb.la \
- ${libdir}/librpmdb.so \
- ${libdir}/librpmio.la \
- ${libdir}/librpmio.so \
- ${libdir}/librpmmisc.la \
- ${libdir}/librpmmisc.so \
- ${libdir}/librpmbuild.la \
- ${libdir}/librpmbuild.so \
- ${libdir}/rpm/lib/liblua.la \
- ${libdir}/pkgconfig/rpm.pc \
- ${libdir}/rpm/rpmdb_loadcvt \
- "
-
-FILES_${PN}-staticdev = " \
- ${libdir}/librpm.a \
- ${libdir}/librpmconstant.a \
- ${libdir}/librpmdb.a \
- ${libdir}/librpmio.a \
- ${libdir}/librpmmisc.a \
- ${libdir}/librpmbuild.a \
- ${libdir}/rpm/lib/liblua.a \
- ${libdir}/python*/site-packages/rpm/*.a \
- "
-
-do_configure() {
- # Disable tests!
- echo "all:" > ${S}/tests/Makefile.am
- sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in
-
- ( cd ${S}; ${S}/autogen.sh )
-
- # NASTY hack to make sure configure files the right pkg-config file...
- sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \
- -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure
-
- ( cd ${S}/syck ; set +e ; rm -- -l* ; make distclean ) || :
-
- export varprefix=${localstatedir}
- oe_runconf
-}
-
-do_install_append() {
- # Configure -distribution wide- package crypto settings
- # If these change, effectively all packages have to be upgraded!
- sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
- sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
-
- sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
- sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
- sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
- sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
- sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
-
- # Enable MIPS64 N32 transactions. (This is a no-op on non-MIPS targets.)
- sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
-
- # Enable Debian style arbitrary tags...
- sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
-
- install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
- install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
-
- # Remove unpackaged files (based on list in rpm.spec)
- rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm}
-
- rm -f ${D}/${mandir}/man8/rpmcache.8*
- rm -f ${D}/${mandir}/man8/rpmgraph.8*
- rm -f ${D}/${mandir}/*/man8/rpmcache.8*
- rm -f ${D}/${mandir}/*/man8/rpmgraph.8*
- rm -rf ${D}/${mandir}/{fr,ko}
-
- rm -f ${D}/${includedir}/popt.h
- rm -f ${D}/${libdir}/libpopt.*
- rm -f ${D}/${libdir}/pkgconfig/popt.pc
- rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo
- rm -f ${D}/${mandir}/man3/popt.3
-
- rm -f ${D}/${mandir}/man1/xar.1*
- rm -f ${D}/${bindir}/xar
- rm -rf ${D}/${includedir}/xar
- rm -f ${D}/${libdir}/libxar*
-
- rm -f ${D}/${bindir}/lz*
- rm -f ${D}/${bindir}/unlzma
- rm -f ${D}/${bindir}/unxz
- rm -f ${D}/${bindir}/xz*
- rm -rf ${D}/${includedir}/lzma*
- rm -f ${D}/${mandir}/man1/lz*.1
- rm -f ${D}/${libdir}/pkgconfig/liblzma*
-
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.la
-
- #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
- # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
- #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';'
-
- rm -f ${D}/${libdir}/rpm/dbconvert.sh
-
- rm -f ${D}/${libdir}/rpm/libsqldb.*
-
- # We don't want, nor need the Mandriva multiarch items
- rm -f ${D}/${bindir}/multiarch-dispatch
- rm -f ${D}/${bindir}/multiarch-platform
- rm -f ${D}/${libdir}/rpm/check-multiarch-files
- rm -f ${D}/${libdir}/rpm/mkmultiarch
- rm -f ${D}/${includedir}/multiarch-dispatch.h
-
- rm -f ${D}/${libdir}/rpm/gstreamer.sh
- rm -f ${D}/${libdir}/rpm/gem_helper.rb
- rm -f ${D}/${libdir}/rpm/rubygems.rb
- rm -f ${D}/${libdir}/rpm/kmod-deps.sh
- rm -f ${D}/${libdir}/rpm/pythoneggs.py
- rm -f ${D}/${libdir}/rpm/macros.d/kernel
- rm -f ${D}/${libdir}/rpm/macros.d/gstreamer
- rm -f ${D}/${libdir}/rpm/bin/mgo
- rm -f ${D}/${libdir}/rpm/bin/dbconvert
- rm -f ${D}/${libdir}/rpm/bin/pom2spec
-
- rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj
- rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl
-
-}
-
-do_install_append_class-target() {
- # Create and install distribution specific macros
- mkdir -p ${D}/${distromacrodir}
- cat << EOF > ${D}/${distromacrodir}/macros
-%_defaultdocdir ${docdir}
-
-%_prefix ${prefix}
-%_exec_prefix ${exec_prefix}
-%_datarootdir ${datadir}
-%_bindir ${bindir}
-%_sbindir ${sbindir}
-%_libexecdir %{_libdir}/%{name}
-%_datadir ${datadir}
-%_sysconfdir ${sysconfdir}
-%_sharedstatedir ${sharedstatedir}
-%_localstatedir ${localstatedir}
-%_lib lib
-%_libdir %{_exec_prefix}/%{_lib}
-%_includedir ${includedir}
-%_oldincludedir ${oldincludedir}
-%_infodir ${infodir}
-%_mandir ${mandir}
-%_localedir %{_libdir}/locale
-EOF
-
- # Create and install multilib specific macros
- ${@multilib_rpmmacros(d)}
-}
-
-do_install_append_class-native () {
- sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
-}
-
-do_install_append_class-nativesdk () {
- sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
-}
-
-def multilib_rpmmacros(d):
- localdata = d.createCopy()
- # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)
- localdata.delVar('TOOLCHAIN_OPTIONS')
-
- # Set 'localdata' values to be consistent with 'd' values.
- localdata.setVar('distromacrodir', d.getVar('distromacrodir', True))
- localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
-
- ret = gen_arch_macro(localdata)
-
- variants = d.getVar("MULTILIB_VARIANTS", True) or ""
- for item in variants.split():
- # Load overrides from 'd' to avoid having to reset the value...
- localdata = d.createCopy()
- overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
- localdata.setVar("OVERRIDES", overrides)
- localdata.setVar("MLPREFIX", item + "-")
- bb.data.update_data(localdata)
- ret += gen_arch_macro(localdata)
- return ret
-
-def gen_arch_macro(d):
- # Generate shell script to produce the file as part of do_install
- val = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n"
- val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n"
- val += "%_lib ${baselib}\n"
- val += "%_libdir ${libdir}\n"
- val += "%_localedir ${localedir}\n"
- val += "\n"
- val += "# Toolchain configuration\n"
- val += "%TOOLCHAIN_OPTIONS %{nil}\n"
- val += "%__ar ${@d.getVar('AR', True).replace('$','%')}\n"
- val += "%__as ${@d.getVar('AS', True).replace('$','%')}\n"
- val += "%__cc ${@d.getVar('CC', True).replace('$','%')}\n"
- val += "%__cpp ${@d.getVar('CPP', True).replace('$','%')}\n"
- val += "%__cxx ${@d.getVar('CXX', True).replace('$','%')}\n"
- val += "%__ld ${@d.getVar('LD', True).replace('$','%')}\n"
- val += "%__nm ${@d.getVar('NM', True).replace('$','%')}\n"
- val += "%__objcopy ${@d.getVar('OBJCOPY', True).replace('$','%')}\n"
- val += "%__objdump ${@d.getVar('OBJDUMP', True).replace('$','%')}\n"
- val += "%__ranlib ${@d.getVar('RANLIB', True).replace('$','%')}\n"
- val += "%__strip ${@d.getVar('STRIP', True).replace('$','%')}\n"
- val += "EOF\n"
- val += "\n"
- return d.expand(val)
-
-
-add_native_wrapper() {
- create_wrapper ${D}/${bindir}/rpm \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
- create_wrapper ${D}/${bindir}/rpm2cpio \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
- create_wrapper ${D}/${bindir}/rpmbuild \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
- create_wrapper ${D}/${bindir}/rpmconstant \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
- for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do
- create_wrapper $rpm_binary \
- RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
- RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
- RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
- done
-}
-
-do_install_append_class-native() {
- add_native_wrapper
-}
-
-do_install_append_class-nativesdk() {
- add_native_wrapper
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index f2c12d2de..133239712 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -116,6 +116,9 @@ SRC_URI += " \
file://rpm-fix-lua-tests-compilation-failure.patch \
file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \
file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
+ file://gcc6-stdlib.patch \
+ file://0001-system.h-query.c-support-nosignature.patch \
+ file://rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch \
"
# OE specific changes
@@ -151,6 +154,7 @@ SRC_URI += " \
file://rpm-rpmdb-grammar.patch \
file://rpm-disable-blaketest.patch \
file://rpm-autogen-force.patch \
+ file://rpmdb-prevent-race-in-tmpdir-creation.patch \
file://rpmdb-more-verbose-error-logging-in-rpmTempFile.patch \
"
@@ -164,7 +168,7 @@ SRC_URI_append_libc-musl = "\
UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$"
-inherit autotools gettext
+inherit autotools gettext python-dir
acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
@@ -257,7 +261,7 @@ PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
--with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
- --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
+ --with-python-lib-dir=${PYTHON_SITEPACKAGES_DIR} \
--without-pythonembed"
PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
@@ -344,7 +348,7 @@ EXTRA_OECONF += "--verbose \
--program-prefix= \
YACC=byacc"
-CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
+CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS"
LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
@@ -475,7 +479,7 @@ RDEPENDS_${PN}-build = "file bash perl"
RDEPENDS_python-rpm = "${PN} python"
-FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
+FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm"
PROVIDES += "python-rpm"
FILES_perl-module-rpm = "${libdir}/perl/*/* \
@@ -510,7 +514,7 @@ FILES_${PN}-staticdev = " \
${libdir}/librpmmisc.a \
${libdir}/librpmbuild.a \
${libdir}/rpm/lib/liblua.a \
- ${libdir}/python*/site-packages/rpm/*.a \
+ ${PYTHON_SITEPACKAGES_DIR}/rpm/*.a \
"
do_configure() {
@@ -524,7 +528,7 @@ do_configure() {
sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \
-e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure
- ( cd ${S}/syck ; set +e ; rm -- -l* ; make distclean ) || :
+ ( cd ${S}/syck ; set +e ; rm -- -l* ; rm Makefile config.h config.status lib/Makefile libtool stamp-h1 tests/.deps tests/Makefile ) || :
export varprefix=${localstatedir}
oe_runconf
@@ -551,54 +555,20 @@ do_install_append() {
install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
- # Remove unpackaged files (based on list in rpm.spec)
- rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm}
-
- rm -f ${D}/${mandir}/man8/rpmcache.8*
- rm -f ${D}/${mandir}/man8/rpmgraph.8*
- rm -f ${D}/${mandir}/*/man8/rpmcache.8*
- rm -f ${D}/${mandir}/*/man8/rpmgraph.8*
- rm -rf ${D}/${mandir}/{fr,ko}
-
rm -f ${D}/${includedir}/popt.h
rm -f ${D}/${libdir}/libpopt.*
rm -f ${D}/${libdir}/pkgconfig/popt.pc
rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo
rm -f ${D}/${mandir}/man3/popt.3
- rm -f ${D}/${mandir}/man1/xar.1*
- rm -f ${D}/${bindir}/xar
- rm -rf ${D}/${includedir}/xar
- rm -f ${D}/${libdir}/libxar*
-
- rm -f ${D}/${bindir}/lz*
- rm -f ${D}/${bindir}/unlzma
- rm -f ${D}/${bindir}/unxz
- rm -f ${D}/${bindir}/xz*
- rm -rf ${D}/${includedir}/lzma*
- rm -f ${D}/${mandir}/man1/lz*.1
- rm -f ${D}/${libdir}/pkgconfig/liblzma*
-
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a
- rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.la
-
- #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
- # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
- #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';'
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.a
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/*.la
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.a
+ rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/*.la
rm -f ${D}/${libdir}/rpm/dbconvert.sh
-
rm -f ${D}/${libdir}/rpm/libsqldb.*
- # We don't want, nor need the Mandriva multiarch items
- rm -f ${D}/${bindir}/multiarch-dispatch
- rm -f ${D}/${bindir}/multiarch-platform
- rm -f ${D}/${libdir}/rpm/check-multiarch-files
- rm -f ${D}/${libdir}/rpm/mkmultiarch
- rm -f ${D}/${includedir}/multiarch-dispatch.h
-
rm -f ${D}/${libdir}/rpm/gstreamer.sh
rm -f ${D}/${libdir}/rpm/gem_helper.rb
rm -f ${D}/${libdir}/rpm/rubygems.rb
@@ -607,12 +577,10 @@ do_install_append() {
rm -f ${D}/${libdir}/rpm/macros.d/kernel
rm -f ${D}/${libdir}/rpm/macros.d/gstreamer
rm -f ${D}/${libdir}/rpm/bin/mgo
- rm -f ${D}/${libdir}/rpm/bin/dbconvert
rm -f ${D}/${libdir}/rpm/bin/pom2spec
rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj
rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl
-
}
do_install_append_class-target() {
@@ -645,11 +613,11 @@ EOF
}
do_install_append_class-native () {
- sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+ sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
}
do_install_append_class-nativesdk () {
- sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+ sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}${PYTHON_SITEPACKAGES_DIR}/rpm/transaction.py
}
def multilib_rpmmacros(d):
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync.inc b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync.inc
index c65f27031..37897aba8 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync.inc
@@ -3,11 +3,6 @@ HOMEPAGE = "http://rsync.samba.org/"
BUGTRACKER = "http://rsync.samba.org/bugzilla.html"
SECTION = "console/network"
-# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-# needs to add acl and attr
DEPENDS = "popt"
SRC_URI = "http://rsync.samba.org/ftp/rsync/src/rsync-${PV}.tar.gz \
@@ -21,3 +16,5 @@ do_install_append() {
}
EXTRA_OEMAKE='STRIP=""'
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_2.6.9.bb b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_2.6.9.bb
index 6854c77f7..efdf255a0 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_2.6.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_2.6.9.bb
@@ -1,28 +1,15 @@
-SUMMARY = "File synchronization tool"
-HOMEPAGE = "http://rsync.samba.org/"
-BUGTRACKER = "http://rsync.samba.org/bugzilla.html"
-SECTION = "console/network"
+require rsync.inc
-# needs to add acl and attr
-DEPENDS = "popt"
-
-SRC_URI = "http://rsync.samba.org/ftp/rsync/src/rsync-${PV}.tar.gz \
- file://rsync-2.6.9-fname-obo.patch \
- file://rsyncd.conf"
+SRC_URI += "file://rsync-2.6.9-fname-obo.patch \
+ file://rsyncd.conf \
+"
SRC_URI[md5sum] = "996d8d8831dbca17910094e56dcb5942"
SRC_URI[sha256sum] = "ca437301becd890e73300bc69a39189ff1564baa761948ff149b3dd7bde633f9"
-inherit autotools
-
-do_install_append() {
- install -d ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/rsyncd.conf ${D}${sysconfdir}
-}
-
-EXTRA_OEMAKE='STRIP=""'
-
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=6d5a9d4c4d3af25cd68fd83e8a8cb09c"
PR = "r4"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
index 9637ed4e7..c6cb3310f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
@@ -5,7 +5,13 @@ SRC_URI += "file://makefile-no-rebuild.patch"
SRC_URI[md5sum] = "0f758d7e000c0f7f7d3792610fad70cb"
SRC_URI[sha256sum] = "ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2"
-PACKAGECONFIG ??= "acl attr"
+# GPLv2+ (<< 3.0.0), GPLv3+ (>= 3.0.0)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+PACKAGECONFIG ??= "acl attr \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
+"
PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
index 313e75222..fde67e940 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
@@ -20,7 +20,8 @@ DEPENDS_class-native = "openssl-native libyaml-native"
SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
file://extmk.patch \
-"
+ file://0002-Obey-LDFLAGS-for-the-link-of-libruby.patch \
+ "
inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
new file mode 100644
index 000000000..b0114ba28
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+From 306e95a9818d39d3349075aac9609e062b0f19ce Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Thu, 5 May 2016 10:59:07 -0700
+Subject: [PATCH 2/2] Obey LDFLAGS for the link of libruby
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 7da2488..5b4aea1 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -75,7 +75,7 @@ EXTLIBS =
+ LIBS = @LIBS@ $(EXTLIBS)
+ MISSING = @LIBOBJS@ @ALLOCA@
+ LDSHARED = @LIBRUBY_LDSHARED@
+-DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
++DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
+ SOLIBS = @SOLIBS@
+ MAINLIBS = @MAINLIBS@
+ ARCHMINIOBJS = @MINIOBJS@
+--
+2.8.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.2.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.2.bb
deleted file mode 100644
index 671502356..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.2.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-require ruby.inc
-
-SRC_URI[md5sum] = "326e99ddc75381c7b50c85f7089f3260"
-SRC_URI[sha256sum] = "5ffc0f317e429e6b29d4a98ac521c3ce65481bfd22a8cf845fa02a7b113d9b44"
-
-# it's unknown to configure script, but then passed to extconf.rb
-# maybe it's not really needed as we're hardcoding the result with
-# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
-UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
-
-PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
-PACKAGECONFIG[gpm] = "--with-gmp=yes, --with-gmp=no, gmp"
-PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
-
-EXTRA_OECONF = "\
- --disable-versioned-paths \
- --disable-rpath \
- --disable-dtrace \
- --enable-shared \
- --enable-load-relative \
-"
-
-EXTRA_OEMAKE = " \
- LIBRUBYARG='-lruby-static' \
-"
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
-}
-
-PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
-
-SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
-RDEPENDS_${PN}-ri-docs = "${PN}"
-FILES_${PN}-ri-docs += "${datadir}/ri"
-
-SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
-RDEPENDS_${PN}-rdoc = "${PN}"
-FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
-
-FILES_${PN} += "${datadir}/rubygems"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.5.bb b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.5.bb
new file mode 100644
index 000000000..5a645821b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.5.bb
@@ -0,0 +1,42 @@
+require ruby.inc
+
+SRC_URI[md5sum] = "bd8e349d4fb2c75d90817649674f94be"
+SRC_URI[sha256sum] = "30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c03ca335e3"
+
+# it's unknown to configure script, but then passed to extconf.rb
+# maybe it's not really needed as we're hardcoding the result with
+# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
+UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+
+PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
+PACKAGECONFIG[gpm] = "--with-gmp=yes, --with-gmp=no, gmp"
+PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
+
+EXTRA_OECONF = "\
+ --disable-versioned-paths \
+ --disable-rpath \
+ --disable-dtrace \
+ --enable-shared \
+ --enable-load-relative \
+"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
+
+PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
+
+SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
+RDEPENDS_${PN}-ri-docs = "${PN}"
+FILES_${PN}-ri-docs += "${datadir}/ri"
+
+SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
+RDEPENDS_${PN}-rdoc = "${PN}"
+FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
+
+FILES_${PN} += "${datadir}/rubygems"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
index 53a8e1db0..04ba3941b 100755
--- a/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
+++ b/import-layers/yocto-poky/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts
@@ -6,7 +6,7 @@
#
# The following script will run all the scriptlets found in #SYSCONFDIR#/deb-postinsts,
-# #SYSCONFDIR#/ipk-postinsts or #SYSCONFDIR#/rpm-posinsts.
+# #SYSCONFDIR#/ipk-postinsts or #SYSCONFDIR#/rpm-postinsts.
# the order of this list is important, do not change!
backend_list="rpm deb ipk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb
index 597536570..97b308a88 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb
@@ -22,8 +22,6 @@ S = "${WORKDIR}/sgml-common-${PV}"
SYSROOT_PREPROCESS_FUNCS += "sgml_common_native_mangle"
SSTATEPOSTINSTFUNCS += "sgml_common_sstate_postinst"
-CLEANFUNCS += "sgml_common_sstate_clean"
-
do_install_append() {
# install-catalog script contains hard-coded references to
@@ -59,13 +57,14 @@ sgml_common_sstate_postinst() {
fi
done
fi
- fi
-}
+ cat << EOF > ${SSTATE_INST_POSTRM}
+#!/bin/sh
-sgml_common_sstate_clean () {
- # Ensure that the catalog file sgml-docbook.cat is properly
- # updated when the package is removed from sstate cache.
- if [ -f ${sysconfdir}/sgml/sgml-docbook.cat ]; then
- sed -i '/\/sgml\/sgml-ent.cat/d' ${sysconfdir}/sgml/sgml-docbook.cat
+# Ensure that the catalog file sgml-docbook.cat is properly
+# updated when the package is removed from sstate cache.
+if [ -f ${sysconfdir}/sgml/sgml-docbook.cat ]; then
+ sed -i '/\/sgml\/sgml-ent.cat/d' ${sysconfdir}/sgml/sgml-docbook.cat
+fi
+EOF
fi
}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch
new file mode 100644
index 000000000..7f59210ca
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch
@@ -0,0 +1,36 @@
+From 1f0c22b79045cfcdc976643f383c1d09589d3087 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Apr 2016 16:23:56 +0000
+Subject: [PATCH] Fix build when using non-glibc libc implementation on ppc
+
+glibc includes the kernel header into its own header for macros
+musl does not
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ptrace.h | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/ptrace.h b/ptrace.h
+index d8af976..4978a69 100644
+--- a/ptrace.h
++++ b/ptrace.h
+@@ -52,7 +52,13 @@ extern long ptrace(int, int, char *, long);
+ # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args
+ #endif
+
+-#include <linux/ptrace.h>
++#if defined(POWERPC) && !defined(__GLIBC__)
++#define pt_regs uapi_pt_regs
++#endif
++# include <linux/ptrace.h>
++#if defined(POWERPC) && !defined(__GLIBC__)
++# undef pt_regs
++#endif
+
+ #ifdef HAVE_STRUCT_IA64_FPREG
+ # undef ia64_fpreg
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch
deleted file mode 100644
index aa61e15c8..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-From f32126ba790dd4e61d43a2140b24f02426297bb6 Mon Sep 17 00:00:00 2001
-From: "Dmitry V. Levin" <ldv@altlinux.org>
-Date: Thu, 31 Dec 2015 14:19:41 +0000
-Subject: [PATCH] Move gcc compat macros to gcc_compat.h
-
-* defs.h: Include "gcc_compat.h".
-(GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT,
-ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC,
-ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): Move ...
-* gcc_compat.h: ... here.
-* Makefile.am (strace_SOURCES): Add gcc_compat.h.
----
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport
-
- Makefile.am | 1 +
- defs.h | 43 +----------------------------------
- gcc_compat.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 75 insertions(+), 42 deletions(-)
- create mode 100644 gcc_compat.h
-
-diff --git a/Makefile.am b/Makefile.am
-index ab52778..d43608d 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -97,6 +97,7 @@ strace_SOURCES = \
- flock.c \
- flock.h \
- futex.c \
-+ gcc_compat.h \
- get_robust_list.c \
- getcpu.c \
- getcwd.c \
-diff --git a/defs.h b/defs.h
-index 283ab1f..bae212c 100644
---- a/defs.h
-+++ b/defs.h
-@@ -55,6 +55,7 @@
- #include <sys/syscall.h>
-
- #include "mpers_type.h"
-+#include "gcc_compat.h"
-
- #ifndef HAVE_STRERROR
- const char *strerror(int);
-@@ -68,48 +69,6 @@ const char *strerror(int);
- extern char *stpcpy(char *dst, const char *src);
- #endif
-
--#if defined __GNUC__ && defined __GNUC_MINOR__
--# define GNUC_PREREQ(maj, min) \
-- ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
--#else
--# define __attribute__(x) /* empty */
--# define GNUC_PREREQ(maj, min) 0
--#endif
--
--#if GNUC_PREREQ(2, 5)
--# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
--#else
--# define ATTRIBUTE_NORETURN /* empty */
--#endif
--
--#if GNUC_PREREQ(2, 7)
--# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
--# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
--# define ATTRIBUTE_PACKED __attribute__((__packed__))
--#else
--# define ATTRIBUTE_FORMAT(args) /* empty */
--# define ATTRIBUTE_ALIGNED(arg) /* empty */
--# define ATTRIBUTE_PACKED /* empty */
--#endif
--
--#if GNUC_PREREQ(3, 0)
--# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
--#else
--# define ATTRIBUTE_MALLOC /* empty */
--#endif
--
--#if GNUC_PREREQ(3, 1)
--# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
--#else
--# define ATTRIBUTE_NOINLINE /* empty */
--#endif
--
--#if GNUC_PREREQ(4, 3)
--# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
--#else
--# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
--#endif
--
- #ifndef offsetof
- # define offsetof(type, member) \
- (((char *) &(((type *) NULL)->member)) - ((char *) (type *) NULL))
-diff --git a/gcc_compat.h b/gcc_compat.h
-new file mode 100644
-index 0000000..1f2c835
---- /dev/null
-+++ b/gcc_compat.h
-@@ -0,0 +1,73 @@
-+/*
-+ * Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the author may not be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#ifndef GCC_COMPAT_H_
-+#define GCC_COMPAT_H_
-+
-+#if defined __GNUC__ && defined __GNUC_MINOR__
-+# define GNUC_PREREQ(maj, min) \
-+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-+#else
-+# define __attribute__(x) /* empty */
-+# define GNUC_PREREQ(maj, min) 0
-+#endif
-+
-+#if GNUC_PREREQ(2, 5)
-+# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
-+#else
-+# define ATTRIBUTE_NORETURN /* empty */
-+#endif
-+
-+#if GNUC_PREREQ(2, 7)
-+# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
-+# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
-+# define ATTRIBUTE_PACKED __attribute__((__packed__))
-+#else
-+# define ATTRIBUTE_FORMAT(args) /* empty */
-+# define ATTRIBUTE_ALIGNED(arg) /* empty */
-+# define ATTRIBUTE_PACKED /* empty */
-+#endif
-+
-+#if GNUC_PREREQ(3, 0)
-+# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
-+#else
-+# define ATTRIBUTE_MALLOC /* empty */
-+#endif
-+
-+#if GNUC_PREREQ(3, 1)
-+# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
-+#else
-+# define ATTRIBUTE_NOINLINE /* empty */
-+#endif
-+
-+#if GNUC_PREREQ(4, 3)
-+# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
-+#else
-+# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
-+#endif
-+
-+#endif
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
deleted file mode 100644
index a9d32037b..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001
-From: "Dmitry V. Levin" <ldv@altlinux.org>
-Date: Thu, 24 Dec 2015 15:40:55 +0000
-Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build
-
-Fix build regression introduced by commit
-34683e3926d8c2daa368afb805da422ee7043396.
-
-* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap.
-* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff.
-* linux/nios2/syscallent.h: Likewise.
-* linux/or1k/syscallent.h: Likewise.
-* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff.
-* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap.
-* NEWS: Mention this build fix.
-
-Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport
----
- NEWS | 3 +++
- linux/32/syscallent.h | 6 +++---
- linux/arc/syscallent.h | 2 +-
- linux/nios2/syscallent.h | 2 +-
- linux/or1k/syscallent.h | 2 +-
- linux/tile/syscallent1.h | 2 +-
- pathtrace.c | 1 +
- 7 files changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index fe40ca4..09263eb 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,3 +1,9 @@
-+Noteworthy changes in release ?.?? (????-??-??)
-+===============================================
-+
-+* Bug fixes
-+ * Fixed build on arc, metag, nios2, or1k, and tile architectures.
-+
- Noteworthy changes in release 4.11 (2015-12-21)
- ===============================================
-
-diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h
-index 5f997e7..e6f895c 100644
---- a/linux/32/syscallent.h
-+++ b/linux/32/syscallent.h
-@@ -1,5 +1,5 @@
--#ifndef ARCH_mmap
--# define ARCH_mmap mmap
-+#ifndef sys_ARCH_mmap
-+# define sys_ARCH_mmap sys_mmap
- #endif
- [ 0] = { 2, 0, SEN(io_setup), "io_setup" },
- [ 1] = { 1, 0, SEN(io_destroy), "io_destroy" },
-@@ -276,5 +276,5 @@
- [283] = { 2, 0, SEN(membarrier), "membarrier", },
- [284] = { 3, TM, SEN(mlock2), "mlock2" },
-
--#undef ARCH_mmap
-+#undef sys_ARCH_mmap
- #undef ARCH_WANT_SYNC_FILE_RANGE2
-diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h
-index 5847dc4..1100008 100644
---- a/linux/arc/syscallent.h
-+++ b/linux/arc/syscallent.h
-@@ -1,4 +1,4 @@
--#define ARCH_mmap mmap_pgoff
-+#define sys_ARCH_mmap sys_mmap_pgoff
- #include "32/syscallent.h"
- [244] = { 3, 0, SEN(printargs), "arc_cacheflush"},
- [245] = { 1, 0, SEN(printargs), "arc_settls" },
-diff --git a/linux/nios2/syscallent.h b/linux/nios2/syscallent.h
-index 8a4b70e..01efe3a 100644
---- a/linux/nios2/syscallent.h
-+++ b/linux/nios2/syscallent.h
-@@ -1,4 +1,4 @@
--#define ARCH_mmap mmap_pgoff
-+#define sys_ARCH_mmap sys_mmap_pgoff
- #include "32/syscallent.h"
- [244] = {4, 0, SEN(cacheflush), "cacheflush"},
- [245 ... 259] = { },
-diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h
-index ed84b3b..351fe25 100644
---- a/linux/or1k/syscallent.h
-+++ b/linux/or1k/syscallent.h
-@@ -1,4 +1,4 @@
--#define ARCH_mmap mmap_pgoff
-+#define sys_ARCH_mmap sys_mmap_pgoff
- #include "32/syscallent.h"
- [244] = { 3, NF, SEN(or1k_atomic), "or1k_atomic" },
- [245 ... 259] = { },
-diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h
-index c86f059..28dbab4 100644
---- a/linux/tile/syscallent1.h
-+++ b/linux/tile/syscallent1.h
-@@ -1,4 +1,4 @@
--#define ARCH_mmap mmap_4koff
-+#define sys_ARCH_mmap sys_mmap_4koff
- #define ARCH_WANT_SYNC_FILE_RANGE2 1
- #include "32/syscallent.h"
- [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" },
-diff --git a/pathtrace.c b/pathtrace.c
-index d530ec2..e72cdf7 100644
---- a/pathtrace.c
-+++ b/pathtrace.c
-@@ -216,6 +216,7 @@ pathtrace_match(struct tcb *tcp)
- case SEN_mmap:
- case SEN_mmap_4koff:
- case SEN_mmap_pgoff:
-+ case SEN_ARCH_mmap:
- /* x, x, x, x, fd */
- return fdmatch(tcp, tcp->u_arg[4]);
-
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch
deleted file mode 100644
index c4e645b81..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-From 3fdcdd47c6a67585123a0a0c8fffabcc9f79a3a2 Mon Sep 17 00:00:00 2001
-From: "Dmitry V. Levin" <ldv@altlinux.org>
-Date: Tue, 12 Jan 2016 14:47:12 +0000
-Subject: [PATCH] scm_rights-fd.test: rewrite without fork
-
-* tests/scm_rights.c (main): Rewrite without fork.
-Place all objects passed to sendmsg and recvmsg at the end
-of memory pages followed by inaccessible pages.
-* tests/scm_rights-fd.test: Update.
----
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport
-
- tests/scm_rights-fd.test | 12 ++---
- tests/scm_rights.c | 122 ++++++++++++++++++++++-------------------------
- 2 files changed, 63 insertions(+), 71 deletions(-)
-
-diff --git a/tests/scm_rights-fd.test b/tests/scm_rights-fd.test
-index a32ef36..48c5028 100755
---- a/tests/scm_rights-fd.test
-+++ b/tests/scm_rights-fd.test
-@@ -49,18 +49,18 @@ touch -- "$file" ||
- framework_skip_ 'failed to create a file'
-
- run_prog ./scm_rights /dev/zero
--run_strace_merge -y -x -enetwork $args "$file"
-+run_strace -y -x -enetwork $args "$file"
-
-+sample='\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf7\\xf8\\xf9\\xfa\\xfb\\xfc\\xfd\\xfe\\xff'
- n='[1-9][0-9]*'
--msg='\{msg_name\(0\)=NULL, msg_iov\(1\)=\[\{"\\x00\\x00\\x00\\x00[^"]*", '"$n"'\}\], msg_controllen='"$n"
--rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, \[3</dev/null>, 4</dev/zero>, 5</[^}>]*/(A\\n){127}Z>\]\}'
-+msg='\{msg_name\(0\)=NULL, msg_iov\(1\)=\[\{"'"$sample"'", 15\}\], msg_controllen='"$n"
-+rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, \[4</dev/null>, 5</dev/zero>, 6</[^}>]*/(A\\n){127}Z>\]\}'
- creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, \{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}\}'
--prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +'
- EXPECTED="$LOG.expected"
-
- cat > "$EXPECTED" << __EOF__
--${prefix}sendmsg\\(1<socket:\\[[0-9]+\\]>, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) += $n
--${prefix}recvmsg\\(0<socket:\\[[0-9]+\\]>, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) += $n
-+sendmsg\\(3<socket:\\[[0-9]+\\]>, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) = 15
-+recvmsg\\(0<socket:\\[[0-9]+\\]>, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) = 15
- __EOF__
-
- match_grep "$LOG" "$EXPECTED"
-diff --git a/tests/scm_rights.c b/tests/scm_rights.c
-index 1e5e850..00af4d5 100644
---- a/tests/scm_rights.c
-+++ b/tests/scm_rights.c
-@@ -27,26 +27,39 @@
-
- #include "tests.h"
- #include <assert.h>
--#include <string.h>
--#include <stdlib.h>
--#include <unistd.h>
- #include <errno.h>
- #include <fcntl.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
- #include <sys/socket.h>
--#include <sys/wait.h>
-
- int main(int ac, const char **av)
- {
-- int i;
-- int data = 0;
-- struct iovec iov = {
-- .iov_base = &data,
-- .iov_len = sizeof(iov)
-- };
-+ assert(ac > 0);
-+ int fds[ac];
-+
-+ static const char sample[] =
-+ "\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff";
-+ const unsigned int data_size = sizeof(sample) - 1;
-+ void *data = tail_alloc(data_size);
-+ memcpy(data, sample, data_size);
-+
-+ struct iovec *iov = tail_alloc(sizeof(struct iovec));
-+ iov->iov_base = data;
-+ iov->iov_len = data_size;
-
-- while ((i = open("/dev/null", O_RDWR)) < 3)
-+ struct msghdr *mh = tail_alloc(sizeof(struct msghdr));
-+ memset(mh, 0, sizeof(*mh));
-+ mh->msg_iov = iov;
-+ mh->msg_iovlen = 1;
-+
-+ int i;
-+ while ((i = open("/dev/null", O_RDWR)) <= ac + 2)
- assert(i >= 0);
-- (void) close(3);
-+ while (i > 2)
-+ assert(close(i--) == 0);
-+ assert(close(0) == 0);
-
- int sv[2];
- if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv))
-@@ -55,60 +68,39 @@ int main(int ac, const char **av)
- if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)))
- perror_msg_and_skip("setsockopt");
-
-- pid_t pid = fork();
-- if (pid < 0)
-- perror_msg_and_fail("fork");
--
-- if (pid) {
-- assert(close(sv[0]) == 0);
-- assert(dup2(sv[1], 1) == 1);
-- assert(close(sv[1]) == 0);
--
-- int fds[ac];
-- assert((fds[0] = open("/dev/null", O_RDWR)) == 3);
-- for (i = 1; i < ac; ++i)
-- assert((fds[i] = open(av[i], O_RDONLY)) == i + 3);
--
-- union {
-- struct cmsghdr cmsg;
-- char buf[CMSG_LEN(sizeof(fds))];
-- } control;
--
-- control.cmsg.cmsg_level = SOL_SOCKET;
-- control.cmsg.cmsg_type = SCM_RIGHTS;
-- control.cmsg.cmsg_len = CMSG_LEN(sizeof(fds));
-- memcpy(CMSG_DATA(&control.cmsg), fds, sizeof(fds));
--
-- struct msghdr mh = {
-- .msg_iov = &iov,
-- .msg_iovlen = 1,
-- .msg_control = &control,
-- .msg_controllen = sizeof(control)
-- };
--
-- assert(sendmsg(1, &mh, 0) == sizeof(iov));
-- assert(close(1) == 0);
--
-- int status;
-- assert(waitpid(pid, &status, 0) == pid);
-- assert(status == 0);
-- } else {
-- assert(close(sv[1]) == 0);
-- assert(dup2(sv[0], 0) == 0);
-- assert(close(sv[0]) == 0);
--
-- struct cmsghdr control[4 + ac * sizeof(int) / sizeof(struct cmsghdr)];
--
-- struct msghdr mh = {
-- .msg_iov = &iov,
-- .msg_iovlen = 1,
-- .msg_control = control,
-- .msg_controllen = sizeof(control)
-- };
--
-- assert(recvmsg(0, &mh, 0) == sizeof(iov));
-- assert(close(0) == 0);
-+ assert((fds[0] = open("/dev/null", O_RDWR)) == 4);
-+ for (i = 1; i < ac; ++i)
-+ assert((fds[i] = open(av[i], O_RDONLY)) == i + 4);
-+
-+ unsigned int cmsg_size = CMSG_SPACE(sizeof(fds));
-+ struct cmsghdr *cmsg = tail_alloc(cmsg_size);
-+ memset(cmsg, 0, cmsg_size);
-+ cmsg->cmsg_level = SOL_SOCKET;
-+ cmsg->cmsg_type = SCM_RIGHTS;
-+ cmsg->cmsg_len = CMSG_LEN(sizeof(fds));
-+ memcpy(CMSG_DATA(cmsg), fds, sizeof(fds));
-+
-+ mh->msg_control = cmsg;
-+ mh->msg_controllen = cmsg_size;
-+
-+ assert(sendmsg(sv[1], mh, 0) == (int) data_size);
-+
-+ assert(close(sv[1]) == 0);
-+ assert(open("/dev/null", O_RDWR) == sv[1]);
-+
-+ for (i = 0; i < ac; ++i) {
-+ assert(close(fds[i]) == 0);
-+ fds[i] = 0;
- }
-
-+ cmsg_size += CMSG_SPACE(sizeof(struct ucred));
-+ cmsg = tail_alloc(cmsg_size);
-+ memset(cmsg, 0, cmsg_size);
-+ mh->msg_control = cmsg;
-+ mh->msg_controllen = cmsg_size;
-+
-+ assert(recvmsg(0, mh, 0) == (int) data_size);
-+ assert(close(0) == 0);
-+
- return 0;
- }
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch
deleted file mode 100644
index 1575ecd22..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch
+++ /dev/null
@@ -1,306 +0,0 @@
-From 87e6b230fff800eb768b68b2e5173ebbe83fd3ef Mon Sep 17 00:00:00 2001
-From: "Dmitry V. Levin" <ldv@altlinux.org>
-Date: Sat, 2 Jan 2016 12:05:14 +0000
-Subject: [PATCH] tests: introduce libtests
-
-Introduce tests/libtests.a with common functions for use in tests.
-
-* tests/tests.h: New file.
-* tests/error_msg.c: Likewise.
-* tests/tail_alloc.c: Likewise.
-* tests/get_page_size.c: Likewise.
-* tests/Makefile.am (libtests_a_SOURCES, libtests_a_CPPFLAGS,
-check_LIBRARIES, LDADD): New variables.
-(clock_xettime_LDADD, filter_unavailable_LDADD, mq_LDADD,
-pc_LDADD, times_LDADD): Add $(LDADD).
-* tests/.gitignore: Add libtests.a.
----
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport
-
- tests/.gitignore | 1 +
- tests/Makefile.am | 20 ++++++++++----
- tests/error_msg.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++
- tests/get_page_size.c | 13 +++++++++
- tests/tail_alloc.c | 52 ++++++++++++++++++++++++++++++++++++
- tests/tests.h | 62 ++++++++++++++++++++++++++++++++++++++++++
- 6 files changed, 217 insertions(+), 5 deletions(-)
- create mode 100644 tests/error_msg.c
- create mode 100644 tests/get_page_size.c
- create mode 100644 tests/tail_alloc.c
- create mode 100644 tests/tests.h
-
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 386a2c2..62d0e56 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -40,6 +40,16 @@ AM_CPPFLAGS = $(ARCH_MFLAGS) \
- -I$(top_srcdir)
- AM_LDFLAGS = $(ARCH_MFLAGS)
-
-+libtests_a_SOURCES = \
-+ get_page_size.c \
-+ error_msg.c \
-+ tail_alloc.c \
-+ tests.h \
-+ # end of libtests_a_SOURCES
-+libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
-+check_LIBRARIES = libtests.a
-+LDADD = libtests.a
-+
- check_PROGRAMS = \
- _newselect \
- adjtimex \
-@@ -146,19 +156,19 @@ check_PROGRAMS = \
- xettimeofday \
- # end of check_PROGRAMS
-
--clock_xettime_LDADD = -lrt
--filter_unavailable_LDADD = -lpthread
-+clock_xettime_LDADD = -lrt $(LDADD)
-+filter_unavailable_LDADD = -lpthread $(LDADD)
- fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
- fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
- ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
- lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
- mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
--mq_LDADD = -lrt
-+mq_LDADD = -lrt $(LDADD)
- newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
--pc_LDADD = $(dl_LIBS)
-+pc_LDADD = $(dl_LIBS) $(LDADD)
- stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
- statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
--times_LDADD = -lrt
-+times_LDADD = -lrt $(LDADD)
- truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
- uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
- stack_fcall_SOURCES = stack-fcall.c \
-diff --git a/tests/error_msg.c b/tests/error_msg.c
-new file mode 100644
-index 0000000..3fd3411
---- /dev/null
-+++ b/tests/error_msg.c
-@@ -0,0 +1,74 @@
-+/*
-+ * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the author may not be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include "tests.h"
-+#include <errno.h>
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+
-+void
-+perror_msg_and_fail(const char *fmt, ...)
-+{
-+ int err_no = errno;
-+ va_list p;
-+
-+ va_start(p, fmt);
-+ vfprintf(stderr, fmt, p);
-+ if (err_no)
-+ fprintf(stderr, ": %s\n", strerror(err_no));
-+ else
-+ putc('\n', stderr);
-+ exit(1);
-+}
-+
-+void
-+error_msg_and_skip(const char *fmt, ...)
-+{
-+ va_list p;
-+
-+ va_start(p, fmt);
-+ vfprintf(stderr, fmt, p);
-+ putc('\n', stderr);
-+ exit(77);
-+}
-+
-+void
-+perror_msg_and_skip(const char *fmt, ...)
-+{
-+ int err_no = errno;
-+ va_list p;
-+
-+ va_start(p, fmt);
-+ vfprintf(stderr, fmt, p);
-+ if (err_no)
-+ fprintf(stderr, ": %s\n", strerror(err_no));
-+ else
-+ putc('\n', stderr);
-+ exit(77);
-+}
-diff --git a/tests/get_page_size.c b/tests/get_page_size.c
-new file mode 100644
-index 0000000..aeea861
---- /dev/null
-+++ b/tests/get_page_size.c
-@@ -0,0 +1,13 @@
-+#include "tests.h"
-+#include <unistd.h>
-+
-+size_t
-+get_page_size(void)
-+{
-+ static size_t page_size;
-+
-+ if (!page_size)
-+ page_size = sysconf(_SC_PAGESIZE);
-+
-+ return page_size;
-+}
-diff --git a/tests/tail_alloc.c b/tests/tail_alloc.c
-new file mode 100644
-index 0000000..2b8b14e
---- /dev/null
-+++ b/tests/tail_alloc.c
-@@ -0,0 +1,52 @@
-+/*
-+ * Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the author may not be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include "tests.h"
-+#include <string.h>
-+#include <sys/mman.h>
-+
-+void *
-+tail_alloc(const size_t size)
-+{
-+ const size_t page_size = get_page_size();
-+ const size_t len = (size + page_size - 1) & -page_size;
-+ const size_t alloc_size = len + 2 * page_size;
-+
-+ void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE,
-+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
-+ if (MAP_FAILED == p)
-+ perror_msg_and_fail("mmap(%zu)", alloc_size);
-+
-+ void *start_work = p + page_size;
-+ void *tail_guard = start_work + len;
-+
-+ if (munmap(p, page_size) || munmap(tail_guard, page_size))
-+ perror_msg_and_fail("munmap");
-+
-+ memset(start_work, 0xff, len);
-+ return tail_guard - size;
-+}
-diff --git a/tests/tests.h b/tests/tests.h
-new file mode 100644
-index 0000000..91fa24e
---- /dev/null
-+++ b/tests/tests.h
-@@ -0,0 +1,62 @@
-+/*
-+ * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, this list of conditions and the following disclaimer.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the author may not be used to endorse or promote products
-+ * derived from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#ifndef TESTS_H_
-+# define TESTS_H_
-+
-+# ifdef HAVE_CONFIG_H
-+# include "config.h"
-+# endif
-+
-+# include <sys/types.h>
-+# include "gcc_compat.h"
-+
-+/* Cached sysconf(_SC_PAGESIZE). */
-+size_t get_page_size(void);
-+
-+/* Print message and strerror(errno) to stderr, then exit(1). */
-+void perror_msg_and_fail(const char *, ...)
-+ ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
-+/* Print message to stderr, then exit(77). */
-+void error_msg_and_skip(const char *, ...)
-+ ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
-+/* Print message and strerror(errno) to stderr, then exit(77). */
-+void perror_msg_and_skip(const char *, ...)
-+ ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
-+
-+/*
-+ * Allocate memory that ends on the page boundary.
-+ * Pages allocated by this call are preceeded by an unmapped page
-+ * and followed also by an unmapped page.
-+ */
-+void *tail_alloc(const size_t)
-+ ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1));
-+
-+# define SKIP_MAIN_UNDEFINED(arg) \
-+ int main(void) { error_msg_and_skip("undefined: %s", arg); }
-+
-+#endif
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch
deleted file mode 100644
index 3fbab8b66..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 339a15b619b479c63cafba21d5fc359e613d9ee8 Mon Sep 17 00:00:00 2001
-From: "Dmitry V. Levin" <ldv@altlinux.org>
-Date: Mon, 4 Jan 2016 23:53:31 +0000
-Subject: [PATCH] tests/scm_rights.c: use libtests
-
-* tests/scm_rights.c (main): Use perror_msg_and_fail and perror_msg_and_skip.
----
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport
-
- tests/scm_rights.c | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/tests/scm_rights.c b/tests/scm_rights.c
-index c41444f..1e5e850 100644
---- a/tests/scm_rights.c
-+++ b/tests/scm_rights.c
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
-+ * Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
-@@ -25,6 +25,7 @@
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-+#include "tests.h"
- #include <assert.h>
- #include <string.h>
- #include <stdlib.h>
-@@ -48,12 +49,15 @@ int main(int ac, const char **av)
- (void) close(3);
-
- int sv[2];
-- assert(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0);
-+ if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv))
-+ perror_msg_and_skip("socketpair");
- int one = 1;
-- assert(setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) == 0);
-+ if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)))
-+ perror_msg_and_skip("setsockopt");
-
- pid_t pid = fork();
-- assert(pid >= 0);
-+ if (pid < 0)
-+ perror_msg_and_fail("fork");
-
- if (pid) {
- assert(close(sv[0]) == 0);
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index 824031e86..2b76e8a11 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -10,23 +10,22 @@ Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 0209bac..b969e25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ AC_INIT([strace],
AC_CONFIG_SRCDIR([strace.c])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_HEADERS([config.h])
--AM_INIT_AUTOMAKE([foreign nostdinc dist-xz no-dist-gzip silent-rules parallel-tests])
-+AM_INIT_AUTOMAKE([foreign nostdinc dist-xz no-dist-gzip silent-rules serial-tests])
+-AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests])
++AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 0f23b4b..429f7e9 100644
+index 9023029..e1917fa 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
-@@ -332,3 +332,21 @@ ksysent.h: $(srcdir)/ksysent.sed
+@@ -784,3 +784,21 @@ ksysent.h: $(srcdir)/ksysent.sed
BUILT_SOURCES = ksysent.h
CLEANFILES = ksysent.h $(TESTS:=.tmp)
@@ -48,6 +47,3 @@ index 0f23b4b..429f7e9 100644
+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
+ done
+ for i in net net-fd scm_rights-fd sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch
new file mode 100644
index 000000000..b24378bfe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/mips-SIGEMT.patch
@@ -0,0 +1,24 @@
+SIGEMT is not defined everywhere e.g musl does
+not define it. Therefore check it being defined
+before using it.
+
+Fixes errors e.g.
+../../strace-4.13/tests/signal2name.c:45:7: error: 'SIGEMT' undeclared (first use in this function)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: strace-4.13/tests/signal2name.c
+===================================================================
+--- strace-4.13.orig/tests/signal2name.c
++++ strace-4.13/tests/signal2name.c
+@@ -42,7 +42,9 @@ signal2name(int sig)
+ CASE(SIGEMT);
+ CASE(SIGLOST);
+ #elif defined MIPS
++#ifdef SIGEMT
+ CASE(SIGEMT);
++#endif
+ CASE(SIGIOT);
+ CASE(SIGPWR);
+ #else
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
index bfc7f3441..94ee53c7f 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
@@ -12,19 +12,20 @@ Upstream-Status: Inappropriate [configuration]
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
- mpers.awk | 2 +-
- tests/caps.awk | 2 +-
- tests/match.awk | 2 +-
- tests/net-yy-accept.awk | 2 +-
- tests/net-yy-connect.awk | 2 +-
- tests/sigaction.awk | 2 +-
- tests/uid.awk | 2 +-
- tests/unix-yy-accept.awk | 2 +-
- tests/unix-yy-connect.awk | 2 +-
- 9 files changed, 9 insertions(+), 9 deletions(-)
+ mpers.awk | 2 +-
+ tests-m32/caps.awk | 2 +-
+ tests-m32/match.awk | 2 +-
+ tests-m32/sigaction.awk | 2 +-
+ tests-mx32/caps.awk | 2 +-
+ tests-mx32/match.awk | 2 +-
+ tests-mx32/sigaction.awk | 2 +-
+ tests/caps.awk | 2 +-
+ tests/match.awk | 2 +-
+ tests/sigaction.awk | 2 +-
+ 10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/mpers.awk b/mpers.awk
-index 73bf0b0..50e6c16 100644
+index 99248c5..ff10520 100644
--- a/mpers.awk
+++ b/mpers.awk
@@ -1,4 +1,4 @@
@@ -32,87 +33,94 @@ index 73bf0b0..50e6c16 100644
+#!/usr/bin/gawk
#
# Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
- # Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
-diff --git a/tests/caps.awk b/tests/caps.awk
-index bad8b0f..845f37c 100644
---- a/tests/caps.awk
-+++ b/tests/caps.awk
+ # Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
+diff --git a/tests-m32/caps.awk b/tests-m32/caps.awk
+index 67003ac..a66f1f0 100644
+--- a/tests-m32/caps.awk
++++ b/tests-m32/caps.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
- # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
- # All rights reserved.
-diff --git a/tests/match.awk b/tests/match.awk
+ # This file is part of caps strace test.
+ #
+diff --git a/tests-m32/match.awk b/tests-m32/match.awk
index abfbae9..f2740bf 100644
---- a/tests/match.awk
-+++ b/tests/match.awk
+--- a/tests-m32/match.awk
++++ b/tests-m32/match.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
-diff --git a/tests/net-yy-accept.awk b/tests/net-yy-accept.awk
-index fed3e30..e916ab0 100644
---- a/tests/net-yy-accept.awk
-+++ b/tests/net-yy-accept.awk
+diff --git a/tests-m32/sigaction.awk b/tests-m32/sigaction.awk
+index 5c6b6d0..3e14464 100644
+--- a/tests-m32/sigaction.awk
++++ b/tests-m32/sigaction.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
- # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
-diff --git a/tests/net-yy-connect.awk b/tests/net-yy-connect.awk
-index f4dcf91..b3cec8c 100644
---- a/tests/net-yy-connect.awk
-+++ b/tests/net-yy-connect.awk
+ # All rights reserved.
+diff --git a/tests-mx32/caps.awk b/tests-mx32/caps.awk
+index 67003ac..a66f1f0 100644
+--- a/tests-mx32/caps.awk
++++ b/tests-mx32/caps.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
- # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
- # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
-diff --git a/tests/sigaction.awk b/tests/sigaction.awk
-index 5c6b6d0..3e14464 100644
---- a/tests/sigaction.awk
-+++ b/tests/sigaction.awk
+ # This file is part of caps strace test.
+ #
+diff --git a/tests-mx32/match.awk b/tests-mx32/match.awk
+index abfbae9..f2740bf 100644
+--- a/tests-mx32/match.awk
++++ b/tests-mx32/match.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
-diff --git a/tests/uid.awk b/tests/uid.awk
-index a56c5be..67b0749 100644
---- a/tests/uid.awk
-+++ b/tests/uid.awk
+diff --git a/tests-mx32/sigaction.awk b/tests-mx32/sigaction.awk
+index 5c6b6d0..3e14464 100644
+--- a/tests-mx32/sigaction.awk
++++ b/tests-mx32/sigaction.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
# All rights reserved.
-diff --git a/tests/unix-yy-accept.awk b/tests/unix-yy-accept.awk
-index 4ed60e4..2a9d9c0 100644
---- a/tests/unix-yy-accept.awk
-+++ b/tests/unix-yy-accept.awk
+diff --git a/tests/caps.awk b/tests/caps.awk
+index 67003ac..a66f1f0 100644
+--- a/tests/caps.awk
++++ b/tests/caps.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # This file is part of caps strace test.
+ #
+diff --git a/tests/match.awk b/tests/match.awk
+index abfbae9..f2740bf 100644
+--- a/tests/match.awk
++++ b/tests/match.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
- # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
-diff --git a/tests/unix-yy-connect.awk b/tests/unix-yy-connect.awk
-index 262bf2e..c809dfa 100644
---- a/tests/unix-yy-connect.awk
-+++ b/tests/unix-yy-connect.awk
+ # All rights reserved.
+diff --git a/tests/sigaction.awk b/tests/sigaction.awk
+index 5c6b6d0..3e14464 100644
+--- a/tests/sigaction.awk
++++ b/tests/sigaction.awk
@@ -1,4 +1,4 @@
-#!/bin/gawk
+#!/usr/bin/gawk
#
- # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
---
-1.9.1
-
+ # All rights reserved.
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb
deleted file mode 100644
index 739138802..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "System call tracing tool"
-HOMEPAGE = "http://strace.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
- file://disable-git-version-gen.patch \
- file://more-robust-test-for-m32-mx32-compile-support.patch \
- file://update-gawk-paths.patch \
- file://use-asm-sgidefs.h.patch \
- file://0001-arc-metag-nios2-or1k-tile-fix-build.patch \
- file://Makefile-ptest.patch \
- file://0001-tests-scm_rights.c-use-libtests.patch \
- file://0001-scm_rights-fd.test-rewrite-without-fork.patch \
- file://0001-Move-gcc-compat-macros-to-gcc_compat.h.patch \
- file://0001-tests-introduce-libtests.patch \
- file://run-ptest \
- "
-
-SRC_URI[md5sum] = "a15d2555a7febb56d00c6e1a51c655dc"
-SRC_URI[sha256sum] = "e86a5f6cd8f941f67f3e4b28f4e60f3d9185c951cf266404533210a2e5cd8152"
-
-inherit autotools ptest bluetooth
-
-RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
-
-PACKAGECONFIG_class-target ??= "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
-"
-
-PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-
-TESTDIR = "tests"
-
-do_install_append() {
- # We don't ship strace-graph here because it needs perl
- rm ${D}${bindir}/strace-graph
-}
-
-do_compile_ptest() {
- oe_runmake -C ${TESTDIR} buildtest-TESTS
-}
-
-do_install_ptest() {
- oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
- sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.13.bb b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.13.bb
new file mode 100644
index 000000000..cae7f2138
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/strace/strace_4.13.bb
@@ -0,0 +1,49 @@
+SUMMARY = "System call tracing tool"
+HOMEPAGE = "http://strace.sourceforge.net"
+SECTION = "console/utils"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
+ file://disable-git-version-gen.patch \
+ file://more-robust-test-for-m32-mx32-compile-support.patch \
+ file://update-gawk-paths.patch \
+ file://use-asm-sgidefs.h.patch \
+ file://Makefile-ptest.patch \
+ file://run-ptest \
+ file://0001-Fix-build-when-using-non-glibc-libc-implementation-o.patch \
+ file://mips-SIGEMT.patch \
+ "
+
+SRC_URI[md5sum] = "4b78c7febdd24c79d5147824d1a080a3"
+SRC_URI[sha256sum] = "d48f732576c91ece36a5843d63f9be054c40ef59f1e4773986042636861625d7"
+
+inherit autotools ptest bluetooth
+
+RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
+
+PACKAGECONFIG_class-target ??= "\
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+"
+
+PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+
+TESTDIR = "tests"
+
+do_install_append() {
+ # We don't ship strace-graph here because it needs perl
+ rm ${D}${bindir}/strace-graph
+}
+
+do_compile_ptest() {
+ oe_runmake -C ${TESTDIR} buildtest-TESTS
+}
+
+do_install_ptest() {
+ oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
+ sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
+}
+
+BBCLASSEXTEND = "native"
+TOOLCHAIN = "gcc"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.3.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.3.bb
deleted file mode 100644
index a19a675c5..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.3.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "Subversion (svn) version control system client"
-SECTION = "console/network"
-DEPENDS = "apr-util serf sqlite3 file"
-DEPENDS_append_class-native = " file-replacement-native"
-RDEPENDS_${PN} = "serf"
-LICENSE = "Apache-2"
-HOMEPAGE = "http://subversion.tigris.org"
-
-BBCLASSEXTEND = "native"
-
-inherit gettext pythonnative
-
-SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://disable_macos.patch \
- file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
- file://0001-Fix-libtool-name-in-configure.ac.patch \
- "
-SRC_URI[md5sum] = "243036eb28b50ce517fc228eb3250add"
-SRC_URI[sha256sum] = "8bbf6bb125003d88ee1c22935a36b7b1ab7d957e0c8b5fbfe5cb6310b6e86ae0"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
-
-PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
-PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
-
-EXTRA_OECONF = " \
- --without-berkeley-db --without-apxs \
- --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
- --with-apr-util=${STAGING_BINDIR_CROSS} \
- --disable-keychain \
- ac_cv_path_RUBY=none"
-
-inherit autotools
-
-export LDFLAGS += " -L${STAGING_LIBDIR} "
-CPPFLAGS += "-P"
-BUILD_CPPFLAGS += "-P"
-
-acpaths = "-I build/ -I build/ac-macros/"
-
-do_configure_prepend () {
- rm -f ${S}/libtool
- rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
- rm -f ${S}/aclocal.m4
- sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
-}
-
-#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
-#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
-#| make: *** [install-serf-lib] Error 1
-PARALLEL_MAKEINST = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.4.bb
new file mode 100644
index 000000000..3ce83c1da
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.4.bb
@@ -0,0 +1,54 @@
+SUMMARY = "Subversion (svn) version control system client"
+SECTION = "console/network"
+DEPENDS = "apr-util serf sqlite3 file"
+DEPENDS_append_class-native = " file-replacement-native"
+RDEPENDS_${PN} = "serf"
+LICENSE = "Apache-2"
+HOMEPAGE = "http://subversion.tigris.org"
+
+BBCLASSEXTEND = "native"
+
+inherit gettext
+
+SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://disable_macos.patch \
+ file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
+ file://0001-Fix-libtool-name-in-configure.ac.patch \
+ "
+
+SRC_URI[md5sum] = "29121a038f87641055a8183f49e9739f"
+SRC_URI[sha256sum] = "1267f9e2ab983f260623bee841e6c9cc458bf4bf776238ed5f100983f79e9299"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
+
+PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
+PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
+
+EXTRA_OECONF = " \
+ --without-berkeley-db --without-apxs \
+ --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
+ --with-apr-util=${STAGING_BINDIR_CROSS} \
+ --disable-keychain \
+ ac_cv_path_RUBY=none"
+
+inherit autotools
+
+export LDFLAGS += " -L${STAGING_LIBDIR} "
+CPPFLAGS += "-P"
+BUILD_CPPFLAGS += "-P"
+
+acpaths = "-I build/ -I build/ac-macros/"
+
+do_configure_prepend () {
+ rm -f ${S}/libtool
+ rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
+ rm -f ${S}/aclocal.m4
+ sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
+}
+
+#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
+#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
+#| make: *** [install-serf-lib] Error 1
+PARALLEL_MAKEINST = ""
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swabber/swabber-native_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/swabber/swabber-native_git.bb
deleted file mode 100644
index 2f313bb46..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/swabber/swabber-native_git.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Tool to monitor and report on host system file usage"
-HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/swabber"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRCREV = "2d1fe36fb0a4fdaae8823a9818a6785182d75e66"
-PV = "0.0+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-SRC_URI = "git://git.yoctoproject.org/swabber"
-
-inherit native
-
-do_configure () {
- :
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install
-}
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
index 9da40df55..704bb27b9 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/swig/swig.inc
@@ -7,14 +7,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
SECTION = "devel"
-DEPENDS = "libpcre python"
+DEPENDS = "libpcre python3"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
-inherit autotools pythonnative
+inherit autotools python3native
EXTRA_OECONF = " \
- --with-python=${PYTHON} \
+ --with-python3=${PYTHON} \
--without-allegrocl \
--without-android \
--without-boost \
@@ -33,7 +33,6 @@ EXTRA_OECONF = " \
--without-perl5 \
--without-pike \
--without-php \
- --without-python3 \
--without-r \
--without-ruby \
--without-tcl \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_230.bb b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_230.bb
new file mode 100644
index 000000000..9ce629a2b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_230.bb
@@ -0,0 +1,29 @@
+LICENSE = "LGPLv2.1 & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
+ file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI = "git://github.com/systemd/systemd-bootchart.git;protocol=https"
+
+# Modify these as desired
+PV = "230+git${SRCPV}"
+SRCREV = "dcb246b46239259ec99b3c6e6ab7d27e1a5a8a84"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "systemd libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native intltool"
+
+inherit pkgconfig autotools systemd distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "systemd"
+
+SYSTEMD_SERVICE_${PN} = "systemd-bootchart.service"
+
+do_configure_prepend() {
+ # intltool.m4 is a soft link to /usr/share/aclocal/m4, delete it and use the one in our sysroot
+ rm -f ${S}/m4/intltool.m4
+}
+
+FILES_${PN} += "${systemd_unitdir}/systemd-bootchart"
+
+EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
+ --with-rootlibdir=${base_libdir}"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index ab2fcd7ab..e5e41f148 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -5,11 +5,11 @@ BUGTRACKER = "https://bugs.eclipse.org/bugs/"
LICENSE = "EPL-1.0 | EDL-1.0"
LIC_FILES_CHKSUM = "file://edl-v10.html;md5=522a390a83dc186513f0500543ad3679"
-SRCREV = "b9a735e9c7cf82f80d412b7ab15d08b89d5a4ccc"
-PV = "1.3.0+git${SRCPV}"
+SRCREV = "2dddd5f440a15d5406032fac20f206484513646f"
+PV = "1.4.0+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git;branch=1.3_mars_bugfix \
+SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent;branch=1.4_neon_bugfix \
file://fix_ranlib.patch \
file://ldflags.patch \
file://0001-canonicalize_file_name-is-specific-to-glibc.patch;striplevel=2 \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch
index 5b5de0730..72a0fa452 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch
@@ -12,7 +12,7 @@ Fixes tcl target recipe build on old distros which have glibc older than 2.14
| Making directory /srv/home/nitin/builds/build-gcc47/tmp/work/x86_64-poky-linux/tcl-8.5.11-r5/image/usr/bin
| make: *** [install-msgs] Error 1
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/04/26
Index: unix/Makefile.in
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/no_packages.patch b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/no_packages.patch
index ab6cc4316..5c622a236 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/no_packages.patch
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl/no_packages.patch
@@ -5,26 +5,26 @@ Upstream-Status:Inappropriate [embedded specific]
Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
-Index: unix/Makefile.in
-===================================================================
---- unix.orig/Makefile.in 2013-11-10 23:38:12.235425891 -0800
-+++ unix/Makefile.in 2013-11-10 23:38:12.231425891 -0800
-@@ -611,7 +611,7 @@
+diff --git a/Makefile.in b/Makefile.in
+index b729ffd..2c2e824 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -612,7 +612,7 @@ SRCS = $(GENERIC_SRCS) $(TOMMATH_SRCS) $(UNIX_SRCS) $(NOTIFY_SRCS) \
# Start of rules
#--------------------------------------------------------------------------
-all: binaries libraries doc packages
+all: binaries libraries doc
- binaries: ${LIB_FILE} $(STUB_LIB_FILE) ${TCL_EXE}
+ binaries: ${LIB_FILE} ${TCL_EXE}
-@@ -653,12 +653,12 @@
+@@ -656,12 +656,12 @@ Makefile: $(UNIX_DIR)/Makefile.in $(DLTEST_DIR)/Makefile.in
#tclConfig.h: $(UNIX_DIR)/tclConfig.h.in
# $(SHELL) config.status
-clean: clean-packages
+clean:
- rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
+ rm -rf *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
errors ${TCL_EXE} ${TCLTEST_EXE} lib.exp Tcl @DTRACE_HDR@
cd dltest ; $(MAKE) clean
@@ -33,7 +33,7 @@ Index: unix/Makefile.in
rm -rf Makefile config.status config.cache config.log tclConfig.sh \
tclConfig.h *.plist Tcl.framework tcl.pc
cd dltest ; $(MAKE) distclean
-@@ -706,7 +706,7 @@
+@@ -709,7 +709,7 @@ tcltest-real:
# tcltest, ie:
# % make test TESTFLAGS="-verbose bps -file fileName.test"
@@ -42,7 +42,7 @@ Index: unix/Makefile.in
test-tcl: ${TCLTEST_EXE}
$(SHELL_ENV) ${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl $(TESTFLAGS)
-@@ -771,7 +771,7 @@
+@@ -774,7 +774,7 @@ INSTALL_PACKAGE_TARGETS = install-packages
INSTALL_DEV_TARGETS = install-headers
INSTALL_EXTRA_TARGETS = @EXTRA_INSTALL@
INSTALL_TARGETS = $(INSTALL_BASE_TARGETS) $(INSTALL_DOC_TARGETS) $(INSTALL_DEV_TARGETS) \
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.4.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
deleted file mode 100644
index 8e92b3e24..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
+++ /dev/null
@@ -1,102 +0,0 @@
-SUMMARY = "Tool Command Language"
-HOMEPAGE = "http://tcl.sourceforge.net"
-SECTION = "devel/tcltk"
-
-# http://www.tcl.tk/software/tcltk/license.html
-LICENSE = "tcl & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
- file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
-"
-
-DEPENDS = "tcl-native zlib"
-
-BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
- file://tcl-add-soname.patch"
-SRC_URI = "${BASE_SRC_URI} \
- file://fix_non_native_build_issue.patch \
- file://fix_issue_with_old_distro_glibc.patch \
- file://no_packages.patch \
- file://tcl-remove-hardcoded-install-path.patch \
- file://alter-includedir.patch \
- file://run-ptest \
-"
-SRC_URI[md5sum] = "d7cbb91f1ded1919370a30edd1534304"
-SRC_URI[sha256sum] = "9e6ed94c981c1d0c5f5fefb8112d06c6bf4d050a7327e95e71d417c416519c8d"
-
-SRC_URI_class-native = "${BASE_SRC_URI}"
-
-S = "${WORKDIR}/${BPN}${PV}/unix"
-
-VER = "${PV}"
-
-inherit autotools ptest binconfig
-
-DEPENDS_class-native = "zlib-native"
-
-EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
-
-do_configure() {
- cd ${S}
- gnu-configize
- cd ${B}
- oe_runconf
-}
-
-do_compile_prepend() {
- echo > ${S}/../compat/fixstrtod.c
-}
-
-do_install() {
- autotools_do_install install-private-headers
- ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
- ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
- sed -i "s+-L${B}+-L${STAGING_LIBDIR}+g" tclConfig.sh
- sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tclConfig.sh
- sed -i "s,-L${libdir},-L=${libdir},g" tclConfig.sh
- sed -i "s,-I${includedir},-I=${includedir},g" tclConfig.sh
- install -d ${D}${bindir_crossscripts}
- install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
- install -m 0755 tclConfig.sh ${D}${libdir}
- cd ..
- for dir in compat generic unix; do
- install -d ${D}${includedir}/${BPN}${VER}/$dir
- install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/
- done
-}
-
-SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess"
-tcl_sysroot_preprocess () {
- sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
-}
-
-PACKAGES =+ "tcl-lib"
-FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
-FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
-FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
-
-# isn't getting picked up by shlibs code
-RDEPENDS_${PN} += "tcl-lib"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}-ptest += "libgcc"
-
-BBCLASSEXTEND = "native"
-
-do_compile_ptest() {
- oe_runmake tcltest
-}
-
-do_install_ptest() {
- cp ${B}/tcltest ${D}${PTEST_PATH}
- cp -r ${S}/../library ${D}${PTEST_PATH}
- cp -r ${S}/../tests ${D}${PTEST_PATH}
-}
-
-# Fix some paths that might be used by Tcl extensions
-BINCONFIG_GLOB = "*Config.sh"
-
-# Fix the path in sstate
-SSTATE_SCAN_FILES += "*Config.sh"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb
new file mode 100644
index 000000000..2dd0a7ae9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/tcltk/tcl_8.6.6.bb
@@ -0,0 +1,97 @@
+SUMMARY = "Tool Command Language"
+HOMEPAGE = "http://tcl.sourceforge.net"
+SECTION = "devel/tcltk"
+
+# http://www.tcl.tk/software/tcltk/license.html
+LICENSE = "tcl & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://../license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../compat/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../library/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../macosx/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../tests/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+ file://../win/license.terms;md5=058f6229798281bbcac4239c788cfa38 \
+"
+
+DEPENDS = "tcl-native zlib"
+
+BASE_SRC_URI = "${SOURCEFORGE_MIRROR}/tcl/${BPN}${PV}-src.tar.gz \
+ file://tcl-add-soname.patch"
+SRC_URI = "${BASE_SRC_URI} \
+ file://fix_non_native_build_issue.patch \
+ file://fix_issue_with_old_distro_glibc.patch \
+ file://no_packages.patch \
+ file://tcl-remove-hardcoded-install-path.patch \
+ file://alter-includedir.patch \
+ file://run-ptest \
+"
+SRC_URI[md5sum] = "5193aea8107839a79df8ac709552ecb7"
+SRC_URI[sha256sum] = "a265409781e4b3edcc4ef822533071b34c3dc6790b893963809b9fe221befe07"
+
+SRC_URI_class-native = "${BASE_SRC_URI}"
+
+S = "${WORKDIR}/${BPN}${PV}/unix"
+
+VER = "${PV}"
+
+inherit autotools ptest binconfig
+
+DEPENDS_class-native = "zlib-native"
+
+EXTRA_OECONF = "--enable-threads --disable-rpath --libdir=${libdir}"
+
+do_configure() {
+ cd ${S}
+ gnu-configize
+ cd ${B}
+ oe_runconf
+}
+
+do_compile_prepend() {
+ echo > ${S}/../compat/fixstrtod.c
+}
+
+do_install() {
+ autotools_do_install install-private-headers
+ ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
+ ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
+ sed -i "s+-L${B}+-L${STAGING_LIBDIR}+g" tclConfig.sh
+ sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tclConfig.sh
+ install -d ${D}${bindir_crossscripts}
+ install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
+ install -m 0755 tclConfig.sh ${D}${libdir}
+ cd ..
+ for dir in compat generic unix; do
+ install -d ${D}${includedir}/${BPN}${VER}/$dir
+ install -m 0644 ${S}/../$dir/*.h ${D}${includedir}/${BPN}${VER}/$dir/
+ done
+}
+
+SYSROOT_DIRS += "${bindir_crossscripts}"
+
+PACKAGES =+ "tcl-lib"
+FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
+FILES_${PN} += "${libdir}/tcl${VER} ${libdir}/tcl8.6 ${libdir}/tcl8"
+FILES_${PN}-dev += "${libdir}/tclConfig.sh ${libdir}/tclooConfig.sh"
+
+# isn't getting picked up by shlibs code
+RDEPENDS_${PN} += "tcl-lib"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}-ptest += "libgcc"
+
+BBCLASSEXTEND = "native"
+
+do_compile_ptest() {
+ oe_runmake tcltest
+}
+
+do_install_ptest() {
+ cp ${B}/tcltest ${D}${PTEST_PATH}
+ cp -r ${S}/../library ${D}${PTEST_PATH}
+ cp -r ${S}/../tests ${D}${PTEST_PATH}
+}
+
+# Fix some paths that might be used by Tcl extensions
+BINCONFIG_GLOB = "*Config.sh"
+
+# Fix the path in sstate
+SSTATE_SCAN_FILES += "*Config.sh"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb b/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
index eba1139e5..e7574fb72 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
@@ -9,8 +9,8 @@ RECIPE_UPSTREAM_DATE = "Oct 08, 2015"
CHECK_DATE = "Dec 10, 2015"
DEPENDS = "flex-native bison-native flex"
-DEPENDS_append_libc-musl = " libtirpc "
-DEPENDS_append_class-nativesdk += "flex-nativesdk"
+DEPENDS_append_libc-musl = " libtirpc"
+DEPENDS_append_class-nativesdk = " flex-nativesdk"
MOD_PV = "497"
S = "${WORKDIR}/trunk"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
index 2a8875f01..34c9db931 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala.inc
@@ -11,7 +11,7 @@ HOMEPAGE = "http://vala-project.org"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
+SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
inherit autotools pkgconfig upstream-version-is-even
@@ -36,15 +36,14 @@ do_install_append_class-target() {
install ${B}/vapigen-wrapper ${D}${bindir}/
}
+# Put vapigen wrapper into target sysroot so that it can be used when building
+# vapi files.
+SYSROOT_DIRS_append_class-target = " ${bindir}"
-SYSROOT_PREPROCESS_FUNCS_append_class-target += "vapigen_sysroot_preprocess"
-
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess"
vapigen_sysroot_preprocess() {
- # Put vapigen wrapper into target sysroot so that it can be used when building vapi files.
- sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
-
- # Also, tweak the vapigen name in vapigen pkgconfig file, so that it picks up our
- # wrapper.
+ # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks
+ # up our wrapper.
sed -i \
-e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \
${SYSROOT_DESTDIR}${datadir}/pkgconfig/vapigen-${SHRT_VER}.pc
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.30.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.30.1.bb
deleted file mode 100644
index 6394afcc1..000000000
--- a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.30.1.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
- file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
-"
-
-SRC_URI[md5sum] = "cc2eb2384fc10038b643753d734a5a51"
-SRC_URI[sha256sum] = "23add78e5c6a5e6df019d4a885c9c79814c9e0b957519ec8a4f4d826c4e5df2c"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.32.1.bb b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.32.1.bb
new file mode 100644
index 000000000..b34086e20
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/vala/vala_0.32.1.bb
@@ -0,0 +1,8 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
+ file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
+"
+
+SRC_URI[md5sum] = "755881770bffac020b5ea5f625fbe528"
+SRC_URI[sha256sum] = "dd0d47e548a34cfb1e4b04149acd082a86414c49057ffb79902eb9a508a161a9"
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/gcc5-port.patch b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/gcc5-port.patch
new file mode 100644
index 000000000..76bc82187
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind/gcc5-port.patch
@@ -0,0 +1,64 @@
+backport fix from upstream to fix build errors with gcc 6
+
+http://valgrind.10908.n7.nabble.com/Valgrind-r15773-in-trunk-configure-ac-drd-tests-std-thread-cpp-drd-tests-std-thread2-cpp-td56109.html
+
+../../../valgrind-3.11.0/drd/tests/std_thread.cpp:30:3: error: '_Impl_base' is not a member of 'std::thread'
+ std::thread::_Impl_base* __t = static_cast<std::thread::_Impl_base*>(__p);
+ ^~~
+../../../valgrind-3.11.0/drd/tests/std_thread.cpp:30:28: error: '__t' was not declared in this scope
+ std::thread::_Impl_base* __t = static_cast<std::thread::_Impl_base*>(__p);
+ ^~~
+../../../valgrind-3.11.0/drd/tests/std_thread.cpp:30:59: error: '_Impl_base' in 'class std::thread' does not name a type
+ std::thread::_Impl_base* __t = static_cast<std::thread::_Impl_base*>(__p);
+ ^~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+Index: configure.ac
+===================================================================
+--- a/configure.ac (revision 15772)
++++ b/configure.ac (revision 15773)
+@@ -160,7 +160,7 @@
+ icc-1[[3-9]].*)
+ AC_MSG_RESULT([ok (ICC version ${gcc_version})])
+ ;;
+- notclang-[[3-9]].*|notclang-[[1-9][0-9]]*)
++ notclang-[[3-9]]|notclang-[[3-9]].*|notclang-[[1-9][0-9]]*)
+ AC_MSG_RESULT([ok (${gcc_version})])
+ ;;
+ clang-2.9|clang-[[3-9]].*|clang-[[1-9][0-9]]*)
+Index: drd/tests/std_thread2.cpp
+===================================================================
+--- a/drd/tests/std_thread2.cpp (revision 15772)
++++ b/drd/tests/std_thread2.cpp (revision 15773)
+@@ -26,6 +26,7 @@
+ return 0;
+ }
+
++#if defined(__GNUC__) && __GNUC__ -0 < 6
+ //
+ // From libstdc++-v3/src/c++11/thread.cc
+ //
+@@ -70,3 +71,4 @@
+ }
+ }
+ }
++#endif
+Index: drd/tests/std_thread.cpp
+===================================================================
+--- a/drd/tests/std_thread.cpp (revision 15772)
++++ b/drd/tests/std_thread.cpp (revision 15773)
+@@ -21,6 +21,7 @@
+ return 0;
+ }
+
++#if defined(__GNUC__) && __GNUC__ -0 < 6
+ //
+ // From libstdc++-v3/src/c++11/thread.cc
+ //
+@@ -65,3 +66,4 @@
+ }
+ }
+ }
++#endif
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
index 51c88bf7a..42fd27f53 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
@@ -23,6 +23,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
file://avoid-neon-for-targets-which-don-t-support-it.patch \
+ file://gcc5-port.patch \
"
SRC_URI_append_libc-musl = "\
file://0001-fix-build-for-musl-targets.patch \
@@ -37,6 +38,10 @@ COMPATIBLE_HOST_armv4 = 'null'
COMPATIBLE_HOST_armv5 = 'null'
COMPATIBLE_HOST_armv6 = 'null'
+# valgrind doesn't like mips soft float
+COMPATIBLE_HOST_mips = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}"
+COMPATIBLE_HOST_mipsel = "${@bb.utils.contains("TARGET_FPU", "soft", "null", ".*-linux", d)}"
+
inherit autotools ptest
EXTRA_OECONF = "--enable-tls --without-mpicc"
@@ -68,9 +73,9 @@ RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob"
RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
-# One of the tests contains a bogus interpreter path on purpose, and QA
-# check complains about it
-INSANE_SKIP_${PN}-ptest += "file-rdeps"
+# One of the tests contains a bogus interpreter path on purpose.
+# Skip file dependency check
+SKIP_FILEDEPS_${PN}-ptest = '1'
do_compile_ptest() {
oe_runmake check
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/import-layers/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
index 71f873f9e..aaaeb6eb2 100644
--- a/import-layers/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
+++ b/import-layers/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
@@ -13,8 +13,9 @@ SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6"
SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
inherit autotools
+RDEPENDS_class-native = "libxslt-native"
-# xmlto needs getopt/xmllint/xsltproc/bash at runtime
+# xmlto needs getopt/xmllint/xsltproc/bash/tail at runtime
RDEPENDS_${PN} = "docbook-xml-dtd4 \
docbook-xsl-stylesheets \
util-linux \
@@ -23,7 +24,9 @@ RDEPENDS_${PN} = "docbook-xml-dtd4 \
"
RDEPENDS_${PN}_append_class-target = " \
libxslt-bin \
+ coreutils \
"
+CACHED_CONFIGUREVARS += "ac_cv_path_TAIL=${bindir}/tail"
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb b/import-layers/yocto-poky/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
new file mode 100644
index 000000000..1cd145421
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Tool for creating HTML, PDF, EPUB, man pages"
+DESCRIPTION = "AsciiDoc is a text document format for writing short documents, \
+articles, books and UNIX man pages."
+
+HOMEPAGE = "http://asciidoc.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+ file://COPYRIGHT;md5=029ad5428ba5efa20176b396222d4069"
+
+SRC_URI = "http://downloads.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BP}.tar.gz"
+SRC_URI[md5sum] = "c59018f105be8d022714b826b0be130a"
+SRC_URI[sha256sum] = "78db9d0567c8ab6570a6eff7ffdf84eadd91f2dfc0a92a2d0105d323cab4e1f0"
+
+UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/asciidoc/files/"
+
+inherit distutils autotools-brokensep
+
+export DESTDIR = "${D}"
+DEPENDS_class-native = "docbook-xml-dtd4-native"
+RDEPENDS_${PN} += "python"
+BBCLASSEXTEND = "native"
+
+CLEANBROKEN = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch b/import-layers/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch
deleted file mode 100644
index 389af1e07..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From c02354af7f3d9426da31503abfae70952c699a9d Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Fri, 18 Mar 2016 03:23:11 -0400
-Subject: [PATCH] configure: fix with/without selinux
-
-Problem:
-without-selinux doesn't work since WITH_SELINUX is always be defined no
-matter which option is given: with-selinux, without-selinux.
-
-Fix:
-Disable selinux support if without-selinux is given; otherwise check
-libselinux to determine if selinux support should be enabled.
-
-Upstream-Status: Submitted [at@packages.debian.org]
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- configure.ac | 19 +++++++++++++++----
- 1 file changed, 15 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 5a43419..8c9de62 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -240,10 +240,21 @@ AC_ARG_WITH(daemon_username,
- AC_SUBST(DAEMON_USERNAME)
-
- AC_ARG_WITH(selinux,
--[ --with-selinux Define to run with selinux],
--AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux]),
--)
--AC_CHECK_LIB(selinux, is_selinux_enabled, SELINUXLIB=-lselinux)
-+[ --with-selinux Define to run with selinux (default=check)],
-+[],
-+[with_selinux=check])
-+
-+if test "x$with_selinux" != xno; then
-+ AC_CHECK_LIB([selinux], [is_selinux_enabled],
-+ [SELINUXLIB=-lselinux
-+ AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux])
-+ ],
-+ [if test "x$with_selinux" != xcheck; then
-+ AC_MSG_FAILURE([--with-selinux is given, but test for selinux failed])
-+ fi
-+ ]
-+ )
-+fi
- AC_SUBST(SELINUXLIB)
- AC_SUBST(WITH_SELINUX)
-
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.18.bb b/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.18.bb
deleted file mode 100644
index 93044f53e..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.18.bb
+++ /dev/null
@@ -1,70 +0,0 @@
-SUMMARY = "Delayed job execution and batch processing"
-DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \
-the system load levels drop to a particular level."
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
-DEPENDS = "flex flex-native \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
-"
-
-PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
-
-RCONFLICTS_${PN} = "atd"
-RREPLACES_${PN} = "atd"
-
-SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz;subdir=${BP} \
- file://fix_parallel_build_error.patch \
- file://posixtm.c \
- file://posixtm.h \
- file://file_replacement_with_gplv2.patch \
- file://atd.init \
- file://atd.service \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://makefile-fix-parallel.patch \
- file://0001-remove-glibc-assumption.patch \
- file://configure-fix-with-without-selinux.patch \
- "
-
-PAM_SRC_URI = "file://pam.conf.patch \
- file://configure-add-enable-pam.patch"
-
-SRC_URI[md5sum] = "f67a7aab557cd5b4a1311079a08acebe"
-SRC_URI[sha256sum] = "dbd5c8cb8edd53ef467363c3af0391c08769f1dbbd4d5002c59a4cd4cac11d52"
-
-EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
- --with-daemon_username=root \
- --with-daemon_groupname=root \
- --with-jobdir=/var/spool/at/jobs \
- --with-atspool=/var/spool/at/spool \
- ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
-
-inherit autotools-brokensep systemd update-rc.d
-
-INITSCRIPT_NAME = "atd"
-INITSCRIPT_PARAMS = "defaults"
-
-SYSTEMD_SERVICE_${PN} = "atd.service"
-
-copy_sources() {
- cp -f ${WORKDIR}/posixtm.[ch] ${S}
-}
-do_patch[postfuncs] += "copy_sources"
-
-do_install () {
- oe_runmake -e "IROOT=${D}" install
-
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd
-
- # install systemd unit files
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
-
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
- install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb b/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb
new file mode 100644
index 000000000..85459b640
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/at/at_3.1.20.bb
@@ -0,0 +1,71 @@
+SUMMARY = "Delayed job execution and batch processing"
+DESCRIPTION = "At allows for commands to be run at a particular time. Batch will execute commands when \
+the system load levels drop to a particular level."
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
+DEPENDS = "flex flex-native \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
+"
+
+PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
+
+RCONFLICTS_${PN} = "atd"
+RREPLACES_${PN} = "atd"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \
+ file://fix_parallel_build_error.patch \
+ file://posixtm.c \
+ file://posixtm.h \
+ file://file_replacement_with_gplv2.patch \
+ file://atd.init \
+ file://atd.service \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://makefile-fix-parallel.patch \
+ file://0001-remove-glibc-assumption.patch \
+ "
+
+PAM_SRC_URI = "file://pam.conf.patch \
+ file://configure-add-enable-pam.patch"
+
+SRC_URI[md5sum] = "e7bd7b785b2cbb17e133d6bdc0fb099e"
+SRC_URI[sha256sum] = "0871923cab73050b98ace020664eb2ddc1e669e4166b5abb64d864d02fcefab9"
+
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/at/"
+
+EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
+ --with-daemon_username=root \
+ --with-daemon_groupname=root \
+ --with-jobdir=/var/spool/at/jobs \
+ --with-atspool=/var/spool/at/spool \
+ ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
+
+inherit autotools-brokensep systemd update-rc.d
+
+INITSCRIPT_NAME = "atd"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "atd.service"
+
+copy_sources() {
+ cp -f ${WORKDIR}/posixtm.[ch] ${S}
+}
+do_patch[postfuncs] += "copy_sources"
+
+do_install () {
+ oe_runmake -e "IROOT=${D}" install
+
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/atd.init ${D}${sysconfdir}/init.d/atd
+
+ # install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
+
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas.inc b/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas.inc
deleted file mode 100644
index 23d12cadf..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Augeas configuration API"
-HOMEPAGE = "http://augeas.net/"
-BUGTRACKER = "https://fedorahosted.org/augeas/report/1"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
-
-SRC_URI = "http://download.augeas.net/${BP}.tar.gz \
- file://add-missing-argz-conditional.patch \
- file://sepbuildfix.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-
-DEPENDS = "readline libxml2"
-
-inherit autotools pkgconfig
-
-PACKAGES =+ "${PN}-lenses lib${BPN}"
-
-FILES_${PN}-lenses = "${datadir}/augeas/lenses"
-FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}"
-
-RDEPENDS_lib${BPN} += "${PN}-lenses"
-RRECOMMENDS_lib${BPN} += "${PN}"
-
-LEAD_SONAME = "libaugeas.so"
-
-do_install_append() {
- rm -fr ${D}${datadir}/vim
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch b/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index 9a19876aa..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: augeas-1.2.0/gnulib/lib/Makefile.am
-===================================================================
---- augeas-1.2.0.orig/gnulib/lib/Makefile.am
-+++ augeas-1.2.0/gnulib/lib/Makefile.am
-@@ -463,7 +463,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch b/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch
deleted file mode 100644
index abbdbaa63..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/add-missing-argz-conditional.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Add missing GL_GENERATE_ARGZ_H conditional
-
-- GL_GENERATE_ARGZ_H is used in gnulib/lib/Makefile.am
-
-Upstream-Status: Pending
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Index: augeas-1.0.0/configure.ac
-===================================================================
---- augeas-1.0.0.orig/configure.ac
-+++ augeas-1.0.0/configure.ac
-@@ -55,6 +55,8 @@ AC_ARG_WITH([failmalloc],
-
- AM_CONDITIONAL([WITH_FAILMALLOC], [test x$with_failmalloc != xno])
-
-+AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"])
-+
- dnl --enable-debug=(yes|no)
- AC_ARG_ENABLE([debug],
- [AC_HELP_STRING([--enable-debug=no/yes],
diff --git a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/sepbuildfix.patch b/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/sepbuildfix.patch
deleted file mode 100644
index b82a3ee2c..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas/sepbuildfix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Ensure that builds in separate builddirs (${B} != ${S}) correctly install the
-lenses files.
-
-Upstream-Status: Pending
-
-RP 2013/4/17
-
-Index: augeas-1.0.0/Makefile.am
-===================================================================
---- augeas-1.0.0.orig/Makefile.am 2012-11-02 15:20:11.000000000 +0000
-+++ augeas-1.0.0/Makefile.am 2013-04-17 10:36:24.033400125 +0000
-@@ -5,8 +5,8 @@
- lensdir=$(datadir)/augeas/lenses/dist
- lenstestdir=$(datadir)/augeas/lenses/dist/tests
-
--dist_lens_DATA=$(wildcard lenses/*.aug)
--dist_lenstest_DATA=$(wildcard lenses/tests/*.aug)
-+dist_lens_DATA=$(wildcard $(top_srcdir)/lenses/*.aug)
-+dist_lenstest_DATA=$(wildcard $(top_srcdir)lenses/tests/*.aug)
-
- EXTRA_DIST=augeas.spec build/aux/move-if-change Makefile.am HACKING
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas_1.4.0.bb b/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas_1.4.0.bb
deleted file mode 100644
index 1064ad4f4..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/augeas/augeas_1.4.0.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require augeas.inc
-
-SRC_URI[md5sum] = "a2536a9c3d744dc09d234228fe4b0c93"
-SRC_URI[sha256sum] = "659fae7ac229029e60a869a3b88c616cfd51cf2fba286cdfe3af3a052cb35b30"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
index 91341ee69..e63457cf2 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/build-tests.patch
@@ -11,15 +11,15 @@ diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in
recho$(EXEEXT): $(SUPPORT_SRC)recho.c
- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
-+ @$(CC) $(CCFLAGS) -o $@ $<
++ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c
- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
-+ @$(CC) $(CCFLAGS) -o $@ $<
++ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c
- @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
-+ @$(CC) $(CCFLAGS) -o $@ $<
++ @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $<
-test tests check: force $(Program) $(TESTS_SUPPORT)
+test tests check:
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/string-format.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/string-format.patch
new file mode 100644
index 000000000..eda39649d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash-3.2.48/string-format.patch
@@ -0,0 +1,21 @@
+Fix a string format warning when using security flags:
+
+| ../bash-3.2.48/print_cmd.c:1152:3: error: format not a string literal and no format arguments [-Werror=format-security]
+| cprintf (indentation_string);
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/print_cmd.c b/print_cmd.c
+index d1dfd1a..956db53 100644
+--- a/print_cmd.c
++++ b/print_cmd.c
+@@ -1149,7 +1149,7 @@ indent (amount)
+ for (i = 0; amount > 0; amount--)
+ indentation_string[i++] = ' ';
+ indentation_string[i] = '\0';
+- cprintf (indentation_string);
++ cprintf ("%s", indentation_string);
+ }
+
+ static void
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc b/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc
index 93ca00b25..1d08526c9 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash.inc
@@ -2,7 +2,7 @@ SUMMARY = "An sh-compatible command language interpreter"
HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html"
SECTION = "base/shell"
-DEPENDS = "ncurses bison-native"
+DEPENDS = "ncurses bison-native virtual/libiconv"
inherit autotools gettext texinfo update-alternatives ptest
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
new file mode 100644
index 000000000..5405c84c7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/0001-help-fix-printf-format-security-warning.patch
@@ -0,0 +1,35 @@
+From e5837a42f8f48a6a721805ff8f7fcd32861d09ca Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Tue, 26 Jul 2016 13:09:47 +0100
+Subject: [PATCH] help: fix printf() format security warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def: In function 'help_builtin':
+| ../../bash-4.3.30/builtins/../../bash-4.3.30/builtins/help.def:130:7: error: format not a string literal and no format arguments [-Werror=format-security]
+| printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
+| ^~~~~~
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+Upstream-Status: Pending
+ builtins/help.def | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/builtins/help.def b/builtins/help.def
+index 1894f17..cf624c6 100644
+--- a/builtins/help.def
++++ b/builtins/help.def
+@@ -127,7 +127,7 @@ help_builtin (list)
+
+ if (glob_pattern_p (list->word->word))
+ {
+- printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
++ printf ("%s", ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
+ print_word_list (list, ", ");
+ printf ("'\n\n");
+ }
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-builtins.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-builtins.patch
new file mode 100644
index 000000000..2fa388302
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-builtins.patch
@@ -0,0 +1,33 @@
+From 0c4cab9594c96c2dc435a8d9724605824bcbf917 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Tue, 19 Apr 2016 02:57:45 -0400
+Subject: [PATCH] fix run-builtins failed
+
+FAIL: run-builtins
+1. redirect the stderr output of command exec with -l option in
+ builtins.tests to /dev/null
+2. ensure the system contain the locales "en_US.UTF-8"
+
+Upstream-Status: Pending
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ tests/builtins.tests | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/builtins.tests b/tests/builtins.tests
+index 9d77520..63f3af8 100644
+--- a/tests/builtins.tests
++++ b/tests/builtins.tests
+@@ -109,7 +109,7 @@ esac
+
+ # test options to exec
+ (exec -a specialname ${THIS_SH} -c 'echo $0' )
+-(exec -l -a specialname ${THIS_SH} -c 'echo $0' )
++(exec -l -a specialname ${THIS_SH} -c 'echo $0' ) 2> /dev/null
+ # test `clean' environment. if /bin/sh is bash, and the script version of
+ # printenv is run, there will be variables in the environment that bash
+ # sets on startup. Also test code that prefixes argv[0] with a dash.
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-intl.patch b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-intl.patch
new file mode 100644
index 000000000..d4a3409ec
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/fix-run-intl.patch
@@ -0,0 +1,110 @@
+From a00d3161fd7b6a698bdd2ed5f0ac5faac580ee2a Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 3 Aug 2016 23:13:00 -0400
+Subject: [PATCH] fix run-intl failed
+
+1. Filter extra white space of intl.right
+
+ Due to the extra white space of intl.right, when the result of
+ sub-test unicode2.sub of intl.tests compared to it, the test
+ failed.
+
+ So we need to filter the extra white space of intl.right.
+
+ Import this patch for intl.right from bash devel branch:
+
+ http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel
+
+ commit is:
+
+ 85ec0778f9d778e1820fb8c0e3e996f2d1103b45
+
+2. Change intl.right correspond to the unicode3.sub's output
+
+ In sub-test unicode3.sub of intl.tests, the payload value is:
+
+ payload=$'\065\247\100\063\231\053\306\123\070\237\242\352\263'
+
+ It used quoted string expansion(escaped octal) to assign ASCII
+ characters to variables. So when the test run the following:
+
+ printf %q "$payload"
+
+ It produced:
+
+ $'5\247@3\231+\306S8\237\242\352\263'
+
+ When compared to the intl.right(contain the converted character), it failed.
+
+ Import parts of patch for intl.right from bash devel branch:
+
+ http://git.savannah.gnu.org/cgit/bash.git/log/?h=devel
+
+ commit is:
+
+ 74b8cbb41398b4453d8ba04d0cdd1b25f9dcb9e3
+
+Upstream-Status: Backport
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ tests/intl.right | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/tests/intl.right b/tests/intl.right
+index acf108a..1efdfbe 100644
+--- a/tests/intl.right
++++ b/tests/intl.right
+@@ -18,34 +18,34 @@ aéb
+ 1.0000
+ 1,0000
+ Passed all 1378 Unicode tests
+-0000000 303 277 012
++0000000 303 277 012
+ 0000003
+-0000000 303 277 012
++0000000 303 277 012
+ 0000003
+-0000000 303 277 012
++0000000 303 277 012
+ 0000003
+-0000000 303 277 012
++0000000 303 277 012
+ 0000003
+-0000000 357 277 277 012
++0000000 357 277 277 012
+ 0000004
+-0000000 357 277 277 012
++0000000 357 277 277 012
+ 0000004
+-0000000 012
++0000000 012
+ 0000001
+-0000000 012
++0000000 012
+ 0000001
+-0000000 012
++0000000 012
+ 0000001
+-0000000 012
++0000000 012
+ 0000001
+-0000000 303 277 012
++0000000 303 277 012
+ 0000003
+-0000000 303 277 012
++0000000 303 277 012
+ 0000003
+-0000000 303 277 012
++0000000 303 277 012
+ 0000003
+-0000000 101 040 302 243 040 305 222 012
++0000000 101 040 302 243 040 305 222 012
+ 0000010
+ ./unicode3.sub: line 2: 5§@3™+ĆS8ź˘ęł: command not found
+-5§@3™+ĆS8ź˘ęł
++$'5\247@3\231+\306S8\237\242\352\263'
+ + : $'5\247@3\231+\306S8\237\242\352\263'
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest
index 2098fa46b..c61fabd02 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash/run-ptest
@@ -1,2 +1,22 @@
#!/bin/sh
+
+en_US=`locale -a | grep en_US*`
+fr_FR=`locale -a | grep fr_FR*`
+de_DE=`locale -a | grep de_DE*`
+
+if [ -z "$en_US" ]
+then
+ echo "Warning: The en_US* locales is needed to run the intl.tests, please add it."
+fi
+
+if [ -z "$fr_FR" ]
+then
+ echo "Warning: The fr_FR* locales is needed to run the intl.tests, please add it."
+fi
+
+if [ -z "$de_DE" ]
+then
+ echo "Warning: The de_DE* locales is needed to run the intl.tests, please add it."
+fi
+
make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd` runtest
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_3.2.48.bb b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_3.2.48.bb
index d42b292b0..6b4028df1 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_3.2.48.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_3.2.48.bb
@@ -20,6 +20,7 @@ SRC_URI = "${GNU_MIRROR}/bash/bash-${PV}.tar.gz;name=tarball \
file://test-output.patch \
file://run-ptest \
file://dont-include-target-CFLAGS-in-host-LDFLAGS.patch \
+ file://string-format.patch \
"
SRC_URI[tarball.md5sum] = "338dcf975a93640bb3eaa843ca42e3f8"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb
index 4426cf00a..765562fbd 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb
@@ -14,12 +14,22 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
${GNU_MIRROR}/bash/bash-4.3-patches/bash43-037;apply=yes;striplevel=0;name=patch037 \
${GNU_MIRROR}/bash/bash-4.3-patches/bash43-038;apply=yes;striplevel=0;name=patch038 \
${GNU_MIRROR}/bash/bash-4.3-patches/bash43-039;apply=yes;striplevel=0;name=patch039 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-040;apply=yes;striplevel=0;name=patch040 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-041;apply=yes;striplevel=0;name=patch041 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-042;apply=yes;striplevel=0;name=patch042 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-043;apply=yes;striplevel=0;name=patch043 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-044;apply=yes;striplevel=0;name=patch044 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-045;apply=yes;striplevel=0;name=patch045 \
+ ${GNU_MIRROR}/bash/bash-4.3-patches/bash43-046;apply=yes;striplevel=0;name=patch046 \
file://execute_cmd.patch;striplevel=0 \
file://mkbuiltins_have_stringize.patch \
file://build-tests.patch \
file://test-output.patch \
file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
file://run-ptest \
+ file://fix-run-builtins.patch \
+ file://0001-help-fix-printf-format-security-warning.patch \
+ file://fix-run-intl.patch \
"
SRC_URI[tarball.md5sum] = "a27b3ee9be83bd3ba448c0ff52b28447"
@@ -43,5 +53,19 @@ SRC_URI[patch038.md5sum] = "61e0522830b24fbe8c0d1b010f132470"
SRC_URI[patch038.sha256sum] = "adbeaa500ca7a82535f0e88d673661963f8a5fcdc7ad63445e68bf5b49786367"
SRC_URI[patch039.md5sum] = "a4775487abe958536751c8ce53cdf6f9"
SRC_URI[patch039.sha256sum] = "ab94dced2215541097691f60c3eb323cc28ef2549463e6a5334bbcc1e61e74ec"
+SRC_URI[patch040.md5sum] = "80d3587c58854e226055ef099ffeb535"
+SRC_URI[patch040.sha256sum] = "84bb396b9262992ca5424feab6ed3ec39f193ef5c76dfe4a62b551bd8dd9d76b"
+SRC_URI[patch041.md5sum] = "20bf63eef7cb441c0b1cc49ef3191d03"
+SRC_URI[patch041.sha256sum] = "4ec432966e4198524a7e0cd685fe222e96043769c9613e66742ac475db132c1a"
+SRC_URI[patch042.md5sum] = "70790646ae61e207c995e44931390e50"
+SRC_URI[patch042.sha256sum] = "ac219322db2791da87a496ee6e8e5544846494bdaaea2626270c2f73c1044919"
+SRC_URI[patch043.md5sum] = "855a46955cb251534e80b4732b748e37"
+SRC_URI[patch043.sha256sum] = "47a8a3c005b46e25821f4d8f5ccb04c1d653b1c829cb40568d553dc44f7a6180"
+SRC_URI[patch044.md5sum] = "29623d3282fcbb37e1158136509b5bb8"
+SRC_URI[patch044.sha256sum] = "9338820630bf67373b44d8ea68409f65162ea7a47b9b29ace06a0aed12567f99"
+SRC_URI[patch045.md5sum] = "4473244ca5abfd4b018ea26dc73e7412"
+SRC_URI[patch045.sha256sum] = "ba6ec3978e9eaa1eb3fabdaf3cc6fdf8c4606ac1c599faaeb4e2d69864150023"
+SRC_URI[patch046.md5sum] = "7e5fb09991c077076b86e0e057798913"
+SRC_URI[patch046.sha256sum] = "b3b456a6b690cd293353f17e22d92a202b3c8bce587ae5f2667c20c9ab6f688f"
BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb b/import-layers/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb
index d6250a90c..4551c3233 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
DEPENDS = "glib-2.0"
-SRC_URI = "${DEBIAN_MIRROR}/main/b/blktool/blktool_4.orig.tar.gz;name=tarball \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/b/${BPN}/${BPN}_4.orig.tar.gz;name=tarball \
file://0001-fix-typos-in-manpage.patch \
file://0002-fix-string-error.patch \
file://0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch \
@@ -20,6 +20,7 @@ SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e0680
# for this package we're mostly interested in tracking debian patches,
# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/blktool/"
UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
S = "${WORKDIR}/${BPN}-4.orig"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/byacc/byacc_20150711.bb b/import-layers/yocto-poky/meta/recipes-extended/byacc/byacc_20150711.bb
deleted file mode 100644
index e5b5451f2..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/byacc/byacc_20150711.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-# Sigh. This is one of those places where everyone licenses it differently. Someone
-# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that:
-# "I've found no reliable source which states that byacc must bear a UCB copyright."
-# Setting to PD as this is what the upstream has it as.
-
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=c52fb2d1b3f75b3b7534927807a1b714"
-require byacc.inc
-
-SRC_URI[md5sum] = "2700401030583c4e9169ac7ea7d08de8"
-SRC_URI[sha256sum] = "c354e4ee14c4a1bf11e55dde9275011d14887ef066406a088b6fa56caf039248"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/byacc/byacc_20160606.bb b/import-layers/yocto-poky/meta/recipes-extended/byacc/byacc_20160606.bb
new file mode 100644
index 000000000..98129d0ec
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/byacc/byacc_20160606.bb
@@ -0,0 +1,12 @@
+# Sigh. This is one of those places where everyone licenses it differently. Someone
+# even apply UCB to it (Free/Net/OpenBSD). The maintainer states that:
+# "I've found no reliable source which states that byacc must bear a UCB copyright."
+# Setting to PD as this is what the upstream has it as.
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://package/debian/copyright;md5=74533d32ffd38bca4cbf1f1305f8bc60"
+require byacc.inc
+
+
+SRC_URI[md5sum] = "d527c811b360f04a8c5f5a0a90625966"
+SRC_URI[sha256sum] = "cc8fdced486cb70cec7a7c9358de836bfd267d19d6456760bb4721ccfea5ac91"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch b/import-layers/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch
new file mode 100644
index 000000000..1d0c3a6dd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/CVE-2016-3189.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Backport
+https://bugzilla.suse.com/attachment.cgi?id=681334
+
+CVE: CVE-2016-3189
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: bzip2-1.0.6/bzip2recover.c
+===================================================================
+--- bzip2-1.0.6.orig/bzip2recover.c
++++ bzip2-1.0.6/bzip2recover.c
+@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv )
+ bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
+ bsPutUInt32 ( bsWr, blockCRC );
+ bsClose ( bsWr );
++ outFile = NULL;
+ }
+ if (wrBlock >= rbCtr) break;
+ wrBlock++;
diff --git a/import-layers/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/import-layers/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index f717d85f4..ef7bc8976 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -12,7 +12,9 @@ SRC_URI = "http://www.bzip.org/${PV}/${BP}.tar.gz \
file://fix-bunzip2-qt-returns-0-for-corrupt-archives.patch \
file://configure.ac;subdir=${BP} \
file://Makefile.am;subdir=${BP} \
- file://run-ptest"
+ file://run-ptest \
+ file://CVE-2016-3189.patch \
+ "
SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc b/import-layers/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc
index 1bdc6176c..31adb717d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc
@@ -39,3 +39,5 @@ ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
ALTERNATIVE_PRIORITY[rmt] = "50"
ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch b/import-layers/yocto-poky/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch
new file mode 100644
index 000000000..b251ac905
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/cracklib/cracklib/0001-Apply-patch-to-fix-CVE-2016-6318.patch
@@ -0,0 +1,105 @@
+From 47e5dec521ab6243c9b249dd65b93d232d90d6b1 Mon Sep 17 00:00:00 2001
+From: Jan Dittberner <jan@dittberner.info>
+Date: Thu, 25 Aug 2016 17:13:49 +0200
+Subject: [PATCH] Apply patch to fix CVE-2016-6318
+
+This patch fixes an issue with a stack-based buffer overflow when
+parsing large GECOS field. See
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6318 and
+https://security-tracker.debian.org/tracker/CVE-2016-6318 for more
+information.
+
+Upstream-Status: Backport [https://github.com/cracklib/cracklib/commit/47e5dec521ab6243c9b249dd65b93d232d90d6b1]
+CVE: CVE-2016-6318
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ lib/fascist.c | 57 ++++++++++++++++++++++++++++++++-----------------------
+ 1 file changed, 33 insertions(+), 24 deletions(-)
+
+diff --git a/lib/fascist.c b/lib/fascist.c
+index a996509..d4deb15 100644
+--- a/lib/fascist.c
++++ b/lib/fascist.c
+@@ -502,7 +502,7 @@ FascistGecosUser(char *password, const char *user, const char *gecos)
+ char gbuffer[STRINGSIZE];
+ char tbuffer[STRINGSIZE];
+ char *uwords[STRINGSIZE];
+- char longbuffer[STRINGSIZE * 2];
++ char longbuffer[STRINGSIZE];
+
+ if (gecos == NULL)
+ gecos = "";
+@@ -583,38 +583,47 @@ FascistGecosUser(char *password, const char *user, const char *gecos)
+ {
+ for (i = 0; i < j; i++)
+ {
+- strcpy(longbuffer, uwords[i]);
+- strcat(longbuffer, uwords[j]);
+-
+- if (GTry(longbuffer, password))
++ if (strlen(uwords[i]) + strlen(uwords[j]) < STRINGSIZE)
+ {
+- return _("it is derived from your password entry");
+- }
++ strcpy(longbuffer, uwords[i]);
++ strcat(longbuffer, uwords[j]);
+
+- strcpy(longbuffer, uwords[j]);
+- strcat(longbuffer, uwords[i]);
++ if (GTry(longbuffer, password))
++ {
++ return _("it is derived from your password entry");
++ }
+
+- if (GTry(longbuffer, password))
+- {
+- return _("it's derived from your password entry");
+- }
++ strcpy(longbuffer, uwords[j]);
++ strcat(longbuffer, uwords[i]);
+
+- longbuffer[0] = uwords[i][0];
+- longbuffer[1] = '\0';
+- strcat(longbuffer, uwords[j]);
++ if (GTry(longbuffer, password))
++ {
++ return _("it's derived from your password entry");
++ }
++ }
+
+- if (GTry(longbuffer, password))
++ if (strlen(uwords[j]) < STRINGSIZE - 1)
+ {
+- return _("it is derivable from your password entry");
++ longbuffer[0] = uwords[i][0];
++ longbuffer[1] = '\0';
++ strcat(longbuffer, uwords[j]);
++
++ if (GTry(longbuffer, password))
++ {
++ return _("it is derivable from your password entry");
++ }
+ }
+
+- longbuffer[0] = uwords[j][0];
+- longbuffer[1] = '\0';
+- strcat(longbuffer, uwords[i]);
+-
+- if (GTry(longbuffer, password))
++ if (strlen(uwords[i]) < STRINGSIZE - 1)
+ {
+- return _("it's derivable from your password entry");
++ longbuffer[0] = uwords[j][0];
++ longbuffer[1] = '\0';
++ strcat(longbuffer, uwords[i]);
++
++ if (GTry(longbuffer, password))
++ {
++ return _("it's derivable from your password entry");
++ }
+ }
+ }
+ }
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb b/import-layers/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
index 3bd3f9367..82995219d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
@@ -4,15 +4,13 @@ HOMEPAGE = "http://sourceforge.net/projects/cracklib"
LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
-DEPENDS = "cracklib-native zlib python"
-RDEPEND_${PN}-python += "python"
+DEPENDS = "cracklib-native zlib"
-PACKAGES += "${PN}-python"
-
-EXTRA_OECONF = "--with-python --libdir=${base_libdir}"
+EXTRA_OECONF = "--without-python --libdir=${base_libdir}"
SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \
file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \
+ file://0001-Apply-patch-to-fix-CVE-2016-6318.patch \
file://0002-craklib-fix-testnum-and-teststr-failed.patch"
SRC_URI[md5sum] = "376790a95c1fb645e59e6e9803c78582"
@@ -21,27 +19,11 @@ SRC_URI[sha256sum] = "59ab0138bc8cf90cccb8509b6969a024d5e58d2d02bcbdccbb9ba9b88b
UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cracklib/files/cracklib/"
UPSTREAM_CHECK_REGEX = "/cracklib/(?P<pver>(\d+[\.\-_]*)+)/"
-inherit autotools gettext pythonnative python-dir
+inherit autotools gettext
do_install_append_class-target() {
create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small
}
-do_install_append() {
- src_dir="${D}${base_libdir}/${PYTHON_DIR}/site-packages"
- rm -f $src_dir/test_cracklib.py*
-
- if [ "${base_libdir}" != "${libdir}" ] ; then
- # Move python files from ${base_libdir} to ${libdir} since used --libdir=${base_libdir}
- install -d -m 0755 ${D}${PYTHON_SITEPACKAGES_DIR}/
- mv $src_dir/* ${D}${PYTHON_SITEPACKAGES_DIR}
- rm -fr ${D}${base_libdir}/${PYTHON_DIR}
- fi
-}
-
BBCLASSEXTEND = "native nativesdk"
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/cracklib.py* \
- ${PYTHON_SITEPACKAGES_DIR}/_cracklib.*"
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_cracklib.a"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond_pam_config.patch b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
index 675872c3c..6c928165c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
@@ -4,16 +4,19 @@ configure files instead.
Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---- cronie-1.4.7/pam/crond.orig 2010-12-16 16:59:02.000000000 +0800
-+++ cronie-1.4.7/pam/crond 2011-07-20 09:47:16.080819203 +0800
-@@ -4,7 +4,7 @@
+Index: cronie-1.5.1/pam/crond
+===================================================================
+--- cronie-1.5.1.orig/pam/crond
++++ cronie-1.5.1/pam/crond
+@@ -4,8 +4,8 @@
#
- # No PAM authentication called, auth modules not needed
+ # Although no PAM authentication is called, auth modules
+ # are used for credential setting
+-auth include password-auth
++auth include common-auth
account required pam_access.so
-account include password-auth
+account include common-account
session required pam_loginuid.so
-session include password-auth
--auth include password-auth
+session include common-session-noninteractive
-+auth include common-auth
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie_1.5.0.bb b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie_1.5.0.bb
deleted file mode 100644
index 697501ac1..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie_1.5.0.bb
+++ /dev/null
@@ -1,81 +0,0 @@
-SUMMARY = "Cron daemon for executing programs at set times"
-DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
-specified programs at scheduled times and related tools. It is based on the \
-original cron and has security and configuration enhancements like the \
-ability to use pam and SELinux."
-HOMEPAGE = "https://fedorahosted.org/cronie/"
-BUGTRACKER = "https://bugzilla.redhat.com"
-
-# Internet Systems Consortium License
-LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \
- file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
- file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
-
-SECTION = "utils"
-
-SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
- file://crond.init \
- file://crontab \
- file://crond.service \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
-
-PAM_SRC_URI = "file://crond_pam_config.patch"
-PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
-
-SRC_URI[md5sum] = "9db75e1884d83a45e002d145c6c54d45"
-SRC_URI[sha256sum] = "9cf0e3f4f5042a9c09413d62c8e0c055e12401f70b112465f0f81f2c84ebfb3f"
-
-inherit autotools update-rc.d useradd systemd
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
-
-PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
-PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
-
-INITSCRIPT_NAME = "crond"
-INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system crontab"
-
-SYSTEMD_SERVICE_${PN} = "crond.service"
-
-do_install_append () {
- install -d ${D}${sysconfdir}/sysconfig/
- install -d ${D}${sysconfdir}/init.d/
- install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
- install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
-
- # install systemd unit files
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
- -e 's,@SBINDIR@,${sbindir},g' \
- ${D}${systemd_unitdir}/system/crond.service
-
- # below are necessary for a complete cron environment
- install -d ${D}${localstatedir}/spool/cron
- install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
- mkdir -p ${D}${sysconfdir}/cron.d
- mkdir -p ${D}${sysconfdir}/cron.hourly
- mkdir -p ${D}${sysconfdir}/cron.daily
- mkdir -p ${D}${sysconfdir}/cron.weekly
- mkdir -p ${D}${sysconfdir}/cron.monthly
- touch ${D}${sysconfdir}/cron.deny
-
- # below setting is necessary to allow normal user using crontab
-
- # setgid for crontab binary
- chown root:crontab ${D}${bindir}/crontab
- chmod 2755 ${D}${bindir}/crontab
-
- # allow 'crontab' group write to /var/spool/cron
- chown root:crontab ${D}${localstatedir}/spool/cron
- chmod 770 ${D}${localstatedir}/spool/cron
-
- chmod 600 ${D}${sysconfdir}/crontab
-}
-
-FILES_${PN} += "${sysconfdir}/cron*"
-CONFFILES_${PN} += "${sysconfdir}/crontab"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie_1.5.1.bb b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie_1.5.1.bb
new file mode 100644
index 000000000..99b2bb5c8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie_1.5.1.bb
@@ -0,0 +1,81 @@
+SUMMARY = "Cron daemon for executing programs at set times"
+DESCRIPTION = "Cronie contains the standard UNIX daemon crond that runs \
+specified programs at scheduled times and related tools. It is based on the \
+original cron and has security and configuration enhancements like the \
+ability to use pam and SELinux."
+HOMEPAGE = "https://fedorahosted.org/cronie/"
+BUGTRACKER = "https://bugzilla.redhat.com"
+
+# Internet Systems Consortium License
+LICENSE = "ISC & BSD-3-Clause & BSD-2-Clause & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=dd2a592170760e1386c769e1043b3722 \
+ file://src/cron.c;endline=20;md5=b425c334265026177128353a142633b4 \
+ file://src/popen.c;beginline=3;endline=31;md5=edd50742d8def712e9472dba353668a9"
+
+SECTION = "utils"
+
+SRC_URI = "https://fedorahosted.org/releases/c/r/cronie/cronie-${PV}.tar.gz \
+ file://crond.init \
+ file://crontab \
+ file://crond.service \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
+
+PAM_SRC_URI = "file://crond_pam_config.patch"
+PAM_DEPS = "libpam libpam-runtime pam-plugin-access pam-plugin-loginuid"
+
+SRC_URI[md5sum] = "910e6effcc032998b0a49fbd46322e18"
+SRC_URI[sha256sum] = "6c73666102a6b5d35e2eaf1bd06925f2d4b0cef8d3323c37286dda3089a85338"
+
+inherit autotools update-rc.d useradd systemd
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+
+PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}"
+
+INITSCRIPT_NAME = "crond"
+INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ."
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system crontab"
+
+SYSTEMD_SERVICE_${PN} = "crond.service"
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/sysconfig/
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0644 ${S}/crond.sysconfig ${D}${sysconfdir}/sysconfig/crond
+ install -m 0755 ${WORKDIR}/crond.init ${D}${sysconfdir}/init.d/crond
+
+ # install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/crond.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ ${D}${systemd_unitdir}/system/crond.service
+
+ # below are necessary for a complete cron environment
+ install -d ${D}${localstatedir}/spool/cron
+ install -m 0755 ${WORKDIR}/crontab ${D}${sysconfdir}/
+ mkdir -p ${D}${sysconfdir}/cron.d
+ mkdir -p ${D}${sysconfdir}/cron.hourly
+ mkdir -p ${D}${sysconfdir}/cron.daily
+ mkdir -p ${D}${sysconfdir}/cron.weekly
+ mkdir -p ${D}${sysconfdir}/cron.monthly
+ touch ${D}${sysconfdir}/cron.deny
+
+ # below setting is necessary to allow normal user using crontab
+
+ # setgid for crontab binary
+ chown root:crontab ${D}${bindir}/crontab
+ chmod 2755 ${D}${bindir}/crontab
+
+ # allow 'crontab' group write to /var/spool/cron
+ chown root:crontab ${D}${localstatedir}/spool/cron
+ chmod 770 ${D}${localstatedir}/spool/cron
+
+ chmod 600 ${D}${sysconfdir}/crontab
+}
+
+FILES_${PN} += "${sysconfdir}/cron*"
+CONFFILES_${PN} += "${sysconfdir}/crontab"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups.inc b/import-layers/yocto-poky/meta/recipes-extended/cups/cups.inc
index 4b2d21409..02b6358af 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/cups/cups.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/cups/cups.inc
@@ -3,13 +3,13 @@ SECTION = "console/utils"
LICENSE = "GPLv2 & LGPLv2"
DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
-SRC_URI = "https://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
+SRC_URI = "https://github.com/apple/cups/releases/download/release-${PV}/${BP}-source.tar.gz \
file://use_echo_only_in_init.patch \
file://0001-don-t-try-to-run-generated-binaries.patch \
file://cups_serverbin.patch \
"
-UPSTREAM_CHECK_URI = "http://www.cups.org/software.php"
+UPSTREAM_CHECK_URI = "https://github.com/apple/cups/releases"
UPSTREAM_CHECK_REGEX = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar"
LEAD_SONAME = "libcupsdriver.so"
@@ -44,6 +44,7 @@ EXTRA_OECONF = " \
--without-perl \
--without-python \
--without-java \
+ DSOFLAGS='${LDFLAGS}' \
"
EXTRA_AUTORECONF += "--exclude=autoheader"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb
deleted file mode 100644
index aef211d91..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
-
-SRC_URI[md5sum] = "62b8fafd590e75f72316915790b0850a"
-SRC_URI[sha256sum] = "36a70d43584aea2617da914b9331e23341c3501a8254c4d2eae9c11ec01fd4d3"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.4.bb b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.4.bb
new file mode 100644
index 000000000..0fab806f9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/cups/cups_2.1.4.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
+
+SRC_URI[md5sum] = "9f9bf6e3b9c20a3519b4dc409666d6e7"
+SRC_URI[sha256sum] = "4b14fd833180ac529ebebea766a09094c2568bf8426e219cb3a1715304ef728d"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch
index cc05d1dc0..f8638bbff 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch
@@ -10,7 +10,7 @@ this patch avoids these kinds of errors:
| configure.ac:90: the top level
| autom4te: m4 failed with exit status: 1
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: diffutils-2.8.1/m4/prereq.m4
diff --git a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch
new file mode 100644
index 000000000..f915287fe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch
@@ -0,0 +1,31 @@
+Fixes to allow diffutils to build with gcc v6.
+
+RP
+2016/5/25
+
+Index: diffutils-2.8.1/lib/posix/regex.h
+===================================================================
+--- diffutils-2.8.1.orig/lib/posix/regex.h
++++ diffutils-2.8.1/lib/posix/regex.h
+@@ -529,7 +529,9 @@ extern int re_exec _RE_ARGS ((const char
+ /* For now unconditionally define __restrict_arr to expand to nothing.
+ Ideally we would have a test for the compiler which allows defining
+ it to restrict. */
++#ifndef __restrict_arr
+ #define __restrict_arr
++#endif
+
+ /* POSIX compatibility. */
+ extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
+Index: diffutils-2.8.1/src/diff.c
+===================================================================
+--- diffutils-2.8.1.orig/src/diff.c
++++ diffutils-2.8.1/src/diff.c
+@@ -71,6 +71,7 @@ static void usage (void);
+ static bool recursive;
+
+ /* In context diffs, show previous lines that match these regexps. */
++struct re_pattern_buffer function_regexp;
+ static struct regexp_list function_regexp_list;
+
+ /* Ignore changes affecting only lines that match these regexps. */
diff --git a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.4/0001-Unset-need_charset_alias-when-building-for-musl.patch
index ba1a4bab4..ba1a4bab4 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.4/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.4/run-ptest
index 695c5e8a7..695c5e8a7 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.3/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils-3.4/run-ptest
diff --git a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_2.8.1.bb b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
index bf425bbb3..fe56f9ce5 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_2.8.1.bb
@@ -6,7 +6,8 @@ require diffutils.inc
PR = "r7.0"
SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \
- file://diffutils_fix_for_automake-1.12.patch"
+ file://diffutils_fix_for_automake-1.12.patch \
+ file://fix_gcc6.patch"
SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428"
SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_3.3.bb b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_3.3.bb
deleted file mode 100644
index 5008690ea..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_3.3.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-require diffutils.inc
-
-SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://run-ptest \
-"
-
-EXTRA_OECONF += "--without-libsigsegv-prefix"
-
-do_configure_prepend () {
- # Need to remove gettext macros with weird mix of versions
- for i in codeset.m4 gettext_gl.m4 intlmacosx.m4 inttypes-pri.m4 lib-ld_gl.m4 lib-prefix_gl.m4 po_gl.m4 ssize_t.m4 wchar_t.m4 wint_t.m4; do
- rm -f ${S}/m4/$i
- done
-}
-
-SRC_URI[md5sum] = "99180208ec2a82ce71f55b0d7389f1b3"
-SRC_URI[sha256sum] = "a25e89a8ab65fded1731e4186be1bb25cda967834b6df973599cdcd5abdfc19c"
-
-inherit ptest
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}
- install -D ${S}/build-aux/test-driver $t/build-aux/test-driver
- cp -r ${S}/tests $t/
- install ${B}/tests/Makefile $t/tests/
- sed -e 's|^Makefile:|_Makefile:|' \
- -e 's|bash|sh|' \
- -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \
- -e 's|^srcdir = \(.*\)|srcdir = .|' \
- -e 's|"`$(built_programs)`"|diff|' \
- -e 's|gawk|awk|g' \
- -i $t/tests/Makefile
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_3.4.bb b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_3.4.bb
new file mode 100644
index 000000000..cb7092b51
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/diffutils/diffutils_3.4.bb
@@ -0,0 +1,37 @@
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+require diffutils.inc
+
+SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ file://run-ptest \
+"
+
+EXTRA_OECONF += "--without-libsigsegv-prefix"
+
+do_configure_prepend () {
+ # Need to remove gettext macros with weird mix of versions
+ for i in codeset.m4 gettext_gl.m4 intlmacosx.m4 inttypes-pri.m4 lib-ld_gl.m4 lib-prefix_gl.m4 po_gl.m4 ssize_t.m4 wchar_t.m4 wint_t.m4; do
+ rm -f ${S}/m4/$i
+ done
+}
+
+SRC_URI[md5sum] = "df9ca465f30307cffd03da176a43a5d4"
+SRC_URI[sha256sum] = "db53c025f2ac3d217bcf753dad6dee7b410b33d0948495ff015aaf8b91189ce2"
+
+inherit ptest
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ install -D ${S}/build-aux/test-driver $t/build-aux/test-driver
+ cp -r ${S}/tests $t/
+ install ${B}/tests/Makefile $t/tests/
+ sed -e 's|^Makefile:|_Makefile:|' \
+ -e 's|bash|sh|' \
+ -e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \
+ -e 's|^srcdir = \(.*\)|srcdir = .|' \
+ -e 's|"`$(built_programs)`"|diff|' \
+ -e 's|gawk|awk|g' \
+ -i $t/tests/Makefile
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb
deleted file mode 100644
index 95df784c4..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Display or change ethernet card settings"
-DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
-HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
-SECTION = "console/network"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
- file://run-ptest \
- file://avoid_parallel_tests.patch \
- "
-
-SRC_URI[md5sum] = "5b55f7cd76e901dfc2738ac22cab96ca"
-SRC_URI[sha256sum] = "f84226db8dd18afaf91d8d00f5cb8f87ec3d7f787d2a3605de08d6dfa95ab8ef"
-
-inherit autotools ptest
-RDEPENDS_${PN}-ptest += "make"
-
-do_compile_ptest() {
- oe_runmake buildtest-TESTS
-}
-
-do_install_ptest () {
- cp ${B}/Makefile ${D}${PTEST_PATH}
- install ${B}/test-cmdline ${D}${PTEST_PATH}
- install ${B}/test-features ${D}${PTEST_PATH}
- install ${B}/ethtool ${D}${PTEST_PATH}/ethtool
- sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.6.bb b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.6.bb
new file mode 100644
index 000000000..788d4ea35
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.6.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Display or change ethernet card settings"
+DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
+HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
+ file://run-ptest \
+ file://avoid_parallel_tests.patch \
+ "
+
+SRC_URI[md5sum] = "1186dd83a0384109b92c6cd40a7bb0e5"
+SRC_URI[sha256sum] = "ad45620887f7e61312fc2f9ca3fd50d49ac7737ed874b0b02845d07e0fa3ca49"
+
+inherit autotools ptest
+RDEPENDS_${PN}-ptest += "make"
+
+do_compile_ptest() {
+ oe_runmake buildtest-TESTS
+}
+
+do_install_ptest () {
+ cp ${B}/Makefile ${D}${PTEST_PATH}
+ install ${B}/test-cmdline ${D}${PTEST_PATH}
+ install ${B}/test-features ${D}${PTEST_PATH}
+ install ${B}/ethtool ${D}${PTEST_PATH}/ethtool
+ sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch
index 2d0ddb43f..1b7f8cfb9 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch
@@ -6,7 +6,7 @@ this patch avoids these kinds of errors:
| configure.in:75: error: automatic de-ANSI-fication support has been removed
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: findutils-4.2.31/configure.in
diff --git a/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch b/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch
new file mode 100644
index 000000000..aaedc88aa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Backport
+
+
+http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7406
+
+Hand applied change to util.c. Fix was for cups-filters but also applied to foomatic-filters.
+
+CVE: CVE-2015-8327
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: util.c
+===================================================================
+--- a/util.c
++++ b/util.c
+@@ -31,7 +31,7 @@
+ #include <assert.h>
+
+
+-const char* shellescapes = "|;<>&!$\'\"#*?()[]{}";
++const char* shellescapes = "|;<>&!$\'\"`#*?()[]{}";
+
+ const char * temp_dir()
+ {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch b/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch
new file mode 100644
index 000000000..dc973c459
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch
@@ -0,0 +1,23 @@
+Upstream-Status: Backport
+
+
+http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7419
+
+Hand applied change to util.c. Fix was for cups-filters but also applied to foomatic-filters.
+
+CVE: CVE-2015-8560
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: util.c
+===================================================================
+--- a/util.c
++++ b/util.c
+@@ -31,7 +31,7 @@
+ #include <assert.h>
+
+
+-const char* shellescapes = "|<>&!$\'\"#*?()[]{}";
++const char* shellescapes = "|;<>&!$\'\"#*?()[]{}";
+
+ const char * temp_dir()
+ {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb b/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
index 0cffedd66..3f439e713 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
@@ -17,6 +17,10 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/foomatic-filters-${PV}/COPYING;md5=393a5ca
SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz"
+SRC_URI += "file://CVE-2015-8560.patch \
+ file://CVE-2015-8327.patch \
+ "
+
SRC_URI[md5sum] = "b05f5dcbfe359f198eef3df5b283d896"
SRC_URI[sha256sum] = "a2e2e53e502571e88eeb9010c45a0d54671f15707ee104f5c9c22b59ea7a33e3"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch
new file mode 100644
index 000000000..bc9201b63
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch
@@ -0,0 +1,67 @@
+From 53496e2e306b16ac59801553f775bcca164e6a39 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
+Date: Wed, 14 Sep 2016 16:20:37 +0100
+Subject: [PATCH] fix gcc >= 4 compilation
+
+| ../gawk-3.1.5/hard-locale.h: In function 'hard_locale':
+| ../gawk-3.1.5/hard-locale.h:43:20: error: invalid storage class for function 'xmalloc'
+| static ptr_t xmalloc PARAMS ((size_t n));
+| ^~~~~~~
+
+| ../gawk-3.1.5/hard-locale.h:45:22: warning: implicit declaration of function 'xmalloc' [-Wimplicit-function-declaration]
+| char *locale = xmalloc (strlen (p) + 1);
+| ^~~~~~~
+| ../gawk-3.1.5/hard-locale.h:45:22: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
+| ../gawk-3.1.5/dfa.c: At top level:
+| ../gawk-3.1.5/dfa.c:125:14: error: conflicting types for 'xmalloc'
+| static ptr_t xmalloc PARAMS ((size_t n));
+| ^~~~~~~
+| In file included from ../gawk-3.1.5/dfa.c:112:0:
+| ../gawk-3.1.5/hard-locale.h:45:22: note: previous implicit declaration of 'xmalloc' was here
+| char *locale = xmalloc (strlen (p) + 1);
+| ^~~~~~~
+
+Upstream-Status: Inappropriate [required for gawk 3.1.5 (GPLv2) recipe only]
+
+Signed-off-by: André Draszik <git@andred.net>
+---
+ dfa.c | 2 +-
+ hard-locale.h | 2 --
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/dfa.c b/dfa.c
+index 71e3736..97f6045 100644
+--- a/dfa.c
++++ b/dfa.c
+@@ -109,6 +109,7 @@ extern void free();
+
+ #include "regex.h"
+ #include "dfa.h"
++static ptr_t xmalloc PARAMS ((size_t n));
+ #include "hard-locale.h"
+
+ /* HPUX, define those as macros in sys/param.h */
+@@ -122,7 +123,6 @@ extern void free();
+ static void dfamust PARAMS ((struct dfa *dfa));
+
+ static ptr_t xcalloc PARAMS ((size_t n, size_t s));
+-static ptr_t xmalloc PARAMS ((size_t n));
+ static ptr_t xrealloc PARAMS ((ptr_t p, size_t n));
+ #ifdef DEBUG
+ static void prtok PARAMS ((token t));
+diff --git a/hard-locale.h b/hard-locale.h
+index 0f4986b..9ee57e0 100644
+--- a/hard-locale.h
++++ b/hard-locale.h
+@@ -40,8 +40,6 @@ hard_locale (int category)
+ if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
+ hard = 0;
+ # else
+- static ptr_t xmalloc PARAMS ((size_t n));
+-
+ char *locale = xmalloc (strlen (p) + 1);
+ strcpy (locale, p);
+
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
index b3e7987ce..c42c33c42 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch
@@ -11,7 +11,7 @@ this patch avoids these kinds of errors:
...
| Makefile.am:27: error: automatic de-ANSI-fication support has been removed
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: gawk-3.1.5/configure.ac
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb
index 7c92bded3..63fd32f4b 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb
@@ -15,8 +15,11 @@ RDEPENDS_gawk += "gawk-common"
RDEPENDS_pgawk += "gawk-common"
PR = "r2"
-SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
- file://gawk-3.1.5_fix_for_automake-1.12.patch"
+SRC_URI = "\
+ ${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
+ file://gawk-3.1.5_fix_for_automake-1.12.patch \
+ file://0001-gawk-fix-non-glibc-gcc-4-compilation.patch \
+"
SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30"
SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch
deleted file mode 100644
index d586a1d6d..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 1d19998091154f89b8294e4594a05986b4c2f822 Mon Sep 17 00:00:00 2001
-From: Chris Liddell <chris.liddell@artifex.com>
-Date: Wed, 13 Jan 2016 02:08:42 -0500
-Subject: [PATCH 1/2] Bug 696497: Fix support for building with no jbig2
- decoder
-
-Author: Chris Liddell <chris.liddell@artifex.com>
-
-Upstream-Status: Backport
-http://bugs.ghostscript.com/show_bug.cgi?id=696497
-http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b0f5a975
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- base/lib.mak | 9 +++++++++
- psi/int.mak | 23 ++++++++++++++++++-----
- 2 files changed, 27 insertions(+), 5 deletions(-)
-
-diff --git a/base/lib.mak b/base/lib.mak
-index 241df2f..daa7056 100644
---- a/base/lib.mak
-+++ b/base/lib.mak
-@@ -1732,6 +1732,10 @@ $(GLD)sjbig2_jbig2dec.dev : $(LIB_MAK) $(ECHOGS_XE) \
- $(SETMOD) $(GLD)sjbig2_jbig2dec $(sjbig2_jbig2dec)
- $(ADDMOD) $(GLD)sjbig2_jbig2dec -include $(GLD)jbig2dec.dev
-
-+$(GLD)sjbig2_.dev : $(LIB_MAK) $(ECHOGS_XE) \
-+ $(LIB_MAK) $(MAKEDIRS)
-+ $(SETMOD) $(GLD)sjbig2_
-+
- # jbig2dec.dev is defined in jbig2.mak
-
- $(GLOBJ)sjbig2.$(OBJ) : $(GLSRC)sjbig2.c $(AK) \
-@@ -1739,6 +1743,11 @@ $(GLOBJ)sjbig2.$(OBJ) : $(GLSRC)sjbig2.c $(AK) \
- $(sjbig2_h) $(strimpl_h) $(MAKEDIRS)
- $(GLJBIG2CC) $(GLO_)sjbig2.$(OBJ) $(C_) $(GLSRC)sjbig2.c
-
-+$(GLOBJ)snojbig2.$(OBJ) : $(GLSRC)snojbig2.c $(AK) \
-+ $(stdint__h) $(memory__h) $(stdio__h) $(gserrors_h) $(gdebug_h) \
-+ $(strimpl_h) $(LIB_MAK) $(MAKEDIRS)
-+ $(GLJBIG2CC) $(GLO_)snojbig2.$(OBJ) $(C_) $(GLSRC)snojbig2.c
-+
- # luratech version
- sjbig2_luratech=$(GLOBJ)sjbig2_luratech.$(OBJ)
-
-diff --git a/psi/int.mak b/psi/int.mak
-index 6149a3b..f9d667d 100644
---- a/psi/int.mak
-+++ b/psi/int.mak
-@@ -1254,11 +1254,24 @@ $(PSOBJ)zfaes.$(OBJ) : $(PSSRC)zfaes.c $(OP) $(memory__h)\
- # this can be turned on and off with a FEATURE_DEV
-
- fjbig2_=$(PSOBJ)zfjbig2_$(JBIG2_LIB).$(OBJ)
--$(PSD)jbig2.dev : $(INT_MAK) $(ECHOGS_XE) $(fjbig2_) $(GLD)sjbig2.dev\
-- $(MAKEDIRS)
-- $(SETMOD) $(PSD)jbig2 $(fjbig2_)
-- $(ADDMOD) $(PSD)jbig2 -include $(GLD)sjbig2
-- $(ADDMOD) $(PSD)jbig2 -oper zfjbig2
-+
-+$(PSD)jbig2_jbig2dec.dev : $(ECHOGS_XE) $(fjbig2_) $(GLD)sjbig2.dev\
-+ $(INT_MAK) $(MAKEDIRS)
-+ $(SETMOD) $(PSD)jbig2_jbig2dec $(fjbig2_)
-+ $(ADDMOD) $(PSD)jbig2_jbig2dec -include $(GLD)sjbig2
-+ $(ADDMOD) $(PSD)jbig2_jbig2dec -oper zfjbig2
-+
-+$(PSD)jbig2_luratech.dev : $(ECHOGS_XE) $(fjbig2_) $(GLD)sjbig2.dev\
-+ $(INT_MAK) $(MAKEDIRS)
-+ $(SETMOD) $(PSD)jbig2_luratech $(fjbig2_)
-+ $(ADDMOD) $(PSD)jbig2_luratech -include $(GLD)sjbig2
-+ $(ADDMOD) $(PSD)jbig2_luratech -oper zfjbig2
-+
-+$(PSD)jbig2_.dev : $(ECHOGS_XE) $(INT_MAK) $(MAKEDIRS)
-+ $(SETMOD) $(PSD)jbig2_
-+
-+$(PSD)jbig2.dev : $(PSD)jbig2_$(JBIG2_LIB).dev $(INT_MAK) $(MAKEDIRS)
-+ $(CP_) $(PSD)jbig2_$(JBIG2_LIB).dev $(PSD)jbig2.dev
-
- $(PSOBJ)zfjbig2_jbig2dec.$(OBJ) : $(PSSRC)zfjbig2.c $(OP) $(memory__h)\
- $(gsstruct_h) $(gstypes_h) $(ialloc_h) $(idict_h) $(ifilter_h)\
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch
deleted file mode 100644
index fcfc479fb..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 3b43f93ec02611c4d554612953f5b64765b8683b Mon Sep 17 00:00:00 2001
-From: Chris Liddell <chris.liddell@artifex.com>
-Date: Wed, 13 Jan 2016 02:14:55 -0500
-Subject: [PATCH 2/2] Bug 696497 (part 2): fix support for building with a JPX
- decoder
-
-Author: Chris Liddell <chris.liddell@artifex.com>
-
-Upstream-Status: Backport
-http://bugs.ghostscript.com/show_bug.cgi?id=696497
-http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b0f5a975
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- base/lib.mak | 3 +++
- psi/int.mak | 3 +++
- 2 files changed, 6 insertions(+)
-
-diff --git a/base/lib.mak b/base/lib.mak
-index daa7056..8853dd5 100644
---- a/base/lib.mak
-+++ b/base/lib.mak
-@@ -1774,6 +1774,9 @@ $(GLOBJ)sjpx.$(OBJ) : $(GLSRC)sjpx.c $(AK) \
- $(gdebug_h) $(strimpl_h) $(sjpx_h) $(MAKEDIRS)
- $(GLJASCC) $(GLO_)sjpx.$(OBJ) $(C_) $(GLSRC)sjpx.c
-
-+$(GLD)sjpx_.dev : $(LIB_MAK) $(ECHOGS_XE) $(LIB_MAK) $(MAKEDIRS)
-+ $(SETMOD) $(GLD)sjpx_
-+
- # luratech version
- sjpx_luratech=$(GLOBJ)sjpx_luratech.$(OBJ)
- $(GLD)sjpx_luratech.dev : $(LIB_MAK) $(ECHOGS_XE) \
-diff --git a/psi/int.mak b/psi/int.mak
-index f9d667d..db01b65 100644
---- a/psi/int.mak
-+++ b/psi/int.mak
-@@ -1290,6 +1290,9 @@ $(PSD)jpx.dev : $(INT_MAK) $(ECHOGS_XE) $(PSD)jpx_$(JPX_LIB).dev\
- $(MAKEDIRS)
- $(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev
-
-+$(PSD)jpx_.dev : $(ECHOGS_XE) $(INT_MAK) $(MAKEDIRS)
-+ $(SETMOD) $(PSD)jpx_
-+
- fjpx_luratech=$(PSOBJ)zfjpx_luratech.$(OBJ)
-
- $(PSOBJ)zfjpx.$(OBJ) : $(PSSRC)zfjpx.c $(OP) $(memory__h)\
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
index b445a6c9e..c3e44fe86 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
@@ -16,17 +16,17 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
-index ab30a97..b762fd7 100644
+index bf6d3f5..01df03f 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -955,11 +955,11 @@ AC_SUBST(ZLIBDIR)
+@@ -930,11 +930,11 @@ AC_SUBST(ZLIBDIR)
AC_SUBST(FT_SYS_ZLIB)
dnl png for the png output device; it also requires zlib
-LIBPNGDIR=src
+LIBPNGDIR=$srcdir/libpng
PNGDEVS=''
- PNGDEVS_ALL='png48 png16m pnggray pngmono png256 png16 pngalpha'
+ PNGDEVS_ALL='png48 png16m pnggray pngmono pngmonod png256 png16 pngalpha'
AC_MSG_CHECKING([for local png library source])
-if test -f $srcdir/libpng/pngread.c; then
+if false; then
@@ -34,5 +34,5 @@ index ab30a97..b762fd7 100644
SHARE_LIBPNG=0
LIBPNGDIR=$srcdir/libpng
--
-1.9.1
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
index bc29be507..e709195d8 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-prevent_recompiling.patch
@@ -1,4 +1,4 @@
-ust use commands provided by ghostscript-native, preventing recompile them when
+Just use commands provided by ghostscript-native, preventing recompile them when
compile ghostscript.
Way to enable cross compile.
@@ -7,94 +7,93 @@ Upstream-Status: Pending
Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+Rebase to 9.19
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ base/unix-aux.mak | 64 +++++++++++++++++++++++++++----------------------------
+ 1 file changed, 32 insertions(+), 32 deletions(-)
+
diff --git a/base/unix-aux.mak b/base/unix-aux.mak
-index a91fb26..c991d11 100644
+index 0110667..e2eb1a1 100644
--- a/base/unix-aux.mak
+++ b/base/unix-aux.mak
-@@ -69,46 +69,46 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\
- $(MAKEDIRS)
- $(GLCC) $(GLO_)gp_sysv.$(OBJ) $(C_) $(GLSRC)gp_sysv.c
+@@ -71,44 +71,44 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\
--# -------------------------- Auxiliary programs --------------------------- #
--
--$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
+ # -------------------------- Auxiliary programs --------------------------- #
+
+-$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
-
--# On the RS/6000 (at least), compiling genarch.c with gcc with -O
--# produces a buggy executable.
--$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
++#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
++#
+ # On the RS/6000 (at least), compiling genarch.c with gcc with -O
+ # produces a buggy executable.
+-$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
-
--$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
+-$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
-
--$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
+-$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
-
--$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
+-$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
-
--# To get GS to use the system zlib, you remove/hide the gs/zlib directory
--# which means that the mkromfs build can't find the zlib source it needs.
--# So it's split into two targets, one using the zlib source directly.....
--MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
-- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
-- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
--
--$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(MAKEDIRS)
-- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
--
--# .... and one using the zlib library linked via the command line
--MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
-- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
-- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
-- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
--
--$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(MAKEDIRS)
-- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
--
--$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
-- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
-+## -------------------------- Auxiliary programs --------------------------- #
-+#
-+#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(MAKEDIRS)
-+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS)
-+#
-+## On the RS/6000 (at least), compiling genarch.c with gcc with -O
-+## produces a buggy executable.
-+#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(MAKEDIRS)
++#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS)
+#
-+#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(MAKEDIRS)
++#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS)
+#
-+#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(MAKEDIRS)
++#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
+# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS)
+#
-+#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(MAKEDIRS)
++#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS)
+# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
+#
-+## To get GS to use the system zlib, you remove/hide the gs/zlib directory
-+## which means that the mkromfs build can't find the zlib source it needs.
-+## So it's split into two targets, one using the zlib source directly.....
+ # To get GS to use the system zlib, you remove/hide the gs/zlib directory
+ # which means that the mkromfs build can't find the zlib source it needs.
+ # So it's split into two targets, one using the zlib source directly.....
+-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
+-
+-$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
+-
+#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+# $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
+#
-+#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(MAKEDIRS)
++#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS)
+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
+#
-+## .... and one using the zlib library linked via the command line
+ # .... and one using the zlib library linked via the command line
+-MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
+- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
+-
+-$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
+-
+-$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS)
+- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
+#MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
+# $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \
+# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
+#
-+#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(MAKEDIRS)
++#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS)
+# $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS)
+#
-+#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(MAKEDIRS)
++#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS)
+# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
# Query the environment to construct gconfig_.h.
# These are all defined conditionally (except the JasPER one), so that
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch
index da900ead3..8b84986ef 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch
@@ -1,21 +1,32 @@
ghostscript: add dependency for pnglibconf.h
-
+
When using parallel make jobs, we need to be sure that
pnglibconf.h is created before we try to reference it,
so add a rule to png.mak.
Upstream-Status: Pending
-
+
Signed-off-by: Joe Slater <jslater@windriver.com>
+Rebase to 9.19
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ base/png.mak | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/base/png.mak b/base/png.mak
+index fe5c6e2..8abb53a 100644
--- a/base/png.mak
+++ b/base/png.mak
-@@ -81,6 +81,8 @@ png.config-clean :
- $(pnglibconf_h) : $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt
- $(CP_) $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt $(pnglibconf_h)
+@@ -74,6 +74,8 @@ png.clean-not-config-clean :
+
+ pnglibconf_h=$(PNGGENDIR)$(D)pnglibconf.h
+$(MAKEDIRS) : $(pnglibconf_h)
+
- PDEP=$(AK) $(pnglibconf_h) $(MAKEDIRS)
-
- png_1=$(PNGOBJ)png.$(OBJ) $(PNGOBJ)pngmem.$(OBJ) $(PNGOBJ)pngerror.$(OBJ) $(PNGOBJ)pngset.$(OBJ)
+ png.config-clean :
+ $(RM_) $(pnglibconf_h)
+ $(RM_) $(PNGGEN)lpg*.dev
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb
deleted file mode 100644
index d4222c773..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb
+++ /dev/null
@@ -1,107 +0,0 @@
-SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
-DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \
-a back-end to a program such as ghostview, it can display PostScript and PDF \
-documents in an X11 environment. \
-\
-Furthermore, it can render PostScript and PDF files as graphics to be printed \
-on non-PostScript printers. Supported printers include common \
-dot-matrix, inkjet and laser models. \
-"
-HOMEPAGE = "http://www.ghostscript.com"
-SECTION = "console/utils"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b17cea54743435ab2a581c237bea294a"
-
-DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng"
-DEPENDS_class-native = "libpng-native"
-
-SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz \
- file://ghostscript-9.15-parallel-make.patch \
- file://ghostscript-9.16-Werror-return-type.patch \
- file://png_mak.patch \
- file://0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch \
- file://0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch \
- file://do-not-check-local-libpng-source.patch \
-"
-
-SRC_URI = "${SRC_URI_BASE} \
- file://ghostscript-9.02-prevent_recompiling.patch \
- file://ghostscript-9.02-genarch.patch \
- file://objarch.h \
- file://cups-no-gcrypt.patch \
- "
-
-SRC_URI_class-native = "${SRC_URI_BASE} \
- file://ghostscript-native-fix-disable-system-libtiff.patch \
- file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
- "
-
-SRC_URI[md5sum] = "33a47567d7a591c00a253caddd12a88a"
-SRC_URI[sha256sum] = "5fc93079749a250be5404c465943850e3ed5ffbc0d5c07e10c7c5ee8afbbdb1b"
-
-EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
- --with-fontpath=${datadir}/fonts \
- --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \
- --with-cups-datadir=${datadir}/cups \
- ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--enable-little-endian', '--enable-big-endian', d)} \
- "
-
-EXTRA_OECONF_append_mips = " --with-large_color_index=0"
-EXTRA_OECONF_append_mipsel = " --with-large_color_index=0"
-
-# Explicity disable libtiff, fontconfig,
-# freetype, cups for ghostscript-native
-EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
- --without-jbig2dec \
- --with-fontpath=${datadir}/fonts \
- --without-libidn --disable-fontconfig \
- --disable-freetype --disable-cups"
-
-# This has been fixed upstream but for now we need to subvert the check for time.h
-# http://bugs.ghostscript.com/show_bug.cgi?id=692443
-# http://bugs.ghostscript.com/show_bug.cgi?id=692426
-CFLAGS += "-DHAVE_SYS_TIME_H=1"
-BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
-
-inherit autotools
-
-do_configure_prepend () {
- mkdir -p obj
- mkdir -p soobj
- if [ -e ${WORKDIR}/objarch.h ]; then
- cp ${WORKDIR}/objarch.h obj/arch.h
- fi
-}
-
-do_configure_append () {
- # copy tools from the native ghostscript build
- if [ "${PN}" != "ghostscript-native" ]; then
- mkdir -p obj/aux soobj
- for i in genarch genconf mkromfs echogs gendev genht; do
- cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
- done
- fi
-}
-
-do_install_append () {
- mkdir -p ${D}${datadir}/ghostscript/${PV}/
- cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
- cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
-}
-
-do_compile_class-native () {
- mkdir -p obj
- for i in genarch genconf mkromfs echogs gendev genht; do
- oe_runmake obj/aux/$i
- done
-}
-
-do_install_class-native () {
- install -d ${D}${bindir}/ghostscript-${PV}
- for i in genarch genconf mkromfs echogs gendev genht; do
- install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
- done
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.19.bb b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
new file mode 100644
index 000000000..fe2016b15
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.19.bb
@@ -0,0 +1,106 @@
+SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
+DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \
+a back-end to a program such as ghostview, it can display PostScript and PDF \
+documents in an X11 environment. \
+\
+Furthermore, it can render PostScript and PDF files as graphics to be printed \
+on non-PostScript printers. Supported printers include common \
+dot-matrix, inkjet and laser models. \
+"
+HOMEPAGE = "http://www.ghostscript.com"
+SECTION = "console/utils"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b17cea54743435ab2a581c237bea294a"
+
+DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng"
+DEPENDS_class-native = "libpng-native"
+
+UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases"
+
+SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs919/${BPN}-${PV}.tar.gz \
+ file://ghostscript-9.15-parallel-make.patch \
+ file://ghostscript-9.16-Werror-return-type.patch \
+ file://png_mak.patch \
+ file://do-not-check-local-libpng-source.patch \
+"
+
+SRC_URI = "${SRC_URI_BASE} \
+ file://ghostscript-9.02-prevent_recompiling.patch \
+ file://ghostscript-9.02-genarch.patch \
+ file://objarch.h \
+ file://cups-no-gcrypt.patch \
+ "
+
+SRC_URI_class-native = "${SRC_URI_BASE} \
+ file://ghostscript-native-fix-disable-system-libtiff.patch \
+ file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
+ "
+
+SRC_URI[md5sum] = "c9682ce6b852f9197c69905a43928907"
+SRC_URI[sha256sum] = "cf3c0dce67db1557a87366969945f9c5235887989c0b585e037af366dc035989"
+
+EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
+ --with-fontpath=${datadir}/fonts \
+ --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \
+ --with-cups-datadir=${datadir}/cups \
+ "
+
+EXTRA_OECONF_append_mips = " --with-large_color_index=0"
+EXTRA_OECONF_append_mipsel = " --with-large_color_index=0"
+
+# Explicity disable libtiff, fontconfig,
+# freetype, cups for ghostscript-native
+EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
+ --without-jbig2dec \
+ --with-fontpath=${datadir}/fonts \
+ --without-libidn --disable-fontconfig \
+ --disable-freetype --disable-cups"
+
+# This has been fixed upstream but for now we need to subvert the check for time.h
+# http://bugs.ghostscript.com/show_bug.cgi?id=692443
+# http://bugs.ghostscript.com/show_bug.cgi?id=692426
+CFLAGS += "-DHAVE_SYS_TIME_H=1"
+BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
+
+inherit autotools
+
+do_configure_prepend () {
+ mkdir -p obj
+ mkdir -p soobj
+ if [ -e ${WORKDIR}/objarch.h ]; then
+ cp ${WORKDIR}/objarch.h obj/arch.h
+ fi
+}
+
+do_configure_append () {
+ # copy tools from the native ghostscript build
+ if [ "${PN}" != "ghostscript-native" ]; then
+ mkdir -p obj/aux soobj
+ for i in genarch genconf mkromfs echogs gendev genht; do
+ cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
+ done
+ fi
+}
+
+do_install_append () {
+ mkdir -p ${D}${datadir}/ghostscript/${PV}/
+ cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
+ cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
+}
+
+do_compile_class-native () {
+ mkdir -p obj
+ for i in genarch genconf mkromfs echogs gendev genht; do
+ oe_runmake obj/aux/$i
+ done
+}
+
+do_install_class-native () {
+ install -d ${D}${bindir}/ghostscript-${PV}
+ for i in genarch genconf mkromfs echogs gendev genht; do
+ install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
+ done
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch b/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch
index 5a4149cfc..ce595099f 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch
@@ -1,6 +1,6 @@
Upstream-Status: Inappropriate [Poky Specific this is gplv2 version]
-Signed-off-by Saul Wold <sgw@linux.intel.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
Index: grep-2.5.1a/doc/grep.texi
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch b/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
index 721f2a0a6..a40a9f30b 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
@@ -12,7 +12,7 @@ This version of GNU Grep has been abandoned upstream and they are no longer
accepting patches. This is not a backport.
CVE: CVE-2012-5667
-Signed-off-by Ming Liu <ming.liu@windriver.com>
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
---
grep.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch
index 3ccce5fc3..d9b1e35e7 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch
@@ -13,7 +13,7 @@ this patch avoids these kinds of errors:
| src/Makefile.am:2: error: automatic de-ANSI-fication support has been removed
| autoreconf: automake failed with exit status: 1
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/04
Index: grep-2.5.1a/configure.in
diff --git a/import-layers/yocto-poky/meta/recipes-extended/grep/grep_2.23.bb b/import-layers/yocto-poky/meta/recipes-extended/grep/grep_2.23.bb
deleted file mode 100644
index 13ff32dd8..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/grep/grep_2.23.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "GNU grep utility"
-HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
-BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
-SECTION = "console/utils"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
-
-SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-
-SRC_URI[md5sum] = "f46aa9d0d2577b9212a104348a286787"
-SRC_URI[sha256sum] = "54fc478ee1ce17780109820ef30730c9e18715a949f7d5c6afc673adb2a56ecf"
-
-inherit autotools gettext texinfo
-
-EXTRA_OECONF = "--disable-perl-regexp"
-
-do_configure_prepend () {
- rm -f ${S}/m4/init.m4
-}
-
-do_install () {
- autotools_do_install
- if [ "${base_bindir}" != "${bindir}" ]; then
- install -d ${D}${base_bindir}
- mv ${D}${bindir}/grep ${D}${base_bindir}/grep
- mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
- mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
- rmdir ${D}${bindir}/
- fi
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN} = "grep egrep fgrep"
-ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
-ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
-ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
-
-export CONFIG_SHELL="/bin/sh"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/grep/grep_2.25.bb b/import-layers/yocto-poky/meta/recipes-extended/grep/grep_2.25.bb
new file mode 100644
index 000000000..9720d9f94
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/grep/grep_2.25.bb
@@ -0,0 +1,43 @@
+SUMMARY = "GNU grep utility"
+HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
+BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
+SECTION = "console/utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
+
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ "
+
+SRC_URI[md5sum] = "04e96b0e6f0fe6a180ae62c88fcd0af6"
+SRC_URI[sha256sum] = "e21e83bac50450e0d0d61a42c154ee0dceaacdbf4f604ef6e79071cb8e596830"
+
+inherit autotools gettext texinfo
+
+EXTRA_OECONF = "--disable-perl-regexp"
+
+do_configure_prepend () {
+ rm -f ${S}/m4/init.m4
+}
+
+do_install () {
+ autotools_do_install
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ install -d ${D}${base_bindir}
+ mv ${D}${bindir}/grep ${D}${base_bindir}/grep
+ mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
+ mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
+ rmdir ${D}${bindir}/
+ fi
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "grep egrep fgrep"
+ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
+ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
+ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch b/import-layers/yocto-poky/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch
new file mode 100644
index 000000000..4b0176fcd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch
@@ -0,0 +1,61 @@
+From fc289ab69c6d7e4ad489172509a85f68afec43ea Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 29 Jul 2016 03:19:39 -0400
+Subject: [PATCH] fix narrowing conversion error
+
+While gcc6 used, build old groff (for anti-GPLv3 reasons) failed:
+.....
+|groff-1.18.1.4/src/devices/grolbp/charset.h:69:1: error: narrowing
+conversion of '130' from 'int' to 'char' inside { } [-Wnarrowing]
+......
+
+In upstream git://git.savannah.gnu.org/groff.git,
+the following commit fix the issue, but the license is GPLV3,
+we could not backport it to the old groff which license is GPLV2.
+...
+commit d180038ae0da19655bc2760ae2043efa0550a76c
+Author: Werner LEMBERG <wl@gnu.org>
+Date: Wed Apr 16 21:11:07 2003 +0000
+ * src/devices/grolbp/charset.h (symset): Use `unsigned char'.
+...
+
+We use another different way to fix the issue.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/devices/grolbp/charset.h | 2 +-
+ src/devices/grolbp/lbp.cc | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/devices/grolbp/charset.h b/src/devices/grolbp/charset.h
+index adc76f4..e9c6c5b 100644
+--- a/src/devices/grolbp/charset.h
++++ b/src/devices/grolbp/charset.h
+@@ -1,6 +1,6 @@
+ // Definition of the WP54 character set
+
+-char symset[] = {
++int symset[] = {
+ 0x57,0x50,0x35,0x34,0x00,0x41,0x76,0x61,0x6e,0x74,0x47,0x61,
+ 0x72,0x64,0x65,0x2d,0x42,0x6f,0x6f,0x6b,0x00,0x41,0x76,
+ 0x61,0x6e,0x74,0x47,0x61,0x72,0x64,0x65,0x2d,0x44,0x65,
+diff --git a/src/devices/grolbp/lbp.cc b/src/devices/grolbp/lbp.cc
+index 76db32a..00d4ca7 100644
+--- a/src/devices/grolbp/lbp.cc
++++ b/src/devices/grolbp/lbp.cc
+@@ -152,8 +152,8 @@ static void wp54charset()
+ {
+ unsigned int i;
+ lbpputs("\033[714;100;29;0;32;120.}");
+- for (i = 0; i < sizeof(symset); i++)
+- lbpputc(symset[i]);
++ for (i = 0; i < sizeof(symset)/sizeof(symset[0]); i++)
++ lbpputc((char)symset[i]&0xFF);
+ lbpputs("\033[100;0 D");
+ return;
+ }
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.18.1.4.bb b/import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.18.1.4.bb
index bd786a30a..fc7eb4478 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.18.1.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.18.1.4.bb
@@ -13,6 +13,7 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/old/${BP}.tar.gz \
file://man-local.patch \
file://mdoc-local.patch \
file://groff-1.18.1.4-fix-bindir.patch \
+ file://fix-narrowing-conversion-error.patch \
"
inherit autotools texinfo
diff --git a/import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.22.3.bb b/import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.22.3.bb
index 4bffa814f..dd241f3f8 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.22.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/groff/groff_1.22.3.bb
@@ -56,6 +56,17 @@ do_install_append() {
if [ -e ${D}${libdir}/charset.alias ]; then
rm -rf ${D}${libdir}/charset.alias
fi
+
+ # awk is located at /usr/bin/, not /bin/
+ SPECIAL_AWK=`find ${D} -name special.awk`
+ if [ -f ${SPECIAL_AWK} ]; then
+ sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK}
+ fi
+
+ # not ship /usr/bin/glilypond and its releated files in embedded target system
+ rm -rf ${D}${bindir}/glilypond
+ rm -rf ${D}${libdir}/groff/glilypond
+ rm -rf ${D}${mandir}/man1/glilypond*
}
do_install_append_class-native() {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
deleted file mode 100644
index 92863d6c4..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.6/wrong-path-fix.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-fix MakeMaker issues with using wrong SHELL/GREP
-
-A set of substitution is being processed to all target scripts with sed by
-replacing some key words with the detected values at configure time, this
-is exactly not compliant with cross compling, and will cause missing path
-errors at run time like:
-"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
-
-Fixed by removing unneeded substitution and using real runtime paths
-instead.
-
-Signed-off-by: Ming Liu <ming.liu@windriver.com>
-
-Upstream-Status: Pending
-
-Index: gzip-1.3.12/Makefile.am
-===================================================================
-diff -urpN a/Makefile.am b/Makefile.am
---- a/Makefile.am 2013-11-30 10:06:09.402234871 +0800
-+++ b/Makefile.am 2013-11-30 10:13:42.952236025 +0800
-@@ -81,9 +81,8 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS)
- SUFFIXES = .in
- .in:
- $(AM_V_GEN)sed \
-- -e 's|/bin/sh|$(SHELL)|g' \
- -e 's|[@]bindir@|'\''$(bindir)'\''|g' \
-- -e 's|[@]GREP@|$(GREP)|g' \
-+ -e 's|[@]GREP@|$(base_bindir)/grep|g' \
- -e 's|[@]VERSION@|$(VERSION)|g' \
- $(srcdir)/$@.in >$@-t \
- && chmod a+x $@-t \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch
new file mode 100644
index 000000000..4dc10002e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip-1.8/wrong-path-fix.patch
@@ -0,0 +1,29 @@
+fix MakeMaker issues with using wrong SHELL/GREP
+
+A set of substitution is being processed to all target scripts with sed by
+replacing some key words with the detected values at configure time, this
+is exactly not compliant with cross compling, and will cause missing path
+errors at run time like:
+"/usr/bin/zgrep: line 230: /usr/bin/grep: No such file or directory"
+
+Fixed by removing unneeded substitution and using real runtime paths
+instead.
+
+Signed-off-by: Ming Liu <ming.liu@windriver.com>
+
+Upstream-Status: Pending
+
+Index: gzip-1.8/Makefile.am
+===================================================================
+--- gzip-1.8.orig/Makefile.am
++++ gzip-1.8/Makefile.am
+@@ -81,8 +81,7 @@ gzip.doc.gz: gzip.doc $(bin_PROGRAMS)
+ SUFFIXES = .in
+ .in:
+ $(AM_V_GEN)sed \
+- -e 's|/bin/sh|$(SHELL)|g' \
+- -e 's|[@]GREP@|$(GREP)|g' \
++ -e 's|[@]GREP@|$(base_bindir)/grep|g' \
+ -e 's|[@]VERSION@|$(VERSION)|g' \
+ $(srcdir)/$@.in >$@-t \
+ && chmod a+x $@-t \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip.inc b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip.inc
index 6e8188347..04f8f95dd 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip.inc
@@ -22,11 +22,6 @@ do_install_append () {
fi
}
-do_install_append_libc-musl () {
- rm ${D}${libdir}/charset.alias
- rmdir ${D}${libdir}
-}
-
inherit update-alternatives
ALTERNATIVE_PRIORITY = "100"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.6.bb b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.6.bb
deleted file mode 100644
index b347f0bb8..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.6.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require gzip.inc
-
-LICENSE = "GPLv3+"
-
-SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
-SRC_URI_append_class-target = " file://wrong-path-fix.patch"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
-
-PROVIDES_append_class-native = " gzip-replacement-native"
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "38603cb2843bf5681ff41aab3bcd6a20"
-SRC_URI[sha256sum] = "97eb83b763d9e5ad35f351fe5517e6b71521d7aac7acf3e3cacdb6b1496d8f7e"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb
new file mode 100644
index 000000000..a19b96539
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/gzip/gzip_1.8.bb
@@ -0,0 +1,18 @@
+require gzip.inc
+
+LICENSE = "GPLv3+"
+
+SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz"
+SRC_URI_append_class-target = " file://wrong-path-fix.patch"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
+
+PROVIDES_append_class-native = " gzip-replacement-native"
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "732553152814b22dc35aa0267df5286c"
+SRC_URI[sha256sum] = "1ff7aedb3d66a0d73f442f6261e4b3860df6fd6c94025c2cb31a202c9c60fe0e"
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb
index ec3d26f42..cd85776cf 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb
@@ -2,8 +2,12 @@ SUMMARY = "Utility for viewing/manipulating IDE disk drive/driver parameters"
DESCRIPTION = "hdparm is a Linux shell utility for viewing \
and manipulating various IDE drive and driver parameters."
SECTION = "console/utils"
-LICENSE = "BSD"
+
+LICENSE = "BSD & GPLv2"
+LICENSE_${PN} = "BSD"
+LICENSE_${PN}-dbg = "BSD"
LICENSE_wiper = "GPLv2"
+
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=910a8a42c962d238619c75fdb78bdb24 \
file://debian/copyright;md5=a82d7ba3ade9e8ec902749db98c592f3 \
file://wiper/GPLv2.txt;md5=fcb02dc552a041dee27e4b85c7396067 \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb b/import-layers/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb
index 26b88c9e8..a40b3aa95 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb
@@ -14,7 +14,7 @@ CORE_IMAGE_EXTRA_INSTALL += "${KERNEL_DEV_MODULE} \
"
# We need extra space for things like kernel builds, etc.
-IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 3000000"
+IMAGE_ROOTFS_EXTRA_SPACE_append = " + 3000000"
# Let's define our own subset to test, we can later add a on-target kernel build even!
DEFAULT_TEST_SUITES = "ping ssh df connman syslog scp date parselogs"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb b/import-layers/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
index ad1407c7a..09a6d1604 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
@@ -18,3 +18,6 @@ inherit core-image
IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
BAD_RECOMMENDATIONS += "busybox-syslog"
+
+# Use the same restriction as initramfs-live-install-testfs
+COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
index 508f5a12f..dc4ba505b 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
@@ -6,7 +6,7 @@ syscall so that it works with both x32 and x86-64.
Received this patch from H.J. Lu <hjl.tools@gmail.com>
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2011/12/02
--- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio_0.3.110.bb b/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio_0.3.110.bb
index 2adfa0aa4..75975d4ab 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio_0.3.110.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/libaio/libaio_0.3.110.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
-SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/liba/${BPN}/${BPN}_${PV}.orig.tar.gz \
file://generic-arch-dectection-for-padding-defines.patch \
file://00_arches.patch \
file://destdir.patch \
@@ -17,6 +17,8 @@ SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8"
SRC_URI[sha256sum] = "e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e"
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/liba/libaio/"
+
EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"
do_install () {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch b/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch
deleted file mode 100644
index 6d74e867e..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 545ded56095c570426fe102ff2192889681ea75c Mon Sep 17 00:00:00 2001
-From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
-Date: Mon, 29 Feb 2016 14:38:25 +0200
-Subject: [PATCH] Set xattrs after setting times
-
-With Integrity Measurement Architecture (IMA) enabled in Linux
-kernel the security.ima extended attribute gets overwritten
-when setting times on a file with a futimens() call. So it's safer
-to set xattrs after times.
-
-Upstream-Status: Submitted [https://github.com/libarchive/libarchive/pull/664]
-
-Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
-
----
- libarchive/archive_write_disk_posix.c | 21 +++++++++++----------
- 1 file changed, 11 insertions(+), 10 deletions(-)
-
-diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c
-index 0fc6193..27c9c1e 100644
---- a/libarchive/archive_write_disk_posix.c
-+++ b/libarchive/archive_write_disk_posix.c
-@@ -1620,16 +1620,6 @@ _archive_write_disk_finish_entry(struct archive *_a)
- }
-
- /*
-- * Security-related extended attributes (such as
-- * security.capability on Linux) have to be restored last,
-- * since they're implicitly removed by other file changes.
-- */
-- if (a->todo & TODO_XATTR) {
-- int r2 = set_xattrs(a);
-- if (r2 < ret) ret = r2;
-- }
--
-- /*
- * Some flags prevent file modification; they must be restored after
- * file contents are written.
- */
-@@ -1648,6 +1638,17 @@ _archive_write_disk_finish_entry(struct archive *_a)
- }
-
- /*
-+ * Security-related extended attributes (such as
-+ * security.capability or security.ima on Linux) have to be restored last,
-+ * since they're implicitly removed by other file changes like setting
-+ * times.
-+ */
-+ if (a->todo & TODO_XATTR) {
-+ int r2 = set_xattrs(a);
-+ if (r2 < ret) ret = r2;
-+ }
-+
-+ /*
- * Mac extended metadata includes ACLs.
- */
- if (a->todo & TODO_MAC_METADATA) {
---
-2.5.0
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch b/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
deleted file mode 100644
index 19523f4b8..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 2f55d6bd308ea61975558c2469ae349dba297e89 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sat, 22 Feb 2014 14:35:59 +0800
-Subject: [PATCH] Fix CVE-2013-0211
-
-This patch comes from:https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4
-
-Upstream-Status: Backport
-CVE: CVE-2013-0211
-
-Signed-off-by: Baogen shang <baogen.shang@windriver.com>
-
-Update the patch because of uprev on 20140222
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- libarchive/archive_write.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c
-index a3d1a33..a323588 100644
---- a/libarchive/archive_write.c
-+++ b/libarchive/archive_write.c
-@@ -671,8 +671,12 @@ static ssize_t
- _archive_write_data(struct archive *_a, const void *buff, size_t s)
- {
- struct archive_write *a = (struct archive_write *)_a;
-+ const size_t max_write = INT_MAX;
- archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
- ARCHIVE_STATE_DATA, "archive_write_data");
-+ /* In particular, this catches attempts to pass negative values. */
-+ if (s > max_write)
-+ s = max_write;
- archive_clear_error(&a->archive);
- return ((a->format_write_data)(a, buff, s));
- }
---
-1.8.2.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch b/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch
deleted file mode 100644
index 5c2439635..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 59357157706d47c365b2227739e17daba3607526 Mon Sep 17 00:00:00 2001
-From: Alessandro Ghedini <alessandro@ghedini.me>
-Date: Sun, 1 Mar 2015 12:07:45 +0100
-Subject: [PATCH] Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
-
-This fixes a directory traversal in the cpio tool.
-
-
-Upstream-Status: backport
-CVE: CVE-2015-2304
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- cpio/bsdcpio.1 | 3 ++-
- cpio/cpio.c | 2 ++
- libarchive/archive.h | 2 ++
- libarchive/archive_write_disk.3 | 3 +++
- libarchive/archive_write_disk_posix.c | 14 +++++++++++---
- libarchive/test/test_write_disk_secure.c | 23 +++++++++++++++++++++++
- 6 files changed, 43 insertions(+), 4 deletions(-)
-
-diff --git a/cpio/bsdcpio.1 b/cpio/bsdcpio.1
-index f966aa0..e52546e 100644
---- a/cpio/bsdcpio.1
-+++ b/cpio/bsdcpio.1
-@@ -156,7 +156,8 @@ See above for description.
- .It Fl Fl insecure
- (i and p mode only)
- Disable security checks during extraction or copying.
--This allows extraction via symbolic links and path names containing
-+This allows extraction via symbolic links, absolute paths,
-+and path names containing
- .Sq ..
- in the name.
- .It Fl J , Fl Fl xz
-diff --git a/cpio/cpio.c b/cpio/cpio.c
-index 0acde11..b267e9b 100644
---- a/cpio/cpio.c
-+++ b/cpio/cpio.c
-@@ -171,6 +171,7 @@ main(int argc, char *argv[])
- cpio->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER;
- cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_SYMLINKS;
- cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NODOTDOT;
-+ cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS;
- cpio->extract_flags |= ARCHIVE_EXTRACT_PERM;
- cpio->extract_flags |= ARCHIVE_EXTRACT_FFLAGS;
- cpio->extract_flags |= ARCHIVE_EXTRACT_ACL;
-@@ -256,6 +257,7 @@ main(int argc, char *argv[])
- case OPTION_INSECURE:
- cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_SYMLINKS;
- cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT;
-+ cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS;
- break;
- case 'L': /* GNU cpio */
- cpio->option_follow_links = 1;
-diff --git a/libarchive/archive.h b/libarchive/archive.h
-index 1f0fc38..ef635ac 100644
---- a/libarchive/archive.h
-+++ b/libarchive/archive.h
-@@ -649,6 +649,8 @@ __LA_DECL int archive_read_set_passphrase_callback(struct archive *,
- /* Default: Do not use HFS+ compression if it was not compressed. */
- /* This has no effect except on Mac OS v10.6 or later. */
- #define ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED (0x8000)
-+/* Default: Do not reject entries with absolute paths */
-+#define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000)
-
- __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *,
- int flags);
-diff --git a/libarchive/archive_write_disk.3 b/libarchive/archive_write_disk.3
-index fa925cc..a2e7afa 100644
---- a/libarchive/archive_write_disk.3
-+++ b/libarchive/archive_write_disk.3
-@@ -177,6 +177,9 @@ The default is to not refuse such paths.
- Note that paths ending in
- .Pa ..
- always cause an error, regardless of this flag.
-+.It Cm ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS
-+Refuse to extract an absolute path.
-+The default is to not refuse such paths.
- .It Cm ARCHIVE_EXTRACT_SPARSE
- Scan data for blocks of NUL bytes and try to recreate them with holes.
- This results in sparse files, independent of whether the archive format
-diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c
-index ab3bdac..c1290eb 100644
---- a/libarchive/archive_write_disk_posix.c
-+++ b/libarchive/archive_write_disk_posix.c
-@@ -2509,8 +2509,9 @@ cleanup_pathname_win(struct archive_write_disk *a)
- /*
- * Canonicalize the pathname. In particular, this strips duplicate
- * '/' characters, '.' elements, and trailing '/'. It also raises an
-- * error for an empty path, a trailing '..' or (if _SECURE_NODOTDOT is
-- * set) any '..' in the path.
-+ * error for an empty path, a trailing '..', (if _SECURE_NODOTDOT is
-+ * set) any '..' in the path or (if ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS
-+ * is set) if the path is absolute.
- */
- static int
- cleanup_pathname(struct archive_write_disk *a)
-@@ -2529,8 +2530,15 @@ cleanup_pathname(struct archive_write_disk *a)
- cleanup_pathname_win(a);
- #endif
- /* Skip leading '/'. */
-- if (*src == '/')
-+ if (*src == '/') {
-+ if (a->flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) {
-+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
-+ "Path is absolute");
-+ return (ARCHIVE_FAILED);
-+ }
-+
- separator = *src++;
-+ }
-
- /* Scan the pathname one element at a time. */
- for (;;) {
-diff --git a/libarchive/test/test_write_disk_secure.c b/libarchive/test/test_write_disk_secure.c
-index 31c5bfd..2c94206 100644
---- a/libarchive/test/test_write_disk_secure.c
-+++ b/libarchive/test/test_write_disk_secure.c
-@@ -178,6 +178,29 @@ DEFINE_TEST(test_write_disk_secure)
- assert(S_ISDIR(st.st_mode));
- archive_entry_free(ae);
-
-+ /*
-+ * Without security checks, we should be able to
-+ * extract an absolute path.
-+ */
-+ assert((ae = archive_entry_new()) != NULL);
-+ archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
-+ archive_entry_set_mode(ae, S_IFREG | 0777);
-+ assert(0 == archive_write_header(a, ae));
-+ assert(0 == archive_write_finish_entry(a));
-+ assertFileExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
-+ assert(0 == unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"));
-+
-+ /* But with security checks enabled, this should fail. */
-+ assert(archive_entry_clear(ae) != NULL);
-+ archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
-+ archive_entry_set_mode(ae, S_IFREG | 0777);
-+ archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS);
-+ failure("Extracting an absolute path should fail here.");
-+ assertEqualInt(ARCHIVE_FAILED, archive_write_header(a, ae));
-+ archive_entry_free(ae);
-+ assert(0 == archive_write_finish_entry(a));
-+ assertFileNotExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
-+
- assertEqualInt(ARCHIVE_OK, archive_write_free(a));
-
- /* Test the entries on disk. */
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/mkdir.patch b/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/mkdir.patch
deleted file mode 100644
index 509a2957a..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/mkdir.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Add missing mkdir calls so that out-of-tree builds work.
-
-Upstream-Status: Submitted (https://github.com/libarchive/libarchive/pull/534)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index 3fa2d22..5ecca52 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -508,6 +508,7 @@ libarchive_test_LDADD= $(LTLIBICONV)
- # Building it automatically provides a sanity-check on libarchive_test_SOURCES
- # above.
- libarchive/test/list.h: Makefile
-+ $(MKDIR_P) libarchive/test
- cat $(top_srcdir)/libarchive/test/test_*.c | grep DEFINE_TEST > libarchive/test/list.h
-
- libarchive_TESTS_ENVIRONMENT= LIBARCHIVE_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/libarchive/test LRZIP=NOCONFIG
-@@ -835,6 +836,7 @@ bsdtar_test_CPPFLAGS=\
- $(PLATFORMCPPFLAGS)
-
- tar/test/list.h: Makefile
-+ $(MKDIR_P) tar/test
- cat $(top_srcdir)/tar/test/test_*.c | grep DEFINE_TEST > tar/test/list.h
-
- if BUILD_BSDTAR
-@@ -975,6 +977,7 @@ bsdcpio_test_CPPFLAGS= \
- bsdcpio_test_LDADD=libarchive_fe.la
-
- cpio/test/list.h: Makefile
-+ $(MKDIR_P) cpio/test
- cat $(top_srcdir)/cpio/test/test_*.c | grep DEFINE_TEST > cpio/test/list.h
-
- if BUILD_BSDCPIO
-diff --git a/configure.ac b/configure.ac
-index 38bd299..7bdb00c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -102,6 +102,7 @@ AC_USE_SYSTEM_EXTENSIONS
- AC_LIBTOOL_WIN32_DLL
- AC_PROG_LIBTOOL
- AC_CHECK_TOOL([STRIP],[strip])
-+AC_PROG_MKDIR_P
-
- #
- # Options for building bsdtar.
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch
deleted file mode 100644
index 346af9135..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive/pkgconfig.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Use pkg-config for the libxml2 dependency, not the -config script.
-
-Upstream-Status: Pending
-
-RP 2014/5/22
-
-Index: libarchive-3.1.2/configure.ac
-===================================================================
---- libarchive-3.1.2.orig/configure.ac 2013-02-09 17:23:03.000000000 +0000
-+++ libarchive-3.1.2/configure.ac 2014-05-13 15:26:45.446499108 +0000
-@@ -329,10 +329,10 @@
- AS_HELP_STRING([--without-expat], [Don't build support for xar through expat]))
-
- if test "x$with_xml2" != "xno"; then
-- AC_PATH_PROG([XML2_CONFIG], [xml2-config],, [${PATH}])
-- if test "x$XML2_CONFIG" != "x"; then
-- CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`"
-- LIBS="${LIBS} `${XML2_CONFIG} --libs`"
-+ PKG_CHECK_MODULES(PKG_XML2, [libxml-2.0],,)
-+ if test "x$PKG_XML2_CFLAGS" != "x"; then
-+ CPPFLAGS="${CPPFLAGS} ${PKG_XML2_CFLAGS}"
-+ LIBS="${LIBS} ${PKG_XML2_LIBS}"
- AC_CHECK_LIB(xml2,xmlInitParser,[true],AC_MSG_FAILURE(Missing xml2 library))
- else
- AC_CHECK_LIB(xml2,xmlInitParser)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb b/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
deleted file mode 100644
index ed677ac31..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "Support for reading various archive formats"
-DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
-HOMEPAGE = "http://www.libarchive.org/"
-SECTION = "devel"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b4e3ffd607d6686c6cb2f63394370841"
-
-DEPENDS = "e2fsprogs-native"
-
-PACKAGECONFIG ?= "zlib bz2"
-
-PACKAGECONFIG_append_class-target = "\
- libxml2 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
-"
-
-PACKAGECONFIG_append_class-nativesdk = " largefile"
-
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
-PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
-PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
-PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,bzip2,"
-PACKAGECONFIG[xz] = "--with-lzmadec --with-lzma,--without-lzmadec --without-lzma,xz,"
-PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
-PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
-PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
-PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
-PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
-
-SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
- file://libarchive-CVE-2013-0211.patch \
- file://pkgconfig.patch \
- file://libarchive-CVE-2015-2304.patch \
- file://mkdir.patch \
- file://0001-Set-xattrs-after-setting-times.patch \
- "
-
-SRC_URI[md5sum] = "efad5a503f66329bb9d2f4308b5de98a"
-SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e"
-
-inherit autotools update-alternatives pkgconfig
-
-CPPFLAGS += "-I${WORKDIR}/extra-includes"
-
-do_configure[cleandirs] += "${WORKDIR}/extra-includes"
-do_configure_prepend() {
- # We just need the headers for some type constants, so no need to
- # build all of e2fsprogs for the target
- cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
-}
-
-ALTERNATIVE_PRIORITY = "100"
-
-PACKAGES =+ "bsdtar"
-FILES_bsdtar = "${bindir}/bsdtar"
-
-ALTERNATIVE_bsdtar = "tar"
-ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
-ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
-
-PACKAGES =+ "bsdcpio"
-FILES_bsdcpio = "${bindir}/bsdcpio"
-
-ALTERNATIVE_bsdcpio = "cpio"
-ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
-ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.2.1.bb b/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.2.1.bb
new file mode 100644
index 000000000..b65b5df01
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.2.1.bb
@@ -0,0 +1,67 @@
+SUMMARY = "Support for reading various archive formats"
+DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats"
+HOMEPAGE = "http://www.libarchive.org/"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ed99aca006bc346974bb745a35336425"
+
+DEPENDS = "e2fsprogs-native"
+
+PACKAGECONFIG ?= "zlib bz2"
+
+PACKAGECONFIG_append_class-target = "\
+ libxml2 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
+"
+
+PACKAGECONFIG_append_class-nativesdk = " largefile"
+
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
+PACKAGECONFIG[bz2] = "--with-bz2lib,--without-bz2lib,bzip2,"
+PACKAGECONFIG[xz] = "--with-lzmadec --with-lzma,--without-lzmadec --without-lzma,xz,"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
+PACKAGECONFIG[libxml2] = "--with-xml2,--without-xml2,libxml2,"
+PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat,"
+PACKAGECONFIG[lzo] = "--with-lzo2,--without-lzo2,lzo,"
+PACKAGECONFIG[nettle] = "--with-nettle,--without-nettle,nettle,"
+PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4,"
+
+SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
+ "
+
+SRC_URI[md5sum] = "afa257047d1941a565216edbf0171e72"
+SRC_URI[sha256sum] = "72ee1a4e3fd534525f13a0ba1aa7b05b203d186e0c6072a8a4738649d0b3cfd2"
+
+inherit autotools update-alternatives pkgconfig
+
+CPPFLAGS += "-I${WORKDIR}/extra-includes"
+
+do_configure[cleandirs] += "${WORKDIR}/extra-includes"
+do_configure_prepend() {
+ # We just need the headers for some type constants, so no need to
+ # build all of e2fsprogs for the target
+ cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
+}
+
+ALTERNATIVE_PRIORITY = "100"
+
+PACKAGES =+ "bsdtar"
+FILES_bsdtar = "${bindir}/bsdtar"
+
+ALTERNATIVE_bsdtar = "tar"
+ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
+ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
+
+PACKAGES =+ "bsdcpio"
+FILES_bsdcpio = "${bindir}/bsdcpio"
+
+ALTERNATIVE_bsdcpio = "cpio"
+ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
+ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch
new file mode 100644
index 000000000..5adc7d9fd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch
@@ -0,0 +1,181 @@
+From 82f98dcbc429bbe89a9837c533cbcbc02e77c790 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Tue, 28 Jun 2016 12:43:31 +0100
+Subject: [PATCH] idn: fix printf() format security warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../../libidn-1.32/src/idn.c: In function 'main':
+| ../../libidn-1.32/src/idn.c:172:7: error: format not a string literal and no format arguments [-Werror=format-security]
+| error (0, 0, _("only one of -s, -e, -d, -a, -u or -n can be specified"));
+| ^~~~~
+| ../../libidn-1.32/src/idn.c:187:5: error: format not a string literal and no format arguments [-Werror=format-security]
+| fprintf (stderr, _("Type each input string on a line by itself, "
+| ^~~~~~~
+| ../../libidn-1.32/src/idn.c:202:4: error: format not a string literal and no format arguments [-Werror=format-security]
+| error (EXIT_FAILURE, errno, _("input error"));
+| ^~~~~
+| ../../libidn-1.32/src/idn.c:220:8: error: format not a string literal and no format arguments [-Werror=format-security]
+| _("could not convert from UTF-8 to UCS-4"));
+| ^
+| ../../libidn-1.32/src/idn.c:245:8: error: format not a string literal and no format arguments [-Werror=format-security]
+| _("could not convert from UTF-8 to UCS-4"));
+| ^
+| ../../libidn-1.32/src/idn.c:281:6: error: format not a string literal and no format arguments [-Werror=format-security]
+| _("could not convert from UTF-8 to UCS-4"));
+| ^
+| ../../libidn-1.32/src/idn.c:340:6: error: format not a string literal and no format arguments [-Werror=format-security]
+| _("could not convert from UCS-4 to UTF-8"));
+| ^
+| ../../libidn-1.32/src/idn.c:364:6: error: format not a string literal and no format arguments [-Werror=format-security]
+| _("could not convert from UCS-4 to UTF-8"));
+| ^
+| ../../libidn-1.32/src/idn.c:442:8: error: format not a string literal and no format arguments [-Werror=format-security]
+| _("could not convert from UCS-4 to UTF-8"));
+| ^
+| ../../libidn-1.32/src/idn.c:498:6: error: format not a string literal and no format arguments [-Werror=format-security]
+| _("could not convert from UTF-8 to UCS-4"));
+| ^
+| ../../libidn-1.32/src/idn.c:527:5: error: format not a string literal and no format arguments [-Werror=format-security]
+| _("could not convert from UTF-8 to UCS-4"));
+| ^
+| ../../libidn-1.32/src/idn.c:540:6: error: format not a string literal and no format arguments [-Werror=format-security]
+| error (EXIT_FAILURE, 0, _("could not do NFKC normalization"));
+| ^~~~~
+| ../../libidn-1.32/src/idn.c:551:5: error: format not a string literal and no format arguments [-Werror=format-security]
+| _("could not convert from UTF-8 to UCS-4"));
+| ^
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+Upstream-Status: Pending
+
+ src/idn.c | 27 ++++++++++++++-------------
+ 1 file changed, 14 insertions(+), 13 deletions(-)
+
+diff --git a/src/idn.c b/src/idn.c
+index be1c7d1..68e4291 100644
+--- a/src/idn.c
++++ b/src/idn.c
+@@ -170,7 +170,7 @@ main (int argc, char *argv[])
+ (args_info.idna_to_unicode_given ? 1 : 0) +
+ (args_info.nfkc_given ? 1 : 0) != 1)
+ {
+- error (0, 0, _("only one of -s, -e, -d, -a, -u or -n can be specified"));
++ error (0, 0, "%s", _("only one of -s, -e, -d, -a, -u or -n can be specified"));
+ usage (EXIT_FAILURE);
+ }
+
+@@ -185,7 +185,7 @@ main (int argc, char *argv[])
+ if (!args_info.quiet_given
+ && args_info.inputs_num == 0
+ && isatty (fileno (stdin)))
+- fprintf (stderr, _("Type each input string on a line by itself, "
++ fprintf (stderr, "%s", _("Type each input string on a line by itself, "
+ "terminated by a newline character.\n"));
+
+ do
+@@ -197,7 +197,7 @@ main (int argc, char *argv[])
+ if (feof (stdin))
+ break;
+
+- error (EXIT_FAILURE, errno, _("input error"));
++ error (EXIT_FAILURE, errno, "%s", _("input error"));
+ }
+
+ if (strlen (line) > 0)
+@@ -215,7 +215,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (p);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+ }
+
+@@ -240,7 +240,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (r);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+ }
+
+@@ -277,7 +277,7 @@ main (int argc, char *argv[])
+ q = stringprep_utf8_to_ucs4 (p, -1, &len);
+ free (p);
+ if (!q)
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+
+ if (args_info.debug_given)
+@@ -336,7 +336,7 @@ main (int argc, char *argv[])
+ r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL);
+ free (q);
+ if (!r)
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UCS-4 to UTF-8"));
+
+ p = stringprep_utf8_to_locale (r);
+@@ -360,7 +360,7 @@ main (int argc, char *argv[])
+ q = stringprep_utf8_to_ucs4 (p, -1, NULL);
+ free (p);
+ if (!q)
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UCS-4 to UTF-8"));
+
+ if (args_info.debug_given)
+@@ -438,7 +438,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (p);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UCS-4 to UTF-8"));
+ }
+
+@@ -494,7 +494,7 @@ main (int argc, char *argv[])
+ r = stringprep_ucs4_to_utf8 (q, -1, NULL, NULL);
+ free (q);
+ if (!r)
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+
+ p = stringprep_utf8_to_locale (r);
+@@ -523,7 +523,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (p);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+ }
+
+@@ -537,7 +537,8 @@ main (int argc, char *argv[])
+ r = stringprep_utf8_nfkc_normalize (p, -1);
+ free (p);
+ if (!r)
+- error (EXIT_FAILURE, 0, _("could not do NFKC normalization"));
++ error (EXIT_FAILURE, 0, "%s",
++ _("could not do NFKC normalization"));
+
+ if (args_info.debug_given)
+ {
+@@ -547,7 +548,7 @@ main (int argc, char *argv[])
+ if (!q)
+ {
+ free (r);
+- error (EXIT_FAILURE, 0,
++ error (EXIT_FAILURE, 0, "%s",
+ _("could not convert from UTF-8 to UCS-4"));
+ }
+
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
index 3476bb959..98ba4d6ff 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch
@@ -7,7 +7,7 @@ These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has n
eliminated these deprecated macros yet. So disable the treatment of warnings
as errors until gettext is updated to remove the deprecated macros.
-Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/07/10
Index: libidn-1.24/configure.ac
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
index 20afd257b..5683d3c98 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch
@@ -6,7 +6,7 @@ This patch fixes following issue with automake 1.12
| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libidn.la': linking libtool libraries using a non-POSIX
| /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'
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/03
Index: libidn-1.24/configure.ac
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb
deleted file mode 100644
index 4d6e88529..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Internationalized Domain Name support library"
-DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
-HOMEPAGE = "http://www.gnu.org/software/libidn/"
-SECTION = "libs"
-LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \
- file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
- file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
- file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://lib/idna.h;endline=21;md5=7c0b3828d1b153663be9a04ad4f7975f \
- file://src/idn.c;endline=20;md5=f4235f2a2cb2b65786b2979fb3cf7fbf"
-
-inherit pkgconfig autotools gettext texinfo
-
-SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
- file://libidn_fix_for_automake-1.12.patch \
- file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
- file://dont-depend-on-help2man.patch \
-"
-
-SRC_URI[md5sum] = "4dd8356ba577287ea7076bfa1554b534"
-SRC_URI[sha256sum] = "ba5d5afee2beff703a34ee094668da5c6ea5afa38784cebba8924105e185c4f5"
-
-# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
-# so package command into a separate package
-PACKAGES =+ "idn"
-FILES_idn = "${bindir}/*"
-
-EXTRA_OECONF = "--disable-csharp"
-
-do_install_append() {
- rm -rf ${D}${datadir}/emacs
-}
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn_1.33.bb b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn_1.33.bb
new file mode 100644
index 000000000..d3d0f557b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libidn/libidn_1.33.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Internationalized Domain Name support library"
+DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
+HOMEPAGE = "http://www.gnu.org/software/libidn/"
+SECTION = "libs"
+LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \
+ file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
+ file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://lib/idna.h;endline=21;md5=37cffad24807f446a24de3e7371f20b9 \
+ file://src/idn.c;endline=20;md5=09e97034a8877b3451cb65065fc2c06e"
+DEPENDS = "virtual/libiconv"
+
+inherit pkgconfig autotools gettext texinfo gtk-doc
+
+SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
+ file://libidn_fix_for_automake-1.12.patch \
+ file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
+ file://dont-depend-on-help2man.patch \
+ file://0001-idn-fix-printf-format-security-warnings.patch \
+"
+
+SRC_URI[md5sum] = "a9aa7e003665de9c82bd3f9fc6ccf308"
+SRC_URI[sha256sum] = "44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19"
+
+# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
+# so package command into a separate package
+PACKAGES =+ "idn"
+FILES_idn = "${bindir}/*"
+
+LICENSE_${PN} = "LGPLv2.1+ | LGPLv3"
+LICENSE_idn = "GPLv3+"
+
+EXTRA_OECONF = "--disable-csharp"
+
+do_install_append() {
+ rm -rf ${D}${datadir}/emacs
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
new file mode 100644
index 000000000..24e2228b7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-Add-fallback-fopencookie-implementation.patch
@@ -0,0 +1,254 @@
+From 5b6e113f548bd8a2b100267bc5d54cee861a4b98 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Neal=20Gompa=20=28=E3=83=8B=E3=83=BC=E3=83=AB=E3=83=BB?=
+ =?UTF-8?q?=E3=82=B3=E3=82=99=E3=83=B3=E3=83=8F=E3=82=9A=29?=
+ <ngompa13@gmail.com>
+Date: Wed, 11 Nov 2015 20:32:17 -0500
+Subject: [PATCH] Add fallback fopencookie() implementation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In environments where neither fopencookie() nor funopen()
+are implemented, we need to provide a suitable implementation
+of fopencookie() that we can use.
+
+Upstream-Status: Submitted [ https://github.com/openSUSE/libsolv/pull/112 ]
+
+Signed-off-by: Neal Gompa (ă‹ăĽă«ă»ă‚łă‚™ăłăŹă‚š) <ngompa13@gmail.com>com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ ext/CMakeLists.txt | 7 ++
+ ext/solv_xfopen.c | 10 +--
+ ext/solv_xfopen_fallback_fopencookie.c | 124 +++++++++++++++++++++++++++++++++
+ ext/solv_xfopen_fallback_fopencookie.h | 28 ++++++++
+ 4 files changed, 165 insertions(+), 4 deletions(-)
+ create mode 100644 ext/solv_xfopen_fallback_fopencookie.c
+ create mode 100644 ext/solv_xfopen_fallback_fopencookie.h
+
+diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
+index ad52495..4f282ce 100644
+--- a/ext/CMakeLists.txt
++++ b/ext/CMakeLists.txt
+@@ -4,6 +4,13 @@ SET (libsolvext_SRCS
+ SET (libsolvext_HEADERS
+ tools_util.h solv_xfopen.h testcase.h)
+
++IF (NOT HAVE_FOPENCOOKIE AND NOT HAVE_FUNOPEN)
++ SET (libsolvext_SRCS ${libsolvext_SRCS}
++ solv_xfopen_fallback_fopencookie.c)
++ SET (libsolvext_HEADERS ${libsolvext_HEADERS}
++ solv_xfopen_fallback_fopencookie.h)
++ENDIF (NOT HAVE_FOPENCOOKIE AND NOT HAVE_FUNOPEN)
++
+ IF (ENABLE_RPMDB)
+ SET (libsolvext_SRCS ${libsolvext_SRCS}
+ pool_fileconflicts.c repo_rpmdb.c)
+diff --git a/ext/solv_xfopen.c b/ext/solv_xfopen.c
+index b0421bf..31345dd 100644
+--- a/ext/solv_xfopen.c
++++ b/ext/solv_xfopen.c
+@@ -13,6 +13,10 @@
+ #include <zlib.h>
+ #include <fcntl.h>
+
++#if !defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE)
++#include "solv_xfopen_fallback_fopencookie.h"
++#endif
++
+ #include "solv_xfopen.h"
+ #include "util.h"
+
+@@ -39,7 +43,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
+ ssize_t (*cwrite)(void *, const char *, size_t),
+ int (*cclose)(void *))
+ {
+-#ifdef HAVE_FUNOPEN
++#if defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE)
+ if (!cookie)
+ return 0;
+ return funopen(cookie,
+@@ -48,7 +52,7 @@ static FILE *cookieopen(void *cookie, const char *mode,
+ (fpos_t (*)(void *, fpos_t, int))NULL, /* seekfn */
+ cclose
+ );
+-#elif defined(HAVE_FOPENCOOKIE)
++#else
+ cookie_io_functions_t cio;
+
+ if (!cookie)
+@@ -60,8 +64,6 @@ static FILE *cookieopen(void *cookie, const char *mode,
+ cio.write = cwrite;
+ cio.close = cclose;
+ return fopencookie(cookie, *mode == 'w' ? "w" : "r", cio);
+-#else
+-# error Need to implement custom I/O
+ #endif
+ }
+
+diff --git a/ext/solv_xfopen_fallback_fopencookie.c b/ext/solv_xfopen_fallback_fopencookie.c
+new file mode 100644
+index 0000000..89426a9
+--- /dev/null
++++ b/ext/solv_xfopen_fallback_fopencookie.c
+@@ -0,0 +1,124 @@
++/*
++ * Provides a very limited fopencookie() for environments with a libc
++ * that lacks it.
++ *
++ * Authors: zhasha & nsz
++ * Modified for libsolv by Neal Gompa
++ *
++ * This program is licensed under the BSD license, read LICENSE.BSD
++ * for further information.
++ *
++ */
++
++#define _LARGEFILE64_SOURCE 1
++#include <pthread.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <fcntl.h>
++#include <sys/types.h>
++#include <errno.h>
++#include "solv_xfopen_fallback_fopencookie.h"
++
++extern int pipe2(int[2], int);
++
++struct ctx {
++ int fd;
++ void *cookie;
++ struct cookie_io_functions_t io;
++ char buf[1024];
++};
++
++static void *proxy(void *arg)
++{
++ struct ctx *ctx = arg;
++ ssize_t r;
++ size_t n, k;
++
++ pthread_detach(pthread_self());
++
++ while (1) {
++ r = ctx->io.read ?
++ (ctx->io.read)(ctx->cookie, ctx->buf, sizeof(ctx->buf)) :
++ read(ctx->fd, ctx->buf, sizeof(ctx->buf));
++ if (r < 0) {
++ if (errno != EINTR) { break; }
++ continue;
++ }
++ if (r == 0) { break; }
++
++ n = r, k = 0;
++ while (n > 0) {
++ r = ctx->io.write ?
++ (ctx->io.write)(ctx->cookie, ctx->buf + k, n) :
++ write(ctx->fd, ctx->buf + k, n);
++ if (r < 0) {
++ if (errno != EINTR) { break; }
++ continue;
++ }
++ if (r == 0) { break; }
++
++ n -= r, k += r;
++ }
++ if (n > 0) { break; }
++ }
++
++ if (ctx->io.close) { (ctx->io.close)(ctx->cookie); }
++ close(ctx->fd);
++ return NULL;
++}
++
++FILE *fopencookie(void *cookie, const char *mode, struct cookie_io_functions_t io)
++{
++ struct ctx *ctx = NULL;
++ int rd = 0, wr = 0;
++ int p[2] = { -1, -1 };
++ FILE *f = NULL;
++ pthread_t dummy;
++
++ switch (mode[0]) {
++ case 'a':
++ case 'w': wr = 1; break;
++ case 'r': rd = 1; break;
++ default:
++ errno = EINVAL;
++ return NULL;
++ }
++ switch (mode[1]) {
++ case '\0': break;
++ case '+':
++ if (mode[2] == '\0') {
++ errno = ENOTSUP;
++ return NULL;
++ }
++ default:
++ errno = EINVAL;
++ return NULL;
++ }
++ if (io.seek) {
++ errno = ENOTSUP;
++ return NULL;
++ }
++
++ ctx = malloc(sizeof(*ctx));
++ if (!ctx) { return NULL; }
++ if (pipe2(p, O_CLOEXEC) != 0) { goto err; }
++ if ((f = fdopen(p[wr], mode)) == NULL) { goto err; }
++ p[wr] = -1;
++ ctx->fd = p[rd];
++ ctx->cookie = cookie;
++ ctx->io.read = rd ? io.read : NULL;
++ ctx->io.write = wr ? io.write : NULL;
++ ctx->io.seek = NULL;
++ ctx->io.close = io.close;
++ if (pthread_create(&dummy, NULL, proxy, ctx) != 0) { goto err; }
++
++ return f;
++
++err:
++ if (p[0] >= 0) { close(p[0]); }
++ if (p[1] >= 0) { close(p[1]); }
++ if (f) { fclose(f); }
++ free(ctx);
++ return NULL;
++}
+diff --git a/ext/solv_xfopen_fallback_fopencookie.h b/ext/solv_xfopen_fallback_fopencookie.h
+new file mode 100644
+index 0000000..7223e3f
+--- /dev/null
++++ b/ext/solv_xfopen_fallback_fopencookie.h
+@@ -0,0 +1,28 @@
++/*
++ * Provides a very limited fopencookie() for environments with a libc
++ * that lacks it.
++ *
++ * Authors: zhasha & nsz
++ * Modified for libsolv by Neal Gompa
++ *
++ * This program is licensed under the BSD license, read LICENSE.BSD
++ * for further information.
++ *
++ */
++
++#ifndef SOLV_XFOPEN_FALLBACK_FOPENCOOKIE_H
++#define SOLV_XFOPEN_FALLBACK_FOPENCOOKIE_H
++
++#include <stdio.h>
++#include <stdint.h>
++
++typedef struct cookie_io_functions_t {
++ ssize_t (*read)(void *, char *, size_t);
++ ssize_t (*write)(void *, const char *, size_t);
++ int (*seek)(void *, off64_t, int);
++ int (*close)(void *);
++} cookie_io_functions_t;
++
++FILE *fopencookie(void *cookie, const char *mode, struct cookie_io_functions_t io);
++
++#endif
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch
deleted file mode 100644
index 972ecc9c5..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 280f0d37c642d68bad2a2e49ef437953474d99e6 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Wed, 6 Apr 2016 23:15:02 -0700
-Subject: [PATCH] CMakeLists.txt: fix MAN_INSTALL_DIR
-
-It checks ${CMAKE_INSTALL_PREFIX}/share/man when configure, but it may
-not exist when crosscompile, for example, when CMAKE_INSTALL_PREFIX="/",
-it is OK, but when CMAKE_INSTALL_PREFIX="/some/path/else", then it
-doesn't exist, and the man dir would be set to "/usr/man" which is
-incorrect.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- CMakeLists.txt | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index fd1426b..747db22 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -57,10 +57,7 @@ else (DEFINED INCLUDE)
- ENDIF (DEFINED INCLUDE)
- MESSAGE (STATUS "Header files will be installed in ${INCLUDE_INSTALL_DIR}")
- SET (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
--SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/man")
--IF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man" AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man")
-- SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
--ENDIF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man" AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man")
-+SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
- MESSAGE(STATUS "Man pages will be installed in ${MAN_INSTALL_DIR}")
-
- ####################################################################
---
-2.7.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.23.bb b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.23.bb
new file mode 100644
index 000000000..f3f3d6e64
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_0.6.23.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Library for solving packages and reading repositories"
+HOMEPAGE = "https://github.com/openSUSE/libsolv"
+BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
+SECTION = "devel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
+
+DEPENDS = "expat zlib"
+
+SRC_URI = "git://github.com/openSUSE/libsolv.git \
+ "
+SRC_URI_append_libc-musl = " file://0001-Add-fallback-fopencookie-implementation.patch"
+
+SRCREV = "f654c8cfa52427ed42d7142e58452dae08c0c2d0"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON"
+
+PACKAGES =+ "${PN}-tools ${PN}ext"
+
+FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibSolv.cmake"
+FILES_${PN}-tools = "${bindir}/*"
+FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
+
+BBCLASSEXTEND =+ "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb b/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb
deleted file mode 100644
index fb81c8a5f..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Library for solving packages and reading repositories"
-HOMEPAGE = "https://github.com/openSUSE/libsolv"
-BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
-SECTION = "devel"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
-
-DEPENDS = "expat zlib"
-
-PV = "0.6.19"
-
-SRC_URI = "git://github.com/openSUSE/libsolv.git \
- file://0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch \
-"
-SRCREV = "4c5af401a89858d4cebbfe40c59a0031ff9db5b0"
-UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
-
-S = "${WORKDIR}/git"
-
-inherit cmake
-
-EXTRA_OECMAKE = "-DLIB=${baselib}"
-
-PACKAGES =+ "${PN}-tools ${PN}ext"
-
-FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibSolv.cmake"
-FILES_${PN}-tools = "${bindir}/*"
-FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
-
-BBCLASSEXTEND =+ "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch b/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch
new file mode 100644
index 000000000..7c47df22e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser/0001-modules-files.c-parse_field-fix-string-formating-in-.patch
@@ -0,0 +1,34 @@
+From a4857911ece5ebfcdef42aee4c070eb216f39597 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Fri, 13 May 2016 11:40:13 -0500
+Subject: [PATCH] modules/files.c: parse_field fix string formating in
+ g_warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[YOCTO #9547]
+
+Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
+
+Upstream-Status: Pending
+---
+ modules/files.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/files.c b/modules/files.c
+index 4ef0a57..35eafc9 100644
+--- a/modules/files.c
++++ b/modules/files.c
+@@ -534,7 +534,7 @@ parse_field(const struct format_specifier *format, GValue *value,
+ string, &err);
+ if (ret == FALSE) {
+ g_assert(err != NULL);
+- g_warning(lu_strerror(err));
++ g_warning(lu_strerror(err), NULL);
+ lu_error_free(&err);
+ }
+ return ret;
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb b/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
index 1369ae8f2..3d0b516ab 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
@@ -14,16 +14,17 @@ SECTION = "base"
SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \
file://0001-Check-for-issetugid.patch \
file://0002-remove-unused-execinfo.h.patch \
- "
+ file://0001-modules-files.c-parse_field-fix-string-formating-in-.patch \
+ "
SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2"
SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b"
-DEPENDS = "popt libpam glib-2.0 docbook-utils-native linuxdoc-tools-native python"
+DEPENDS = "popt libpam glib-2.0 docbook-utils-native linuxdoc-tools-native python3"
-inherit autotools gettext pythonnative python-dir pkgconfig
+inherit autotools gettext python3native python3-dir pkgconfig gtk-doc
-EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}"
+EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
PACKAGES += "${PN}-python "
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
new file mode 100644
index 000000000..b8c7f3751
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch
@@ -0,0 +1,37 @@
+From e7a8c925b9316a72bdc8f32789ffe56fda5c4788 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 26 Aug 2016 18:20:32 +0300
+Subject: [PATCH] Use pkg-config for pcre dependency instead of -config script.
+
+RP 2014/5/22
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1d172a1..a9236da 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -380,11 +380,12 @@ if test "$WITH_PCRE" != "no"; then
+ PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
+ CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
+ else
+- AC_PATH_PROG(PCRECONFIG, pcre-config)
+- if test x"$PCRECONFIG" != x; then
+- PCRE_LIB=`$PCRECONFIG --libs`
+- CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
+- fi
++ PKG_CHECK_MODULES(PCREPKG, [libpcre], [
++ PCRE_LIB=${PCREPKG_LIBS}
++ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}"
++ ], [
++ AC_MSG_ERROR([pcre pkgconfig not found, install the pcre-devel package or build with --without-pcre])
++ ])
+ fi
+
+ if test x"$PCRE_LIB" != x; then
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch
deleted file mode 100644
index e395f928c..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/pkgconfig.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Use pkg-config for pcre dependency instead of -config script.
-
-Upstream-Status: Pending
-
-RP 2014/5/22
-
-
-Index: lighttpd-1.4.35/configure.ac
-===================================================================
---- lighttpd-1.4.35.orig/configure.ac 2014-03-06 14:08:00.000000000 +0000
-+++ lighttpd-1.4.35/configure.ac 2014-05-13 16:58:30.758471169 +0000
-@@ -309,16 +309,14 @@
- AC_MSG_RESULT([$WITH_PCRE])
-
- if test "$WITH_PCRE" != "no"; then
-- AC_PATH_PROG(PCRECONFIG, pcre-config)
--
-- if test x"$PCRECONFIG" != x; then
-- PCRE_LIB=`$PCRECONFIG --libs`
-- CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
-+ PKG_CHECK_MODULES(PCREPKG, [libpcre], [
-+ PCRE_LIB=${PCREPKG_LIBS}
-+ CPPFLAGS="$CPPFLAGS ${PCREPKG_CFLAGS}"
- AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
- AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
-- else
-+ ], [
- AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre])
-- fi
-+ ])
- fi
-
- AC_SUBST(PCRE_LIB)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb
deleted file mode 100644
index 378accbf1..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb
+++ /dev/null
@@ -1,76 +0,0 @@
-SUMMARY = "Lightweight high-performance web server"
-HOMEPAGE = "http://www.lighttpd.net/"
-BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
-
-SECTION = "net"
-DEPENDS = "zlib libpcre"
-RDEPENDS_${PN} += " \
- lighttpd-module-access \
- lighttpd-module-accesslog \
- lighttpd-module-indexfile \
- lighttpd-module-dirlisting \
- lighttpd-module-staticfile \
-"
-
-SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
- file://index.html.lighttpd \
- file://lighttpd.conf \
- file://lighttpd \
- file://lighttpd.service \
- file://pkgconfig.patch \
- "
-
-SRC_URI[md5sum] = "63c7563be1c7a7a9819a51f07f1af8b2"
-SRC_URI[sha256sum] = "7eb9a1853c3d6dd5851682b0733a729ba4158d6bdff80974d5ef5f1f6887365b"
-
-PACKAGECONFIG ??= "openssl"
-PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
-
-EXTRA_OECONF = " \
- --without-bzip2 \
- --without-ldap \
- --without-lua \
- --without-memcache \
- --with-pcre \
- --without-webdav-props \
- --without-webdav-locks \
- --disable-static \
-"
-
-inherit autotools pkgconfig update-rc.d gettext systemd
-
-INITSCRIPT_NAME = "lighttpd"
-INITSCRIPT_PARAMS = "defaults 70"
-
-SYSTEMD_SERVICE_${PN} = "lighttpd.service"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
- install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
- install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
-
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@SBINDIR@,${sbindir},g' \
- -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- -e 's,@BASE_BINDIR@,${base_bindir},g' \
- ${D}${systemd_unitdir}/system/lighttpd.service
- #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
- ln -sf ${localstatedir}/log ${D}/www/logs
- ln -sf ${localstatedir}/tmp ${D}/www/var
-}
-
-FILES_${PN} += "${sysconfdir} /www"
-
-CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
-
-PACKAGES_DYNAMIC += "^lighttpd-module-.*"
-
-python populate_packages_prepend () {
- lighttpd_libdir = d.expand('${libdir}')
- do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.41.bb b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.41.bb
new file mode 100644
index 000000000..1a3f32342
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.41.bb
@@ -0,0 +1,79 @@
+SUMMARY = "Lightweight high-performance web server"
+HOMEPAGE = "http://www.lighttpd.net/"
+BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
+
+SECTION = "net"
+DEPENDS = "zlib libpcre"
+RDEPENDS_${PN} += " \
+ lighttpd-module-access \
+ lighttpd-module-accesslog \
+ lighttpd-module-indexfile \
+ lighttpd-module-dirlisting \
+ lighttpd-module-staticfile \
+"
+
+SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
+ file://index.html.lighttpd \
+ file://lighttpd.conf \
+ file://lighttpd \
+ file://lighttpd.service \
+ file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
+ "
+
+SRC_URI[md5sum] = "1df2e4dbc965cfe6f99f008ac3db4d8d"
+SRC_URI[sha256sum] = "4bcc383ef6d6dc7b284f68882d71a178e2986c83c4e85eeb3c8f3b882e346b6c"
+
+PACKAGECONFIG ??= "openssl \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
+"
+PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+EXTRA_OECONF = " \
+ --without-bzip2 \
+ --without-ldap \
+ --without-lua \
+ --without-memcached \
+ --with-pcre \
+ --without-webdav-props \
+ --without-webdav-locks \
+ --disable-static \
+"
+
+inherit autotools pkgconfig update-rc.d gettext systemd
+
+INITSCRIPT_NAME = "lighttpd"
+INITSCRIPT_PARAMS = "defaults 70"
+
+SYSTEMD_SERVICE_${PN} = "lighttpd.service"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
+ install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
+ install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@BASE_BINDIR@,${base_bindir},g' \
+ ${D}${systemd_unitdir}/system/lighttpd.service
+ #For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
+ ln -sf ${localstatedir}/log ${D}/www/logs
+ ln -sf ${localstatedir}/tmp ${D}/www/var
+}
+
+FILES_${PN} += "${sysconfdir} /www"
+
+CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
+
+PACKAGES_DYNAMIC += "^lighttpd-module-.*"
+
+python populate_packages_prepend () {
+ lighttpd_libdir = d.expand('${libdir}')
+ do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
index 0809c9be9..17c90029c 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts/0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch
@@ -11,13 +11,14 @@ diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 6850046..11223f7 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
-@@ -597,5 +597,5 @@ if [ "$_use_systemctl" = "1" ]; then
+@@ -597,6 +597,6 @@ if [ "$_use_systemctl" = "1" ]; then
fi
fi
-strstr "$(cat /proc/cmdline)" "rc.debug" && set -x
+strstr "$(cat /proc/cmdline)" "rc.debug" && set -x || true
-
+ return 0
+
--
2.1.0
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
deleted file mode 100644
index 727305015..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "SysV init scripts which are only used in an LSB image"
-SECTION = "base"
-LICENSE = "GPLv2"
-DEPENDS = "popt glib-2.0"
-
-RDEPENDS_${PN} += "util-linux"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
-
-S="${WORKDIR}/initscripts-${PV}"
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}.tar.bz2/9cce2ae1009750e84be37c09a028757e/initscripts-${PV}.tar.bz2 \
- file://functions.patch \
- file://0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch \
- "
-
-SRC_URI[md5sum] = "9cce2ae1009750e84be37c09a028757e"
-SRC_URI[sha256sum] = "48b59ce8157cfc58bbd4b1dfa58ad1087245761ae11c2033b66ae3864ea7e1cf"
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "functions"
-ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
-
-# Since we are only taking the patched version of functions, no need to
-# configure or compile anything so do not execute these
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install(){
- install -d ${D}${sysconfdir}/init.d/
- install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.68.bb b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.68.bb
new file mode 100644
index 000000000..0c08fffce
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.68.bb
@@ -0,0 +1,33 @@
+SUMMARY = "SysV init scripts which are only used in an LSB image"
+SECTION = "base"
+LICENSE = "GPLv2"
+DEPENDS = "popt glib-2.0"
+
+RDEPENDS_${PN} += "util-linux"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=ebf4e8b49780ab187d51bd26aaa022c6"
+
+S="${WORKDIR}/initscripts-${PV}"
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/initscripts/initscripts-${PV}.tar.bz2/6a51a5af38e01445f53989ed0727c3e1/initscripts-${PV}.tar.bz2 \
+ file://functions.patch \
+ file://0001-functions-avoid-exit-1-which-causes-init-scripts-to-.patch \
+ "
+
+SRC_URI[md5sum] = "6a51a5af38e01445f53989ed0727c3e1"
+SRC_URI[sha256sum] = "2a1c6e9dbaa37a676518f4803b501e107c058bb14ef7a8db24c52b77fbcba531"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "functions"
+ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
+
+# Since we are only taking the patched version of functions, no need to
+# configure or compile anything so do not execute these
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install(){
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
index b9971a17d..c31a3eb46 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/LSB_Test.sh
@@ -113,7 +113,7 @@ fi
#fi
SERVER1="\
- http://${SERVER_NAME}/pub/lsb/base/${LSB_RELEASE}/binary"
+ http://${SERVER_NAME}/pub/lsb/base/released-all/binary"
SERVER2="\
http://${SERVER_NAME}/pub/lsb/test_suites/released-all/binary/runtime"
SERVER3="\
@@ -429,7 +429,6 @@ cat > /etc/rpm/sysinfo/Dirnames << EOF
/opt/lsb/test/desktop/freetype
/opt/lsb/test/desktop/gtkvts
/opt/lsb/test/desktop/libpng
-/opt/lsb/test/desktop/qt3
/opt/lsb/test/desktop/xft
/opt/lsb/test/desktop/xml
/opt/lsb/test/desktop/xrender
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list
index 27d8352d9..959f93150 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/packages_list
@@ -1,4 +1,4 @@
-LSB_RELEASE="released-4.1.0"
+LSB_RELEASE="released-5.0"
LSB_ARCH="lsbarch"
BASE_PACKAGES_LIST="lsb-setup-4.1.0-1.noarch.rpm"
@@ -9,36 +9,35 @@ RUNTIME_BASE_PACKAGES_LIST="lsb-dist-checker-5.0.0.1-1.targetarch.rpm \
lsb-xvfb-1.2.0-22.targetarch.rpm \
"
-RUNTIME_PACKAGES_LIST="lsb-cmdchk-4.1.4-5.targetarch.rpm \
- lsb-libchk-4.1.4-5.targetarch.rpm \
- lsb-qm-2.2-12.lsb4.targetarch.rpm \
- lsb-task-dist-testkit-4.1.9-1.noarch.rpm \
- lsb-test-core-4.1.15-1.targetarch.rpm \
- lsb-test-cpp-t2c-4.1.0-1.targetarch.rpm \
- lsb-test-desktop-4.1.9-1.targetarch.rpm \
- lsb-test-desktop-t2c-4.1.3-3.targetarch.rpm \
- lsb-test-libstdcpp-4.1.0-18.lsb4.targetarch.rpm \
- lsb-test-olver-core-4.1.4-1.targetarch.rpm \
- lsb-test-perl-4.1.8-1.noarch.rpm \
- lsb-test-printing-4.1.2-1.targetarch.rpm \
- lsb-test-python-4.1.5-1.targetarch.rpm \
- lsb-test-qt3-azov-4.1.1-3.targetarch.rpm \
- lsb-test-qt4-azov-4.1.3-1.targetarch.rpm \
- lsb-test-xts5-5.1.5-45.lsb4.targetarch.rpm \
- lsb-test-alsa-t2c-4.1.0-1.targetarch.rpm \
- lsb-test-core-t2c-4.1.2-3.targetarch.rpm \
- lsb-test-xml2-azov-4.1.0-1.targetarch.rpm \
+RUNTIME_PACKAGES_LIST="lsb-cmdchk-5.0.3-1.targetarch.rpm \
+ lsb-libchk-5.0.3-1.targetarch.rpm \
+ lsb-qm-2.2-1.lsb5.targetarch.rpm \
+ lsb-task-dist-testkit-5.0.0-2.noarch.rpm \
+ lsb-test-core-5.0.1-1.targetarch.rpm \
+ lsb-test-cpp-t2c-5.0.0-1.targetarch.rpm \
+ lsb-test-desktop-5.0.0-1.targetarch.rpm \
+ lsb-test-desktop-t2c-5.0.0-1.targetarch.rpm \
+ lsb-test-libstdcpp-4.1.0-22.lsb1.targetarch.rpm \
+ lsb-test-olver-core-5.0.0-1.targetarch.rpm \
+ lsb-test-perl-5.0.2-1.noarch.rpm \
+ lsb-test-printing-5.0.1-1.targetarch.rpm \
+ lsb-test-python-5.0.0-1.targetarch.rpm \
+ lsb-test-qt4-azov-5.0.0-1.targetarch.rpm \
+ lsb-test-xts5-5.1.5-47.lsb5.targetarch.rpm \
+ lsb-test-alsa-t2c-5.1.91-4.targetarch.rpm \
+ lsb-test-core-t2c-5.0.1-1.targetarch.rpm \
+ lsb-test-xml2-azov-5.0.0-1.targetarch.rpm \
"
-APP_PACKAGES_LIST="lsb-python-2.4.6-7.lsb4.targetarch.rpm \
- lsb-apache-2.2.14-8.lsb4.targetarch.rpm \
- lsb-tcl-8.5.7-8.lsb4.targetarch.rpm \
- lsb-expect-5.43.0-13.lsb4.targetarch.rpm \
- lsb-groff-1.20.1-7.lsb4.targetarch.rpm \
- lsb-raptor-1.4.19-5.lsb4.targetarch.rpm \
- lsb-xpdf-1.01-14.lsb4.targetarch.rpm \
- lsb-samba-3.4.3-9.lsb4.targetarch.rpm \
- lsb-rsync-3.0.6-6.lsb4.targetarch.rpm \
+APP_PACKAGES_LIST="lsb-python-2.4.6-10.lsb5.targetarch.rpm \
+ lsb-apache-2.2.19-5.lsb5.targetarch.rpm \
+ lsb-tcl-8.5.9-21.lsb5.targetarch.rpm \
+ lsb-expect-5.43.0-21.lsb5.targetarch.rpm \
+ lsb-groff-1.20.1-9.lsb5.targetarch.rpm \
+ lsb-raptor-1.4.21-4.lsb5.targetarch.rpm \
+ lsb-xpdf-1.01-17.lsb5.targetarch.rpm \
+ lsb-samba-3.5.9-5.lsb5.targetarch.rpm \
+ lsb-rsync-3.0.8-3.lsb5.targetarch.rpm \
"
APP_TESTFILES_LIST="expect-tests.tar \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session
index 85ca2efe9..3abcca740 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsb/lsbtest/session
@@ -126,15 +126,6 @@ VERSION: local|*
AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/python
AUTOREPLY_RESULTS_DIR: /opt/lsb/test/python/results
-[qt3-azov]
-RUN: 1
-VERSION: local|*
-
-[qt3-azov|local|*]
-AUTOREPLY_TESTSUITE_DIR: /opt/lsb/test/qt3-azov
-AUTOREPLY_X11_FONT_PATH: [default]
-AUTOREPLY_RESULTS_DIR: /opt/lsb/test/qt3-azov/results
-
[qt4-azov]
RUN: 1
VERSION: local|*
diff --git a/import-layers/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb b/import-layers/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb
index c10337beb..b732cf0ac 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb
@@ -47,8 +47,6 @@ do_configure () {
export I = "${STAGING_INCDIR}"
export L = "${STAGING_INCDIR}"
-EXTRA_OEMAKE = ""
-
do_compile () {
oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
new file mode 100644
index 000000000..04532be79
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch
@@ -0,0 +1,41 @@
+From 672a56be14426eae44864673c6c2afca0ab89d46 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Fri, 13 May 2016 11:11:28 -0500
+Subject: [PATCH] testcases/network/nfsv4/acl/acl1.c: Security fix on string
+ printf
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+acl1.c: In function 'test_acl_default':
+acl1.c:317:2: error: format not a string literal and no format arguments
+[-Werror=format-security]
+ printf(cmd);
+
+[YOCTO #9548]
+
+Signed-off-by: AnĂ­bal LimĂłn <anibal.limon@linux.intel.com>
+
+Upstream-Status: Pending
+---
+ testcases/network/nfsv4/acl/acl1.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c
+index b8b67b4..7c7c506 100644
+--- a/testcases/network/nfsv4/acl/acl1.c
++++ b/testcases/network/nfsv4/acl/acl1.c
+@@ -314,7 +314,7 @@ void test_acl_default(char *dir, acl_t acl)
+ char *cmd = malloc(256);
+
+ strcpy(cmd, "chmod 7777 ");
+- printf(cmd);
++ printf(cmd, NULL);
+ strcat(cmd, dir);
+ system(cmd);
+ acl2 = acl_get_file(path, ACL_TYPE_ACCESS);
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
index 68725dc7a..0684beeee 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
@@ -7,7 +7,7 @@ Subject: [PATCH 02/32] Add knob to control whether numa support should be
otherwise undeterministic dependency will be generated
during build depending upong numa being staged or not
-signed-off-by: Roy.Li <rongqing.li@windriver.com>
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
m4/ltp-numa.m4 | 10 +++++++++-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb
index 097c16d57..7631e0ec0 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb
@@ -62,6 +62,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch \
file://0034-periodic_output.patch \
file://0035-fix-test_proc_kill-hang.patch \
+ file://0001-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
"
S = "${WORKDIR}/git"
@@ -91,6 +92,14 @@ do_install(){
install -d ${D}/opt/ltp/
oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
+ # fixup not deploy STPfailure_report.pl to avoid confusing about it fails to run
+ # as it lacks dependency on some perl moudle such as LWP::Simple
+ # And this script previously works as a tool for analyzing failures from LTP
+ # runs on the OSDL's Scaleable Test Platform (STP) and it mainly accesses
+ # http://khack.osdl.org to retrieve ltp test results run on
+ # OSDL's Scaleable Test Platform, but now http://khack.osdl.org unaccessible
+ rm -rf ${D}/opt/ltp/bin/STPfailure_report.pl
+
# Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb b/import-layers/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb
index 4a32d2f68..9dd710a71 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4202a0a62910cf94f7af8a3436a2a2dd"
DEPENDS = "openssl"
-SRC_URI = "${DEBIAN_MIRROR}/main/h/heirloom-mailx/heirloom-mailx_12.5.orig.tar.gz;name=archive \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/h/heirloom-mailx/heirloom-mailx_12.5.orig.tar.gz;name=archive \
file://0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch \
file://0002-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch \
file://0003-Fixed-Lintian-warning-warning-macro-N-not-defined.patch \
@@ -28,6 +28,7 @@ SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b8
# for this package we're mostly interested in tracking debian patches,
# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/h/heirloom-mailx/"
UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
S = "${WORKDIR}/heirloom-mailx-12.5"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb b/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb
deleted file mode 100644
index 65df0aad3..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Linux man-pages"
-DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
-SECTION = "console/utils"
-HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
-LICENSE = "GPLv2+"
-
-LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
-SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "901cd52e0ee2a9d7508ae1ab15d5e835"
-SRC_URI[sha256sum] = "bff072462baea8d1b8e4568759324c5ed6c760716fe830bca71129cc09e00668"
-
-RDEPENDS_${PN} = "man"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
- oe_runmake install DESTDIR=${D}
-}
-
-# Only deliveres man-pages so FILES_${PN} gets everything
-FILES_${PN}-doc = ""
-FILES_${PN} = "${mandir}/*"
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
-ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
-ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.07.bb b/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.07.bb
new file mode 100644
index 000000000..76a3fd8ae
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.07.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Linux man-pages"
+DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
+SECTION = "console/utils"
+HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
+SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "05ba1cb21e99d02bd7bc1a59378965d2"
+SRC_URI[sha256sum] = "c973351131931f7700f5e9fbf4ef366c43ea7c1515d282e8d5db9c77590c4c93"
+
+RDEPENDS_${PN} = "man"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+ oe_runmake install DESTDIR=${D}
+}
+
+# Only deliveres man-pages so FILES_${PN} gets everything
+FILES_${PN}-doc = ""
+FILES_${PN} = "${mandir}/*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb b/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb
deleted file mode 100644
index 6c3a16aab..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Midnight Commander is an ncurses based file manager"
-HOMEPAGE = "http://www.midnight-commander.org/"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
-SECTION = "console/utils"
-DEPENDS = "ncurses glib-2.0 util-linux"
-RDEPENDS_${PN} = "ncurses-terminfo"
-
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
- "
-SRC_URI[md5sum] = "db48ce26ba425a61edc51930e94227fd"
-SRC_URI[sha256sum] = "f74e3da70410975cdeb27ee9a66d1dd812250b6d3ede364bca728dd5a48e5471"
-
-inherit autotools gettext pkgconfig
-
-#
-# Both Samba (smb) and sftp require package delivered from meta-openembedded
-#
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
-PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
-
-EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x"
-
-do_install_append () {
- sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
- sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
-}
-
-PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
-
-SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
-FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
- ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
- ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
- ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
- ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
- ${libexecdir}/mc/extfs.d/uzip"
-RDEPENDS_${BPN}-helpers-perl = "perl"
-
-SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
-FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
-RDEPENDS_${BPN}-helpers-python = "python"
-
-SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
-FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
-
-SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
-FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.17.bb b/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.17.bb
new file mode 100644
index 000000000..a5c4eceb9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/mc/mc_4.8.17.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Midnight Commander is an ncurses based file manager"
+HOMEPAGE = "http://www.midnight-commander.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
+SECTION = "console/utils"
+DEPENDS = "ncurses glib-2.0 util-linux"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+ "
+SRC_URI[md5sum] = "6e9c07066e40af06b263a13fad17a07f"
+SRC_URI[sha256sum] = "66d0cb37baaed8ef930f8ad25a634adad4f264eb61820893920ac87b9dfb783b"
+
+inherit autotools gettext pkgconfig
+
+#
+# Both Samba (smb) and sftp require package delivered from meta-openembedded
+#
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
+PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
+
+EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x"
+
+do_install_append () {
+ sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
+ sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
+}
+
+PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
+
+SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
+FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
+ ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
+ ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
+ ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \
+ ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \
+ ${libexecdir}/mc/extfs.d/uzip"
+RDEPENDS_${BPN}-helpers-perl = "perl"
+
+SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
+FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
+RDEPENDS_${BPN}-helpers-python = "python"
+
+SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
+FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
+
+SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
+FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
index ee482b5ca..f829467a1 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
@@ -11,7 +11,7 @@ unsigned int too.
Upstream-Status: Backport
-Signed-off-by : Xiao Ni <xni@redhat.com>
+Signed-off-by: : Xiao Ni <xni@redhat.com>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch
new file mode 100644
index 000000000..4cf809290
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-Undefine-dprintf-before-redefining.patch
@@ -0,0 +1,43 @@
+From 6d369e8f226594632ce4260129509daf7030de0a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 9 May 2016 22:03:57 +0000
+Subject: [PATCH] mdadm.h: Undefine dprintf before redefining
+
+dprintf is also defined in libc see
+usr/include/bits/stdio2.h, this comes into
+play especially when fortify sources is enabled
+and compilers like clang reports the override
+
+In file included from policy.c:25:
+./mdadm.h:1562:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined]
+ ^
+/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/bits/stdio2.h:145:12: note: previous definition is here
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ mdadm.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/mdadm.h b/mdadm.h
+index 230e60f..8c8f4d1 100755
+--- a/mdadm.h
++++ b/mdadm.h
+@@ -1554,11 +1554,13 @@ static inline char *to_subarray(struct mdstat_ent *ent, char *container)
+ }
+
+ #ifdef DEBUG
++#undef dprintf
+ #define dprintf(fmt, arg...) \
+ fprintf(stderr, "%s: %s: "fmt, Name, __func__, ##arg)
+ #define dprintf_cont(fmt, arg...) \
+ fprintf(stderr, fmt, ##arg)
+ #else
++#undef dprintf
+ #define dprintf(fmt, arg...) \
+ ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; })
+ #define dprintf_cont(fmt, arg...) \
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch
new file mode 100644
index 000000000..0b34b8491
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/0001-raid6check-Fix-if-else-indentation.patch
@@ -0,0 +1,37 @@
+From 1b0aa1debf6fbe9923c9aac671d2894f76c32f9d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 20 Apr 2016 16:38:13 +0000
+Subject: [PATCH] raid6check: Fix if-else indentation
+
+gcc 6 warns about ambiguity due to this indentation
+| raid6check.c: In function 'manual_repair':
+| raid6check.c:267:4: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
+| else
+| ^~~~
+| raid6check.c:269:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
+| printf("Repairing D(%d) and P\n", failed_data);
+| ^~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ raid6check.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/raid6check.c b/raid6check.c
+index ad7ffe7..409b1b6 100644
+--- a/raid6check.c
++++ b/raid6check.c
+@@ -266,7 +266,7 @@ int manual_repair(int chunk_size, int syndrome_disks,
+ failed_data = failed_slot2;
+ else
+ failed_data = failed_slot1;
+- printf("Repairing D(%d) and P\n", failed_data);
++ printf("Repairing D(%d) and P\n", failed_data);
+ raid6_datap_recov(syndrome_disks+2, chunk_size,
+ failed_data, (uint8_t**)blocks, 1);
+ } else {
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
index 40acc148e..84c382def 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
@@ -6,7 +6,7 @@ set by tune settings are lost. Causing compile failure with x32 toolchain
As the bitbake defined CC is good, there is no need to redfine CC in the
make file, hence making the CC definition in the Makefile conditional.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/07
Index: mdadm-3.3/Makefile
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb b/import-layers/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb
index 142dfddbf..261054e76 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb
@@ -19,7 +19,9 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
file://0001-Fix-some-type-comparison-problems.patch \
file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
file://run-ptest \
- "
+ file://0001-raid6check-Fix-if-else-indentation.patch \
+ file://0001-mdadm.h-Undefine-dprintf-before-redefining.patch \
+ "
SRC_URI[md5sum] = "04b8b21f637540350f8517c7e68d3c63"
SRC_URI[sha256sum] = "27d0be4627d38a12ddcd1c1c3721d649d4e89e1093914497e22b57245cda8808"
@@ -44,8 +46,6 @@ do_install() {
autotools_do_install
}
-FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules"
-
inherit ptest
do_compile_ptest() {
diff --git a/import-layers/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb
deleted file mode 100644
index 6dbd78f9f..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "msmtp is an SMTP client"
-DESCRIPTION = "A sendmail replacement for use in MTAs like mutt"
-HOMEPAGE = "http://msmtp.sourceforge.net/"
-SECTION = "console/network"
-
-LICENSE = "GPLv3"
-DEPENDS = "zlib gnutls"
-
-#COPYING or Licence
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
- "
-
-SRC_URI[md5sum] = "6d9384c09405db9476beaa2237c56705"
-SRC_URI[sha256sum] = "f982be069c0772c3ee83925f552f5dac5fb307d2d1c68202f9926bb13b757355"
-
-inherit gettext autotools update-alternatives pkgconfig
-
-EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
-
-ALTERNATIVE_${PN} = "sendmail"
-ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
-ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
-ALTERNATIVE_PRIORITY = "100"
-
-pkg_postinst_${PN}_linuxstdbase () {
- # /usr/lib/sendmial is required by LSB core test
- [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.5.bb b/import-layers/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.5.bb
new file mode 100644
index 000000000..d0c39eb4d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.5.bb
@@ -0,0 +1,30 @@
+SUMMARY = "msmtp is an SMTP client"
+DESCRIPTION = "A sendmail replacement for use in MTAs like mutt"
+HOMEPAGE = "http://msmtp.sourceforge.net/"
+SECTION = "console/network"
+
+LICENSE = "GPLv3"
+DEPENDS = "zlib gnutls"
+
+#COPYING or Licence
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
+ "
+
+SRC_URI[md5sum] = "50a8c9bb72f8222779db6b4aae2965e0"
+SRC_URI[sha256sum] = "76a0d60693c7e65d0c7a12f01d300882d280b1e1be0202f54730ae44d44a5006"
+
+inherit gettext autotools update-alternatives pkgconfig
+
+EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
+
+ALTERNATIVE_${PN} = "sendmail"
+ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_PRIORITY = "100"
+
+pkg_postinst_${PN}_linuxstdbase () {
+ # /usr/lib/sendmial is required by LSB core test
+ [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/0001-lib-inet6.c-INET6_rresolve-various-fixes.patch b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/0001-lib-inet6.c-INET6_rresolve-various-fixes.patch
new file mode 100644
index 000000000..8be45ccac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/0001-lib-inet6.c-INET6_rresolve-various-fixes.patch
@@ -0,0 +1,87 @@
+From 08abfcd923e9f37d1902db26771b1dc6731eb265 Mon Sep 17 00:00:00 2001
+From: Jiri Popelka <jpopelka@redhat.com>
+Date: Fri, 27 Sep 2013 18:40:06 +0200
+Subject: [PATCH 1/1] lib/inet6.c:INET6_rresolve() - various fixes
+
+1) Fall-back to numeric address if getnameinfo fails.
+ Reverse lookup is not mandatory, therefore its fail
+ is not an error. Just return numeric address in that case.
+ This makes netstat/route show IPv6 address instead of
+ [UNKNOWN] in case of DNS problems.
+
+2) Pass length of 'name' buffer into function.
+ 'name' is a pointer and therefore sizeof(name)
+ returns size of pointer and not size of the buffer.
+ see http://stackoverflow.com/questions/14298710/c-pointers-and-arrays-sizeof-operator
+ The sizeof() usage was added with commit 604785adc,
+ so I checked all the other changes in that commit
+ and they seem to be OK.
+
+3) remove unused 's' variable
+
+Upstream-Status: Pending
+
+Signed-off-by: Shan Hai <shan.hai@windriver.com>
+Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
+---
+ lib/inet6.c | 21 ++++++++++-----------
+ 1 file changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/lib/inet6.c b/lib/inet6.c
+index 9a484a0..2a9c459 100644
+--- a/lib/inet6.c
++++ b/lib/inet6.c
+@@ -84,10 +84,9 @@ static int INET6_resolve(char *name, struct sockaddr_in6 *sin6)
+ #endif
+
+
+-static int INET6_rresolve(char *name, struct sockaddr_in6 *sin6, int numeric)
++static int INET6_rresolve(char *name, size_t namelen,
++ struct sockaddr_in6 *sin6, int numeric)
+ {
+- int s;
+-
+ /* Grmpf. -FvK */
+ if (sin6->sin6_family != AF_INET6) {
+ #ifdef DEBUG
+@@ -98,21 +97,20 @@ static int INET6_rresolve(char *name, struct sockaddr_in6 *sin6, int numeric)
+ return (-1);
+ }
+ if (numeric & 0x7FFF) {
+- inet_ntop( AF_INET6, &sin6->sin6_addr, name, 80);
++ inet_ntop( AF_INET6, &sin6->sin6_addr, name, namelen);
+ return (0);
+ }
+ if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
+ if (numeric & 0x8000)
+- strcpy(name, "default");
++ safe_strncpy(name, "default", namelen);
+ else
+- strcpy(name, "[::]");
++ safe_strncpy(name, "[::]", namelen);
+ return (0);
+ }
+
+- if ((s = getnameinfo((struct sockaddr *) sin6, sizeof(struct sockaddr_in6),
+- name, 255 /* !! */ , NULL, 0, 0))) {
+- fputs("getnameinfo failed\n", stderr);
+- return -1;
++ if (getnameinfo((struct sockaddr *) sin6, sizeof(struct sockaddr_in6),
++ name, namelen , NULL, 0, 0)) {
++ inet_ntop( AF_INET6, &sin6->sin6_addr, name, namelen);
+ }
+ return (0);
+ }
+@@ -143,7 +141,8 @@ static char *INET6_sprint(struct sockaddr *sap, int numeric)
+
+ if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+ return safe_strncpy(buff, _("[NONE SET]"), sizeof(buff));
+- if (INET6_rresolve(buff, (struct sockaddr_in6 *) sap, numeric) != 0)
++ if (INET6_rresolve(buff, sizeof(buff),
++ (struct sockaddr_in6 *) sap, numeric) != 0)
+ return safe_strncpy(buff, _("[UNKNOWN]"), sizeof(buff));
+ return (fix_v4_address(buff, &((struct sockaddr_in6 *)sap)->sin6_addr));
+ }
+--
+1.8.5.2.233.g932f7e4
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch
new file mode 100644
index 000000000..505eeb048
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-fix-building-with-linux-4.8.patch
@@ -0,0 +1,52 @@
+From 4d56645ea144a34f7cdd3e3ede6452d81fbae251 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Sat, 8 Oct 2016 14:42:54 +0800
+Subject: [PATCH] iptunnel.c: include linux/ip.h to fix building with linux-4.8
+
+Fix a build error when using the linux-4.8 headers that results in:
+
+In file included from
+.../sysroots/qemuarm64/usr/include/linux/if_tunnel.h:6:0,
+ from iptunnel.c:39:
+.../qemuarm64/usr/include/linux/ip.h:85:8: error: redefinition of
+'struct iphdr'
+ struct iphdr {
+ ^~~~~
+In file included from iptunnel.c:29:0:
+.../qemuarm64/usr/include/netinet/ip.h:44:8: note: originally defined here
+ struct iphdr
+ ^~~~~
+
+Upstream-Status: Submitted [1]
+
+[1] https://sourceforge.net/p/net-tools/mailman/message/35413022/
+
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ iptunnel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iptunnel.c b/iptunnel.c
+index 4943d83..acfcbc7 100644
+--- a/iptunnel.c
++++ b/iptunnel.c
+@@ -26,7 +26,6 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <netinet/in.h>
+-#include <netinet/ip.h>
+ #include <arpa/inet.h>
+ #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
+ #include <net/if.h>
+@@ -36,6 +35,7 @@
+ #include <linux/if_arp.h>
+ #endif
+ #include <linux/types.h>
++#include <linux/ip.h>
+ #include <linux/if_tunnel.h>
+
+ #include "config.h"
+--
+2.8.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
index 63b2051ba..47a68a59a 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
@@ -15,6 +15,8 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/
file://net-tools-1.60-sctp1.patch \
file://net-tools-1.60-sctp2-quiet.patch \
file://net-tools-1.60-sctp3-addrs.patch \
+ file://0001-lib-inet6.c-INET6_rresolve-various-fixes.patch \
+ file://net-tools-fix-building-with-linux-4.8.patch \
"
# for this package we're mostly interested in tracking debian patches,
@@ -99,6 +101,10 @@ base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig r
base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname"
ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}"
+ALTERNATIVE_${PN}-doc += "hostname.1"
+ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
+ALTERNATIVE_PRIORITY[hostname.1] = "10"
+
python __anonymous() {
for prog in d.getVar('base_sbindir_progs', True).split():
d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
diff --git a/import-layers/yocto-poky/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch b/import-layers/yocto-poky/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch
new file mode 100644
index 000000000..a4b3afd95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch
@@ -0,0 +1,31 @@
+From 58245b859ffbcb1780575bf1b0a018d55e74e434 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Wed, 21 Sep 2016 21:14:40 +0200
+Subject: [PATCH] detect gold as GNU linker too
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas MĂĽller <schnitzeltony@googlemail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 03e8bda..c2fce51 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -28,7 +28,7 @@ AC_CHECK_SIZEOF([void *])
+ AC_MSG_CHECKING([for GNU ld])
+ LD=`$CC -print-prog-name=ld 2>&5`
+
+-if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld"` = 0; then
++if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU "` = 0; then
+ # Not
+ GNU_LD=""
+ AC_MSG_RESULT([no])
+--
+2.5.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/newt/files/remove_slang_include.patch b/import-layers/yocto-poky/meta/recipes-extended/newt/files/remove_slang_include.patch
deleted file mode 100644
index a2634ec75..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/newt/files/remove_slang_include.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-
-Upstream-Status: Pending
-
-Index: git/Makefile.in
-===================================================================
---- git.orig/Makefile.in
-+++ git/Makefile.in
-@@ -5,7 +5,7 @@ CC = @CC@
- CPP = @CPP@
- CFLAGS = @CFLAGS@
- LDFLAGS = @LDFLAGS@
--CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@
-+CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
- GNU_LD = @GNU_LD@
-
- VERSION = @VERSION@
diff --git a/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb b/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
deleted file mode 100644
index ba047574f..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-require recipes-extended/newt/libnewt_${PV}.bb
-
-SUMMARY .= " - python"
-DEPENDS = "libnewt python"
-RDEPENDS_${PN} += "python-core"
-
-inherit pythonnative python-dir
-
-EXTRA_OECONF += "--with-python"
-EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
-
-
-do_compile () {
- VERSION="$(sed -n 's/^VERSION = //p' Makefile)"
- oe_runmake _snack.so
-}
-
-do_install () {
- install -d ${D}${PYTHON_SITEPACKAGES_DIR}
- install -m 0755 ${PYTHON_DIR}/_snack.so ${D}${PYTHON_SITEPACKAGES_DIR}/
- install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/
-}
-
-PACKAGES_remove = "whiptail"
-
-FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.19.bb b/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.19.bb
new file mode 100644
index 000000000..20369effe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.19.bb
@@ -0,0 +1,28 @@
+require recipes-extended/newt/libnewt_${PV}.bb
+
+SUMMARY .= " - python"
+DEPENDS = "libnewt python3"
+RDEPENDS_${PN} += "python3-core"
+
+inherit python3native python3-dir
+
+EXTRA_OECONF += "--with-python"
+EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
+
+
+do_compile () {
+ VERSION="$(sed -n 's/^VERSION = //p' Makefile)"
+ oe_runmake _snack.so
+}
+
+do_install () {
+ install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+ install -m 0755 ${PYTHON_DIR}/_snack.so ${D}${PYTHON_SITEPACKAGES_DIR}/
+ install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/
+}
+
+PACKAGES_remove = "whiptail"
+
+FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb b/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
deleted file mode 100644
index 9a2964be1..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
+++ /dev/null
@@ -1,59 +0,0 @@
-SUMMARY = "A library for text mode user interfaces"
-
-DESCRIPTION = "Newt is a programming library for color text mode, widget based user \
-interfaces. Newt can be used to add stacked windows, entry widgets, \
-checkboxes, radio buttons, labels, plain text fields, scrollbars, \
-etc., to text mode user interfaces. This package also contains the \
-shared library needed by programs built with newt, as well as a \
-/usr/bin/dialog replacement called whiptail. Newt is based on the \
-slang library."
-
-HOMEPAGE = "https://fedorahosted.org/newt/"
-SECTION = "libs"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-# slang needs to be >= 2.2
-DEPENDS = "slang popt"
-
-SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
- file://remove_slang_include.patch \
- file://fix_SHAREDDIR.patch \
- file://cross_ar.patch \
- file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \
- file://pie-flags.patch \
-"
-
-SRC_URI[md5sum] = "685721bee1a318570704b19dcf31d268"
-SRC_URI[sha256sum] = "771b0e634ede56ae6a6acd910728bb5832ac13ddb0d1d27919d2498dab70c91e"
-
-S = "${WORKDIR}/newt-${PV}"
-
-EXTRA_OECONF = "--without-tcl --without-python"
-
-inherit autotools-brokensep
-
-CLEANBROKEN = "1"
-
-export STAGING_INCDIR
-export STAGING_LIBDIR
-export CPPFLAGS
-
-export BUILD_SYS
-export HOST_SYS
-
-PACKAGES_prepend = "whiptail "
-
-do_configure_prepend() {
- sh autogen.sh
-}
-
-do_compile_prepend() {
- # Make sure the recompile is OK
- rm -f ${B}/.depend
-}
-
-FILES_whiptail = "${bindir}/whiptail"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.19.bb b/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.19.bb
new file mode 100644
index 000000000..a26ce1fbe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.19.bb
@@ -0,0 +1,54 @@
+SUMMARY = "A library for text mode user interfaces"
+
+DESCRIPTION = "Newt is a programming library for color text mode, widget based user \
+interfaces. Newt can be used to add stacked windows, entry widgets, \
+checkboxes, radio buttons, labels, plain text fields, scrollbars, \
+etc., to text mode user interfaces. This package also contains the \
+shared library needed by programs built with newt, as well as a \
+/usr/bin/dialog replacement called whiptail. Newt is based on the \
+slang library."
+
+HOMEPAGE = "https://fedorahosted.org/newt/"
+SECTION = "libs"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+# slang needs to be >= 2.2
+DEPENDS = "slang popt"
+
+SRC_URI = "https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
+ file://fix_SHAREDDIR.patch \
+ file://cross_ar.patch \
+ file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \
+ file://pie-flags.patch \
+ file://0001-detect-gold-as-GNU-linker-too.patch \
+"
+
+SRC_URI[md5sum] = "e4aa0f7943edd39c52481a87f68f412a"
+SRC_URI[sha256sum] = "08c0db56c21996af6a7cbab99491b774c6c09cef91cd9b03903c84634bff2e80"
+
+S = "${WORKDIR}/newt-${PV}"
+
+EXTRA_OECONF = "--without-tcl --without-python"
+
+inherit autotools-brokensep
+
+CLEANBROKEN = "1"
+
+export CPPFLAGS
+
+PACKAGES_prepend = "whiptail "
+
+do_configure_prepend() {
+ sh autogen.sh
+}
+
+do_compile_prepend() {
+ # Make sure the recompile is OK
+ rm -f ${B}/.depend
+}
+
+FILES_whiptail = "${bindir}/whiptail"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
index 1d7e6089e..a60a68cbf 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb
@@ -5,7 +5,6 @@
SUMMARY = "Standard full-featured Linux system"
DESCRIPTION = "Package group bringing in packages needed for a more traditional full-featured Linux system"
PR = "r6"
-LICENSE = "MIT"
inherit packagegroup
@@ -144,7 +143,6 @@ RDEPENDS_packagegroup-core-full-cmdline-sys-services = "\
cronie \
dbus \
dbus-glib \
- python-dbus \
elfutils \
gzip \
less \
diff --git a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
index a29c3d762..29564e0c9 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -5,7 +5,6 @@
SUMMARY = "Linux Standard Base (LSB)"
DESCRIPTION = "Packages required to satisfy the Linux Standard Base (LSB) specification"
PR = "r10"
-LICENSE = "MIT"
inherit packagegroup distro_features_check
@@ -201,16 +200,6 @@ RDEPENDS_packagegroup-core-lsb-python = "\
python-misc \
"
-def get_libqt3(d):
- if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) or "":
- if 'qt3' in d.getVar('BBFILE_COLLECTIONS', False) or "":
- return 'libqt-mt3'
-
- bb.warn('The meta-qt3 layer should be added, this layer provides Qt 3.x' \
- 'libraries. Its intended use is for passing LSB tests as Qt3 is' \
- 'a requirement for LSB.')
- return ''
-
QT4PKGS = " \
libqtcore4 \
libqtgui4 \
@@ -229,8 +218,8 @@ def get_libqt4(d):
if 'qt4' in d.getVar('BBFILE_COLLECTIONS', False) or "":
return d.getVar('QT4PKGS', False)
- bb.warn('The meta-qt4 layer should be added, this layer provides Qt 4.x' \
- 'libraries. Its intended use is for passing LSB tests as Qt4 is' \
+ bb.warn('The meta-qt4 layer should be added, this layer provides Qt 4.x ' \
+ 'libraries. Its intended use is for passing LSB tests as Qt4 is ' \
'a requirement for LSB.')
return ''
@@ -255,7 +244,6 @@ RDEPENDS_packagegroup-core-lsb-desktop = "\
atk \
libasound \
${@get_libqt4(d)} \
- ${@get_libqt3(d)} \
"
RDEPENDS_packagegroup-core-lsb-runtime-add = "\
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/crypt_configure.patch b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/crypt_configure.patch
index bec82a5f1..917a8af64 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/crypt_configure.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/crypt_configure.patch
@@ -1,31 +1,40 @@
+From b86575ab4a0df07da160283459da270e1c0372a0 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Tue, 24 May 2016 14:11:09 +0300
+Subject: [PATCH] crypt_configure
+
This patch fixes a case where it find crypt defined in libc (musl) but
not in specified libraries then it ends up assigning
-
LIBCRYPT="-l" which then goes into makefile cause all sort of problems
e.g.
ld: cannot find -l-m32
| collect2: error: ld returned 1 exit status
-
-The reason is that -l appears on commandline with out any library and
-compiler treats the next argument as library name whatever it is.
-
+The reason is that -l appears on commandline with
+out any library and compiler treats the next argument as library name
+whatever it is.
Upstream-Status: Pending
+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
-Index: Linux-PAM-1.1.6/configure.in
-===================================================================
---- Linux-PAM-1.1.6.org/configure.ac
-+++ Linux-PAM-1.1.6/configure.ac
-@@ -400,7 +400,9 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" =
+diff --git a/configure.ac b/configure.ac
+index df39d07..e68d856 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -401,7 +401,7 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"],
[crypt_libs="crypt"])
BACKUP_LIBS=$LIBS
--AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="")
-+AC_SEARCH_LIBS([crypt],[$crypt_libs],
-+ [test "$ac_cv_search_crypt" = "none required" ||
-+ LIBCRYPT="$ac_cv_search_crypt"])
+-AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_lib:+-l$ac_lib}", LIBCRYPT="")
++AC_SEARCH_LIBS([crypt],[$crypt_libs], [test "$ac_cv_search_crypt" = "none required" || LIBCRYPT="$ac_cv_search_crypt"])
AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
LIBS=$BACKUP_LIBS
AC_SUBST(LIBCRYPT)
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch
deleted file mode 100644
index 5e551ac48..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-no-innetgr.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-innetgr may not be there so make sure that when innetgr is not present
-then we inform about it and not use it.
-
--Khem
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-Index: Linux-PAM-1.1.3/modules/pam_group/pam_group.c
-===================================================================
---- Linux-PAM-1.1.3.orig/modules/pam_group/pam_group.c
-+++ Linux-PAM-1.1.3/modules/pam_group/pam_group.c
-@@ -659,7 +659,11 @@ static int check_account(pam_handle_t *p
- }
- /* If buffer starts with @, we are using netgroups */
- if (buffer[0] == '@')
-- good &= innetgr (&buffer[1], NULL, user, NULL);
-+#ifdef HAVE_INNETGR
-+ good &= innetgr (&buffer[1], NULL, user, NULL);
-+#else
-+ pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support");
-+#endif
- /* otherwise, if the buffer starts with %, it's a UNIX group */
- else if (buffer[0] == '%')
- good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
-Index: Linux-PAM-1.1.3/modules/pam_time/pam_time.c
-===================================================================
---- Linux-PAM-1.1.3.orig/modules/pam_time/pam_time.c
-+++ Linux-PAM-1.1.3/modules/pam_time/pam_time.c
-@@ -555,9 +555,13 @@ check_account(pam_handle_t *pamh, const
- }
- /* If buffer starts with @, we are using netgroups */
- if (buffer[0] == '@')
-- good &= innetgr (&buffer[1], NULL, user, NULL);
-+#ifdef HAVE_INNETGR
-+ good &= innetgr (&buffer[1], NULL, user, NULL);
-+#else
-+ pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support");
-+#endif
- else
-- good &= logic_field(pamh, user, buffer, count, is_same);
-+ good &= logic_field(pamh, user, buffer, count, is_same);
- D(("with user: %s", good ? "passes":"fails" ));
-
- /* here we get the time field */
-Index: Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c
-===================================================================
---- Linux-PAM-1.1.3.orig/modules/pam_succeed_if/pam_succeed_if.c
-+++ Linux-PAM-1.1.3/modules/pam_succeed_if/pam_succeed_if.c
-@@ -231,18 +231,27 @@ evaluate_notingroup(pam_handle_t *pamh,
- }
- /* Return PAM_SUCCESS if the (host,user) is in the netgroup. */
- static int
--evaluate_innetgr(const char *host, const char *user, const char *group)
-+evaluate_innetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
- {
-+#ifdef HAVE_INNETGR
- if (innetgr(group, host, user, NULL) == 1)
- return PAM_SUCCESS;
-+#else
-+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
-+#endif
-+
- return PAM_AUTH_ERR;
- }
- /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
- static int
--evaluate_notinnetgr(const char *host, const char *user, const char *group)
-+evaluate_notinnetgr(const pam_handle_t* pamh, const char *host, const char *user, const char *group)
- {
-+#ifdef HAVE_INNETGR
- if (innetgr(group, host, user, NULL) == 0)
- return PAM_SUCCESS;
-+#else
-+ pam_syslog (pamh, LOG_ERR, "pam_succeed_if does not have netgroup support");
-+#endif
- return PAM_AUTH_ERR;
- }
-
-@@ -361,14 +370,14 @@ evaluate(pam_handle_t *pamh, int debug,
- const void *rhost;
- if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
- rhost = NULL;
-- return evaluate_innetgr(rhost, user, right);
-+ return evaluate_innetgr(pamh, rhost, user, right);
- }
- /* (Rhost, user) is not in this group. */
- if (strcasecmp(qual, "notinnetgr") == 0) {
- const void *rhost;
- if (pam_get_item(pamh, PAM_RHOST, &rhost) != PAM_SUCCESS)
- rhost = NULL;
-- return evaluate_notinnetgr(rhost, user, right);
-+ return evaluate_notinnetgr(pamh, rhost, user, right);
- }
- /* Fail closed. */
- return PAM_SERVICE_ERR;
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch
index 3241e8295..d2cc66882 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam/pam-unix-nullok-secure.patch
@@ -1,9 +1,11 @@
-From 9bdc197474795f2d000c2bc04f58f7cef8898f21 Mon Sep 17 00:00:00 2001
-From: Amarnath Valluri <amarnath.valluri@intel.com>
-Date: Wed, 15 Jul 2015 13:07:20 +0300
-Subject: [PATCH] Debian patch to add a new 'nullok_secure' option to pam_unix,
- which accepts users with null passwords only when the applicant is connected
- from a tty listed in /etc/securetty.
+From b6545b83f94c5fb7aec1478b8d458a1393f479c8 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Wed, 25 May 2016 14:12:25 +0300
+Subject: [PATCH] pam_unix: support 'nullok_secure' option
+
+Debian patch to add a new 'nullok_secure' option to pam_unix,
+which accepts users with null passwords only when the applicant is
+connected from a tty listed in /etc/securetty.
Authors: Sam Hartman <hartmans@debian.org>,
Steve Langasek <vorlon@debian.org>
@@ -11,78 +13,31 @@ Authors: Sam Hartman <hartmans@debian.org>,
Upstream-Status: Pending
Signed-off-by: Ming Liu <ming.liu@windriver.com>
-
-v2:
- - Forward ported from v1.1.6 to v1.2.1
-
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
modules/pam_unix/Makefile.am | 3 ++-
- modules/pam_unix/README | 11 ++++++++++-
- modules/pam_unix/pam_unix.8 | 9 ++++++++-
modules/pam_unix/pam_unix.8.xml | 19 ++++++++++++++++++-
modules/pam_unix/support.c | 40 +++++++++++++++++++++++++++++++++++-----
modules/pam_unix/support.h | 8 ++++++--
- 6 files changed, 79 insertions(+), 11 deletions(-)
+ 4 files changed, 61 insertions(+), 9 deletions(-)
diff --git a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am
-index 56ed591..9a372ac 100644
+index 56df178..2bba460 100644
--- a/modules/pam_unix/Makefile.am
+++ b/modules/pam_unix/Makefile.am
@@ -30,7 +30,8 @@ if HAVE_VERSIONING
pam_unix_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
endif
pam_unix_la_LIBADD = $(top_builddir)/libpam/libpam.la \
-- @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS)
-+ @LIBCRYPT@ @LIBSELINUX@ $(NIS_LIBS) \
+- @LIBCRYPT@ @LIBSELINUX@ @TIRPC_LIBS@ @NSL_LIBS@
++ @LIBCRYPT@ @LIBSELINUX@ @TIRPC_LIBS@ @NSL_LIBS@ \
+ ../pam_securetty/tty_secure.lo
securelib_LTLIBRARIES = pam_unix.la
-diff --git a/modules/pam_unix/README b/modules/pam_unix/README
-index 3935dba..7880d91 100644
---- a/modules/pam_unix/README
-+++ b/modules/pam_unix/README
-@@ -67,7 +67,16 @@ nullok
-
- The default action of this module is to not permit the user access to a
- service if their official password is blank. The nullok argument overrides
-- this default.
-+ this default and allows any user with a blank password to access the
-+ service.
-+
-+nullok_secure
-+
-+ The default action of this module is to not permit the user access to a
-+ service if their official password is blank. The nullok_secure argument
-+ overrides this default and allows any user with a blank password to access
-+ the service as long as the value of PAM_TTY is set to one of the values
-+ found in /etc/securetty.
-
- try_first_pass
-
-diff --git a/modules/pam_unix/pam_unix.8 b/modules/pam_unix/pam_unix.8
-index 339178b..a4bd906 100644
---- a/modules/pam_unix/pam_unix.8
-+++ b/modules/pam_unix/pam_unix.8
-@@ -92,7 +92,14 @@ Turns off informational messages namely messages about session open and close vi
- .RS 4
- The default action of this module is to not permit the user access to a service if their official password is blank\&. The
- \fBnullok\fR
--argument overrides this default\&.
-+argument overrides this default and allows any user with a blank password to access the service\&.
-+.RE
-+.PP
-+\fBnullok_secure\fR
-+.RS 4
-+The default action of this module is to not permit the user access to a service if their official password is blank\&. The
-+\fBnullok_secure\fR
-+argument overrides this default and allows any user with a blank password to access the service as long as the value of PAM_TTY is set to one of the values found in /etc/securetty\&.
- .RE
- .PP
- \fBtry_first_pass\fR
diff --git a/modules/pam_unix/pam_unix.8.xml b/modules/pam_unix/pam_unix.8.xml
-index a8b64bb..1ced6f4 100644
+index 1b318f1..be0330e 100644
--- a/modules/pam_unix/pam_unix.8.xml
+++ b/modules/pam_unix/pam_unix.8.xml
@@ -159,7 +159,24 @@
@@ -112,10 +67,10 @@ index a8b64bb..1ced6f4 100644
</listitem>
</varlistentry>
diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c
-index abccd82..2361957 100644
+index fc8595e..29e3341 100644
--- a/modules/pam_unix/support.c
+++ b/modules/pam_unix/support.c
-@@ -189,13 +189,22 @@ int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int *rounds,
+@@ -183,13 +183,22 @@ int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int *rounds,
/* now parse the arguments to this module */
for (; argc-- > 0; ++argv) {
@@ -141,7 +96,7 @@ index abccd82..2361957 100644
}
}
-@@ -566,6 +575,7 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
+@@ -560,6 +569,7 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
if (child == 0) {
static char *envp[] = { NULL };
const char *args[] = { NULL, NULL, NULL, NULL };
@@ -149,7 +104,7 @@ index abccd82..2361957 100644
/* XXX - should really tidy up PAM here too */
-@@ -593,7 +603,16 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
+@@ -587,7 +597,16 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
/* exec binary helper */
args[0] = CHKPWD_HELPER;
args[1] = user;
@@ -167,7 +122,7 @@ index abccd82..2361957 100644
args[2]="nullok";
} else {
args[2]="nonull";
-@@ -678,6 +697,17 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name)
+@@ -672,6 +691,17 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name)
if (on(UNIX__NONULL, ctrl))
return 0; /* will fail but don't let on yet */
@@ -185,7 +140,7 @@ index abccd82..2361957 100644
/* UNIX passwords area */
retval = get_pwd_hash(pamh, name, &pwd, &salt);
-@@ -764,7 +794,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
+@@ -758,7 +788,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
}
}
} else {
@@ -195,46 +150,46 @@ index abccd82..2361957 100644
if (retval == PAM_SUCCESS) {
diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h
-index 3729ce0..43cdbea 100644
+index b4c279c..8da4a8e 100644
--- a/modules/pam_unix/support.h
+++ b/modules/pam_unix/support.h
-@@ -99,8 +99,9 @@ typedef struct {
- #define UNIX_MIN_PASS_LEN 27 /* min length for password */
+@@ -98,8 +98,9 @@ typedef struct {
#define UNIX_QUIET 28 /* Don't print informational messages */
- #define UNIX_DES 29 /* DES, default */
-+#define UNIX_NULLOK_SECURE 30 /* NULL passwords allowed only on secure ttys */
+ #define UNIX_NO_PASS_EXPIRY 29 /* Don't check for password expiration if not used for authentication */
+ #define UNIX_DES 30 /* DES, default */
++#define UNIX_NULLOK_SECURE 31 /* NULL passwords allowed only on secure ttys */
/* -------------- */
--#define UNIX_CTRLS_ 30 /* number of ctrl arguments defined */
-+#define UNIX_CTRLS_ 31 /* number of ctrl arguments defined */
+-#define UNIX_CTRLS_ 31 /* number of ctrl arguments defined */
++#define UNIX_CTRLS_ 32 /* number of ctrl arguments defined */
#define UNIX_DES_CRYPT(ctrl) (off(UNIX_MD5_PASS,ctrl)&&off(UNIX_BIGCRYPT,ctrl)&&off(UNIX_SHA256_PASS,ctrl)&&off(UNIX_SHA512_PASS,ctrl)&&off(UNIX_BLOWFISH_PASS,ctrl))
-@@ -118,7 +119,7 @@ static const UNIX_Ctrls unix_args[UNIX_CTRLS_] =
- /* UNIX_NOT_SET_PASS */ {"not_set_pass", _ALL_ON_, 0100, 0},
+@@ -117,7 +118,7 @@ static const UNIX_Ctrls unix_args[UNIX_CTRLS_] =
+ /* UNIX_AUTHTOK_TYPE */ {"authtok_type=", _ALL_ON_, 0100, 0},
/* UNIX__PRELIM */ {NULL, _ALL_ON_^(0600), 0200, 0},
/* UNIX__UPDATE */ {NULL, _ALL_ON_^(0600), 0400, 0},
-/* UNIX__NONULL */ {NULL, _ALL_ON_, 01000, 0},
-+/* UNIX__NONULL */ {NULL, _ALL_ON_^(02000000000), 01000, 0},
++/* UNIX__NONULL */ {NULL, _ALL_ON_^(02000000000), 01000, 0},
/* UNIX__QUIET */ {NULL, _ALL_ON_, 02000, 0},
/* UNIX_USE_AUTHTOK */ {"use_authtok", _ALL_ON_, 04000, 0},
/* UNIX_SHADOW */ {"shadow", _ALL_ON_, 010000, 0},
@@ -139,6 +140,7 @@ static const UNIX_Ctrls unix_args[UNIX_CTRLS_] =
- /* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000, 0},
/* UNIX_QUIET */ {"quiet", _ALL_ON_, 01000000000, 0},
+ /* UNIX_NO_PASS_EXPIRY */ {"no_pass_expiry", _ALL_ON_, 02000000000, 0},
/* UNIX_DES */ {"des", _ALL_ON_^(0260420000), 0, 1},
-+/* UNIX_NULLOK_SECURE */ {"nullok_secure", _ALL_ON_^(01000), 02000000000, 0},
++/* UNIX_NULLOK_SECURE */ {"nullok_secure", _ALL_ON_^(01000), 02000000000, 0},
};
#define UNIX_DEFAULTS (unix_args[UNIX__NONULL].flag)
-@@ -171,6 +173,8 @@ extern int _unix_read_password(pam_handle_t * pamh
- ,const char *prompt2
+@@ -172,6 +174,8 @@ extern int _unix_read_password(pam_handle_t * pamh
,const char *data_name
,const void **pass);
-+extern int _pammodutil_tty_secure(const pam_handle_t *pamh,
-+ const char *uttyname);
++extern int _pammodutil_tty_secure(const pam_handle_t *pamh, const char *uttyname);
++
extern int _unix_run_verify_binary(pam_handle_t *pamh,
unsigned int ctrl, const char *user, int *daysleft);
+ #endif /* _PAM_UNIX_SUPPORT_H */
--
-2.1.4
+2.4.0
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb
deleted file mode 100644
index 341ea2411..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb
+++ /dev/null
@@ -1,171 +0,0 @@
-SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
-DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
-HOMEPAGE = "https://fedorahosted.org/linux-pam/"
-BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
-SECTION = "base"
-# PAM is dual licensed under GPL and BSD.
-# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
-# libpam-runtime-1.0.1 is GPLv2+), by openembedded
-LICENSE = "GPLv2+ | BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3"
-
-SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
- file://99_pam \
- file://pam.d/common-account \
- file://pam.d/common-auth \
- file://pam.d/common-password \
- file://pam.d/common-session \
- file://pam.d/common-session-noninteractive \
- file://pam.d/other \
- file://libpam-xtests.patch \
- file://fixsepbuild.patch \
- file://pam-security-abstract-securetty-handling.patch \
- file://pam-unix-nullok-secure.patch \
- file://libpam-xtests-remove-bash-dependency.patch \
- file://crypt_configure.patch \
- "
-
-SRC_URI[md5sum] = "9dc53067556d2dd567808fd509519dd6"
-SRC_URI[sha256sum] = "342b1211c0d3b203a7df2540a5b03a428a087bd8a48c17e49ae268f992b334d9"
-
-SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch \
- file://use-utmpx.patch"
-
-SRC_URI_append_libc-musl = " file://pam-no-innetgr.patch \
- file://0001-Add-support-for-defining-missing-funcitonality.patch \
- file://include_paths_header.patch \
- "
-
-DEPENDS = "bison flex flex-native cracklib"
-
-EXTRA_OECONF = "--with-db-uniquename=_pam \
- --includedir=${includedir}/security \
- --libdir=${base_libdir} \
- --disable-nis \
- --disable-regenerate-docu \
- --disable-prelude"
-
-CFLAGS_append = " -fPIC "
-
-PR = "r5"
-
-S = "${WORKDIR}/Linux-PAM-${PV}"
-
-inherit autotools gettext pkgconfig
-
-PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
-
-PACKAGES += "${PN}-runtime ${PN}-xtests"
-FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
-FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
-FILES_${PN}-runtime = "${sysconfdir}"
-FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
-
-PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
-
-def get_multilib_bit(d):
- baselib = d.getVar('baselib', True) or ''
- return baselib.replace('lib', '')
-
-libpam_suffix = "suffix${@get_multilib_bit(d)}"
-
-RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
-RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
-
-RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \
- "
-RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-access-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
- ${MLPREFIX}pam-plugin-time-${libpam_suffix} \
- coreutils"
-
-# FIXME: Native suffix breaks here, disable it for now
-RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
-RRECOMMENDS_${PN}_class-native = ""
-
-python populate_packages_prepend () {
- def pam_plugin_append_file(pn, dir, file):
- nf = os.path.join(dir, file)
- of = d.getVar('FILES_' + pn, True)
- if of:
- nf = of + " " + nf
- d.setVar('FILES_' + pn, nf)
-
- def pam_plugin_hook(file, pkg, pattern, format, basename):
- pn = d.getVar('PN', True)
- libpam_suffix = d.getVar('libpam_suffix', True)
-
- rdeps = d.getVar('RDEPENDS_' + pkg, True)
- if rdeps:
- rdeps = rdeps + " " + pn + "-" + libpam_suffix
- else:
- rdeps = pn + "-" + libpam_suffix
- d.setVar('RDEPENDS_' + pkg, rdeps)
-
- provides = d.getVar('RPROVIDES_' + pkg, True)
- if provides:
- provides = provides + " " + pkg + "-" + libpam_suffix
- else:
- provides = pkg + "-" + libpam_suffix
- d.setVar('RPROVIDES_' + pkg, provides)
-
- mlprefix = d.getVar('MLPREFIX', True) or ''
- dvar = bb.data.expand('${WORKDIR}/package', d, True)
- pam_libdir = d.expand('${base_libdir}/security')
- pam_sbindir = d.expand('${sbindir}')
- pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
- pam_pkgname = mlprefix + 'pam-plugin%s'
-
- do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname,
- 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
- pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
- pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
- pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
- pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
- pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
- pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
- pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply')
- do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
-}
-
-do_install() {
- autotools_do_install
-
- # don't install /var/run when populating rootfs. Do it through volatile
- rm -rf ${D}${localstatedir}
- install -d ${D}${sysconfdir}/default/volatiles
- install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
-
- install -d ${D}${sysconfdir}/pam.d/
- install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
-
- # The lsb requires unix_chkpwd has setuid permission
- chmod 4755 ${D}${sbindir}/unix_chkpwd
-
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
- fi
-}
-
-python do_pam_sanity () {
- if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d):
- bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
-}
-addtask pam_sanity before do_configure
-
-BBCLASSEXTEND = "nativesdk native"
-
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
-CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
-CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb
new file mode 100644
index 000000000..bb5a4bd8d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/pam/libpam_1.3.0.bb
@@ -0,0 +1,169 @@
+SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
+DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
+HOMEPAGE = "https://fedorahosted.org/linux-pam/"
+BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
+SECTION = "base"
+# PAM is dual licensed under GPL and BSD.
+# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
+# libpam-runtime-1.0.1 is GPLv2+), by openembedded
+LICENSE = "GPLv2+ | BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3"
+
+SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
+ file://99_pam \
+ file://pam.d/common-account \
+ file://pam.d/common-auth \
+ file://pam.d/common-password \
+ file://pam.d/common-session \
+ file://pam.d/common-session-noninteractive \
+ file://pam.d/other \
+ file://libpam-xtests.patch \
+ file://fixsepbuild.patch \
+ file://pam-security-abstract-securetty-handling.patch \
+ file://pam-unix-nullok-secure.patch \
+ file://libpam-xtests-remove-bash-dependency.patch \
+ file://crypt_configure.patch \
+ "
+
+SRC_URI[md5sum] = "da4b2289b7cfb19583d54e9eaaef1c3a"
+SRC_URI[sha256sum] = "241aed1ef522f66ed672719ecf2205ec513fd0075ed80cda8e086a5b1a01d1bb"
+
+SRC_URI_append_libc-uclibc = " file://use-utmpx.patch"
+
+SRC_URI_append_libc-musl = " file://0001-Add-support-for-defining-missing-funcitonality.patch \
+ file://include_paths_header.patch \
+ "
+
+DEPENDS = "bison-native flex flex-native cracklib libxml2-native"
+
+EXTRA_OECONF = "--with-db-uniquename=_pam \
+ --includedir=${includedir}/security \
+ --libdir=${base_libdir} \
+ --disable-nis \
+ --disable-regenerate-docu \
+ --disable-prelude"
+
+CFLAGS_append = " -fPIC "
+
+PR = "r5"
+
+S = "${WORKDIR}/Linux-PAM-${PV}"
+
+inherit autotools gettext pkgconfig
+
+PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
+
+PACKAGES += "${PN}-runtime ${PN}-xtests"
+FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
+FILES_${PN}-runtime = "${sysconfdir}"
+FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
+
+PACKAGES_DYNAMIC += "^${MLPREFIX}pam-plugin-.*"
+
+def get_multilib_bit(d):
+ baselib = d.getVar('baselib', True) or ''
+ return baselib.replace('lib', '')
+
+libpam_suffix = "suffix${@get_multilib_bit(d)}"
+
+RPROVIDES_${PN} += "${PN}-${libpam_suffix}"
+RPROVIDES_${PN}-runtime += "${PN}-runtime-${libpam_suffix}"
+
+RDEPENDS_${PN}-runtime = "${PN}-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-deny-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-permit-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-warn-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-unix-${libpam_suffix} \
+ "
+RDEPENDS_${PN}-xtests = "${PN}-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-access-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-debug-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-cracklib-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-pwhistory-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-succeed-if-${libpam_suffix} \
+ ${MLPREFIX}pam-plugin-time-${libpam_suffix} \
+ coreutils"
+
+# FIXME: Native suffix breaks here, disable it for now
+RRECOMMENDS_${PN} = "${PN}-runtime-${libpam_suffix}"
+RRECOMMENDS_${PN}_class-native = ""
+
+python populate_packages_prepend () {
+ def pam_plugin_append_file(pn, dir, file):
+ nf = os.path.join(dir, file)
+ of = d.getVar('FILES_' + pn, True)
+ if of:
+ nf = of + " " + nf
+ d.setVar('FILES_' + pn, nf)
+
+ def pam_plugin_hook(file, pkg, pattern, format, basename):
+ pn = d.getVar('PN', True)
+ libpam_suffix = d.getVar('libpam_suffix', True)
+
+ rdeps = d.getVar('RDEPENDS_' + pkg, True)
+ if rdeps:
+ rdeps = rdeps + " " + pn + "-" + libpam_suffix
+ else:
+ rdeps = pn + "-" + libpam_suffix
+ d.setVar('RDEPENDS_' + pkg, rdeps)
+
+ provides = d.getVar('RPROVIDES_' + pkg, True)
+ if provides:
+ provides = provides + " " + pkg + "-" + libpam_suffix
+ else:
+ provides = pkg + "-" + libpam_suffix
+ d.setVar('RPROVIDES_' + pkg, provides)
+
+ mlprefix = d.getVar('MLPREFIX', True) or ''
+ dvar = bb.data.expand('${WORKDIR}/package', d, True)
+ pam_libdir = d.expand('${base_libdir}/security')
+ pam_sbindir = d.expand('${sbindir}')
+ pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
+ pam_pkgname = mlprefix + 'pam-plugin%s'
+
+ do_split_packages(d, pam_libdir, '^pam(.*)\.so$', pam_pkgname,
+ 'PAM plugin for %s', hook=pam_plugin_hook, extra_depends='')
+ pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
+ pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
+ pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
+ pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
+ pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
+ pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
+ pam_plugin_append_file('%spam-plugin-console' % mlprefix, pam_sbindir, 'pam_console_apply')
+ do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
+}
+
+do_install() {
+ autotools_do_install
+
+ # don't install /var/run when populating rootfs. Do it through volatile
+ rm -rf ${D}${localstatedir}
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
+
+ install -d ${D}${sysconfdir}/pam.d/
+ install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
+
+ # The lsb requires unix_chkpwd has setuid permission
+ chmod 4755 ${D}${sbindir}/unix_chkpwd
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
+ fi
+}
+
+python do_pam_sanity () {
+ if not bb.utils.contains('DISTRO_FEATURES', 'pam', True, False, d):
+ bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
+}
+addtask pam_sanity before do_configure
+
+BBCLASSEXTEND = "nativesdk native"
+
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-auth"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
+CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
+CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
index 80878f38b..7adbd0297 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/pax/pax/pax-3.4_fix_for_x32.patch
@@ -9,7 +9,7 @@ Date: Tue Dec 6 10:34:53 2011 -0800
size of off_t to see if file offset is 64bit. This patch adds
AC_CHECK_SIZEOF(off_t) and checks SIZEOF_OFF_T == 8.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/06
Index: pax-3.4/configure.in
===================================================================
diff --git a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.3.bb b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.3.bb
index 080be2bbc..9e97273c8 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/pigz/pigz_2.3.3.bb
@@ -1,6 +1,8 @@
require pigz.inc
LIC_FILES_CHKSUM = "file://pigz.c;beginline=7;endline=21;md5=a21d4075cb00ab4ca17fce5e7534ca95"
+UPSTREAM_CHECK_URI := "${SRC_URI}"
+SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.gz"
SRC_URI += "file://link-order.patch"
SRC_URI[md5sum] = "01d7a16cce77929cc1a78aa1bdfb68cb"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb b/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb
deleted file mode 100644
index c6dccc677..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb
+++ /dev/null
@@ -1,66 +0,0 @@
-SUMMARY = "System and process monitoring utilities"
-DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
-the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
-HOMEPAGE = "https://gitorious.org/procps"
-SECTION = "base"
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
- "
-
-DEPENDS = "ncurses"
-
-inherit autotools gettext pkgconfig update-alternatives
-
-SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
- file://sysctl.conf \
- "
-
-SRC_URI[md5sum] = "6cc5b94c1c5b8cbc89ad345a7b522f74"
-SRC_URI[sha256sum] = "e9493169a2d2adc0bc045538707310c8e877b385e4e296143b62607d2bb044ed"
-
-S = "${WORKDIR}/procps-ng-${PV}"
-
-EXTRA_OECONF = "--enable-skill --disable-modern-top"
-
-CPPFLAGS += "-I${S}"
-
-do_install_append () {
- install -d ${D}${base_bindir}
- [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
- install -d ${D}${base_sbindir}
- [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
- if [ "${base_sbindir}" != "${sbindir}" ]; then
- rmdir ${D}${sbindir}
- fi
-
- install -d ${D}${sysconfdir}
- install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${sysconfdir}/sysctl.d
- ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
- fi
-}
-
-CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
-
-bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
-base_bindir_progs += "kill pidof ps watch"
-base_sbindir_progs += "sysctl"
-
-ALTERNATIVE_PRIORITY = "200"
-
-ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
-
-ALTERNATIVE_${PN}-doc = "kill.1 uptime.1"
-ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
-ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
-
-python __anonymous() {
- for prog in d.getVar('base_bindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
-
- for prog in d.getVar('base_sbindir_progs', True).split():
- d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb b/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb
new file mode 100644
index 000000000..4ca1a5023
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/procps/procps_3.3.12.bb
@@ -0,0 +1,66 @@
+SUMMARY = "System and process monitoring utilities"
+DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
+the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
+HOMEPAGE = "https://gitorious.org/procps"
+SECTION = "base"
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
+ "
+
+DEPENDS = "ncurses"
+
+inherit autotools gettext pkgconfig update-alternatives
+
+SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
+ file://sysctl.conf \
+ "
+
+SRC_URI[md5sum] = "957e42e8b193490b2111252e4a2b443c"
+SRC_URI[sha256sum] = "6ed65ab86318f37904e8f9014415a098bec5bc53653e5d9ab404f95ca5e1a7d4"
+
+S = "${WORKDIR}/procps-ng-${PV}"
+
+EXTRA_OECONF = "--enable-skill --disable-modern-top"
+
+CPPFLAGS += "-I${S}"
+
+do_install_append () {
+ install -d ${D}${base_bindir}
+ [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
+ install -d ${D}${base_sbindir}
+ [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
+ if [ "${base_sbindir}" != "${sbindir}" ]; then
+ rmdir ${D}${sbindir}
+ fi
+
+ install -d ${D}${sysconfdir}
+ install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${sysconfdir}/sysctl.d
+ ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
+ fi
+}
+
+CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
+
+bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
+base_bindir_progs += "kill pidof ps watch"
+base_sbindir_progs += "sysctl"
+
+ALTERNATIVE_PRIORITY = "200"
+
+ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
+
+ALTERNATIVE_${PN}-doc = "kill.1 uptime.1"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
+ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
+
+python __anonymous() {
+ for prog in d.getVar('base_bindir_progs', True).split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
+
+ for prog in d.getVar('base_sbindir_progs', True).split():
+ d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc
index 68e06561f..98a84709a 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/psmisc/psmisc.inc
@@ -15,6 +15,9 @@ S = "${WORKDIR}/psmisc-${PV}"
inherit autotools gettext
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
ALLOW_EMPTY_${PN} = "1"
PACKAGES =+ "fuser fuser-doc killall killall-doc pstree pstree-doc"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
new file mode 100644
index 000000000..6fb2daf53
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch
@@ -0,0 +1,83 @@
+Upstream-Status: Backport
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From feca6d2e55d992bbe176ee8faa734c105eb1b2e1 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Tue, 29 Mar 2016 20:48:05 -0400
+Subject: [PATCH] Use NGROUPS_MAX instead of NGROUPS
+
+NGRROUPS_MAX is what is defined by SuSv3; NGROUPS is not guaranteed by
+any standard, but is just an ancient BSD'ism. Since Android's bionic
+libc has the former but not the latter, let's use NGROUPS_MAX instead.
+
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Jan Kara <jack@suse.cz>
+---
+ quota.c | 5 +++--
+ quotaops.c | 5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/quota.c b/quota.c
+index 049dac4..e195ead 100644
+--- a/quota.c
++++ b/quota.c
+@@ -48,6 +48,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <limits.h>
+ #ifdef RPC
+ #include <rpc/rpc.h>
+ #include "rquota.h"
+@@ -296,7 +297,7 @@ static int showquotas(int type, qid_t id, int mntcnt, char **mnt)
+ int main(int argc, char **argv)
+ {
+ int ngroups;
+- gid_t gidset[NGROUPS], *gidsetp;
++ gid_t gidset[NGROUPS_MAX], *gidsetp;
+ int i, ret;
+ struct option long_opts[] = {
+ { "help", 0, NULL, 'h' },
+@@ -405,7 +406,7 @@ int main(int argc, char **argv)
+ ret |= showquotas(USRQUOTA, getuid(), argc, argv);
+ if (flags & FL_GROUP) {
+ ngroups = sysconf(_SC_NGROUPS_MAX);
+- if (ngroups > NGROUPS) {
++ if (ngroups > NGROUPS_MAX) {
+ gidsetp = malloc(ngroups * sizeof(gid_t));
+ if (!gidsetp)
+ die(1, _("Gid set allocation (%d): %s\n"), ngroups, strerror(errno));
+diff --git a/quotaops.c b/quotaops.c
+index 136aec3..590dc1b 100644
+--- a/quotaops.c
++++ b/quotaops.c
+@@ -51,6 +51,7 @@
+ #include <unistd.h>
+ #include <time.h>
+ #include <ctype.h>
++#include <limits.h>
+
+ #if defined(RPC)
+ #include "rquota.h"
+@@ -97,7 +98,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
+ #if defined(BSD_BEHAVIOUR)
+ int j, ngroups;
+ uid_t euid;
+- gid_t gidset[NGROUPS], *gidsetp;
++ gid_t gidset[NGROUPS_MAX], *gidsetp;
+ #endif
+
+ for (i = 0; handles[i]; i++) {
+@@ -115,7 +116,7 @@ struct dquot *getprivs(qid_t id, struct quota_handle **handles, int quiet)
+ if (geteuid() == 0)
+ break;
+ ngroups = sysconf(_SC_NGROUPS_MAX);
+- if (ngroups > NGROUPS) {
++ if (ngroups > NGROUPS_MAX) {
+ gidsetp = malloc(ngroups * sizeof(gid_t));
+ if (!gidsetp) {
+ gid2group(id, name);
+--
+2.6.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
new file mode 100644
index 000000000..6cea548ed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch
@@ -0,0 +1,153 @@
+Upstream-Status: Backport
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From f30e1ada8326463cc0af048afa058bc2f1dc9370 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Tue, 29 Mar 2016 20:48:04 -0400
+Subject: [PATCH] Allow building on systems that do not have rpc header files
+
+Android's bionic C library doesn't have Sun RPC support.
+
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Jan Kara <jack@suse.cz>
+---
+ Makefile.am | 30 ++++++++++++++++--------------
+ quotaops.c | 2 ++
+ setquota.c | 2 ++
+ 3 files changed, 20 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 6d7ea0e..82db99f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,5 @@
+ ACLOCAL_AMFLAGS = -I m4
+
+-BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
+-
+ docdir = $(datadir)/doc/@PACKAGE@
+ doc_DATA = \
+ README.mailserver \
+@@ -12,11 +10,6 @@ doc_DATA = \
+ doc/quotas.preformated \
+ doc/quotas-1.eps
+
+-rpcsvcdir = $(includedir)/rpcsvc
+-rpcsvc_DATA = \
+- rquota.h \
+- rquota.x
+-
+ sysconf_DATA = \
+ warnquota.conf \
+ quotatab \
+@@ -35,15 +28,12 @@ man_MANS = \
+ quota.1 \
+ quot.8 \
+ repquota.8 \
+- rpc.rquotad.8 \
+ rquota.3 \
+ setquota.8 \
+ warnquota.conf.5 \
+ warnquota.8 \
+ xqmstats.8
+
+-CLEANFILES = rquota.c rquota.h rquota_clnt.c
+-
+ SUBDIRS = po
+
+ EXTRA_DIST = \
+@@ -55,9 +45,15 @@ EXTRA_DIST = \
+ Changelog \
+ ldap-scripts
+
+-noinst_LIBRARIES = \
+- libquota.a \
+- librpcclient.a
++noinst_LIBRARIES = libquota.a
++
++if WITH_RPC
++rpcsvcdir = $(includedir)/rpcsvc
++rpcsvc_DATA = \
++ rquota.h \
++ rquota.x
++
++noinst_LIBRARIES += librpcclient.a
+
+ librpcclient_a_SOURCES = \
+ rquota.c \
+@@ -67,8 +63,10 @@ librpcclient_a_SOURCES = \
+ rquota_clnt.c
+ librpcclient_a_CFLAGS = -Wno-unused
+
+-if WITH_RPC
+ RPCLIBS = librpcclient.a
++BUILT_SOURCES = rquota.h rquota.c rquota_clnt.c
++CLEANFILES = rquota.c rquota.h rquota_clnt.c
++man_MANS += rpc.rquotad.8
+ endif
+
+ libquota_a_SOURCES = \
+@@ -217,6 +215,7 @@ convertquota_LDADD = \
+ libquota.a \
+ $(RPCLIBS)
+
++if WITH_RPC
+ rpc_rquotad_SOURCES = \
+ rquota_server.c \
+ rquota_svc.c \
+@@ -225,6 +224,7 @@ rpc_rquotad_LDADD = \
+ libquota.a \
+ $(WRAP_LIBS) \
+ $(RPCLIBS)
++endif
+
+ quota_nld_SOURCES = quota_nld.c
+ quota_nld_CFLAGS = \
+@@ -236,6 +236,7 @@ quota_nld_LDADD = \
+ $(DBUS_LIBS) \
+ $(LIBNL3_LIBS)
+
++if WITH_RPC
+ # ------------------
+ # Rpcgen conversions
+ # ------------------
+@@ -250,6 +251,7 @@ quota_nld_LDADD = \
+ rquota_clnt.c: rquota.x
+ @rm -f $@
+ @$(RPCGEN) -l -o $@ $<
++endif
+
+ # --------
+ # Quotaoff
+diff --git a/quotaops.c b/quotaops.c
+index 47ef9a7..136aec3 100644
+--- a/quotaops.c
++++ b/quotaops.c
+@@ -34,7 +34,9 @@
+
+ #include "config.h"
+
++#if defined(RPC)
+ #include <rpc/rpc.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+diff --git a/setquota.c b/setquota.c
+index 51d7b3c..8ecd9c3 100644
+--- a/setquota.c
++++ b/setquota.c
+@@ -7,7 +7,9 @@
+
+ #include "config.h"
+
++#if defined(RPC)
+ #include <rpc/rpc.h>
++#endif
+ #include <sys/types.h>
+ #include <errno.h>
+ #include <stdio.h>
+--
+2.6.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
new file mode 100644
index 000000000..145538412
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch
@@ -0,0 +1,62 @@
+Upstream-Status: Backport
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From c7a76237e7a51a69d0236ebfc191e462f805cf4e Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Mon, 15 Feb 2016 14:42:14 +0100
+Subject: [PATCH] Don't build rpc.rquotad when --disable-rpc was requested.
+
+This fixes a buch of undefined references:
+
+x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe -D_GNU_SOURCE -Wa
+ll -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pie -Wl,-O1 -Wl,--hash-st
+yle=gnu -Wl,--sort-common -Wl,--as-needed -o rpc.rquotad rquota_server.o rquota_
+svc.o svc_socket.o libquota.a
+rquota_svc.o: In function `rquotaprog_2':
+rquota_svc.c:(.text+0x1d3): undefined reference to `xdr_setquota_rslt'
+rquota_svc.c:(.text+0x1da): undefined reference to `xdr_ext_setquota_args'
+rquota_svc.c:(.text+0x2b2): undefined reference to `xdr_setquota_rslt'
+rquota_svc.c:(.text+0x2b9): undefined reference to `xdr_ext_setquota_args'
+rquota_svc.c:(.text+0x2ff): undefined reference to `xdr_getquota_rslt'
+rquota_svc.c:(.text+0x306): undefined reference to `xdr_ext_getquota_args'
+rquota_svc.c:(.text+0x31a): undefined reference to `xdr_getquota_rslt'
+rquota_svc.c:(.text+0x321): undefined reference to `xdr_ext_getquota_args'
+rquota_svc.o: In function `rquotaprog_1':
+rquota_svc.c:(.text+0x3f3): undefined reference to `xdr_setquota_rslt'
+rquota_svc.c:(.text+0x3fa): undefined reference to `xdr_setquota_args'
+rquota_svc.c:(.text+0x4d2): undefined reference to `xdr_setquota_rslt'
+rquota_svc.c:(.text+0x4d9): undefined reference to `xdr_setquota_args'
+rquota_svc.c:(.text+0x51f): undefined reference to `xdr_getquota_rslt'
+rquota_svc.c:(.text+0x526): undefined reference to `xdr_getquota_args'
+rquota_svc.c:(.text+0x53a): undefined reference to `xdr_getquota_rslt'
+rquota_svc.c:(.text+0x541): undefined reference to `xdr_getquota_args'
+collect2: error: ld returned 1 exit status
+Makefile:901: recipe for target 'rpc.rquotad' failed
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+Signed-off-by: Jan Kara <jack@suse.cz>
+---
+ Makefile.am | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 77f8400..6d7ea0e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -116,8 +116,11 @@ sbin_PROGRAMS = \
+ xqmstats \
+ edquota \
+ setquota \
+- convertquota \
++ convertquota
++if WITH_RPC
++sbin_PROGRAMS += \
+ rpc.rquotad
++endif
+ if WITH_NETLINK
+ sbin_PROGRAMS += \
+ quota_nld
+--
+2.6.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
new file mode 100644
index 000000000..bdb4ceaad
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/0004-Fix-warnings-due-to-missing-stdlib.h.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Backport
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+From c4b56ee58b9b76d2598535cf6109a27b22e60abe Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Wed, 30 Mar 2016 10:21:13 +0200
+Subject: [PATCH] Fix warnings due to missing stdlib.h
+
+When compiling without RPC, we do not get stdlib.h automatically
+included via other includes and thus miss some function definitions.
+Include stdlib.h explicitely.
+
+Signed-off-by: Jan Kara <jack@suse.cz>
+---
+ quotaops.c | 1 +
+ setquota.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/quotaops.c b/quotaops.c
+index 590dc1b..56cf622 100644
+--- a/quotaops.c
++++ b/quotaops.c
+@@ -52,6 +52,7 @@
+ #include <time.h>
+ #include <ctype.h>
+ #include <limits.h>
++#include <stdlib.h>
+
+ #if defined(RPC)
+ #include "rquota.h"
+diff --git a/setquota.c b/setquota.c
+index 8ecd9c3..421631e 100644
+--- a/setquota.c
++++ b/setquota.c
+@@ -17,6 +17,7 @@
+ #include <getopt.h>
+ #include <time.h>
+ #include <ctype.h>
++#include <stdlib.h>
+
+ #if defined(RPC)
+ #include "rquota.h"
+--
+2.6.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/fcntl.patch b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/fcntl.patch
index 27e60fd07..2d3797132 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota/fcntl.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota/fcntl.patch
@@ -59,20 +59,6 @@ Index: quota-tools/dqblk_v2.h
#include <sys/types.h>
#include "quota_tree.h"
-Index: quota-tools/quotaops.c
-===================================================================
---- quota-tools.orig/quotaops.c
-+++ quota-tools/quotaops.c
-@@ -34,7 +34,9 @@
-
- #include "config.h"
-
-+#if defined(RPC)
- #include <rpc/rpc.h>
-+#endif
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/file.h>
Index: quota-tools/rquota_client.c
===================================================================
--- quota-tools.orig/rquota_client.c
@@ -97,17 +83,3 @@ Index: quota-tools/rquota_client.c
#include "common.h"
#include "quotaio.h"
#include "quotasys.h"
-Index: quota-tools/setquota.c
-===================================================================
---- quota-tools.orig/setquota.c
-+++ quota-tools/setquota.c
-@@ -7,7 +7,9 @@
-
- #include "config.h"
-
-+#if defined(RPC)
- #include <rpc/rpc.h>
-+#endif
- #include <sys/types.h>
- #include <errno.h>
- #include <stdio.h>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb b/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
index 4a980464b..22aab4147 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
@@ -12,6 +12,10 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV
file://0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch \
file://fcntl.patch \
file://remove_non_posix_types.patch \
+ file://0001-Use-NGROUPS_MAX-instead-of-NGROUPS.patch \
+ file://0002-Allow-building-on-systems-that-do-not-have-rpc-heade.patch \
+ file://0003-Don-t-build-rpc.rquotad-when-disable-rpc-was-request.patch \
+ file://0004-Fix-warnings-due-to-missing-stdlib.h.patch \
"
SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
@@ -25,8 +29,8 @@ DEPENDS = "gettext-native e2fsprogs libnl dbus"
inherit autotools-brokensep gettext pkgconfig
-CFLAGS += "-I${STAGING_INCDIR}/tirpc"
-LDFLAGS += "-ltirpc"
+CFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-I${STAGING_INCDIR}/tirpc', '', d)}"
+LDFLAGS += "${@bb.utils.contains('PACKAGECONFIG', 'rpc', '-ltirpc', '', d)}"
ASNEEDED = ""
PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch
deleted file mode 100644
index 4ac820fde..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Bug: 45713
-
-How to reproduce:
-Run this command inside screen
-$ printf '\x1b[10000000T'
-
-screen will recursively call MScrollV to depth n/256.
-This is time consuming and will overflow stack if n is huge.
-
-Fixes CVE-2015-6806
-
-Upstream-Status: Backport
-CVE: CVE-2015-6806
-
-Signed-off-by: Kuang-che Wu <kcwu@csie.org>
-Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur screen-4.3.1-orig/ansi.c screen-4.3.1/ansi.c
---- screen-4.3.1-orig/ansi.c 2015-06-29 00:22:55.000000000 +0300
-+++ screen-4.3.1/ansi.c 2015-10-06 13:13:58.297648039 +0300
-@@ -2502,13 +2502,13 @@
- return;
- if (n > 0)
- {
-+ if (ye - ys + 1 < n)
-+ n = ye - ys + 1;
- if (n > 256)
- {
- MScrollV(p, n - 256, ys, ye, bce);
- n = 256;
- }
-- if (ye - ys + 1 < n)
-- n = ye - ys + 1;
- #ifdef COPY_PASTE
- if (compacthist)
- {
-@@ -2562,15 +2562,15 @@
- }
- else
- {
-- if (n < -256)
-- {
-- MScrollV(p, n + 256, ys, ye, bce);
-- n = -256;
-- }
- n = -n;
- if (ye - ys + 1 < n)
- n = ye - ys + 1;
-
-+ if (n > 256)
-+ {
-+ MScrollV(p, - (n - 256), ys, ye, bce);
-+ n = 256;
-+ }
- ml = p->w_mlines + ye;
- /* Clear lines */
- for (i = ye; i > ye - n; i--, ml--)
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch
index 40ecef00b..fbdb0eb47 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/screen/screen/0001-fix-for-multijob-build.patch
@@ -1,3 +1,13 @@
+From 79ad2885e26631077dd6b8aebe17ae95b38133a6 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Tue, 26 Jul 2016 14:23:59 +0800
+Subject: [PATCH] fix for multijob build
+
+make sure that comm.sh script generates comm.h header before doing
+anything else
+
+Signed-off-by: Amadeusz Sawiski <amade@asmblr.net>
+
Upstream-Status: Backport
Backport patch to fix parallel build failure and update context to make patch
@@ -6,25 +16,13 @@ coulde be applied.
http://git.savannah.gnu.org/cgit/screen.git/commit?id=c0de6dd
Signed-off-by: Kai Kang <kai.kang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
-From c0de6dd7970b2c7b426a5c39dcbc31c2bef87232 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= <amade@asmblr.net>
-Date: Thu, 2 Jan 2014 18:18:06 +0100
-Subject: [PATCH] fix for multijob build
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-make sure that comm.sh script generates comm.h header before doing
-anything else
-
-Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
----
- Makefile.in | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ Makefile.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.in b/Makefile.in
-index ce86cbc..dea16d8 100644
+index aca7da3..3607711 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -298,7 +298,7 @@ search.o: layout.h viewport.h canvas.h search.c config.h screen.h os.h osdef.h a
@@ -51,8 +49,10 @@ index ce86cbc..dea16d8 100644
braille.h
-list_generic.o: list_generic.h list_generic.c layer.h screen.h osdef.h
-list_display.o: list_generic.h list_display.c layer.h screen.h osdef.h
--list_window.o: list_generic.h list_window.c window.h layer.h screen.h osdef.h
+list_generic.o: list_generic.h list_generic.c layer.h screen.h osdef.h comm.h
+list_display.o: list_generic.h list_display.c layer.h screen.h osdef.h comm.h
-+list_window.o: list_generic.h list_window.c window.h layer.h screen.h osdef.h comm.h
+ list_window.o: list_generic.h list_window.c window.h layer.h screen.h osdef.h comm.h
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.3.1.bb b/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.3.1.bb
deleted file mode 100644
index 00d878b2c..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.3.1.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "Multiplexing terminal manager"
-DESCRIPTION = "Screen is a full-screen window manager \
-that multiplexes a physical terminal between several \
-processes, typically interactive shells."
-HOMEPAGE = "http://www.gnu.org/software/screen/"
-BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
-
-SECTION = "console/utils"
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf"
-
-DEPENDS = "ncurses \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-RDEPENDS_${PN} = "base-files"
-
-SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \
- file://fix-parallel-make.patch \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://screen.pam', '', d)} \
- file://Remove-redundant-compiler-sanity-checks.patch \
- file://Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch \
- file://Skip-host-file-system-checks-when-cross-compiling.patch \
- file://Avoid-mis-identifying-systems-as-SVR4.patch \
- file://0001-fix-for-multijob-build.patch \
- file://0002-comm.h-now-depends-on-term.h.patch \
- file://0001-Fix-stack-overflow-due-to-too-deep-recursion.patch \
- "
-
-SRC_URI[md5sum] = "5bb3b0ff2674e29378c31ad3411170ad"
-SRC_URI[sha256sum] = "fa4049f8aee283de62e283d427f2cfd35d6c369b40f7f45f947dbfd915699d63"
-
-inherit autotools texinfo
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
-
-EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
-
-do_install_append () {
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
- install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
- fi
-}
-
-pkg_postinst_${PN} () {
- grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
-}
-
-pkg_postrm_${PN} () {
- printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.4.0.bb b/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.4.0.bb
new file mode 100644
index 000000000..769bac162
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/screen/screen_4.4.0.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Multiplexing terminal manager"
+DESCRIPTION = "Screen is a full-screen window manager \
+that multiplexes a physical terminal between several \
+processes, typically interactive shells."
+HOMEPAGE = "http://www.gnu.org/software/screen/"
+BUGTRACKER = "https://savannah.gnu.org/bugs/?func=additem&group=screen"
+
+SECTION = "console/utils"
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://screen.h;endline=26;md5=3971142989289a8198a544220703c2bf"
+
+DEPENDS = "ncurses \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} = "base-files"
+
+SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \
+ file://fix-parallel-make.patch \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://screen.pam', '', d)} \
+ file://Remove-redundant-compiler-sanity-checks.patch \
+ file://Provide-cross-compile-alternatives-for-AC_TRY_RUN.patch \
+ file://Skip-host-file-system-checks-when-cross-compiling.patch \
+ file://Avoid-mis-identifying-systems-as-SVR4.patch \
+ file://0002-comm.h-now-depends-on-term.h.patch \
+ file://0001-fix-for-multijob-build.patch \
+ "
+
+SRC_URI[md5sum] = "d26e11a3648c2b11aaefa215a55dfd39"
+SRC_URI[sha256sum] = "ef722a54759a3bf23aad272bbf33c414c1078cad6bcd982fada93c0d7917218b"
+
+inherit autotools texinfo
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[utempter] = "ac_cv_header_utempter_h=yes,ac_cv_header_utempter_h=no,libutempter,"
+
+EXTRA_OECONF = "--with-pty-mode=0620 --with-pty-group=5 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)}"
+
+do_install_append () {
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ install -D -m 644 ${WORKDIR}/screen.pam ${D}/${sysconfdir}/pam.d/screen
+ fi
+}
+
+pkg_postinst_${PN} () {
+ grep -q "^${bindir}/screen$" $D${sysconfdir}/shells || echo ${bindir}/screen >> $D${sysconfdir}/shells
+}
+
+pkg_postrm_${PN} () {
+ printf "$(grep -v "^${bindir}/screen$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch
index 80594068a..c7c0aa015 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch
@@ -6,7 +6,7 @@ Avoid this build issue:
| make[1]: mkdir_p@: Command not found
| make[1]: *** [install-data-yes] Error 127
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/07/13
Index: sed-4.1.2/intl/Makefile.in
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch b/import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch
index 105e8b745..0293900fb 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/sed/sed-4.2.2/sed-add-ptest.patch
@@ -54,7 +54,7 @@ index d80e72c..b05f01e 100644
# dummy targets for $(TESTS) so that make does not complain.
+install-ptest:
-+ cd $(BUILDDIR); tar -cf - $(TESTDIR) --exclude *.o | ( cd $(DESTDIR) && tar -xf - )
++ cd $(BUILDDIR); tar -c --exclude=*.o $(TESTDIR) | ( cd $(DESTDIR) && tar -xf - )
+ for i in $(EXTRA_DIST) tst-regex2.c; do install $(srcdir)/$$i $(DESTDIR)/$(TESTDIR); done
+ sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/bash/sh/' -i $(DESTDIR)/$(TESTDIR)/Makefile
+ for i in `grep -rl "../sed/sed" $(DESTDIR)/$(TESTDIR)`; do sed -e 's/..\/sed\/sed/sed/' -i $$i; done
diff --git a/import-layers/yocto-poky/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch b/import-layers/yocto-poky/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch
new file mode 100644
index 000000000..1af04d5fe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/shadow/files/shadow-relaxed-usernames.patch
@@ -0,0 +1,100 @@
+
+The groupadd from shadow does not allow upper case group names, the
+same is true for the upstream shadow. But distributions like
+Debian/Ubuntu/CentOS has their own way to cope with this problem,
+this patch is picked up from CentOS release 7.0 to relax the usernames
+restrictions to allow the upper case group names, and the relaxation is
+POSIX compliant because POSIX indicate that usernames are composed of
+characters from the portable filename character set [A-Za-z0-9._-].
+
+Upstream-Status: Pending
+
+Signed-off-by: Shan Hai <shan.hai@windriver.com>
+
+diff -urpN a/libmisc/chkname.c b/libmisc/chkname.c
+index 5089112..f40a0da 100644
+--- a/libmisc/chkname.c
++++ b/libmisc/chkname.c
+@@ -49,21 +49,28 @@
+ static bool is_valid_name (const char *name)
+ {
+ /*
+- * User/group names must match [a-z_][a-z0-9_-]*[$]
+- */
+- if (('\0' == *name) ||
+- !((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) {
++ * User/group names must match gnu e-regex:
++ * [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?
++ *
++ * as a non-POSIX, extension, allow "$" as the last char for
++ * sake of Samba 3.x "add machine script"
++ */
++ if ( ('\0' == *name) ||
++ !((*name >= 'a' && *name <= 'z') ||
++ (*name >= 'A' && *name <= 'Z') ||
++ (*name >= '0' && *name <= '9') ||
++ (*name == '_') || (*name == '.')
++ )) {
+ return false;
+ }
+
+ while ('\0' != *++name) {
+- if (!(( ('a' <= *name) && ('z' >= *name) ) ||
+- ( ('0' <= *name) && ('9' >= *name) ) ||
+- ('_' == *name) ||
+- ('-' == *name) ||
+- ('.' == *name) ||
+- ( ('$' == *name) && ('\0' == *(name + 1)) )
+- )) {
++ if (!( (*name >= 'a' && *name <= 'z') ||
++ (*name >= 'A' && *name <= 'Z') ||
++ (*name >= '0' && *name <= '9') ||
++ (*name == '_') || (*name == '.') || (*name == '-') ||
++ (*name == '$' && *(name + 1) == '\0')
++ )) {
+ return false;
+ }
+ }
+diff -urpN a/man/groupadd.8.xml b/man/groupadd.8.xml
+index 230fd0c..94f7807 100644
+--- a/man/groupadd.8.xml
++++ b/man/groupadd.8.xml
+@@ -222,12 +222,6 @@
+ <refsect1 id='caveats'>
+ <title>CAVEATS</title>
+ <para>
+- Groupnames must start with a lower case letter or an underscore,
+- followed by lower case letters, digits, underscores, or dashes.
+- They can end with a dollar sign.
+- In regular expression terms: [a-z_][a-z0-9_-]*[$]?
+- </para>
+- <para>
+ Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long.
+ </para>
+ <para>
+diff -urpN a/man/useradd.8.xml b/man/useradd.8.xml
+index 5dec989..fe623b9 100644
+--- a/man/useradd.8.xml
++++ b/man/useradd.8.xml
+@@ -336,7 +336,7 @@
+ </term>
+ <listitem>
+ <para>
+- Do no create the user's home directory, even if the system
++ Do not create the user's home directory, even if the system
+ wide setting from <filename>/etc/login.defs</filename>
+ (<option>CREATE_HOME</option>) is set to
+ <replaceable>yes</replaceable>.
+@@ -607,12 +607,6 @@
+ </para>
+
+ <para>
+- Usernames must start with a lower case letter or an underscore,
+- followed by lower case letters, digits, underscores, or dashes.
+- They can end with a dollar sign.
+- In regular expression terms: [a-z_][a-z0-9_-]*[$]?
+- </para>
+- <para>
+ Usernames may only be up to 32 characters long.
+ </para>
+ </refsect1>
diff --git a/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb b/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
index 697569c47..ef014628f 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
@@ -21,12 +21,10 @@ S = "${WORKDIR}"
do_install() {
install -d ${D}${sysconfdir}
- install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
+ install -p -m 644 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
}
-sysroot_stage_all() {
- sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
-}
+SYSROOT_DIRS += "${sysconfdir}"
# don't create any packages
# otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot
diff --git a/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc b/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc
index d024b01dc..35a18f8ab 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/shadow/shadow.inc
@@ -22,6 +22,7 @@ SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
SRC_URI_append_class-target = " \
file://login_defs_pam.sed \
file://shadow-update-pam-conf.patch \
+ file://shadow-relaxed-usernames.patch \
"
SRC_URI_append_class-native = " \
@@ -179,10 +180,11 @@ ALTERNATIVE_${PN}-base = "newgrp groups login su"
ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su"
-ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3 groups.1"
+ALTERNATIVE_${PN}-doc = "passwd.5 getspnam.3 groups.1 su.1"
ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
+ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1"
pkg_postinst_${PN} () {
if [ "x$D" != "x" ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch b/import-layers/yocto-poky/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch
deleted file mode 100644
index 2ea1ffda5..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/change-char-type-to-signed-char-in-macros.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-slang: change char type to signed char in macros
-
-C language has 3 distinct char types:
- char
- unsigned char
- signed char
-A char has the same range of values as signed char on X86,
-but same as unsigned char on ARM which made Slang's typecast()
-and array_sort() unable to work for char value on ARM, since
-Slang is assuming "char" as "signed char".
-
-Now we change "char" as "signed char" explicitly in
-util/mkslarith2.sl, and use it to regenerate src/slarith2.inc
-
-Upstream-Status: Submitted
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- src/slarith2.inc | 72 ++++++++++++++++++++++++-------------------------
- src/util/mkslarith2.sl | 2 -
- 2 files changed, 37 insertions(+), 37 deletions(-)
-
---- a/src/util/mkslarith2.sl
-+++ b/src/util/mkslarith2.sl
-@@ -1,7 +1,7 @@
- #!/usr/bin/env slsh
-
- private variable CTypes =
-- ["char", "unsigned char", "short", "unsigned short", "int", "unsigned int",
-+ ["signed char", "unsigned char", "short", "unsigned short", "int", "unsigned int",
- "long", "unsigned long", "long long", "unsigned long long",
- "float", "double", "long double"];
- private variable Is_Int_Type =
---- a/src/slarith2.inc
-+++ b/src/slarith2.inc
-@@ -1,43 +1,43 @@
- /* DO NOT EDIT -- this file was generated by src/util/mkslarith2.sl */
--/* ------------ char ---------- */
--DEFUN_1(copy_char_to_char,char,char)
-+/* ------------ signed char ---------- */
-+DEFUN_1(copy_char_to_char,signed char,signed char)
- #define char_to_char NULL
- #define copy_char_to_uchar copy_char_to_char
- #define char_to_uchar NULL
--DEFUN_1(copy_char_to_short,char,short)
-+DEFUN_1(copy_char_to_short,signed char,short)
- #define char_to_short NULL
--DEFUN_1(copy_char_to_ushort,char,unsigned short)
-+DEFUN_1(copy_char_to_ushort,signed char,unsigned short)
- #define char_to_ushort NULL
--DEFUN_1(copy_char_to_int,char,int)
--DEFUN_2(char_to_int,char,int,copy_char_to_int)
--DEFUN_1(copy_char_to_uint,char,unsigned int)
--DEFUN_2(char_to_uint,char,unsigned int,copy_char_to_uint)
--DEFUN_1(copy_char_to_long,char,long)
--DEFUN_2(char_to_long,char,long,copy_char_to_long)
--DEFUN_1(copy_char_to_ulong,char,unsigned long)
--DEFUN_2(char_to_ulong,char,unsigned long,copy_char_to_ulong)
-+DEFUN_1(copy_char_to_int,signed char,int)
-+DEFUN_2(char_to_int,signed char,int,copy_char_to_int)
-+DEFUN_1(copy_char_to_uint,signed char,unsigned int)
-+DEFUN_2(char_to_uint,signed char,unsigned int,copy_char_to_uint)
-+DEFUN_1(copy_char_to_long,signed char,long)
-+DEFUN_2(char_to_long,signed char,long,copy_char_to_long)
-+DEFUN_1(copy_char_to_ulong,signed char,unsigned long)
-+DEFUN_2(char_to_ulong,signed char,unsigned long,copy_char_to_ulong)
- #if defined(HAVE_LONG_LONG)
--DEFUN_1(copy_char_to_llong,char,long long)
--DEFUN_2(char_to_llong,char,long long,copy_char_to_llong)
-+DEFUN_1(copy_char_to_llong,signed char,long long)
-+DEFUN_2(char_to_llong,signed char,long long,copy_char_to_llong)
- #endif /* defined(HAVE_LONG_LONG) */
- #if defined(HAVE_LONG_LONG)
--DEFUN_1(copy_char_to_ullong,char,unsigned long long)
--DEFUN_2(char_to_ullong,char,unsigned long long,copy_char_to_ullong)
-+DEFUN_1(copy_char_to_ullong,signed char,unsigned long long)
-+DEFUN_2(char_to_ullong,signed char,unsigned long long,copy_char_to_ullong)
- #endif /* defined(HAVE_LONG_LONG) */
- #if SLANG_HAS_FLOAT
--DEFUN_1(copy_char_to_float,char,float)
--DEFUN_2(char_to_float,char,float,copy_char_to_float)
-+DEFUN_1(copy_char_to_float,signed char,float)
-+DEFUN_2(char_to_float,signed char,float,copy_char_to_float)
- #endif /* SLANG_HAS_FLOAT */
- #if SLANG_HAS_FLOAT
--DEFUN_1(copy_char_to_double,char,double)
--DEFUN_2(char_to_double,char,double,copy_char_to_double)
-+DEFUN_1(copy_char_to_double,signed char,double)
-+DEFUN_2(char_to_double,signed char,double,copy_char_to_double)
- #endif /* SLANG_HAS_FLOAT */
- #if defined(HAVE_LONG_DOUBLE)
--DEFUN_1(copy_char_to_ldouble,char,long double)
--DEFUN_2(char_to_ldouble,char,long double,copy_char_to_ldouble)
-+DEFUN_1(copy_char_to_ldouble,signed char,long double)
-+DEFUN_2(char_to_ldouble,signed char,long double,copy_char_to_ldouble)
- #endif /* defined(HAVE_LONG_DOUBLE) */
- #if SLANG_HAS_FLOAT
--TO_DOUBLE_FUN(char_to_one_double,char)
-+TO_DOUBLE_FUN(char_to_one_double,signed char)
- #endif
-
- /* ------------ unsigned char ---------- */
-@@ -82,7 +82,7 @@ TO_DOUBLE_FUN(uchar_to_one_double,unsign
- #endif
-
- /* ------------ short ---------- */
--DEFUN_1(copy_short_to_char,short,char)
-+DEFUN_1(copy_short_to_char,short,signed char)
- #define short_to_char NULL
- DEFUN_1(copy_short_to_uchar,short,unsigned char)
- #define short_to_uchar NULL
-@@ -123,7 +123,7 @@ TO_DOUBLE_FUN(short_to_one_double,short)
- #endif
-
- /* ------------ unsigned short ---------- */
--DEFUN_1(copy_ushort_to_char,unsigned short,char)
-+DEFUN_1(copy_ushort_to_char,unsigned short,signed char)
- #define ushort_to_char NULL
- DEFUN_1(copy_ushort_to_uchar,unsigned short,unsigned char)
- #define ushort_to_uchar NULL
-@@ -164,7 +164,7 @@ TO_DOUBLE_FUN(ushort_to_one_double,unsig
- #endif
-
- /* ------------ int ---------- */
--DEFUN_1(copy_int_to_char,int,char)
-+DEFUN_1(copy_int_to_char,int,signed char)
- #define int_to_char NULL
- DEFUN_1(copy_int_to_uchar,int,unsigned char)
- #define int_to_uchar NULL
-@@ -205,7 +205,7 @@ TO_DOUBLE_FUN(int_to_one_double,int)
- #endif
-
- /* ------------ unsigned int ---------- */
--DEFUN_1(copy_uint_to_char,unsigned int,char)
-+DEFUN_1(copy_uint_to_char,unsigned int,signed char)
- #define uint_to_char NULL
- DEFUN_1(copy_uint_to_uchar,unsigned int,unsigned char)
- #define uint_to_uchar NULL
-@@ -246,7 +246,7 @@ TO_DOUBLE_FUN(uint_to_one_double,unsigne
- #endif
-
- /* ------------ long ---------- */
--DEFUN_1(copy_long_to_char,long,char)
-+DEFUN_1(copy_long_to_char,long,signed char)
- #define long_to_char NULL
- DEFUN_1(copy_long_to_uchar,long,unsigned char)
- #define long_to_uchar NULL
-@@ -287,7 +287,7 @@ TO_DOUBLE_FUN(long_to_one_double,long)
- #endif
-
- /* ------------ unsigned long ---------- */
--DEFUN_1(copy_ulong_to_char,unsigned long,char)
-+DEFUN_1(copy_ulong_to_char,unsigned long,signed char)
- #define ulong_to_char NULL
- DEFUN_1(copy_ulong_to_uchar,unsigned long,unsigned char)
- #define ulong_to_uchar NULL
-@@ -329,7 +329,7 @@ TO_DOUBLE_FUN(ulong_to_one_double,unsign
-
- /* ------------ long long ---------- */
- #if defined(HAVE_LONG_LONG)
--DEFUN_1(copy_llong_to_char,long long,char)
-+DEFUN_1(copy_llong_to_char,long long,signed char)
- #define llong_to_char NULL
- DEFUN_1(copy_llong_to_uchar,long long,unsigned char)
- #define llong_to_uchar NULL
-@@ -372,7 +372,7 @@ TO_DOUBLE_FUN(llong_to_one_double,long l
-
- /* ------------ unsigned long long ---------- */
- #if defined(HAVE_LONG_LONG)
--DEFUN_1(copy_ullong_to_char,unsigned long long,char)
-+DEFUN_1(copy_ullong_to_char,unsigned long long,signed char)
- #define ullong_to_char NULL
- DEFUN_1(copy_ullong_to_uchar,unsigned long long,unsigned char)
- #define ullong_to_uchar NULL
-@@ -415,7 +415,7 @@ TO_DOUBLE_FUN(ullong_to_one_double,unsig
-
- /* ------------ float ---------- */
- #if SLANG_HAS_FLOAT
--DEFUN_1(copy_float_to_char,float,char)
-+DEFUN_1(copy_float_to_char,float,signed char)
- #define float_to_char NULL
- DEFUN_1(copy_float_to_uchar,float,unsigned char)
- #define float_to_uchar NULL
-@@ -458,7 +458,7 @@ TO_DOUBLE_FUN(float_to_one_double,float)
-
- /* ------------ double ---------- */
- #if SLANG_HAS_FLOAT
--DEFUN_1(copy_double_to_char,double,char)
-+DEFUN_1(copy_double_to_char,double,signed char)
- #define double_to_char NULL
- DEFUN_1(copy_double_to_uchar,double,unsigned char)
- #define double_to_uchar NULL
-@@ -501,7 +501,7 @@ TO_DOUBLE_FUN(double_to_one_double,doubl
-
- /* ------------ long double ---------- */
- #if defined(HAVE_LONG_DOUBLE)
--DEFUN_1(copy_ldouble_to_char,long double,char)
-+DEFUN_1(copy_ldouble_to_char,long double,signed char)
- #define ldouble_to_char NULL
- DEFUN_1(copy_ldouble_to_uchar,long double,unsigned char)
- #define ldouble_to_uchar NULL
-@@ -545,7 +545,7 @@ TO_DOUBLE_FUN(ldouble_to_one_double,long
- #if SLANG_HAS_FLOAT
- static To_Double_Fun_Table_Type To_Double_Fun_Table [MAX_ARITHMETIC_TYPES] =
- {
-- {sizeof(char), char_to_one_double},
-+ {sizeof(signed char), char_to_one_double},
- {sizeof(unsigned char), uchar_to_one_double},
- {sizeof(short), short_to_one_double},
- {sizeof(unsigned short), ushort_to_one_double},
-@@ -583,7 +583,7 @@ static To_Double_Fun_Table_Type To_Doubl
-
- static Binary_Matrix_Type Binary_Matrix [MAX_ARITHMETIC_TYPES][MAX_ARITHMETIC_TYPES] =
- {
-- /* char */
-+ /* signed char */
- {
- {(FVOID_STAR)copy_char_to_char, char_to_char},
- {(FVOID_STAR)copy_char_to_uchar, char_to_uchar},
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/fix-check-pcre.patch b/import-layers/yocto-poky/meta/recipes-extended/slang/slang/fix-check-pcre.patch
index 0c1553a66..a0ec0ff65 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/fix-check-pcre.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/slang/slang/fix-check-pcre.patch
@@ -11,14 +11,13 @@ this off.
Upstream-Status: Inappropriate
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
- configure | 60 ++++++------------------------------------------------------
- 1 files changed, 6 insertions(+), 54 deletions(-)
+ configure | 72 +++++---------------------------------------------------------
+ 1 file changed, 6 insertions(+), 66 deletions(-)
diff --git a/configure b/configure
-index f1586c3..d22814f 100755
--- a/configure
+++ b/configure
-@@ -6991,6 +6991,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
+@@ -7191,6 +7191,7 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
/usr/include/pcre,/usr/lib \
/usr/pcre/include,/usr/pcre/lib \
/usr/include,/usr/lib \
@@ -26,7 +25,7 @@ index f1586c3..d22814f 100755
/opt/include/pcre,/opt/lib \
/opt/pcre/include,/opt/pcre/lib \
/opt/include,/opt/lib"
-@@ -7021,14 +7022,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
+@@ -7221,14 +7222,14 @@ $as_echo_n "checking for the pcre library and header files ... " >&6; }
xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
found=0
@@ -45,7 +44,7 @@ index f1586c3..d22814f 100755
jd_with_pcre_library="yes"
found=1
break
-@@ -7054,56 +7055,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; }
+@@ -7255,68 +7255,7 @@ $as_echo "yes: $jd_pcre_library_dir and $jd_pcre_include_dir" >&6; }
then
PCRE_LIB=""
else
@@ -74,7 +73,7 @@ index f1586c3..d22814f 100755
- fi
- fi
- ;;
-- *osf*|*openbsd*)
+- *osf*|*openbsd*|*freebsd*)
- if test "X$GCC" = Xyes
- then
- RPATH="-Wl,-rpath,"
@@ -95,7 +94,19 @@ index f1586c3..d22814f 100755
- RPATH="$RPATH$jd_pcre_library_dir"
- fi
- else
-- RPATH="$RPATH:$jd_pcre_library_dir"
+- _already_there=0
+- for X in `echo $RPATH | sed 's/:/ /g'`
+- do
+- if test "$X" = "$jd_pcre_library_dir"
+- then
+- _already_there=1
+- break
+- fi
+- done
+- if test $_already_there = 0
+- then
+- RPATH="$RPATH:$jd_pcre_library_dir"
+- fi
- fi
-fi
-
@@ -103,6 +114,3 @@ index f1586c3..d22814f 100755
fi
PCRE_INC=-I$jd_pcre_include_dir
---
-1.7.4.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/rpathfix.patch b/import-layers/yocto-poky/meta/recipes-extended/slang/slang/rpathfix.patch
index 50cac9264..f82a5313d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/rpathfix.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/slang/slang/rpathfix.patch
@@ -10,7 +10,7 @@ Index: slang-2.2.4/configure
===================================================================
--- slang-2.2.4.orig/configure 2012-03-14 23:40:01.283560679 +0000
+++ slang-2.2.4/configure 2012-03-14 23:41:18.023558900 +0000
-@@ -6081,56 +6081,7 @@
+@@ -6246,68 +6246,7 @@ esac
ELF_CFLAGS="$ELF_CFLAGS $IEEE_CFLAGS"
CFLAGS="$CFLAGS $IEEE_CFLAGS"
@@ -39,7 +39,7 @@ Index: slang-2.2.4/configure
- fi
- fi
- ;;
-- *osf*|*openbsd*)
+- *osf*|*openbsd*|*freebsd*)
- if test "X$GCC" = Xyes
- then
- RPATH="-Wl,-rpath,"
@@ -60,7 +60,19 @@ Index: slang-2.2.4/configure
- RPATH="$RPATH$libdir"
- fi
- else
-- RPATH="$RPATH:$libdir"
+- _already_there=0
+- for X in `echo $RPATH | sed 's/:/ /g'`
+- do
+- if test "$X" = "$libdir"
+- then
+- _already_there=1
+- break
+- fi
+- done
+- if test $_already_there = 0
+- then
+- RPATH="$RPATH:$libdir"
+- fi
- fi
-fi
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch b/import-layers/yocto-poky/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
index 958fe983c..850551ef0 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/slang/slang/slang-fix-the-iconv-existence-checking.patch
@@ -19,14 +19,14 @@ Upstream-Status: Inappropriate
Signed-off-by: Zheng Junling <zhengjunling@huawei.com>
---
- configure | 60 ++++++------------------------------------------------------
- 1 file changed, 6 insertions(+), 54 deletions(-)
+ configure | 72 +++++---------------------------------------------------------
+ 1 file changed, 6 insertions(+), 66 deletions(-)
diff --git a/configure b/configure
-index 7a96256..91632f3 100755
+index fa395ff..7fa769c 100755
--- a/configure
+++ b/configure
-@@ -7909,6 +7909,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
+@@ -8259,6 +8259,7 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
/usr/include/iconv,/usr/lib \
/usr/iconv/include,/usr/iconv/lib \
/usr/include,/usr/lib \
@@ -34,7 +34,7 @@ index 7a96256..91632f3 100755
/opt/include/iconv,/opt/lib \
/opt/iconv/include,/opt/iconv/lib \
/opt/include,/opt/lib"
-@@ -7939,14 +7940,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
+@@ -8289,14 +8290,14 @@ $as_echo_n "checking for the iconv library and header files ... " >&6; }
xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $1}'`
xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print $2}'`
found=0
@@ -53,7 +53,7 @@ index 7a96256..91632f3 100755
jd_with_iconv_library="yes"
found=1
break
-@@ -7972,56 +7973,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; }
+@@ -8201,68 +8201,7 @@ $as_echo "yes: $jd_iconv_library_dir and $jd_iconv_include_dir" >&6; }
then
ICONV_LIB=""
else
@@ -82,7 +82,7 @@ index 7a96256..91632f3 100755
- fi
- fi
- ;;
-- *osf*|*openbsd*)
+- *osf*|*openbsd*|*freebsd*)
- if test "X$GCC" = Xyes
- then
- RPATH="-Wl,-rpath,"
@@ -103,7 +103,19 @@ index 7a96256..91632f3 100755
- RPATH="$RPATH$jd_iconv_library_dir"
- fi
- else
-- RPATH="$RPATH:$jd_iconv_library_dir"
+- _already_there=0
+- for X in `echo $RPATH | sed 's/:/ /g'`
+- do
+- if test "$X" = "$jd_iconv_library_dir"
+- then
+- _already_there=1
+- break
+- fi
+- done
+- if test $_already_there = 0
+- then
+- RPATH="$RPATH:$jd_iconv_library_dir"
+- fi
- fi
-fi
-
@@ -111,6 +123,3 @@ index 7a96256..91632f3 100755
fi
ICONV_INC=-I$jd_iconv_include_dir
---
-1.8.3.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch b/import-layers/yocto-poky/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch
deleted file mode 100644
index 420001b08..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/slang/slang/sprintf-bug-concerning-8-bit-characters.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Upstream-Status: Backport
-
-From 3a05d1a920140e9f2c72791c12f664213feb46df Mon Sep 17 00:00:00 2001
-From: Manfred Hanke <Manfred.Hanke@tngtech.com>
-Date: Thu, 20 Jun 2013 10:24:12 +0200
-Subject: [PATCH] sprintf bug (concerning %c for 8-bit character in non-UTF8
- mode) fixed
-
-char *str points to SLuchar_Type utf8_buf[], which had too small scope
-
-src/test/strops.sl failed in the following environment:
- - compiler: gcc (Debian 4.7.2-5) 4.7.2
- - CFLAGS: -g -O2
- - libc: GNU C Library (Debian EGLIBC 2.13-38) stable release version 2.13
- - kernel: 3.2.0-4-686-pae #1 SMP Debian 3.2.39-2 i686 GNU/Linux
----
- src/slstrops.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/slstrops.c b/src/slstrops.c
-index ce6acb0..cbbbb01 100644
---- a/src/slstrops.c
-+++ b/src/slstrops.c
-@@ -1884,6 +1884,7 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/
- #endif
- unsigned char uch;
- int use_long = 0, use_alt_format = 0;
-+ SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1];
-
- while (1)
- {
-@@ -2071,7 +2072,6 @@ static char *SLdo_sprintf (char *fmt) /*{{{*/
- #endif
- {
- SLwchar_Type wc;
-- SLuchar_Type utf8_buf[SLUTF8_MAX_MBLEN+1];
-
- if (-1 == SLang_pop_wchar (&wc))
- return out;
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb b/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb
deleted file mode 100644
index 237e9f252..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "The shared library for the S-Lang extension language"
-
-DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \
-S-Lang language was designed so that it can be easily embedded into \
-a program to provide the program with a powerful extension language. \
-The S-Lang library, provided in this package, provides the S-Lang \
-extension language. S-Lang's syntax resembles C, which makes it easy \
-to recode S-Lang procedures in C if you need to."
-
-HOMEPAGE = "http://www.jedsoft.org/slang/"
-SECTION = "libs"
-DEPENDS = "pcre ncurses"
-PR = "r12"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
-
-
-SRC_URI = "http://www.jedsoft.org/releases/slang/old/slang-${PV}.tar.bz2 \
- file://rpathfix.patch \
- file://fix-check-pcre.patch \
- file://change-char-type-to-signed-char-in-macros.patch \
- file://sprintf-bug-concerning-8-bit-characters.patch \
- file://slang-fix-the-iconv-existence-checking.patch \
- file://0001-Fix-error-conflicting-types-for-posix_close.patch \
- "
-UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
-
-inherit autotools-brokensep
-
-CLEANBROKEN = "1"
-
-SRC_URI[md5sum] = "7fcfd447e378f07dd0c0bae671fe6487"
-SRC_URI[sha256sum] = "9a8257a9a2a55099af858b13338dc8f3a06dd2069f46f0df2c9c3bb84a01d5db"
-
-EXTRA_OECONF += " --without-z --without-png --without-onig --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib"
-
-do_configure_prepend() {
- # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
- # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
- # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
- cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* .
- cd ${B}
-}
-
-do_install() {
- oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib'
-}
-
-FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
-
-PARALLEL_MAKE = ""
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.0.bb b/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.0.bb
new file mode 100644
index 000000000..17efbbe22
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/slang/slang_2.3.0.bb
@@ -0,0 +1,51 @@
+SUMMARY = "The shared library for the S-Lang extension language"
+
+DESCRIPTION = "S-Lang is an interpreted language and a programming library. The \
+S-Lang language was designed so that it can be easily embedded into \
+a program to provide the program with a powerful extension language. \
+The S-Lang library, provided in this package, provides the S-Lang \
+extension language. S-Lang's syntax resembles C, which makes it easy \
+to recode S-Lang procedures in C if you need to."
+
+HOMEPAGE = "http://www.jedsoft.org/slang/"
+SECTION = "libs"
+DEPENDS = "pcre ncurses"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
+
+
+SRC_URI = "http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
+ file://rpathfix.patch \
+ file://fix-check-pcre.patch \
+ file://slang-fix-the-iconv-existence-checking.patch \
+ file://0001-Fix-error-conflicting-types-for-posix_close.patch \
+ "
+UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
+
+inherit autotools-brokensep
+
+CLEANBROKEN = "1"
+
+SRC_URI[md5sum] = "3bcc790460d52db1316c20395b7ac2f1"
+SRC_URI[sha256sum] = "f95224060f45e0d8212a5039b339afa5f1a94a1bb0298e796104e5b12e926129"
+
+EXTRA_OECONF += " --without-z --without-png --without-onig --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib"
+
+do_configure_prepend() {
+ # slang keeps configure.ac and rest of autoconf files in autoconf/ directory
+ # we have to go there to be able to run gnu-configize cause it expects configure.{in,ac}
+ # to be present. Resulting files land in autoconf/autoconf/ so we need to move them.
+ cd ${S}/autoconf && gnu-configize --force && mv autoconf/config.* .
+ cd ${B}
+}
+
+do_install() {
+ oe_runmake install DESTDIR=${D} -e 'INST_LIB_DIR=${STAGING_DIR_HOST}/usr/lib'
+}
+
+FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
+
+PARALLEL_MAKE = ""
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch b/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch
new file mode 100644
index 000000000..0c01ed038
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/stat/stat-3.3/fix-security-format.patch
@@ -0,0 +1,68 @@
+stat: Fixing security formatting issues
+
+Fix security formatting issues related to printf without NULL argument
+
+stat.c: In function 'print_human_access':
+stat.c:292:13: error: format not a string literal and no format arguments [-Werror=format-security]
+ printf (access);
+ ^
+stat.c: In function 'print_human_time':
+stat.c:299:57: error: format not a string literal and no format arguments [-Werror=format-security]
+ if (strftime(str, 40, "%c", localtime(t)) > 0) printf(str);
+ ^
+stat.c: In function 'print_it':
+stat.c:613:6: error: format not a string literal and no format arguments [-Werror=format-security]
+ printf(b);
+ ^
+stat.c:642:6: error: format not a string literal and no format arguments [-Werror=format-security]
+ printf(b);
+ ^
+
+[YOCTO #9550]
+[https://bugzilla.yoctoproject.org/show_bug.cgi?id=9550]
+
+Upstream-Status: Pending
+
+Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
+
+diff --git a/stat.c b/stat.c
+index 1ed07a9..2be6f62 100644
+--- a/stat.c
++++ b/stat.c
+@@ -289,15 +289,15 @@ void print_human_access(struct stat *statbuf)
+ default:
+ access[0] = '?';
+ }
+- printf (access);
++ fputs(access,stdout);
+ }
+
+ void print_human_time(time_t *t)
+ {
+ char str[40];
+
+- if (strftime(str, 40, "%c", localtime(t)) > 0) printf(str);
+- else printf("Cannot calculate human readable time, sorry");
++ if (strftime(str, 40, "%c", localtime(t)) > 0) fputs(str,stdout);
++ else fputs("Cannot calculate human readable time, sorry",stdout);
+ }
+
+ /* print statfs info */
+@@ -610,7 +610,7 @@ void print_it(char *masterformat, char *filename,
+ {
+ strcpy (pformat, "%");
+ *m++ = '\0';
+- printf(b);
++ fputs(b,stdout);
+
+ /* copy all format specifiers to our format string */
+ while (isdigit(*m) || strchr("#0-+. I", *m))
+@@ -639,7 +639,7 @@ void print_it(char *masterformat, char *filename,
+ }
+ else
+ {
+- printf(b);
++ fputs(b,stdout);
+ b = NULL;
+ }
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb b/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
index a5ece0744..0697c7390 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=39886b077fd072e876e5c4c16310b631 \
file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI = "http://www.ibiblio.org/pub/Linux/utils/file/${BP}.tar.gz \
+ file://fix-security-format.patch \
file://fix-error-return.patch"
SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb
deleted file mode 100644
index 042043ece..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require sudo.inc
-
-SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://0001-Include-sys-types.h-for-id_t-definition.patch \
- "
-
-PAM_SRC_URI = "file://sudo.pam"
-
-SRC_URI[md5sum] = "7cf6b9b76d0478a572432bed481dd7b5"
-SRC_URI[sha256sum] = "4316381708324da8b6cb151f655c1a11855207c7c02244d8ffdea5104d7cc308"
-
-DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
-
-EXTRA_OECONF += " \
- ac_cv_type_rsize_t=no \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
- "
-
-do_install_append () {
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
- install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
- fi
-
- chmod 4111 ${D}${bindir}/sudo
- chmod 0440 ${D}${sysconfdir}/sudoers
-
- # Explicitly remove the ${localstatedir}/run directory to avoid QA error
- rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
-}
-
-FILES_${PN} += "${libdir}/tmpfiles.d"
-FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
- ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.17p1.bb b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.17p1.bb
new file mode 100644
index 000000000..614ad5c32
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.17p1.bb
@@ -0,0 +1,36 @@
+require sudo.inc
+
+SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://0001-Include-sys-types.h-for-id_t-definition.patch \
+ "
+
+PAM_SRC_URI = "file://sudo.pam"
+
+SRC_URI[md5sum] = "50a840a688ceb6fa3ab24fc0adf4fa23"
+SRC_URI[sha256sum] = "c690d707fb561b3ecdf6a6de5563bc0b769388eff201c851edbace408bb155cc"
+
+DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
+
+EXTRA_OECONF += " \
+ ac_cv_type_rsize_t=no \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
+ "
+
+do_install_append () {
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+ fi
+
+ chmod 4111 ${D}${bindir}/sudo
+ chmod 0440 ${D}${sysconfdir}/sudoers
+
+ # Explicitly remove the ${localstatedir}/run directory to avoid QA error
+ rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
+}
+
+FILES_${PN} += "${libdir}/tmpfiles.d"
+FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
+ ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc b/import-layers/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc
index 1e363db6e..5c15ffe8a 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -55,7 +55,7 @@ ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
pkg_prerm_${PN} () {
if test "x$D" = "x"; then
if test "$1" = "upgrade" -o "$1" = "remove"; then
- /etc/init.d/syslog stop
+ /etc/init.d/syslog stop || :
fi
fi
}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc
index c35329193..bb5629db4 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc
@@ -14,6 +14,7 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
DEPENDS += "base-passwd"
+# autotools-brokensep as this package doesn't use automake
inherit autotools-brokensep gettext systemd
EXTRA_OECONF += "--disable-sensors"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb
deleted file mode 100644
index 7a8eb96ad..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require sysstat.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
-
-SRC_URI[md5sum] = "e8b615775ad98780e3f0675b91eddb19"
-SRC_URI[sha256sum] = "9806b9a662568796d3fb93ecd01ecea10d815e668337a646494953bff4bc4155"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.4.0.bb b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.4.0.bb
new file mode 100644
index 000000000..69f83fc42
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.4.0.bb
@@ -0,0 +1,8 @@
+require sysstat.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
+
+SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
+
+SRC_URI[md5sum] = "ee7b8c0b139a11a7a3418dc0658ca1be"
+SRC_URI[sha256sum] = "b8518ca88acfcbc474a406022ee9c0c3210ccef4f0ec80e5b3e8c41dda8c16f2"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/remove-gets.patch b/import-layers/yocto-poky/meta/recipes-extended/tar/tar/remove-gets.patch
index 0b8be39ee..f24de926a 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/tar/tar/remove-gets.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/tar/tar/remove-gets.patch
@@ -3,20 +3,27 @@ ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ re
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: tar-1.27/gnu/stdio.in.h
-===================================================================
---- tar-1.27.orig/gnu/stdio.in.h 2013-06-29 08:54:26.000000000 +0300
-+++ tar-1.27/gnu/stdio.in.h 2013-10-16 15:22:46.977204737 +0300
-@@ -710,10 +710,12 @@
+---
+ gnu/stdio.in.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gnu/stdio.in.h b/gnu/stdio.in.h
+index ec43874..502e3ae 100644
+--- a/gnu/stdio.in.h
++++ b/gnu/stdio.in.h
+@@ -722,10 +722,12 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning; besides, C11
removed it. */
+#if defined gets
#undef gets
- #if HAVE_RAW_DECL_GETS
+ #if HAVE_RAW_DECL_GETS && !defined __cplusplus
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
+#endif
-
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+ struct obstack;
+--
+2.8.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb b/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb
deleted file mode 100644
index 518e62206..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require tar.inc
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl,"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI += "file://remove-gets.patch \
- file://musl_dirent.patch \
- "
-SRC_URI[md5sum] = "8f32b2bc1ed7ddf4cf4e4a39711341b0"
-SRC_URI[sha256sum] = "60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562"
-
-do_install_append_libc-musl() {
- rm -f ${D}${libdir}/charset.alias
- rmdir ${D}${libdir}
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb b/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb
new file mode 100644
index 000000000..efce57d9d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tar/tar_1.29.bb
@@ -0,0 +1,18 @@
+require tar.inc
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[acl] = "--with-posix-acls, --without-posix-acls, acl,"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI += "file://remove-gets.patch \
+ file://musl_dirent.patch \
+ "
+SRC_URI[md5sum] = "955cd533955acb1804b83fd70218da51"
+SRC_URI[sha256sum] = "236b11190c0a3a6885bdb8d61424f2b36a5872869aa3f7f695dea4b4843ae2f2"
+
+do_install_append_libc-musl() {
+ rm -f ${D}${libdir}/charset.alias
+ rmdir ${D}${libdir}
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb b/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb
deleted file mode 100644
index 06b92ea6e..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-# note that we allow for us to use data later than our code version
-#
-SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
-LICENSE = "PD & BSD & BSD-3-Clause"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
-
-SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
- http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
-
-SRC_URI[tzcode.md5sum] = "ffb82ab0b588138759902b4627a6a80d"
-SRC_URI[tzcode.sha256sum] = "344b1bd486935bca2b7baa47db3b99b32211c45f31ec0d1ead8bacd103c5a416"
-SRC_URI[tzdata.md5sum] = "0330ccd16140d3b6438a18dae9b34b93"
-SRC_URI[tzdata.sha256sum] = "8700d981e6f2007ac037dabb5d2b12f390e8629bbc30e564bc21cf0c069a2d48"
-
-S = "${WORKDIR}"
-
-inherit native
-
-do_install () {
- install -d ${D}${bindir}/
- install -m 755 zic ${D}${bindir}/
- install -m 755 zdump ${D}${bindir}/
- install -m 755 tzselect ${D}${bindir}/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016g.bb b/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016g.bb
new file mode 100644
index 000000000..a2e621741
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016g.bb
@@ -0,0 +1,26 @@
+# note that we allow for us to use data later than our code version
+#
+SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
+LICENSE = "PD & BSD & BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ef1a352b901ee7b75a75df8171d6aca7"
+
+SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
+ http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
+UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
+
+SRC_URI[tzcode.md5sum] = "f89867013676e3cb9544be2df7d36a91"
+SRC_URI[tzcode.sha256sum] = "1ff90b47ad7986140a513b5287b1851c40f80fd44fd636db5cc5b46d06f9fa2b"
+SRC_URI[tzdata.md5sum] = "3c7e97ec8527211104d27cc1d97a23de"
+SRC_URI[tzdata.sha256sum] = "3c7137b2bc47323b0de47b77786bacf81ed503d4b2c693ff8ada2fbd1281ebd1"
+
+S = "${WORKDIR}"
+
+inherit native
+
+do_install () {
+ install -d ${D}${bindir}/
+ install -m 755 zic ${D}${bindir}/
+ install -m 755 zdump ${D}${bindir}/
+ install -m 755 tzselect ${D}${bindir}/
+}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb b/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb
deleted file mode 100644
index 5eb85b7e9..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb
+++ /dev/null
@@ -1,212 +0,0 @@
-SUMMARY = "Timezone data"
-HOMEPAGE = "http://www.iana.org/time-zones"
-SECTION = "base"
-LICENSE = "PD & BSD & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
-
-DEPENDS = "tzcode-native"
-
-SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
-
-SRC_URI[tzdata.md5sum] = "0330ccd16140d3b6438a18dae9b34b93"
-SRC_URI[tzdata.sha256sum] = "8700d981e6f2007ac037dabb5d2b12f390e8629bbc30e564bc21cf0c069a2d48"
-
-inherit allarch
-
-RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
- timezone-arctic timezone-asia timezone-atlantic \
- timezone-australia timezone-europe timezone-indian \
- timezone-iso3166.tab timezone-pacific timezone-zone.tab"
-
-S = "${WORKDIR}"
-
-DEFAULT_TIMEZONE ?= "Universal"
-INSTALL_TIMEZONE_FILE ?= "1"
-
-TZONES= "africa antarctica asia australasia europe northamerica southamerica \
- factory etcetera backward systemv \
- "
-# pacificnew
-
-do_compile () {
- for zone in ${TZONES}; do \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
- -y ${S}/yearistype.sh ${S}/${zone} ; \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
- -y ${S}/yearistype.sh ${S}/${zone} ; \
- ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
- -y ${S}/yearistype.sh ${S}/${zone} ; \
- done
-}
-
-do_install () {
- install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
- cp -pPR ${S}/$exec_prefix ${D}/
- # libc is removing zoneinfo files from package
- cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
- cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
-
- # Install default timezone
- if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
- install -d ${D}${sysconfdir}
- if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
- echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
- fi
- ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
- else
- bberror "DEFAULT_TIMEZONE is set to an invalid value."
- exit 1
- fi
-
- chown -R root:root ${D}
-}
-
-pkg_postinst_${PN} () {
- etc_lt="$D${sysconfdir}/localtime"
- src="$D${sysconfdir}/timezone"
-
- if [ -e ${src} ] ; then
- tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
- fi
-
- if [ -z "${tz}" ] ; then
- exit 0
- fi
-
- if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
- echo "You have an invalid TIMEZONE setting in ${src}"
- echo "Your ${etc_lt} has been reset to Universal; enjoy!"
- tz="Universal"
- echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
- if [ -L ${etc_lt} ] ; then
- rm -f "${etc_lt}"
- fi
- ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
- fi
-}
-
-# Packages primarily organized by directory with a major city
-# in most time zones in the base package
-
-PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
- tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
- tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
-
-FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
-RPROVIDES_tzdata-africa = "tzdata-africa"
-
-FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
- ${datadir}/zoneinfo/US/* \
- ${datadir}/zoneinfo/Brazil/* \
- ${datadir}/zoneinfo/Canada/* \
- ${datadir}/zoneinfo/Mexico/* \
- ${datadir}/zoneinfo/Chile/*"
-RPROVIDES_tzdata-americas = "tzdata-americas"
-
-FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
-RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
-
-FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
-RPROVIDES_tzdata-arctic = "tzdata-arctic"
-
-FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
- ${datadir}/zoneinfo/Indian/* \
- ${datadir}/zoneinfo/Mideast/*"
-RPROVIDES_tzdata-asia = "tzdata-asia"
-
-FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
-RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
-
-FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
-RPROVIDES_tzdata-australia = "tzdata-australia"
-
-FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
-RPROVIDES_tzdata-europe = "tzdata-europe"
-
-FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
-RPROVIDES_tzdata-pacific = "tzdata-pacific"
-
-FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
-RPROVIDES_tzdata-posix = "tzdata-posix"
-
-FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
-RPROVIDES_tzdata-right = "tzdata-right"
-
-
-FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
- ${datadir}/zoneinfo/Egypt \
- ${datadir}/zoneinfo/Eire \
- ${datadir}/zoneinfo/Factory \
- ${datadir}/zoneinfo/GB-Eire \
- ${datadir}/zoneinfo/Hongkong \
- ${datadir}/zoneinfo/Iceland \
- ${datadir}/zoneinfo/Iran \
- ${datadir}/zoneinfo/Israel \
- ${datadir}/zoneinfo/Jamaica \
- ${datadir}/zoneinfo/Japan \
- ${datadir}/zoneinfo/Kwajalein \
- ${datadir}/zoneinfo/Libya \
- ${datadir}/zoneinfo/Navajo \
- ${datadir}/zoneinfo/Poland \
- ${datadir}/zoneinfo/Portugal \
- ${datadir}/zoneinfo/Singapore \
- ${datadir}/zoneinfo/Turkey"
-RPROVIDES_tzdata-misc = "tzdata-misc"
-
-
-FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
- ${datadir}/zoneinfo/America/Anchorage \
- ${datadir}/zoneinfo/America/Los_Angeles \
- ${datadir}/zoneinfo/America/Denver \
- ${datadir}/zoneinfo/America/Chicago \
- ${datadir}/zoneinfo/America/New_York \
- ${datadir}/zoneinfo/America/Caracas \
- ${datadir}/zoneinfo/America/Sao_Paulo \
- ${datadir}/zoneinfo/Europe/London \
- ${datadir}/zoneinfo/Europe/Paris \
- ${datadir}/zoneinfo/Africa/Cairo \
- ${datadir}/zoneinfo/Europe/Moscow \
- ${datadir}/zoneinfo/Asia/Dubai \
- ${datadir}/zoneinfo/Asia/Karachi \
- ${datadir}/zoneinfo/Asia/Dhaka \
- ${datadir}/zoneinfo/Asia/Bankok \
- ${datadir}/zoneinfo/Asia/Hong_Kong \
- ${datadir}/zoneinfo/Asia/Tokyo \
- ${datadir}/zoneinfo/Australia/Darwin \
- ${datadir}/zoneinfo/Australia/Adelaide \
- ${datadir}/zoneinfo/Australia/Brisbane \
- ${datadir}/zoneinfo/Australia/Sydney \
- ${datadir}/zoneinfo/Pacific/Noumea \
- ${datadir}/zoneinfo/CET \
- ${datadir}/zoneinfo/CST6CDT \
- ${datadir}/zoneinfo/EET \
- ${datadir}/zoneinfo/EST \
- ${datadir}/zoneinfo/EST5EDT \
- ${datadir}/zoneinfo/GB \
- ${datadir}/zoneinfo/GMT \
- ${datadir}/zoneinfo/GMT+0 \
- ${datadir}/zoneinfo/GMT-0 \
- ${datadir}/zoneinfo/GMT0 \
- ${datadir}/zoneinfo/Greenwich \
- ${datadir}/zoneinfo/HST \
- ${datadir}/zoneinfo/MET \
- ${datadir}/zoneinfo/MST \
- ${datadir}/zoneinfo/MST7MDT \
- ${datadir}/zoneinfo/NZ \
- ${datadir}/zoneinfo/NZ-CHAT \
- ${datadir}/zoneinfo/PRC \
- ${datadir}/zoneinfo/PST8PDT \
- ${datadir}/zoneinfo/ROC \
- ${datadir}/zoneinfo/ROK \
- ${datadir}/zoneinfo/UCT \
- ${datadir}/zoneinfo/UTC \
- ${datadir}/zoneinfo/Universal \
- ${datadir}/zoneinfo/W-SU \
- ${datadir}/zoneinfo/WET \
- ${datadir}/zoneinfo/Zulu \
- ${datadir}/zoneinfo/zone.tab \
- ${datadir}/zoneinfo/iso3166.tab \
- ${datadir}/zoneinfo/Etc/*"
-
-CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE', True)) else "" }"
-CONFFILES_${PN} += "${sysconfdir}/localtime"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016g.bb b/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016g.bb
new file mode 100644
index 000000000..3ee4b5af6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016g.bb
@@ -0,0 +1,213 @@
+SUMMARY = "Timezone data"
+HOMEPAGE = "http://www.iana.org/time-zones"
+SECTION = "base"
+LICENSE = "PD & BSD & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ef1a352b901ee7b75a75df8171d6aca7"
+
+DEPENDS = "tzcode-native"
+
+SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
+UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
+
+SRC_URI[tzdata.md5sum] = "3c7e97ec8527211104d27cc1d97a23de"
+SRC_URI[tzdata.sha256sum] = "3c7137b2bc47323b0de47b77786bacf81ed503d4b2c693ff8ada2fbd1281ebd1"
+
+inherit allarch
+
+RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
+ timezone-arctic timezone-asia timezone-atlantic \
+ timezone-australia timezone-europe timezone-indian \
+ timezone-iso3166.tab timezone-pacific timezone-zone.tab"
+
+S = "${WORKDIR}"
+
+DEFAULT_TIMEZONE ?= "Universal"
+INSTALL_TIMEZONE_FILE ?= "1"
+
+TZONES= "africa antarctica asia australasia europe northamerica southamerica \
+ factory etcetera backward systemv \
+ "
+# pacificnew
+
+do_compile () {
+ for zone in ${TZONES}; do \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
+ -y ${S}/yearistype.sh ${S}/${zone} ; \
+ done
+}
+
+do_install () {
+ install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
+ cp -pPR ${S}/$exec_prefix ${D}/
+ # libc is removing zoneinfo files from package
+ cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
+ cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
+
+ # Install default timezone
+ if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
+ install -d ${D}${sysconfdir}
+ if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
+ echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+ fi
+ ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
+ else
+ bberror "DEFAULT_TIMEZONE is set to an invalid value."
+ exit 1
+ fi
+
+ chown -R root:root ${D}
+}
+
+pkg_postinst_${PN} () {
+ etc_lt="$D${sysconfdir}/localtime"
+ src="$D${sysconfdir}/timezone"
+
+ if [ -e ${src} ] ; then
+ tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
+ fi
+
+ if [ -z "${tz}" ] ; then
+ exit 0
+ fi
+
+ if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
+ echo "You have an invalid TIMEZONE setting in ${src}"
+ echo "Your ${etc_lt} has been reset to Universal; enjoy!"
+ tz="Universal"
+ echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
+ if [ -L ${etc_lt} ] ; then
+ rm -f "${etc_lt}"
+ fi
+ ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
+ fi
+}
+
+# Packages primarily organized by directory with a major city
+# in most time zones in the base package
+
+PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
+ tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
+ tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
+
+FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
+RPROVIDES_tzdata-africa = "tzdata-africa"
+
+FILES_tzdata-americas += "${datadir}/zoneinfo/America/* \
+ ${datadir}/zoneinfo/US/* \
+ ${datadir}/zoneinfo/Brazil/* \
+ ${datadir}/zoneinfo/Canada/* \
+ ${datadir}/zoneinfo/Mexico/* \
+ ${datadir}/zoneinfo/Chile/*"
+RPROVIDES_tzdata-americas = "tzdata-americas"
+
+FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
+RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
+
+FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
+RPROVIDES_tzdata-arctic = "tzdata-arctic"
+
+FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/* \
+ ${datadir}/zoneinfo/Indian/* \
+ ${datadir}/zoneinfo/Mideast/*"
+RPROVIDES_tzdata-asia = "tzdata-asia"
+
+FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
+RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
+
+FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
+RPROVIDES_tzdata-australia = "tzdata-australia"
+
+FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
+RPROVIDES_tzdata-europe = "tzdata-europe"
+
+FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
+RPROVIDES_tzdata-pacific = "tzdata-pacific"
+
+FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
+RPROVIDES_tzdata-posix = "tzdata-posix"
+
+FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
+RPROVIDES_tzdata-right = "tzdata-right"
+
+
+FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba \
+ ${datadir}/zoneinfo/Egypt \
+ ${datadir}/zoneinfo/Eire \
+ ${datadir}/zoneinfo/Factory \
+ ${datadir}/zoneinfo/GB-Eire \
+ ${datadir}/zoneinfo/Hongkong \
+ ${datadir}/zoneinfo/Iceland \
+ ${datadir}/zoneinfo/Iran \
+ ${datadir}/zoneinfo/Israel \
+ ${datadir}/zoneinfo/Jamaica \
+ ${datadir}/zoneinfo/Japan \
+ ${datadir}/zoneinfo/Kwajalein \
+ ${datadir}/zoneinfo/Libya \
+ ${datadir}/zoneinfo/Navajo \
+ ${datadir}/zoneinfo/Poland \
+ ${datadir}/zoneinfo/Portugal \
+ ${datadir}/zoneinfo/Singapore \
+ ${datadir}/zoneinfo/Turkey"
+RPROVIDES_tzdata-misc = "tzdata-misc"
+
+
+FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu \
+ ${datadir}/zoneinfo/America/Anchorage \
+ ${datadir}/zoneinfo/America/Los_Angeles \
+ ${datadir}/zoneinfo/America/Denver \
+ ${datadir}/zoneinfo/America/Chicago \
+ ${datadir}/zoneinfo/America/New_York \
+ ${datadir}/zoneinfo/America/Caracas \
+ ${datadir}/zoneinfo/America/Sao_Paulo \
+ ${datadir}/zoneinfo/Europe/London \
+ ${datadir}/zoneinfo/Europe/Paris \
+ ${datadir}/zoneinfo/Africa/Cairo \
+ ${datadir}/zoneinfo/Europe/Moscow \
+ ${datadir}/zoneinfo/Asia/Dubai \
+ ${datadir}/zoneinfo/Asia/Karachi \
+ ${datadir}/zoneinfo/Asia/Dhaka \
+ ${datadir}/zoneinfo/Asia/Bankok \
+ ${datadir}/zoneinfo/Asia/Hong_Kong \
+ ${datadir}/zoneinfo/Asia/Tokyo \
+ ${datadir}/zoneinfo/Australia/Darwin \
+ ${datadir}/zoneinfo/Australia/Adelaide \
+ ${datadir}/zoneinfo/Australia/Brisbane \
+ ${datadir}/zoneinfo/Australia/Sydney \
+ ${datadir}/zoneinfo/Pacific/Noumea \
+ ${datadir}/zoneinfo/CET \
+ ${datadir}/zoneinfo/CST6CDT \
+ ${datadir}/zoneinfo/EET \
+ ${datadir}/zoneinfo/EST \
+ ${datadir}/zoneinfo/EST5EDT \
+ ${datadir}/zoneinfo/GB \
+ ${datadir}/zoneinfo/GMT \
+ ${datadir}/zoneinfo/GMT+0 \
+ ${datadir}/zoneinfo/GMT-0 \
+ ${datadir}/zoneinfo/GMT0 \
+ ${datadir}/zoneinfo/Greenwich \
+ ${datadir}/zoneinfo/HST \
+ ${datadir}/zoneinfo/MET \
+ ${datadir}/zoneinfo/MST \
+ ${datadir}/zoneinfo/MST7MDT \
+ ${datadir}/zoneinfo/NZ \
+ ${datadir}/zoneinfo/NZ-CHAT \
+ ${datadir}/zoneinfo/PRC \
+ ${datadir}/zoneinfo/PST8PDT \
+ ${datadir}/zoneinfo/ROC \
+ ${datadir}/zoneinfo/ROK \
+ ${datadir}/zoneinfo/UCT \
+ ${datadir}/zoneinfo/UTC \
+ ${datadir}/zoneinfo/Universal \
+ ${datadir}/zoneinfo/W-SU \
+ ${datadir}/zoneinfo/WET \
+ ${datadir}/zoneinfo/Zulu \
+ ${datadir}/zoneinfo/zone.tab \
+ ${datadir}/zoneinfo/iso3166.tab \
+ ${datadir}/zoneinfo/Etc/*"
+
+CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE', True)) else "" }"
+CONFFILES_${PN} += "${sysconfdir}/localtime"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/fix-security-format.patch b/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/fix-security-format.patch
new file mode 100644
index 000000000..8e9b06c42
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip/fix-security-format.patch
@@ -0,0 +1,97 @@
+unzip: Fixing security formatting issues
+
+Fix security formatting issues related to sprintf parameters expeted.
+
+[YOCTO #9551]
+[https://bugzilla.yoctoproject.org/show_bug.cgi?id=9551]
+
+Upstream-Status: Pending
+
+Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
+
+diff --git a/extract.c b/extract.c
+index 7cd9123..25c5a62 100644
+--- a/extract.c
++++ b/extract.c
+@@ -475,7 +475,7 @@ int extract_or_test_files(__G) /* return PK-type error code */
+ Info(slide, 0x401, ((char *)slide,
+ LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1));
+ Info(slide, 0x401, ((char *)slide,
+- LoadFarString(ReportMsg)));
++ "%s",LoadFarString(ReportMsg)));
+ error_in_archive = PK_BADERR;
+ }
+ reached_end = TRUE; /* ...so no more left to do */
+@@ -754,8 +754,8 @@ int extract_or_test_files(__G) /* return PK-type error code */
+
+ #ifndef SFX
+ if (no_endsig_found) { /* just to make sure */
+- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
+- Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg)));
++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(ReportMsg)));
+ if (!error_in_archive) /* don't overwrite stronger error */
+ error_in_archive = PK_WARN;
+ }
+diff --git a/list.c b/list.c
+index 15e0011..0b484f6 100644
+--- a/list.c
++++ b/list.c
+@@ -181,7 +181,7 @@ int list_files(__G) /* return PK-type error code */
+ Info(slide, 0x401,
+ ((char *)slide, LoadFarString(CentSigMsg), j));
+ Info(slide, 0x401,
+- ((char *)slide, LoadFarString(ReportMsg)));
++ ((char *)slide, "%s", LoadFarString(ReportMsg)));
+ return PK_BADERR; /* sig not found */
+ }
+ }
+@@ -507,7 +507,7 @@ int list_files(__G) /* return PK-type error code */
+ && (!G.ecrec.is_zip64_archive)
+ && (memcmp(G.sig, end_central_sig, 4) != 0)
+ ) { /* just to make sure again */
+- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
+ error_in_archive = PK_WARN; /* didn't find sig */
+ }
+
+@@ -591,7 +591,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */
+ Info(slide, 0x401,
+ ((char *)slide, LoadFarString(CentSigMsg), j));
+ Info(slide, 0x401,
+- ((char *)slide, LoadFarString(ReportMsg)));
++ ((char *)slide, "%s", LoadFarString(ReportMsg)));
+ return PK_BADERR; /* sig not found */
+ }
+ }
+@@ -674,7 +674,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */
+ ---------------------------------------------------------------------------*/
+
+ if (memcmp(G.sig, end_central_sig, 4)) { /* just to make sure again */
+- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
+ error_in_archive = PK_WARN;
+ }
+ if (*nmember == 0L && error_in_archive <= PK_WARN)
+diff --git a/zipinfo.c b/zipinfo.c
+index 0ac75b3..1e7fa82 100644
+--- a/zipinfo.c
++++ b/zipinfo.c
+@@ -833,7 +833,7 @@ int zipinfo(__G) /* return PK-type error code */
+ Info(slide, 0x401,
+ ((char *)slide, LoadFarString(CentSigMsg), j));
+ Info(slide, 0x401,
+- ((char *)slide, LoadFarString(ReportMsg)));
++ ((char *)slide, "%s", LoadFarString(ReportMsg)));
+ error_in_archive = PK_BADERR; /* sig not found */
+ break;
+ }
+@@ -1022,7 +1022,7 @@ int zipinfo(__G) /* return PK-type error code */
+ && (!G.ecrec.is_zip64_archive)
+ && (memcmp(G.sig, end_central_sig, 4) != 0)
+ ) { /* just to make sure again */
+- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg)));
++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg)));
+ error_in_archive = PK_WARN; /* didn't find sig */
+ }
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb b/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb
index 9efe75628..547379c0d 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=94caec5a51ef55ef711ee4e8b1c69e29"
PE = "1"
PR = "r5"
-SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz \
file://avoid-strip.patch \
file://define-ldflags.patch \
file://06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch \
@@ -16,6 +16,7 @@ SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \
file://11-cve-2014-8141-getzip64data.patch \
file://CVE-2015-7696.patch \
file://CVE-2015-7697.patch \
+ file://fix-security-format.patch \
"
SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config.bb b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config.bb
new file mode 100644
index 000000000..8bf40f0f0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Software watchdog"
+DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
+working. If programs in user space are not longer executed it will reboot \
+the system."
+HOMEPAGE = "http://watchdog.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"
+
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = " \
+ file://watchdog.default \
+ file://watchdog.conf \
+"
+
+do_install() {
+ install -Dm 0644 ${WORKDIR}/watchdog.default ${D}${sysconfdir}/default/watchdog
+ install -Dm 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf
new file mode 100644
index 000000000..c493d12d3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config/watchdog.conf
@@ -0,0 +1,42 @@
+#ping = 172.31.14.1
+#ping = 172.26.1.255
+#interface = eth0
+#file = /var/log/messages
+#change = 1407
+
+# Uncomment to enable test. Setting one of these values to '0' disables it.
+# These values will hopefully never reboot your machine during normal use
+# (if your machine is really hung, the loadavg will go much higher than 25)
+#max-load-1 = 24
+#max-load-5 = 18
+#max-load-15 = 12
+
+# Note that this is the number of pages!
+# To get the real size, check how large the pagesize is on your machine.
+#min-memory = 1
+
+#repair-binary = /usr/sbin/repair
+#repair-timeout =
+#test-binary =
+#test-timeout =
+
+watchdog-device = /dev/watchdog
+
+# Defaults compiled into the binary
+#temperature-device =
+#max-temperature = 120
+
+# Defaults compiled into the binary
+#admin = root
+#interval = 1
+#logtick = 1
+#log-dir = /var/log/watchdog
+
+# This greatly decreases the chance that watchdog won't be scheduled before
+# your machine is really loaded
+realtime = yes
+priority = 1
+
+# Check if rsyslogd is still running by enabling the following line
+#pidfile = /var/run/rsyslogd.pid
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config/watchdog.default b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config/watchdog.default
new file mode 100644
index 000000000..647d5abca
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog-config/watchdog.default
@@ -0,0 +1,2 @@
+# Start watchdog at boot time? 0 or 1
+run_watchdog=1
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
deleted file mode 100644
index 8afed5c0d..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 83ec34df357218a1c9cfc13a23d3367d333652c3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 30 Dec 2015 01:01:15 +0000
-Subject: [PATCH] Fix build issues found with non glibc C libraries
-
-Add time.h for getting time_t definition
-limits.h for PATH_MAX
-linux/param.h for EXEC_PAGESIZE
-Replace deprecated MNTTAB with _PATH_MNTTAB
-include ext2_mnt.h for MNTOPT_USRQUOTA and MNTOPT_GRPQUOTA and
-MNTTYPE_EXT2
-Include sys/types.h for u_char definition
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-
-Upstream-Status: Submitted
-
- include/extern.h | 1 +
- src/configfile.c | 1 +
- src/memory.c | 3 +++
- src/net.c | 1 +
- src/shutdown.c | 3 ++-
- 5 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/include/extern.h b/include/extern.h
-index 21db11b..04b16bc 100644
---- a/include/extern.h
-+++ b/include/extern.h
-@@ -3,6 +3,7 @@
-
- #include <netinet/in.h>
- #include <stdio.h>
-+#include <time.h>
-
- #include "logmessage.h"
- #include "xmalloc.h"
-diff --git a/src/configfile.c b/src/configfile.c
-index be5d7b3..7c1d1dd 100644
---- a/src/configfile.c
-+++ b/src/configfile.c
-@@ -16,6 +16,7 @@
- #include <errno.h>
- #include <string.h>
- #include <dirent.h>
-+#include <limits.h>
- #include <sys/stat.h>
-
- #include "extern.h"
-diff --git a/src/memory.c b/src/memory.c
-index e9607e4..b5e08aa 100644
---- a/src/memory.c
-+++ b/src/memory.c
-@@ -21,6 +21,9 @@
- #include <sys/stat.h>
- #include <sys/param.h>
- #include <sys/mman.h>
-+#ifdef __linux__
-+#include <linux/param.h>
-+#endif
-
- #include "extern.h"
- #include "watch_err.h"
-diff --git a/src/net.c b/src/net.c
-index 21823ae..8930caf 100644
---- a/src/net.c
-+++ b/src/net.c
-@@ -17,6 +17,7 @@
- #include <string.h>
- #include <unistd.h> /* for gethostname() etc */
- #include <netdb.h> /* for gethostbyname() */
-+#include <sys/types.h>
- #include <sys/param.h> /* for MAXHOSTNAMELEN */
- #include <sys/socket.h>
- #include <netinet/in.h>
-diff --git a/src/shutdown.c b/src/shutdown.c
-index 74aafa5..46b99cf 100644
---- a/src/shutdown.c
-+++ b/src/shutdown.c
-@@ -25,6 +25,7 @@
-
- #include "watch_err.h"
- #include "extern.h"
-+#include "ext2_mnt.h"
-
- #if defined __GLIBC__
- #include "ext2_mnt.h"
-@@ -123,7 +124,7 @@ static void mnt_off()
- FILE *fp;
- struct mntent *mnt;
-
-- fp = setmntent(MNTTAB, "r");
-+ fp = setmntent(_PATH_MNTTAB, "r");
- /* in some rare cases fp might be NULL so be careful */
- while (fp != NULL && ((mnt = getmntent(fp)) != (struct mntent *)0)) {
- /* First check if swap */
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch
new file mode 100644
index 000000000..198f19861
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch
@@ -0,0 +1,32 @@
+From 8f91385dbd5e7c14b36ecbd8a01ca82c709f6d77 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 24 Jun 2016 18:19:29 +0000
+Subject: [PATCH] Include linux/param.h for EXEC_PAGESIZE definition
+
+Musl does not include linux/param.h whereas glibc
+does, so it fails to build on musl.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ src/watchdog.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/watchdog.c b/src/watchdog.c
+index acf6450..486384a 100644
+--- a/src/watchdog.c
++++ b/src/watchdog.c
+@@ -26,6 +26,9 @@
+ #include <sys/param.h> /* For EXEC_PAGESIZE */
+ #include <linux/oom.h>
+ #include <linux/watchdog.h>
++#ifdef __linux__
++#include <linux/param.h>
++#endif
+ #include <string.h>
+
+ #include <libgen.h>
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
deleted file mode 100644
index 14ab9c56a..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/fix-ping-failure.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-Fix ping mode failure
-
-Upstream-Status: Pending
-
-When watchdog works on ping mode, the system will be rebooted since
-watchdog can not receive the expected ECOREPLY on a setting interval.
-
-Ping mode uses a raw socket to send a ECO packet, then uses select()
-to wait and recvfrom() to receive the ECOREPLY packet, if select()
-shows the data is ready, and the data is not the expected ECOREPLY,
-and waiting time is not overdue, it will continue use select() and
-recvfrom().
-
-Problem is that the raw socket can receive any icmp packets, if we do
-not set filters, and there are many icmp packets on socket, this
-program will not find its interested ECOREPLY packet in a special
-interval, which makes the ping mode fail.
-
-
-Other program is that watchdog sometime can not reach the call of
-recvfrom to try to receive packets since tv_sec of struct timeval
-of select parameter is 0.
-
-The timeout of select() is the result of ping interval minusing the
-time of calling gettimeofday spending, when ping interval is 1 second,
-and the call of gettimeofday() spends several useconds, the tv_sec of
-struct timeval of select parameter must be 0, at that condition, we
-should it is valid of tv_sec of struct timeval of select parameter be 0
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- src/net.c | 2 +-
- src/watchdog.c | 5 ++++-
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-Index: watchdog-5.14/src/watchdog.c
-===================================================================
---- watchdog-5.14.orig/src/watchdog.c
-+++ watchdog-5.14/src/watchdog.c
-@@ -24,6 +24,7 @@
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <linux/oom.h>
-+#include <linux/icmp.h>
- #include <linux/watchdog.h>
- #include <string.h>
-
-Index: watchdog-5.14/src/net.c
-===================================================================
---- watchdog-5.14.orig/src/net.c
-+++ watchdog-5.14/src/net.c
-@@ -11,7 +11,8 @@
- #include <errno.h>
- #include <sys/time.h>
- #include <netinet/ip.h>
--#include <netinet/ip_icmp.h>
-+#include <linux/icmp.h>
-+//#include <netinet/ip_icmp.h>
- #include <fcntl.h>
- #include <string.h>
- #include <unistd.h> /* for gethostname() etc */
-@@ -179,6 +180,9 @@ int open_netcheck(struct list *tlist)
- {
- struct list *act;
- int hold = 0;
-+ struct icmp_filter filt;
-+ filt.data = ~(1<<ICMP_ECHOREPLY);
-+
-
- if (tlist != NULL) {
- for (act = tlist; act != NULL; act = act->next) {
-@@ -202,6 +206,7 @@ int open_netcheck(struct list *tlist)
- fatal_error(EX_SYSERR, "error opening socket (%s)", strerror(errno));
- }
-
-+ setsockopt(net->sock_fp, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt));
- /* this is necessary for broadcast pings to work */
- (void)setsockopt(net->sock_fp, SOL_SOCKET, SO_BROADCAST, (char *)&hold, sizeof(hold));
-
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
deleted file mode 100644
index 2fad3a112..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/fixsepbuild.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Fix out of tree build support:
-
-| installing /etc/watchdog.conf
-| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5'
-| /bin/mkdir -p '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8'
-| /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.conf.5 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man5'
-| /usr/bin/install -c -m 644 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/watchdog.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_keepalive.8 /media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/watchdog-5.13/wd_identify.8 '/media/build1/poky/build/tmp/work/i586-poky-linux/watchdog/5.13-r0/image/usr/share/man/man8'
-| /usr/bin/install: cannot stat `watchdog.conf': No such file or directory
-| make[2]: *** [install-etc-local] Error 1
-
-Upstream-Status: Pending
-
-RP 2013/03/21
-
-Index: watchdog-5.13/Makefile.am
-===================================================================
---- watchdog-5.13.orig/Makefile.am 2013-02-01 11:15:44.000000000 +0000
-+++ watchdog-5.13/Makefile.am 2013-03-21 11:59:35.637139031 +0000
-@@ -16,7 +16,7 @@
- else \
- echo "installing $(CONFIG_FILENAME)"; \
- $(mkinstalldirs) `dirname $(DESTDIR)$(CONFIG_FILENAME)`; \
-- $(INSTALL_DATA) watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \
-+ $(INSTALL_DATA) $(srcdir)/watchdog.conf $(DESTDIR)$(CONFIG_FILENAME); \
- fi
-
- install-data-local: install-etc-local
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/wd_keepalive.init b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/wd_keepalive.init
new file mode 100644
index 000000000..1d3e4c555
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog/wd_keepalive.init
@@ -0,0 +1,121 @@
+#!/bin/sh
+#/etc/init.d/wd_keepalive: start wd_keepalive daemon.
+
+### BEGIN INIT INFO
+# Provides: wd_keepalive
+# Short-Description: Start watchdog keepalive daemon
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# X-Start-Before: $all
+# Default-Start: 2 3 4 5
+# Default-Stop
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+test -x /usr/sbin/wd_keepalive || exit 0
+
+# For configuration of the init script use the file
+# /etc/default/watchdog, do not edit this init script.
+
+# Set run_watchdog to 1 to start watchdog or 0 to disable it.
+run_watchdog=0
+
+# Specify additional watchdog options here (see manpage).
+watchdog_options=""
+
+# Specify module to load
+watchdog_module="none"
+
+[ -e /etc/default/watchdog ] && . /etc/default/watchdog
+
+NAME=wd_keepalive
+DAEMON=/usr/sbin/wd_keepalive
+
+STOP_RETRY_SCHEDULE='TERM/10/forever/KILL/1'
+
+# . /lib/lsb/init-functions
+
+# Mock Debian stuff
+log_begin_msg() {
+ echo -n $*
+}
+
+log_end_msg() {
+ if [ "$1" = "0" ]; then
+ echo 'done'
+ else
+ echo 'error'
+ fi
+}
+
+log_daemon_msg() {
+ echo $*
+}
+
+log_progress_msg() {
+ echo $*
+}
+
+
+case "$1" in
+ start)
+ if [ $run_watchdog = 1 ]
+ then
+ [ ${watchdog_module:-none} != "none" ] && /sbin/modprobe $watchdog_module
+ echo -n "Starting watchdog keepalive daemon: "
+ if start-stop-daemon --start --quiet \
+ --exec $DAEMON -- $watchdog_options
+ then
+ echo wd_keepalive.
+ else
+ echo
+ fi
+ fi
+ ;;
+
+ stop)
+ if [ $run_watchdog = 1 ]
+ then
+ echo -n "Stopping watchdog keepalive daemon: "
+ if start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
+ $STOP_RETRY_SCHEDULE
+ then
+ echo wd_keepalive.
+ else
+ echo
+ fi
+ fi
+ ;;
+
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+
+ restart)
+ $0 force-reload
+ ;;
+
+ force-reload)
+ if [ $run_watchdog = 0 ]; then exit 0; fi
+ echo -n "Restarting $NAME daemon."
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
+ $STOP_RETRY_SCHEDULE
+ echo -n "."
+ if start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $watchdog_options
+ then
+ echo "done."
+ else
+ echo
+ fi
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/wd_keepalive {start|stop|status|restart|force-reload}"
+ exit 1
+
+esac
+
+exit 0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb
deleted file mode 100644
index 733023897..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Software watchdog"
-DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
-working. If programs in user space are not longer executed \
-it will reboot the system."
-HOMEPAGE = "http://watchdog.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"
-
-LICENSE = "GPL-2.0+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
- file://fixsepbuild.patch \
- file://fix-ping-failure.patch \
- file://watchdog-init.patch \
- file://watchdog-conf.patch \
- file://0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch \
-"
-
-SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4"
-SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
-UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
-
-inherit autotools
-inherit update-rc.d
-
-DEPENDS_append_libc-musl = " libtirpc "
-CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
-LDFLAGS_append_libc-musl = " -ltirpc "
-EXTRA_OECONF_append_libc-musl = " --disable-nfs "
-
-INITSCRIPT_NAME = "watchdog.sh"
-INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
-
-RRECOMMENDS_${PN} = "kernel-module-softdog"
-
-do_install_append() {
- install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
-}
diff --git a/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb
new file mode 100644
index 000000000..cedfc042c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.15.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Software watchdog"
+DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
+working. If programs in user space are not longer executed \
+it will reboot the system."
+HOMEPAGE = "http://watchdog.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"
+
+LICENSE = "GPL-2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \
+ file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
+ file://watchdog-init.patch \
+ file://watchdog-conf.patch \
+ file://wd_keepalive.init \
+"
+
+SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828"
+SRC_URI[sha256sum] = "ffdc865137ad5d8e53664bd22bad4de6ca136d1b4636720320cb52af0c18947c"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
+UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
+
+inherit autotools
+inherit update-rc.d
+
+DEPENDS_append_libc-musl = " libtirpc "
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
+LDFLAGS_append_libc-musl = " -ltirpc "
+EXTRA_OECONF_append_libc-musl = " --disable-nfs "
+
+INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive"
+
+INITSCRIPT_NAME_${PN} = "watchdog.sh"
+INITSCRIPT_PARAMS_${PN} = "start 15 1 2 3 4 5 . stop 85 0 6 ."
+
+INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
+INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ."
+
+do_install_append() {
+ install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
+ install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
+
+ # watchdog.conf is provided by the watchdog-config recipe
+ rm ${D}${sysconfdir}/watchdog.conf
+}
+
+PACKAGES =+ "${PN}-keepalive"
+
+FILES_${PN}-keepalive = " \
+ ${sysconfdir}/init.d/wd_keepalive \
+ ${sbindir}/wd_keepalive \
+"
+
+RDEPENDS_${PN} += "${PN}-config ${PN}-keepalive"
+RDEPENDS_${PN}-keepalive += "${PN}-config"
+
+RRECOMMENDS_${PN} = "kernel-module-softdog"
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc b/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc
index dc381a628..c4abfe490 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc
+++ b/import-layers/yocto-poky/meta/recipes-extended/wget/wget.inc
@@ -9,7 +9,7 @@ INC_PR = "r16"
inherit autotools gettext texinfo update-alternatives pkgconfig
-EXTRA_OECONF = "--enable-ipv6 --with-ssl=gnutls --disable-rpath --disable-iri \
+EXTRA_OECONF = "--with-ssl=gnutls --disable-rpath --disable-iri \
--without-libgnutls-prefix ac_cv_header_uuid_uuid_h=no"
ALTERNATIVE_${PN} = "wget"
@@ -20,8 +20,9 @@ RRECOMMENDS_${PN} += "ca-certificates"
BBCLASSEXTEND += "nativesdk"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
PACKAGECONFIG[libuuid] = "--with-libuuid, --without-libuuid,util-linux"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
# Let aclocal use the relative path for the m4 file rather than
# absolute, otherwise there might be an "Argument list too long" error
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb b/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb
deleted file mode 100644
index dca5d1f71..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- "
-
-SRC_URI[md5sum] = "a6a908c9ae0e6a4194c628974cc3f05a"
-SRC_URI[sha256sum] = "029fbb93bdc1c0c5a7507b6076a6ec2f8d34204a85aa87e5b2f61a9405b290f5"
-
-require wget.inc
diff --git a/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.18.bb b/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.18.bb
new file mode 100644
index 000000000..c969b98e7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/wget/wget_1.18.bb
@@ -0,0 +1,8 @@
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+ "
+
+SRC_URI[md5sum] = "fc2debd8399e3b933a9b226794e2a886"
+SRC_URI[sha256sum] = "a00a65fab84cc46e24c53ce88c45604668a7a479276e037dc2f558e34717fb2d"
+
+require wget.inc
diff --git a/import-layers/yocto-poky/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch b/import-layers/yocto-poky/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
index fb9b1a408..0e0988b26 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch
@@ -3,7 +3,7 @@ Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific]
# glibc also implements the function group_member. To avoid name conflict,
# here let us append a "_" to which's version.
#
-# Signed-off-by Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20
+# Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20
# (this patch is licensed under GPLv2)
--- which-2.18/bash.c
diff --git a/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb b/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
index c1472cf97..5007498bb 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
@@ -27,6 +27,7 @@ SRC_URI[sha256sum] = "b0dd63a2576e0bb16f1aa78d6ddf7d6784784a098d4df17161cd6a17c7
UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)"
+# Needs brokensep as this doesn't use automake
inherit autotools-brokensep distro_features_check
# The xprop requires x11 in DISTRO_FEATURES
diff --git a/import-layers/yocto-poky/meta/recipes-extended/zip/zip-3.0/fix-security-format.patch b/import-layers/yocto-poky/meta/recipes-extended/zip/zip-3.0/fix-security-format.patch
new file mode 100644
index 000000000..19d854827
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/zip/zip-3.0/fix-security-format.patch
@@ -0,0 +1,42 @@
+zip: Fixing security formatting issues
+
+Fix security formatting issues related to printing without NULL argument
+
+zip.c: In function 'help_extended':
+zip.c:1031:5: error: format not a string literal and no format arguments [-Werror=format-security]
+ printf(text[i]);
+ ^
+zip.c: In function 'version_info':
+zip.c:1228:5: error: format not a string literal and no format arguments [-Werror=format-security]
+ printf(cryptnote[i]);
+ ^
+
+[YOCTO #9552]
+[https://bugzilla.yoctoproject.org/show_bug.cgi?id=9552]
+
+Upstream-Status: Pending
+
+Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@intel.com>
+
+diff --git a/zip.c b/zip.c
+index 439821f..d7da768 100644
+--- a/zip.c
++++ b/zip.c
+@@ -1028,7 +1028,7 @@ local void help_extended()
+
+ for (i = 0; i < sizeof(text)/sizeof(char *); i++)
+ {
+- printf(text[i]);
++ fputs(text[i],stdout);
+ putchar('\n');
+ }
+ #ifdef DOS
+@@ -1225,7 +1225,7 @@ local void version_info()
+ CR_MAJORVER, CR_MINORVER, CR_BETA_VER, CR_VERSION_DATE);
+ for (i = 0; i < sizeof(cryptnote)/sizeof(char *); i++)
+ {
+- printf(cryptnote[i]);
++ fputs(cryptnote[i],stdout);
+ putchar('\n');
+ }
+ ++i; /* crypt support means there IS at least one compilation option */
diff --git a/import-layers/yocto-poky/meta/recipes-extended/zip/zip.inc b/import-layers/yocto-poky/meta/recipes-extended/zip/zip.inc
deleted file mode 100644
index 6221c5e13..000000000
--- a/import-layers/yocto-poky/meta/recipes-extended/zip/zip.inc
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Compressor/archiver for creating and modifying .zip files"
-HOMEPAGE = "http://www.info-zip.org"
-SECTION = "console/utils"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d"
-
-SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz"
-
-EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \
- 'CFLAGS=-I. -DUNIX ${CFLAGS}' 'INSTALL=install' \
- 'BINFLAGS=0755' 'INSTALL_D=install -d'"
-
-do_compile() {
- oe_runmake -f unix/Makefile flags IZ_BZIP2=no_such_directory
- sed -i 's#LFLAGS1=""#LFLAGS1="${LDFLAGS}"#' flags
- oe_runmake -f unix/Makefile generic IZ_BZIP2=no_such_directory
-}
-
-do_install() {
- oe_runmake -f unix/Makefile prefix=${D}${prefix} \
- BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \
- install
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb b/import-layers/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb
index 383da4b89..087423a04 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb
@@ -1,18 +1,42 @@
-require zip.inc
+SUMMARY = "Compressor/archiver for creating and modifying .zip files"
+HOMEPAGE = "http://www.info-zip.org"
+SECTION = "console/utils"
-PR="r2"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=04d43c5d70b496c032308106e26ae17d"
+
+PR = "r2"
-# zip-2.32 still uses directory name of zip-2.30
S = "${WORKDIR}/zip30"
+SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz \
+ file://fix-security-format.patch"
+
SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37"
SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369"
-# exclude version 2.3.2 which triggers a false positive
-UPSTREAM_CHECK_REGEX = "^zip(?P<pver>(?!232).+)\.tgz"
-
# zip.inc sets CFLAGS, but what Makefile actually uses is
# CFLAGS_NOOPT. It will also force -O3 optimization, overriding
# whatever we set.
-#
-EXTRA_OEMAKE_append = " 'CFLAGS_NOOPT=-I. -DUNIX ${CFLAGS}'"
+EXTRA_OEMAKE = "'CC=${CC}' 'BIND=${CC}' 'AS=${CC} -c' 'CPP=${CPP}' \
+ 'CFLAGS=-I. -DUNIX ${CFLAGS}' \
+ 'CFLAGS_NOOPT=-I. -DUNIX ${CFLAGS}' \
+ 'INSTALL=install' 'INSTALL_D=install -d' \
+ 'BINFLAGS=0755'"
+
+do_compile() {
+ oe_runmake -f unix/Makefile flags IZ_BZIP2=no_such_directory
+ sed -i 's#LFLAGS1=""#LFLAGS1="${LDFLAGS}"#' flags
+ oe_runmake -f unix/Makefile generic IZ_BZIP2=no_such_directory
+}
+
+do_install() {
+ oe_runmake -f unix/Makefile prefix=${D}${prefix} \
+ BINDIR=${D}${bindir} MANDIR=${D}${mandir}/man1 \
+ install
+}
+
+BBCLASSEXTEND = "native"
+
+# exclude version 2.3.2 which triggers a false positive
+UPSTREAM_CHECK_REGEX = "^zip(?P<pver>(?!232).+)\.tgz"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.18.4.bb b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.18.4.bb
deleted file mode 100644
index 869569c51..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.18.4.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "WebKit based web browser for GNOME"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes ca-certificates avahi libnotify gcr libwnck3 \
- gsettings-desktop-schemas gnome-desktop3 libxml2-native intltool-native"
-
-inherit gnomebase gsettings distro_features_check upstream-version-is-even
-# libwnck3 is x11 only
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI += "file://0001-yelp.m4-drop-the-check-for-itstool.patch"
-SRC_URI[archive.md5sum] = "172b78256100e8d3c629764abd0e1495"
-SRC_URI[archive.sha256sum] = "be699d484371111abae754e669187215df73e21533f461e513b79537d7a1c1c1"
-
-EXTRA_OECONF += " --disable-nss --with-distributor-name=${DISTRO}"
-
-do_configure_prepend() {
- touch ${S}/gnome-doc-utils.make
- sed -i -e s:help::g ${S}/Makefile.am
-}
-
-FILES_${PN} += "${datadir}/appdata ${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers"
-RDEPENDS_${PN} = "iso-codes adwaita-icon-theme"
-RRECOMMENDS_${PN} = "ca-certificates"
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.20.3.bb b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.20.3.bb
new file mode 100644
index 000000000..eba480b2f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.20.3.bb
@@ -0,0 +1,25 @@
+SUMMARY = "WebKit based web browser for GNOME"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes ca-certificates avahi libnotify gcr libwnck3 \
+ gsettings-desktop-schemas gnome-desktop3 libxml2-native intltool-native"
+
+inherit gnomebase gsettings distro_features_check upstream-version-is-even
+# libwnck3 is x11 only
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI += "file://0001-yelp.m4-drop-the-check-for-itstool.patch"
+SRC_URI[archive.md5sum] = "31822b6b199f724f212ae9200bc055f1"
+SRC_URI[archive.sha256sum] = "4d9de1bdb44c14adf25aa6dc02ea3de60925cff5eb01fe89545e6032c9b424a2"
+
+EXTRA_OECONF += " --disable-nss --with-distributor-name=${DISTRO}"
+
+do_configure_prepend() {
+ sed -i -e s:help::g ${S}/Makefile.am
+}
+
+FILES_${PN} += "${datadir}/appdata ${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers"
+RDEPENDS_${PN} = "iso-codes adwaita-icon-theme"
+RRECOMMENDS_${PN} = "ca-certificates"
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.18.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.18.0.bb
deleted file mode 100644
index 32523a64a..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.18.0.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "A library for bits of crypto UI and parsing etc"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
-
-DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt"
-
-inherit autotools gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
-# depends on gtk+3, but also x11 through gtk+-x11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI[archive.md5sum] = "b959bac99e17c9bb0990a15c9be11aed"
-SRC_URI[archive.sha256sum] = "d4d16da5af55148a694055835ccd07ad34daf0ad03bdad929bf7cad15637ce00"
-
-FILES_${PN} += " \
- ${datadir}/dbus-1 \
- ${datadir}/gcr-3 \
-"
-
-# http://errors.yoctoproject.org/Errors/Details/20229/
-ARM_INSTRUCTION_SET = "arm"
-
-# on x86-64 the introspection binary goes into
-# an infinite loop under qemu during compilation,
-# printing the following:
-#
-# gcrypt-Message: select() error: Bad address
-#
-# gcrypt-Message: select() error: Bad address
-#
-# gcrypt-Message: select() error: Bad address
-#
-# This will be investigated later.
-EXTRA_OECONF_append_x86-64 = " --disable-introspection"
-
-# Gcr-3.broken: poky/build-mips64/tmp/work/mips64-poky-linux/libgpg-error/1.19-r0/libgpg-error-1.19/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
-# qemu: uncaught target signal 6 (Aborted) - core dumped
-EXTRA_OECONF_append_mips64 = " --disable-introspection"
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb
new file mode 100644
index 000000000..b32a455e3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gcr/gcr_3.20.0.bb
@@ -0,0 +1,40 @@
+SUMMARY = "A library for bits of crypto UI and parsing etc"
+HOMEPAGE = "http://www.gnome.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
+
+DEPENDS = "intltool-native gtk+3 p11-kit glib-2.0 libgcrypt"
+
+inherit autotools gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
+# depends on gtk+3, but also x11 through gtk+-x11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[archive.md5sum] = "4314bf89eac293dd0a9d806593ff1b35"
+SRC_URI[archive.sha256sum] = "90572c626d8a708225560c42b4421f7941315247fa1679d4ef569bde7f4bb379"
+
+FILES_${PN} += " \
+ ${datadir}/dbus-1 \
+ ${datadir}/gcr-3 \
+"
+
+# http://errors.yoctoproject.org/Errors/Details/20229/
+ARM_INSTRUCTION_SET = "arm"
+
+# on x86-64 the introspection binary goes into
+# an infinite loop under qemu during compilation,
+# printing the following:
+#
+# gcrypt-Message: select() error: Bad address
+#
+# gcrypt-Message: select() error: Bad address
+#
+# gcrypt-Message: select() error: Bad address
+#
+# This will be investigated later.
+EXTRA_OECONF_append_x86-64 = " --disable-introspection --disable-gtk-doc"
+
+# Gcr-3.broken: poky/build-mips64/tmp/work/mips64-poky-linux/libgpg-error/1.19-r0/libgpg-error-1.19/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
+# qemu: uncaught target signal 6 (Aborted) - core dumped
+EXTRA_OECONF_append_mips64 = " --disable-introspection --disable-gtk-doc"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.3.bb b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.3.bb
deleted file mode 100644
index ba94eecbd..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.3.bb
+++ /dev/null
@@ -1,102 +0,0 @@
-SUMMARY = "Image loading library for GTK+"
-HOMEPAGE = "http://www.gtk.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
-
-SECTION = "libs"
-
-DEPENDS = "glib-2.0"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- file://hardcoded_libtool.patch \
- file://extending-libinstall-dependencies.patch \
- file://run-ptest \
- file://fatal-loader.patch \
- "
-
-SRC_URI[md5sum] = "9275076639baa24a342f3e02c402920e"
-SRC_URI[sha256sum] = "2b6771f1ac72f687a8971e59810b8dc658e65e7d3086bd2e676e618fd541d031"
-
-inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection
-
-LIBV = "2.10.0"
-
-GDK_PIXBUF_LOADERS ?= "png jpeg"
-
-PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_linuxstdbase = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
-
-PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
-PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
-PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
-PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
-
-# Use GIO to sniff image format instead of trying all loaders
-PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info"
-PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
-
-PACKAGES =+ "${PN}-xlib"
-
-FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
-ALLOW_EMPTY_${PN}-xlib = "1"
-
-FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
-
-FILES_${PN}-dev += " \
- ${bindir}/gdk-pixbuf-csource \
- ${bindir}/gdk-pixbuf-pixdata \
- ${includedir}/* \
- ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
-"
-
-PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
-PACKAGES_DYNAMIC_class-native = ""
-
-python populate_packages_prepend () {
- postinst_pixbufloader = d.getVar("postinst_pixbufloader", True)
-
- loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
-
- packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
- d.setVar('PIXBUF_PACKAGES', packages)
-
- # The test suite exercises all the loaders, so ensure they are all
- # dependencies of the ptest package.
- d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages)
-}
-
-do_install_append() {
- # Move gdk-pixbuf-query-loaders into libdir so it is always available
- # in multilib builds.
- mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
-}
-
-do_install_append_class-native() {
- find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
-
- create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
- create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
- create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
- GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
-}
-BBCLASSEXTEND = "native"
-
-SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
-SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
-
-gdkpixbuf_sstate_preinst() {
- if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then
- rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/*
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.34.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.34.0.bb
new file mode 100644
index 000000000..4f39494cf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.34.0.bb
@@ -0,0 +1,102 @@
+SUMMARY = "Image loading library for GTK+"
+HOMEPAGE = "http://www.gtk.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
+
+SECTION = "libs"
+
+DEPENDS = "glib-2.0"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ file://hardcoded_libtool.patch \
+ file://extending-libinstall-dependencies.patch \
+ file://run-ptest \
+ file://fatal-loader.patch \
+ "
+
+SRC_URI[md5sum] = "63cb19f92cf7709ccf44bbb6fe1ff70c"
+SRC_URI[sha256sum] = "d55e5b383ee219bd0e23bf6ed4427d56a7db5379729a6e3e0a0e0eba9a8d8879"
+
+inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc
+
+LIBV = "2.10.0"
+
+GDK_PIXBUF_LOADERS ?= "png jpeg"
+
+PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
+PACKAGECONFIG_linuxstdbase = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${GDK_PIXBUF_LOADERS}"
+PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
+
+PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
+PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
+PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
+PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
+
+# Use GIO to sniff image format instead of trying all loaders
+PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info"
+PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
+
+PACKAGES =+ "${PN}-xlib"
+
+FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
+ALLOW_EMPTY_${PN}-xlib = "1"
+
+FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+FILES_${PN}-dev += " \
+ ${bindir}/gdk-pixbuf-csource \
+ ${bindir}/gdk-pixbuf-pixdata \
+ ${includedir}/* \
+ ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
+"
+
+PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
+PACKAGES_DYNAMIC_class-native = ""
+
+python populate_packages_prepend () {
+ postinst_pixbufloader = d.getVar("postinst_pixbufloader", True)
+
+ loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
+
+ packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
+ d.setVar('PIXBUF_PACKAGES', packages)
+
+ # The test suite exercises all the loaders, so ensure they are all
+ # dependencies of the ptest package.
+ d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages)
+}
+
+do_install_append() {
+ # Move gdk-pixbuf-query-loaders into libdir so it is always available
+ # in multilib builds.
+ mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
+}
+
+do_install_append_class-native() {
+ find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
+
+ create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+ create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+ create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
+ GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
+}
+BBCLASSEXTEND = "native"
+
+SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
+
+gdkpixbuf_sstate_preinst() {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then
+ rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/*
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.18.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.18.2.bb
deleted file mode 100644
index ee460d988..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.18.2.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "GNOME library for reading .desktop files"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-BPN = "gnome-desktop"
-
-inherit gnome pkgconfig upstream-version-is-even gobject-introspection
-SRC_URI[archive.md5sum] = "9a5875247abdb99bad93f1c4230d1d6d"
-SRC_URI[archive.sha256sum] = "ddd46d022de137543a71f50c7392b32f9b98d5d3f2b53040b35f5802de2e7b56"
-
-DEPENDS += "gsettings-desktop-schemas gconf libxrandr virtual/libx11 gtk+3 glib-2.0 gnome-doc-utils gnome-common startup-notification xkeyboard-config iso-codes"
-
-inherit distro_features_check
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-desktop-docs"
-
-PACKAGES =+ "libgnome-desktop3"
-FILES_libgnome-desktop3 = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop*/pnp.ids ${datadir}/gnome/*xml"
-
-RRECOMMENDS_libgnome-desktop3 += "gsettings-desktop-schemas"
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.20.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.20.2.bb
new file mode 100644
index 000000000..eb061b20e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.20.2.bb
@@ -0,0 +1,23 @@
+SUMMARY = "GNOME library for reading .desktop files"
+SECTION = "x11/gnome"
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+BPN = "gnome-desktop"
+
+inherit gnome pkgconfig upstream-version-is-even gobject-introspection
+SRC_URI[archive.md5sum] = "8354ed38624f5eb6b5d34267b658a9c9"
+SRC_URI[archive.sha256sum] = "492c2da7aa8c3a8b65796e8171fc8f0dfb5d322dd2799c0d76392e1fb061e2b2"
+
+DEPENDS += "intltool-native gsettings-desktop-schemas gconf libxrandr virtual/libx11 gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes"
+
+inherit distro_features_check gtk-doc
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "--disable-desktop-docs"
+
+PACKAGES =+ "libgnome-desktop3"
+FILES_libgnome-desktop3 = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop*/pnp.ids ${datadir}/gnome/*xml"
+
+RRECOMMENDS_libgnome-desktop3 += "gsettings-desktop-schemas"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.18.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.18.0.bb
deleted file mode 100644
index 81c88458d..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.18.0.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "GTK+ icon theme"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome"
-
-LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
-
-inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
-
-DEPENDS += "intltool-native"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- "
-
-SRC_URI[md5sum] = "ec1fa3fde83ad166ae7075a97dc1ec4b"
-SRC_URI[sha256sum] = "5e9ce726001fdd8ee93c394fdc3cdb9e1603bbed5b7c62df453ccf521ec50e58"
-
-do_install_append() {
- # Build uses gtk-encode-symbolic-svg to create png versions:
- # no need to store the svgs anymore.
- rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic.svg \
- ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic-rtl.svg
-}
-
-PACKAGES = "${PN}-cursors ${PN}-symbolic ${PN}-hires ${PN}"
-
-RREPLACES_${PN} = "gnome-icon-theme"
-RCONFLICTS_${PN} = "gnome-icon-theme"
-RPROVIDES_${PN} = "gnome-icon-theme"
-
-FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
-FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/*/*/*.symbolic.png"
-FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/"
-FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
- ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.20.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.20.bb
new file mode 100644
index 000000000..bb0eaebdc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.20.bb
@@ -0,0 +1,41 @@
+SUMMARY = "GTK+ icon theme"
+HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome"
+
+LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
+
+inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
+
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ "
+
+SRC_URI[md5sum] = "411be2bd68dd8b0a3c86aca2eb351ce4"
+SRC_URI[sha256sum] = "7a0a887349f340dd644032f89d81264b694c4b006bd51af1c2c368d431e7ae35"
+
+do_install_append() {
+ # Build uses gtk-encode-symbolic-svg to create png versions:
+ # no need to store the svgs anymore.
+ rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic.svg \
+ ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic-rtl.svg
+}
+
+PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires ${PN}"
+
+RREPLACES_${PN} = "gnome-icon-theme"
+RCONFLICTS_${PN} = "gnome-icon-theme"
+RPROVIDES_${PN} = "gnome-icon-theme"
+
+FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
+FILES_${PN}-symbolic-hires = "${prefix}/share/icons/Adwaita/96x96/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/64x64/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/48x48/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/32x32/*/*.symbolic.png"
+FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/16x16/*/*.symbolic.png \
+ ${prefix}/share/icons/Adwaita/24x24/*/*.symbolic.png"
+FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/"
+FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
+ ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils.inc b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils.inc
deleted file mode 100644
index 8adfac7d7..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "A collection of documentation utilities for the Gnome project"
-DESCRIPTION = "The GNOME Documentation Build Utilities (gnome-doc- \
-utils) were created to make it easier for application developers to \
-include and create documentation in their releases. They include the \
-xml2po tool which makes it easier to translate and keep up to date \
-translations of documentation."
-LICENSE = "GPLv2 & LGPLv2.1"
-DEPENDS = "libxml2 libxslt libxslt-native gnome-doc-utils-native glib-2.0"
-DEPENDS_class-native = "libxml2-native libxslt-native intltool-native glib-2.0-native"
-
-inherit gnomebase gettext python-dir pythonnative autotools-brokensep
-
-CLEANBROKEN = "1"
-
-EXTRA_OECONF += "--disable-scrollkeeper"
-
-do_install_append() {
- chown -R root:root ${D}
-}
-
-do_install_append_class-native () {
- sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' ${D}${bindir}/xml2po
-}
-
-FILES_${PN} += "${datadir}/xml* ${PYTHON_SITEPACKAGES_DIR}/*"
-
-RDEPENDS_${PN} = "bash"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch
new file mode 100644
index 000000000..4cfcabd38
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch
@@ -0,0 +1,40 @@
+From 426e38468463a4abb495cf6a269b9635b2107519 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 17 May 2016 13:51:24 +0300
+Subject: [PATCH] glib-gettext.m4: Update AM_GLIB_GNU_GETTEXT to match glib
+
+This avoids
+ error: m4_copy: won't overwrite defined macro: glib_DEFUN
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Inappropriate [No upstream]
+---
+ m4/glib-gettext.m4 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/m4/glib-gettext.m4 b/m4/glib-gettext.m4
+index 81f8fd2..e2b142b 100644
+--- a/m4/glib-gettext.m4
++++ b/m4/glib-gettext.m4
+@@ -310,7 +310,7 @@ msgstr ""
+ # on various variables needed by the Makefile.in.in installed by
+ # glib-gettextize.
+ dnl
+-glib_DEFUN([GLIB_GNU_GETTEXT],
++AU_DEFUN([GLIB_GNU_GETTEXT],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+
+@@ -381,7 +381,8 @@ glib_DEFUN([GLIB_GNU_GETTEXT],
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+- ])
++ ]
++ [[$0: This macro is deprecated. You should use upstream gettext instead.]])
+
+ # AX_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+ # -------------------------------
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/sysrooted-pkg-config.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/sysrooted-pkg-config.patch
deleted file mode 100644
index 416d69864..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/sysrooted-pkg-config.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-In cross environment we have to prepend the sysroot to the path found by
-pkgconfig since the path returned from pkgconfig does not have sysroot prefixed
-it ends up using the files from host system. Now usually people have gnome installed
-so the build succeeds but if you dont have gnome installed on build host then
-it wont find the files on host system and packages using gnome-doc-utils wont
-compile.
-
-This should work ok with non sysrooted builds too since in those cases PKG_CONFIG_SYSROOT_DIR
-will be empty
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Index: gnome-doc-utils-0.20.10/tools/gnome-doc-utils.make
-===================================================================
---- gnome-doc-utils-0.20.10.orig/tools/gnome-doc-utils.make
-+++ gnome-doc-utils-0.20.10/tools/gnome-doc-utils.make
-@@ -133,11 +133,11 @@ _DOC_ABS_SRCDIR = @abs_srcdir@
- _xml2po ?= `which xml2po`
- _xml2po_mode = $(if $(DOC_ID),mallard,docbook)
-
--_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
--_db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
--_chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
--_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
--_ids ?= $(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
-+_db2html ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2html gnome-doc-utils`
-+_db2omf ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
-+_chunks ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
-+_credits ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
-+_ids ?= ${PKG_CONFIG_SYSROOT_DIR}$(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
-
- if ENABLE_SK
- _ENABLE_SK = true
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/use-usr-bin-env-for-python-in-xml2po.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/use-usr-bin-env-for-python-in-xml2po.patch
deleted file mode 100644
index 0e196c063..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/use-usr-bin-env-for-python-in-xml2po.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-We can't use #!/full/path/to/python -u as this can be longer than shebang
-allows for. In order to be appropraite for upstream more work would be
-needed to make sure that the main xml2po code doesn't rely on python
-being invoked with -u (force stdin/out/err to be used raw).
-
-Upstream-Status: Inappropriate [Would break behavior on Windows]
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Index: gnome-doc-utils-0.20.10/xml2po/xml2po/Makefile.am
-===================================================================
---- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/Makefile.am
-+++ gnome-doc-utils-0.20.10/xml2po/xml2po/Makefile.am
-@@ -7,7 +7,6 @@ CLEANFILES = xml2po
-
- xml2po: xml2po.py.in
- $(AM_V_GEN)sed -e "s/^VERSION =.*/VERSION = \"@VERSION@\"/" \
-- -e "s+^#!.*python.*+#!$(PYTHON)+" \
- < $(srcdir)/xml2po.py.in > xml2po
- $(AM_V_at)chmod +x xml2po
-
-Index: gnome-doc-utils-0.20.10/xml2po/xml2po/xml2po.py.in
-===================================================================
---- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/xml2po.py.in
-+++ gnome-doc-utils-0.20.10/xml2po/xml2po/xml2po.py.in
-@@ -1,4 +1,4 @@
--#!/usr/bin/python -u
-+#!/usr/bin/env python
- # -*- encoding: utf-8 -*-
- # Copyright (c) 2004, 2005, 2006 Danilo Ĺ egan <danilo@gnome.org>.
- # Copyright (c) 2009 Claude Paroz <claude@2xlibre.net>.
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/xsltproc_nonet.patch b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/xsltproc_nonet.patch
deleted file mode 100644
index 9346494e9..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils/xsltproc_nonet.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-This adds the -nonet option to xsltproc invocations, which fixes
-compile errors when building the gnome-doc-utils docs.
-
-Upstream-Status: Inappropriate [configuration]
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Index: gnome-doc-utils-0.20.10/doc/xslt/Makefile.am
-===================================================================
---- gnome-doc-utils-0.20.10.orig/doc/xslt/Makefile.am
-+++ gnome-doc-utils-0.20.10/doc/xslt/Makefile.am
-@@ -21,14 +21,14 @@ all: $(xsldoc_docs) $(xsldoc_xmls)
-
- $(xsldoc_docs): $(xsldoc_xsls) xsldoc.awk xsldoc-fill.xsl
- $(AM_V_GEN)$(GDU_AWK) -f "$(srcdir)/xsldoc.awk" "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" \
-- | xsltproc -o "$@" \
-+ | xsltproc -nonet -o "$@" \
- --stringparam basename "$(basename $(notdir $@))" \
- --stringparam xsl_file "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" \
- "$(srcdir)/xsldoc-fill.xsl" -
-
- $(xsldoc_xmls): xsldoc-docbook.xsl
- $(xsldoc_xmls): C/%.xml : C/%.xsldoc
-- $(AM_V_GEN)xsltproc -o "$@" \
-+ $(AM_V_GEN)xsltproc -nonet -o "$@" \
- --stringparam basename "$(basename $(notdir $@))" \
- --stringparam xsl_file "$(filter %/$(basename $(notdir $@)).xsl,$(xsldoc_xsls))" \
- "$(srcdir)/xsldoc-docbook.xsl" "$<"
-@@ -62,7 +62,7 @@ gnome-doc-xslt-check-includes:
- gnome-doc-xslt-check-xsldoc: $(xsldoc_docs)
- @echo "Running xsldoc checks";
- @(echo "<xsldoc>"; cat $(xsldoc_docs); echo "</xsldoc>") \
-- | xsltproc "$(srcdir)/xsldoc-check.xsl" - 1> /dev/null
-+ | xsltproc -nonet "$(srcdir)/xsldoc-check.xsl" - 1> /dev/null
-
- .PHONY: clean-xsldoc
- clean-local: clean_xsldoc
-Index: gnome-doc-utils-0.20.10/tools/gnome-doc-utils.make
-===================================================================
---- gnome-doc-utils-0.20.10.orig/tools/gnome-doc-utils.make
-+++ gnome-doc-utils-0.20.10/tools/gnome-doc-utils.make
-@@ -37,7 +37,7 @@ $(DOC_H_FILE): $(DOC_H_DOCS);
- list='$(DOC_H_DOCS)'; for doc in $$list; do \
- xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
- if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \
-- xsltproc --path "$$xmlpath" $(_credits) $$doc; \
-+ xsltproc -nonet --path "$$xmlpath" $(_credits) $$doc; \
- done | sort | uniq \
- | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \
- | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp
-@@ -50,7 +50,7 @@ $(DOC_H_FILE): $(DOC_H_DOCS);
- docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \
- | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \
- echo $$xmlpath; \
-- ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \
-+ ids=`xsltproc -nonet --xinclude --path "$$xmlpath" $(_ids) $$doc`; \
- for id in $$ids; do \
- echo '#define HELP_'`echo $$docid`'_'`echo $$id \
- | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \
-@@ -197,7 +197,7 @@ $(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %
- echo "The file '$(_skcontentslist)' does not exist." >&2; \
- echo "Please check your ScrollKeeper installation." >&2; \
- exit 1; }
-- $(GDU_V_DB2OMF)xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; }
-+ $(GDU_V_DB2OMF)xsltproc -nonet -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; }
-
- ## @ _DOC_OMF_HTML
- ## The OMF files for HTML output
-@@ -212,7 +212,7 @@ if ENABLE_SK
- echo "Please check your ScrollKeeper installation." >&2; \
- exit 1; }
- endif
-- $(GDU_V_DB2OMF)xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; }
-+ $(GDU_V_DB2OMF)xsltproc -nonet -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; }
-
- ## @ _DOC_OMF_ALL
- ## All OMF output files to be built
-@@ -267,7 +267,7 @@ _DOC_C_FIGURES = $(if $(DOC_FIGURES),
- ## All HTML documentation in the C locale
- # FIXME: probably have to shell escape to determine the file names
- _DOC_C_HTML = $(foreach f, \
-- $(shell xsltproc --xinclude \
-+ $(shell xsltproc -nonet --xinclude \
- --stringparam db.chunk.basename "$(DOC_MODULE)" \
- $(_chunks) "C/$(DOC_MODULE).xml"), \
- C/$(f).xhtml)
-@@ -393,7 +393,7 @@ _DOC_HTML_ALL = $(if $(filter html HTML,
- _DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml)
-
- $(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
-- $(GDU_V_DB2HTM)xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@)
-+ $(GDU_V_DB2HTM)xsltproc -nonet -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@)
-
-
- ################################################################################
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils_0.20.10.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils_0.20.10.bb
deleted file mode 100644
index 78cc005f9..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-doc-utils_0.20.10.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require gnome-doc-utils.inc
-LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=eb723b61539feef013de476e68b5c50a \
- file://COPYING.LGPL;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI += "file://xsltproc_nonet.patch \
- file://use-usr-bin-env-for-python-in-xml2po.patch \
- file://sysrooted-pkg-config.patch \
- "
-
-SRC_URI[archive.md5sum] = "3c64ad7bacd617b04999e4a168afaac5"
-SRC_URI[archive.sha256sum] = "cb0639ffa9550b6ddf3b62f3b1add92fb92ab4690d351f2353cffe668be8c4a6"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-themes-standard_3.20.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-themes-standard_3.20.2.bb
new file mode 100644
index 000000000..c98d8702c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gnome/gnome-themes-standard_3.20.2.bb
@@ -0,0 +1,39 @@
+SUMMARY = "GTK+2 standard themes"
+HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/gnome-themes-standard/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome"
+
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+inherit autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even distro_features_check
+
+ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+
+DEPENDS += "intltool-native gtk+"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ "
+
+SRC_URI[md5sum] = "adc3b1d57330561fea524842d0c0b485"
+SRC_URI[sha256sum] = "9d0d9c4b2c9f9008301c3c1878ebb95859a735b7fd4a6a518802b9637e4a7915"
+
+EXTRA_OECONF = "--disable-gtk3-engine"
+
+do_install_append() {
+ # Only building Adwaita, remove highcontrast files
+ rm -rf ${D}${prefix}/share/themes/HighContrast \
+ ${D}${prefix}/share/icons
+}
+
+# There could be gnome-theme-highcontrast as well but that requires
+# gtk+3 and includes lots of icons (is also broken with B != S).
+PACKAGES += "gnome-theme-adwaita \
+ gnome-theme-adwaita-dbg \
+ gnome-theme-adwaita-dev"
+
+FILES_gnome-theme-adwaita = "${prefix}/share/themes/Adwaita \
+ ${libdir}/gtk-2.0/2.10.0/engines/libadwaita.so"
+FILES_gnome-theme-adwaita-dev = "${libdir}/gtk-2.0/2.10.0/engines/libadwaita.la"
+FILES_gnome-theme-adwaita-dbg = "${libdir}/gtk-2.0/2.10.0/engines/.debug/libadwaita.so"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
deleted file mode 100644
index 5026d8177..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From a57604e205e6535acd9989444ad1f5f5038f4fba Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 8 Oct 2015 18:30:35 +0300
-Subject: [PATCH 1/4] Prefix pkg-config paths with PKG_CONFIG_SYSROOT_DIR
- environment variable
-
-This environment variable sets the location of sysroot directory in cross-compilation
-environments; if the variable is not set, the prefix will be empty.
-
-Upstream-Status: Pending [review on oe-core list]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- Makefile-gir.am | 18 +++++++++---------
- m4/introspection.m4 | 8 ++++----
- 2 files changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/Makefile-gir.am b/Makefile-gir.am
-index 9aca664..09b9360 100644
---- a/Makefile-gir.am
-+++ b/Makefile-gir.am
-@@ -55,8 +55,8 @@ else
- endif
-
- # glib
--GLIB_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir glib-2.0)/glib-2.0
--GLIB_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir glib-2.0)
-+GLIB_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir glib-2.0)/glib-2.0
-+GLIB_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir glib-2.0)
-
- GLIB_LIBRARY=glib-2.0
-
-@@ -92,8 +92,8 @@ GLib-2.0.gir: g-ir-scanner g-ir-compiler$(EXEEXT)
- gir/DBusGLib-1.0.typelib: GObject-2.0.gir
-
- # gobject
--GOBJECT_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gobject-2.0)/glib-2.0
--GOBJECT_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gobject-2.0)
-+GOBJECT_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gobject-2.0)/glib-2.0
-+GOBJECT_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gobject-2.0)
-
- GOBJECT_LIBRARY=gobject-2.0
-
-@@ -120,8 +120,8 @@ GObject_2_0_gir_FILES = \
- BUILT_GIRSOURCES += GObject-2.0.gir
-
- # gmodule
--GMODULE_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gmodule-2.0)/glib-2.0
--GMODULE_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gmodule-2.0)
-+GMODULE_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gmodule-2.0)/glib-2.0
-+GMODULE_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gmodule-2.0)
-
- GMODULE_LIBRARY=gmodule-2.0
-
-@@ -146,13 +146,13 @@ GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h \
- BUILT_GIRSOURCES += GModule-2.0.gir
-
- # gio
--GIO_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gio-2.0)/glib-2.0
--GIO_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gio-2.0)
-+GIO_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gio-2.0)/glib-2.0
-+GIO_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gio-2.0)
-
- GIO_LIBRARY=gio-2.0
-
- if HAVE_GIO_UNIX
--GIO_UNIX_HDRS=$(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
-+GIO_UNIX_HDRS=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
- GIO_UNIX_PACKAGES = gio-unix-2.0
- else
- GIO_UNIX_HDRS=
-diff --git a/m4/introspection.m4 b/m4/introspection.m4
-index d89c3d9..b562266 100644
---- a/m4/introspection.m4
-+++ b/m4/introspection.m4
-@@ -56,14 +56,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
- INTROSPECTION_GIRDIR=
- INTROSPECTION_TYPELIBDIR=
- if test "x$found_introspection" = "xyes"; then
-- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
-- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
-- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
-+ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
-+ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
-+ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
- INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
- INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
-- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
-+ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
- fi
- AC_SUBST(INTROSPECTION_SCANNER)
- AC_SUBST(INTROSPECTION_COMPILER)
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
new file mode 100644
index 000000000..9abaea7e7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
@@ -0,0 +1,50 @@
+From 3a9d1e5ee0aae56fafec0beba2014c19e4ff310c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 23 Mar 2016 17:07:28 +0200
+Subject: [PATCH 1/5] Revert an incomplete upstream attempt at cross-compile
+ support
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ common.mk | 4 ----
+ giscanner/gdumpparser.py | 6 ------
+ 2 files changed, 10 deletions(-)
+
+diff --git a/common.mk b/common.mk
+index b778f7a..e26c637 100644
+--- a/common.mk
++++ b/common.mk
+@@ -24,12 +24,8 @@ INTROSPECTION_SCANNER_ARGS = \
+ --add-include-path=$(top_builddir) \
+ --add-include-path=$(top_builddir)/gir
+
+-# GI_CROSS_LAUNCHER is the command to use for executing g-ir-compiler.
+-# Normally will be undefined but can be set (e.g. to wine or qemu)
+-# when cross-compiling
+ INTROSPECTION_COMPILER = \
+ env PATH=".libs:$(PATH)" \
+- $(GI_CROSS_LAUNCHER) \
+ $(top_builddir)/g-ir-compiler$(EXEEXT)
+
+ INTROSPECTION_COMPILER_ARGS = \
+diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py
+index 1134f33..9bdc2bc 100644
+--- a/giscanner/gdumpparser.py
++++ b/giscanner/gdumpparser.py
+@@ -162,12 +162,6 @@ blob containing data gleaned from GObject's primitive introspection."""
+ out_path = os.path.join(self._binary.tmpdir, 'dump.xml')
+
+ args = []
+-
+- # Prepend the launcher command and arguments, if defined
+- launcher = os.environ.get('GI_CROSS_LAUNCHER')
+- if launcher:
+- args.extend(launcher.split())
+-
+ args.extend(self._binary.args)
+ args.append('--introspect-dump=%s,%s' % (in_path, out_path))
+
+--
+2.7.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-configure.ac-add-host-gi-gi-cross-wrapper-and-gi-ldd.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-configure.ac-add-host-gi-gi-cross-wrapper-and-gi-ldd.patch
deleted file mode 100644
index 6afefabc7..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-configure.ac-add-host-gi-gi-cross-wrapper-and-gi-ldd.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-From c6e4f83c373b577166a7e46130ce8ff025ee8515 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 19 Oct 2015 18:29:21 +0300
-Subject: [PATCH] configure.ac: add host-gi, gi-cross-wrapper, gi-ldd-wrapper
- and introspection-data options
-
-With the first option, gobject-introspection tools (g-ir-doc-tool and g-ir-scanner)
-that are already installed in the host system will be used for building the source tree.
-
-With the second option, g-ir-scanner will be instructed to use an executable
-wrapper to run binaries it's producing, and g-ir-compiler will be run
-through the same wrapper (host system's g-ir-compiler cannot be used because
-it's producing architecture-specific output).
-
-With the third option, giscanner will be instructed to use a special ldd
-command instead of system's ldd (which does not work when the binary to inspect
-is compiled for a different architecture).
-
-With the fourth option, it is possible to disable building of introspection data
-(.gir and .typelib files), which may be difficult or impossible in cross-compilation
-environments, because of lack of emulation (or native hardware) for the target architecture
-on which the target binaries can be run.
-
-These options are useful when cross-compiling for a different target architecture.
-
-Upstream-Status: Pending [review on oe-core list]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- Makefile.am | 2 ++
- common.mk | 39 +++++++++++++++++++++++++++++++++++++++
- configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++
- tests/Makefile.am | 5 ++++-
- 4 files changed, 87 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 437c673..1eb3545 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -21,7 +21,9 @@ include Makefile-cmph.am
- include Makefile-girepository.am
- include Makefile-giscanner.am
- include Makefile-examples.am
-+if BUILD_INTROSPECTION_DATA
- include Makefile-gir.am
-+endif
- include Makefile-tools.am
- include Makefile-msvcproj.am
-
-diff --git a/common.mk b/common.mk
-index e26c637..9f3a65f 100644
---- a/common.mk
-+++ b/common.mk
-@@ -6,6 +6,15 @@
- # module itself.
- #
-
-+if USE_HOST_GI
-+INTROSPECTION_SCANNER = \
-+ env PATH="$(PATH)" \
-+ LPATH=.libs \
-+ CC="$(CC)" \
-+ PYTHONPATH=$(top_builddir):$(top_srcdir) \
-+ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
-+ g-ir-scanner
-+else
- INTROSPECTION_SCANNER = \
- env PATH=".libs:$(PATH)" \
- LPATH=.libs \
-@@ -14,9 +23,24 @@ INTROSPECTION_SCANNER = \
- UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
- UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
- $(top_builddir)/g-ir-scanner
-+endif
-+
-+if USE_CROSS_WRAPPER
-+CROSS_WRAPPER_ARG = --use-binary-wrapper=$(GI_CROSS_WRAPPER)
-+else
-+CROSS_WRAPPER_ARG =
-+endif
-+
-+if USE_LDD_WRAPPER
-+LDD_WRAPPER_ARG = --use-ldd-wrapper=$(GI_LDD_WRAPPER)
-+else
-+LDD_WRAPPER_ARG =
-+endif
-
- INTROSPECTION_SCANNER_ARGS = \
- --verbose \
-+ $(CROSS_WRAPPER_ARG) \
-+ $(LDD_WRAPPER_ARG) \
- -I$(top_srcdir) \
- --add-include-path=$(srcdir) \
- --add-include-path=$(top_srcdir)/gir \
-@@ -24,9 +48,15 @@ INTROSPECTION_SCANNER_ARGS = \
- --add-include-path=$(top_builddir) \
- --add-include-path=$(top_builddir)/gir
-
-+if USE_CROSS_WRAPPER
-+INTROSPECTION_COMPILER = \
-+ env PATH=".libs:$(PATH)" \
-+ $(GI_CROSS_WRAPPER) $(top_builddir)/.libs/g-ir-compiler$(EXEEXT)
-+else
- INTROSPECTION_COMPILER = \
- env PATH=".libs:$(PATH)" \
- $(top_builddir)/g-ir-compiler$(EXEEXT)
-+endif
-
- INTROSPECTION_COMPILER_ARGS = \
- --includedir=$(srcdir) \
-@@ -35,6 +65,14 @@ INTROSPECTION_COMPILER_ARGS = \
- --includedir=$(top_builddir) \
- --includedir=$(top_builddir)/gir
-
-+if USE_HOST_GI
-+INTROSPECTION_DOCTOOL = \
-+ env PATH="$(PATH)" \
-+ LPATH=.libs \
-+ PYTHONPATH=$(top_builddir):$(top_srcdir) \
-+ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
-+ g-ir-doc-tool
-+else
- INTROSPECTION_DOCTOOL = \
- env PATH=".libs:$(PATH)" \
- LPATH=.libs \
-@@ -42,6 +80,7 @@ INTROSPECTION_DOCTOOL = \
- UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
- UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
- $(top_builddir)/g-ir-doc-tool
-+endif
-
- INTROSPECTION_DOCTOOL_ARGS = \
- --add-include-path=$(srcdir) \
-diff --git a/configure.ac b/configure.ac
-index b11596b..d78ae52 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -347,6 +347,48 @@ fi
-
- AC_SUBST(EXTRA_LINK_FLAGS)
-
-+AC_ARG_ENABLE([host-gi],
-+[AS_HELP_STRING([--enable-host-gi],[Use gobject introspection tools installed in the host system (useful when cross-compiling)])],
-+[case "${enableval}" in
-+ yes) host_gi=true ;;
-+ no) host_gi=false ;;
-+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-host-gi]) ;;
-+esac],[host_gi=false])
-+AM_CONDITIONAL([USE_HOST_GI], [test x$host_gi = xtrue])
-+
-+AC_ARG_ENABLE([gi-cross-wrapper],
-+[AS_HELP_STRING([--enable-gi-cross-wrapper=path],[Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)])],
-+[
-+GI_CROSS_WRAPPER="${enableval}"
-+use_wrapper=true
-+],[
-+GI_CROSS_WRAPPER=""
-+use_wrapper=false
-+])
-+AC_SUBST(GI_CROSS_WRAPPER)
-+AM_CONDITIONAL([USE_CROSS_WRAPPER], [test x$use_wrapper = xtrue])
-+
-+AC_ARG_ENABLE([gi-ldd-wrapper],
-+[AS_HELP_STRING([--enable-gi-ldd-wrapper=path],[Use a ldd wrapper instead of system's ldd command in giscanner (useful when cross-compiling)])],
-+[
-+GI_LDD_WRAPPER="${enableval}"
-+use_ldd_wrapper=true
-+],[
-+GI_LDD_WRAPPER=""
-+use_ldd_wrapper=false
-+])
-+AC_SUBST(GI_LDD_WRAPPER)
-+AM_CONDITIONAL([USE_LDD_WRAPPER], [test x$use_ldd_wrapper = xtrue])
-+
-+AC_ARG_ENABLE([introspection-data],
-+[AS_HELP_STRING([--enable-introspection-data],[Build introspection data (.gir and .typelib files) in addition to library and tools])],
-+[case "${enableval}" in
-+ yes) introspection_data=true ;;
-+ no) introspection_data=false ;;
-+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-introspection-data]) ;;
-+esac],[introspection_data=true])
-+AM_CONDITIONAL([BUILD_INTROSPECTION_DATA], [test x$introspection_data = xtrue])
-+
- AC_CONFIG_FILES([
- Makefile
- tests/Makefile
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index bdd0fa7..75dd3c9 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -1,6 +1,9 @@
- include $(top_srcdir)/common.mk
-
--SUBDIRS = . scanner repository offsets warn
-+SUBDIRS = . scanner repository warn
-+if BUILD_INTROSPECTION_DATA
-+SUBDIRS += offsets
-+endif
-
- EXTRA_DIST=
- BUILT_SOURCES=
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-use-ldd-wrapper-option.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-use-ldd-wrapper-option.patch
deleted file mode 100644
index f923dcccf..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-use-ldd-wrapper-option.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 291a92f200981a772b2d03739dffb5926a82c5a5 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 30 Oct 2015 16:28:46 +0200
-Subject: [PATCH 1/2] giscanner: add a --use-ldd-wrapper option
-
-This is useful in cross-compile environments where system's ldd
-command does not work on binaries built for a different architecture
-
-Upstream-Status: Pending [review in oe-core]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- giscanner/scannermain.py | 3 +++
- giscanner/shlibs.py | 4 +++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
-index e37d3e3..b8fff5f 100755
---- a/giscanner/scannermain.py
-+++ b/giscanner/scannermain.py
-@@ -121,6 +121,9 @@ def _get_option_parser():
- parser.add_option("", "--use-binary-wrapper",
- action="store", dest="wrapper", default=None,
- help="wrapper to use for running programs (useful when cross-compiling)")
-+ parser.add_option("", "--use-ldd-wrapper",
-+ action="store", dest="ldd_wrapper", default=None,
-+ help="wrapper to use instead of ldd (useful when cross-compiling)")
- parser.add_option("", "--program-arg",
- action="append", dest="program_args", default=[],
- help="extra arguments to program")
-diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
-index 1ad75ee..41117c6 100644
---- a/giscanner/shlibs.py
-+++ b/giscanner/shlibs.py
-@@ -100,7 +100,9 @@ def _resolve_non_libtool(options, binary, libraries):
- args.extend(libtool)
- args.append('--mode=execute')
- platform_system = platform.system()
-- if platform_system == 'Darwin':
-+ if options.ldd_wrapper:
-+ args.extend([options.ldd_wrapper, binary.args[0]])
-+ elif platform_system == 'Darwin':
- args.extend(['otool', '-L', binary.args[0]])
- else:
- args.extend(['ldd', binary.args[0]])
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch
deleted file mode 100644
index e1241a949..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 2322f36056265f809aaffb74fcf5ac0c83129752 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 19 Oct 2015 18:26:40 +0300
-Subject: [PATCH 2/4] giscanner: add --use-binary-wrapper option
-
-With this option, giscanner will use a wrapper executable to run
-binaries it's producing, instead of running them directly. This
-is useful when binaries are cross-compiled and cannot be run directly,
-but they can be run using for example QEMU emulation.
-
-Upstream-Status: Pending [review on oe-core list]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- giscanner/scannermain.py | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
-index b36284d..e37d3e3 100755
---- a/giscanner/scannermain.py
-+++ b/giscanner/scannermain.py
-@@ -118,6 +118,9 @@ def _get_option_parser():
- parser.add_option("", "--program",
- action="store", dest="program", default=None,
- help="program to execute")
-+ parser.add_option("", "--use-binary-wrapper",
-+ action="store", dest="wrapper", default=None,
-+ help="wrapper to use for running programs (useful when cross-compiling)")
- parser.add_option("", "--program-arg",
- action="append", dest="program_args", default=[],
- help="extra arguments to program")
-@@ -406,6 +409,17 @@ def create_binary(transformer, options, args):
- gdump_parser.get_error_quark_functions())
-
- shlibs = resolve_shlibs(options, binary, options.libraries)
-+ if options.wrapper:
-+ # The wrapper needs the binary itself, not the libtool wrapper script,
-+ # so we check if libtool has sneaked the binary into .libs subdirectory
-+ # and adjust the path accordingly
-+ import os.path
-+ dir_name, binary_name = os.path.split(binary.args[0])
-+ libtool_binary = os.path.join(dir_name, '.libs', binary_name)
-+ if os.path.exists(libtool_binary):
-+ binary.args[0] = libtool_binary
-+ # Then prepend the wrapper to the command line to execute
-+ binary.args = [options.wrapper] + binary.args
- gdump_parser.set_introspection_binary(binary)
- gdump_parser.parse()
- return shlibs
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
new file mode 100644
index 000000000..48a0c85f0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
@@ -0,0 +1,203 @@
+From b1503fe2693d602b3e24e4b832dc0934960d5d22 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 19 Oct 2015 18:29:21 +0300
+Subject: [PATCH 2/5] configure.ac: add host-gi, gi-cross-wrapper,
+ gi-ldd-wrapper and introspection-data options
+
+With the first option, gobject-introspection tools (g-ir-doc-tool and g-ir-scanner)
+that are already installed in the host system will be used for building the source tree.
+
+With the second option, g-ir-scanner will be instructed to use an executable
+wrapper to run binaries it's producing, and g-ir-compiler will be run
+through the same wrapper (host system's g-ir-compiler cannot be used because
+it's producing architecture-specific output).
+
+With the third option, giscanner will be instructed to use a special ldd
+command instead of system's ldd (which does not work when the binary to inspect
+is compiled for a different architecture).
+
+With the fourth option, it is possible to disable building of introspection data
+(.gir and .typelib files), which may be difficult or impossible in cross-compilation
+environments, because of lack of emulation (or native hardware) for the target architecture
+on which the target binaries can be run.
+
+These options are useful when cross-compiling for a different target architecture.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.am | 2 ++
+ common.mk | 39 +++++++++++++++++++++++++++++++++++++++
+ configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++
+ tests/Makefile.am | 5 ++++-
+ 4 files changed, 87 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b080a89..ce8d29b 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -21,7 +21,9 @@ include Makefile-cmph.am
+ include Makefile-girepository.am
+ include Makefile-giscanner.am
+ include Makefile-examples.am
++if BUILD_INTROSPECTION_DATA
+ include Makefile-gir.am
++endif
+ include Makefile-tools.am
+ include Makefile-msvcproj.am
+
+diff --git a/common.mk b/common.mk
+index e26c637..9f3a65f 100644
+--- a/common.mk
++++ b/common.mk
+@@ -6,6 +6,15 @@
+ # module itself.
+ #
+
++if USE_HOST_GI
++INTROSPECTION_SCANNER = \
++ env PATH="$(PATH)" \
++ LPATH=.libs \
++ CC="$(CC)" \
++ PYTHONPATH=$(top_builddir):$(top_srcdir) \
++ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
++ g-ir-scanner
++else
+ INTROSPECTION_SCANNER = \
+ env PATH=".libs:$(PATH)" \
+ LPATH=.libs \
+@@ -14,9 +23,24 @@ INTROSPECTION_SCANNER = \
+ UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+ $(top_builddir)/g-ir-scanner
++endif
++
++if USE_CROSS_WRAPPER
++CROSS_WRAPPER_ARG = --use-binary-wrapper=$(GI_CROSS_WRAPPER)
++else
++CROSS_WRAPPER_ARG =
++endif
++
++if USE_LDD_WRAPPER
++LDD_WRAPPER_ARG = --use-ldd-wrapper=$(GI_LDD_WRAPPER)
++else
++LDD_WRAPPER_ARG =
++endif
+
+ INTROSPECTION_SCANNER_ARGS = \
+ --verbose \
++ $(CROSS_WRAPPER_ARG) \
++ $(LDD_WRAPPER_ARG) \
+ -I$(top_srcdir) \
+ --add-include-path=$(srcdir) \
+ --add-include-path=$(top_srcdir)/gir \
+@@ -24,9 +48,15 @@ INTROSPECTION_SCANNER_ARGS = \
+ --add-include-path=$(top_builddir) \
+ --add-include-path=$(top_builddir)/gir
+
++if USE_CROSS_WRAPPER
++INTROSPECTION_COMPILER = \
++ env PATH=".libs:$(PATH)" \
++ $(GI_CROSS_WRAPPER) $(top_builddir)/.libs/g-ir-compiler$(EXEEXT)
++else
+ INTROSPECTION_COMPILER = \
+ env PATH=".libs:$(PATH)" \
+ $(top_builddir)/g-ir-compiler$(EXEEXT)
++endif
+
+ INTROSPECTION_COMPILER_ARGS = \
+ --includedir=$(srcdir) \
+@@ -35,6 +65,14 @@ INTROSPECTION_COMPILER_ARGS = \
+ --includedir=$(top_builddir) \
+ --includedir=$(top_builddir)/gir
+
++if USE_HOST_GI
++INTROSPECTION_DOCTOOL = \
++ env PATH="$(PATH)" \
++ LPATH=.libs \
++ PYTHONPATH=$(top_builddir):$(top_srcdir) \
++ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
++ g-ir-doc-tool
++else
+ INTROSPECTION_DOCTOOL = \
+ env PATH=".libs:$(PATH)" \
+ LPATH=.libs \
+@@ -42,6 +80,7 @@ INTROSPECTION_DOCTOOL = \
+ UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+ UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+ $(top_builddir)/g-ir-doc-tool
++endif
+
+ INTROSPECTION_DOCTOOL_ARGS = \
+ --add-include-path=$(srcdir) \
+diff --git a/configure.ac b/configure.ac
+index 6c91fa5..21340a5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -360,6 +360,48 @@ fi
+
+ AC_SUBST(EXTRA_LINK_FLAGS)
+
++AC_ARG_ENABLE([host-gi],
++[AS_HELP_STRING([--enable-host-gi],[Use gobject introspection tools installed in the host system (useful when cross-compiling)])],
++[case "${enableval}" in
++ yes) host_gi=true ;;
++ no) host_gi=false ;;
++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-host-gi]) ;;
++esac],[host_gi=false])
++AM_CONDITIONAL([USE_HOST_GI], [test x$host_gi = xtrue])
++
++AC_ARG_ENABLE([gi-cross-wrapper],
++[AS_HELP_STRING([--enable-gi-cross-wrapper=path],[Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)])],
++[
++GI_CROSS_WRAPPER="${enableval}"
++use_wrapper=true
++],[
++GI_CROSS_WRAPPER=""
++use_wrapper=false
++])
++AC_SUBST(GI_CROSS_WRAPPER)
++AM_CONDITIONAL([USE_CROSS_WRAPPER], [test x$use_wrapper = xtrue])
++
++AC_ARG_ENABLE([gi-ldd-wrapper],
++[AS_HELP_STRING([--enable-gi-ldd-wrapper=path],[Use a ldd wrapper instead of system's ldd command in giscanner (useful when cross-compiling)])],
++[
++GI_LDD_WRAPPER="${enableval}"
++use_ldd_wrapper=true
++],[
++GI_LDD_WRAPPER=""
++use_ldd_wrapper=false
++])
++AC_SUBST(GI_LDD_WRAPPER)
++AM_CONDITIONAL([USE_LDD_WRAPPER], [test x$use_ldd_wrapper = xtrue])
++
++AC_ARG_ENABLE([introspection-data],
++[AS_HELP_STRING([--enable-introspection-data],[Build introspection data (.gir and .typelib files) in addition to library and tools])],
++[case "${enableval}" in
++ yes) introspection_data=true ;;
++ no) introspection_data=false ;;
++ *) AC_MSG_ERROR([bad value ${enableval} for --enable-introspection-data]) ;;
++esac],[introspection_data=true])
++AM_CONDITIONAL([BUILD_INTROSPECTION_DATA], [test x$introspection_data = xtrue])
++
+ AC_CONFIG_FILES([
+ Makefile
+ tests/Makefile
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index bdd0fa7..75dd3c9 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -1,6 +1,9 @@
+ include $(top_srcdir)/common.mk
+
+-SUBDIRS = . scanner repository offsets warn
++SUBDIRS = . scanner repository warn
++if BUILD_INTROSPECTION_DATA
++SUBDIRS += offsets
++endif
+
+ EXTRA_DIST=
+ BUILT_SOURCES=
+--
+2.7.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
new file mode 100644
index 000000000..f21eaca85
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
@@ -0,0 +1,51 @@
+From 704b888d0abfb01067352c40156f49f655691c7c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 19 Oct 2015 18:26:40 +0300
+Subject: [PATCH 3/5] giscanner: add --use-binary-wrapper option
+
+With this option, giscanner will use a wrapper executable to run
+binaries it's producing, instead of running them directly. This
+is useful when binaries are cross-compiled and cannot be run directly,
+but they can be run using for example QEMU emulation.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ giscanner/scannermain.py | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index 633496f..d684cd0 100755
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -124,6 +124,9 @@ def _get_option_parser():
+ parser.add_option("", "--program",
+ action="store", dest="program", default=None,
+ help="program to execute")
++ parser.add_option("", "--use-binary-wrapper",
++ action="store", dest="wrapper", default=None,
++ help="wrapper to use for running programs (useful when cross-compiling)")
+ parser.add_option("", "--program-arg",
+ action="append", dest="program_args", default=[],
+ help="extra arguments to program")
+@@ -419,6 +422,17 @@ def create_binary(transformer, options, args):
+ gdump_parser.get_error_quark_functions())
+
+ shlibs = resolve_shlibs(options, binary, options.libraries)
++ if options.wrapper:
++ # The wrapper needs the binary itself, not the libtool wrapper script,
++ # so we check if libtool has sneaked the binary into .libs subdirectory
++ # and adjust the path accordingly
++ import os.path
++ dir_name, binary_name = os.path.split(binary.args[0])
++ libtool_binary = os.path.join(dir_name, '.libs', binary_name)
++ if os.path.exists(libtool_binary):
++ binary.args[0] = libtool_binary
++ # Then prepend the wrapper to the command line to execute
++ binary.args = [options.wrapper] + binary.args
+ gdump_parser.set_introspection_binary(binary)
+ gdump_parser.parse()
+ return shlibs
+--
+2.7.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
new file mode 100644
index 000000000..afb71e767
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
@@ -0,0 +1,47 @@
+From d4ad57fd4a32c4f0d2f0522a3090ef940746431b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Oct 2015 16:28:46 +0200
+Subject: [PATCH 4/5] giscanner: add a --use-ldd-wrapper option
+
+This is useful in cross-compile environments where system's ldd
+command does not work on binaries built for a different architecture
+
+Upstream-Status: Pending [review in oe-core]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ giscanner/scannermain.py | 3 +++
+ giscanner/shlibs.py | 4 +++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index d684cd0..1b3b369 100755
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -127,6 +127,9 @@ def _get_option_parser():
+ parser.add_option("", "--use-binary-wrapper",
+ action="store", dest="wrapper", default=None,
+ help="wrapper to use for running programs (useful when cross-compiling)")
++ parser.add_option("", "--use-ldd-wrapper",
++ action="store", dest="ldd_wrapper", default=None,
++ help="wrapper to use instead of ldd (useful when cross-compiling)")
+ parser.add_option("", "--program-arg",
+ action="append", dest="program_args", default=[],
+ help="extra arguments to program")
+diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
+index c93d20c..c5b5942 100644
+--- a/giscanner/shlibs.py
++++ b/giscanner/shlibs.py
+@@ -105,7 +105,9 @@ def _resolve_non_libtool(options, binary, libraries):
+ args.extend(libtool)
+ args.append('--mode=execute')
+ platform_system = platform.system()
+- if platform_system == 'Darwin':
++ if options.ldd_wrapper:
++ args.extend([options.ldd_wrapper, binary.args[0]])
++ elif platform_system == 'Darwin':
+ args.extend(['otool', '-L', binary.args[0]])
+ else:
+ args.extend(['ldd', binary.args[0]])
+--
+2.7.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
new file mode 100644
index 000000000..47a18ec84
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
@@ -0,0 +1,96 @@
+From e08b3677dd04d6ec407ba8f74f601b2d51310eff Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 8 Oct 2015 18:30:35 +0300
+Subject: [PATCH 5/5] Prefix pkg-config paths with PKG_CONFIG_SYSROOT_DIR
+ environment variable
+
+This environment variable sets the location of sysroot directory in cross-compilation
+environments; if the variable is not set, the prefix will be empty.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile-gir.am | 18 +++++++++---------
+ m4/introspection.m4 | 8 ++++----
+ 2 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/Makefile-gir.am b/Makefile-gir.am
+index a09260a..ba6e89e 100644
+--- a/Makefile-gir.am
++++ b/Makefile-gir.am
+@@ -55,8 +55,8 @@ else
+ endif
+
+ # glib
+-GLIB_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir glib-2.0)/glib-2.0
+-GLIB_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir glib-2.0)
++GLIB_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir glib-2.0)/glib-2.0
++GLIB_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir glib-2.0)
+
+ GLIB_LIBRARY=glib-2.0
+
+@@ -92,8 +92,8 @@ GLib-2.0.gir: g-ir-scanner g-ir-compiler$(EXEEXT)
+ gir/DBusGLib-1.0.typelib: GObject-2.0.gir
+
+ # gobject
+-GOBJECT_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gobject-2.0)/glib-2.0
+-GOBJECT_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gobject-2.0)
++GOBJECT_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gobject-2.0)/glib-2.0
++GOBJECT_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gobject-2.0)
+
+ GOBJECT_LIBRARY=gobject-2.0
+
+@@ -120,8 +120,8 @@ GObject_2_0_gir_FILES = \
+ BUILT_GIRSOURCES += GObject-2.0.gir
+
+ # gmodule
+-GMODULE_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gmodule-2.0)/glib-2.0
+-GMODULE_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gmodule-2.0)
++GMODULE_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gmodule-2.0)/glib-2.0
++GMODULE_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gmodule-2.0)
+
+ GMODULE_LIBRARY=gmodule-2.0
+
+@@ -146,13 +146,13 @@ GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h \
+ BUILT_GIRSOURCES += GModule-2.0.gir
+
+ # gio
+-GIO_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gio-2.0)/glib-2.0
+-GIO_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gio-2.0)
++GIO_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gio-2.0)/glib-2.0
++GIO_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gio-2.0)
+
+ GIO_LIBRARY=gio-2.0
+
+ if HAVE_GIO_UNIX
+-GIO_UNIX_INCLUDEDIR = $(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0
++GIO_UNIX_INCLUDEDIR = $(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0
+ GIO_UNIX_HDRS = $(GIO_UNIX_INCLUDEDIR)/gio/*.h
+ GIO_UNIX_PACKAGES = gio-unix-2.0
+ else
+diff --git a/m4/introspection.m4 b/m4/introspection.m4
+index d89c3d9..b562266 100644
+--- a/m4/introspection.m4
++++ b/m4/introspection.m4
+@@ -56,14 +56,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+ INTROSPECTION_GIRDIR=
+ INTROSPECTION_TYPELIBDIR=
+ if test "x$found_introspection" = "xyes"; then
+- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
++ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
++ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
++ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+ INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+ INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+ INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+ INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
++ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+ fi
+ AC_SUBST(INTROSPECTION_SCANNER)
+ AC_SUBST(INTROSPECTION_COMPILER)
+--
+2.7.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
deleted file mode 100644
index 9b16147da..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
+++ /dev/null
@@ -1,163 +0,0 @@
-HOMEPAGE = "http://gnome.org"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "libs"
-LICENSE = "LGPLv2+ & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=90d577535a3898e1ae5dbf0ae3509a8c \
- file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
- file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
- file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/1.46/${BPN}-${PV}.tar.xz \
- file://0001-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
- file://0001-giscanner-add-use-binary-wrapper-option.patch \
- file://0001-giscanner-add-a-use-ldd-wrapper-option.patch \
- file://0001-configure.ac-add-host-gi-gi-cross-wrapper-and-gi-ldd.patch \
- "
-SRC_URI[md5sum] = "adb40a31c7c80b65b0f4c8fd71b493dc"
-SRC_URI[sha256sum] = "6658bd3c2b8813eb3e2511ee153238d09ace9d309e4574af27443d87423e4233"
-
-inherit autotools pkgconfig gtk-doc pythonnative qemu gobject-introspection-data
-BBCLASSEXTEND = "native"
-
-# necessary to let the call for python-config from configure.ac succeed
-export BUILD_SYS
-export HOST_SYS
-export STAGING_INCDIR
-export STAGING_LIBDIR
-
-# needed for writing out the qemu wrapper script
-export STAGING_DIR_HOST
-export B
-
-DEPENDS_append = " libffi zlib glib-2.0 python"
-
-# target build needs qemu to run temporary introspection binaries created
-# on the fly by g-ir-scanner and a native version of itself to run
-# native versions of its own tools during build.
-# Also prelink-rtld is used to find out library dependencies of introspection binaries
-# (standard ldd doesn't work when cross-compiling).
-DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
-
-SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir"
-
-do_configure_prepend_class-native() {
- # Tweak the native python scripts so that they don't refer to the
- # full path of native python binary (the solution is taken from glib-2.0 recipe)
- # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
- sed -i -e '1s,#!.*,#!${USRBINPATH}/env nativepython,' ${S}/tools/g-ir-tool-template.in
-}
-
-do_configure_prepend_class-target() {
- # Write out a qemu wrapper that will be given to gi-scanner so that it
- # can run target helper binaries through that.
- qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
- cat > ${B}/g-ir-scanner-qemuwrapper << EOF
-#!/bin/sh
-# Use a modules directory which doesn't exist so we don't load random things
-# which may then get deleted (or their dependencies) and potentially segfault
-export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
-
-$qemu_binary "\$@"
-if [ \$? -ne 0 ]; then
- echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
- echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
- exit 1
-fi
-EOF
- chmod +x ${B}/g-ir-scanner-qemuwrapper
-
- # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files
- # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use
- # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory
- # from the target sysroot.
- cat > ${B}/g-ir-scanner-wrapper << EOF
-#!/bin/sh
-# This prevents g-ir-scanner from writing cache data to $HOME
-export GI_SCANNER_DISABLE_CACHE=1
-
-g-ir-scanner --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@"
-EOF
- chmod +x ${B}/g-ir-scanner-wrapper
-
- # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu.
- # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent.
- cat > ${B}/g-ir-compiler-wrapper << EOF
-#!/bin/sh
-${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@"
-EOF
- chmod +x ${B}/g-ir-compiler-wrapper
-
- # Write out a wrapper to use instead of ldd, which does not work when a binary is built
- # for a different architecture
- cat > ${B}/g-ir-scanner-lddwrapper << EOF
-#!/bin/sh
-prelink-rtld --root=$STAGING_DIR_HOST "\$@"
-EOF
- chmod +x ${B}/g-ir-scanner-lddwrapper
-
- # Also tweak the target python scripts so that they don't refer to the
- # native version of python binary (the solution is taken from glib-2.0 recipe)
- sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/tools/g-ir-tool-template.in
-}
-
-# Configure target build to use native tools of itself and to use a qemu wrapper
-# and optionally to generate introspection data
-EXTRA_OECONF_class-target += "--enable-host-gi \
- --enable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \
- --enable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \
- ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection-data', '--disable-introspection-data', d)} \
- "
-
-
-do_compile_prepend_class-target() {
- # This prevents g-ir-scanner from writing cache data to $HOME
- export GI_SCANNER_DISABLE_CACHE=1
-
- # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
- export GIR_EXTRA_LIBS_PATH=$B/.libs
-}
-
-# Our wrappers need to be available system-wide, because they will be used
-# to build introspection files for all other gobject-based packages
-do_install_append_class-target() {
- install -d ${D}${bindir}/
- install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
- install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
- install ${B}/g-ir-compiler-wrapper ${D}${bindir}/
- install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/
-}
-
-# .typelib files are needed at runtime and so they go to the main package
-FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
-
-# .gir files go to dev package, as they're needed for developing (but not for running)
-# things that depends on introspection.
-FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
-
-# These are used by gobject-based packages
-# to generate transient introspection binaries
-FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \
- ${datadir}/gobject-introspection-1.0/Makefile.introspection"
-
-# These are used by dependent packages (e.g. pygobject) to build their
-# testsuites.
-FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
- ${datadir}/gobject-introspection-1.0/tests/*.h"
-
-FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
-FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
-
-# we need target versions of introspection tools in sysroot so that they can be run via qemu
-# when building introspection files in other packages
-SYSROOT_PREPROCESS_FUNCS_append_class-target += "gi_binaries_sysroot_preprocess"
-
-gi_binaries_sysroot_preprocess() {
- sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
-
- # Also, tweak the binary names in introspection pkgconfig file, so that it picks up our
- # wrappers which do the cross-compile and qemu magic.
- sed -i \
- -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
- -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
- ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb
new file mode 100644
index 000000000..abaa48579
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb
@@ -0,0 +1,173 @@
+SUMMARY = "Middleware layer between GObject-using C libraries and language bindings"
+HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "libs"
+LICENSE = "LGPLv2+ & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=90d577535a3898e1ae5dbf0ae3509a8c \
+ file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
+ file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
+ file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/1.48/${BPN}-${PV}.tar.xz \
+ file://0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch \
+ file://0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch \
+ file://0003-giscanner-add-use-binary-wrapper-option.patch \
+ file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \
+ file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
+ "
+SRC_URI[md5sum] = "01301fa9019667d48e927353e08bc218"
+SRC_URI[sha256sum] = "fa275aaccdbfc91ec0bc9a6fd0562051acdba731e7d584b64a277fec60e75877"
+
+inherit autotools pkgconfig gtk-doc python3native qemu gobject-introspection-data upstream-version-is-even
+BBCLASSEXTEND = "native"
+
+# needed for writing out the qemu wrapper script
+export STAGING_DIR_HOST
+export B
+
+DEPENDS_append = " libffi zlib glib-2.0 python3 flex-native bison-native"
+
+# target build needs qemu to run temporary introspection binaries created
+# on the fly by g-ir-scanner and a native version of itself to run
+# native versions of its own tools during build.
+# Also prelink-rtld is used to find out library dependencies of introspection binaries
+# (standard ldd doesn't work when cross-compiling).
+DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
+
+SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir"
+
+do_configure_prepend_class-native() {
+ # Tweak the native python scripts so that they don't refer to the
+ # full path of native python binary (the solution is taken from glib-2.0 recipe)
+ # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
+ sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
+}
+
+do_configure_prepend_class-target() {
+ # Write out a qemu wrapper that will be given to gi-scanner so that it
+ # can run target helper binaries through that.
+ qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
+ cat > ${B}/g-ir-scanner-qemuwrapper << EOF
+#!/bin/sh
+# Use a modules directory which doesn't exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
+
+$qemu_binary "\$@"
+if [ \$? -ne 0 ]; then
+ echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
+ echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
+ exit 1
+fi
+EOF
+ chmod +x ${B}/g-ir-scanner-qemuwrapper
+
+ # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files
+ # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use
+ # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory
+ # from the target sysroot.
+ cat > ${B}/g-ir-scanner-wrapper << EOF
+#!/bin/sh
+# This prevents g-ir-scanner from writing cache data to $HOME
+export GI_SCANNER_DISABLE_CACHE=1
+
+g-ir-scanner --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@"
+EOF
+ chmod +x ${B}/g-ir-scanner-wrapper
+
+ # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu.
+ # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent.
+ cat > ${B}/g-ir-compiler-wrapper << EOF
+#!/bin/sh
+${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@"
+EOF
+ chmod +x ${B}/g-ir-compiler-wrapper
+
+ # Write out a wrapper to use instead of ldd, which does not work when a binary is built
+ # for a different architecture
+ cat > ${B}/g-ir-scanner-lddwrapper << EOF
+#!/bin/sh
+prelink-rtld --root=$STAGING_DIR_HOST "\$@"
+EOF
+ chmod +x ${B}/g-ir-scanner-lddwrapper
+
+ # Also tweak the target python scripts so that they don't refer to the
+ # native version of python binary (the solution is taken from glib-2.0 recipe)
+ sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in
+}
+
+# Configure target build to use native tools of itself and to use a qemu wrapper
+# and optionally to generate introspection data
+EXTRA_OECONF_class-target += "--enable-host-gi \
+ --enable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \
+ --enable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \
+ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection-data', '--disable-introspection-data', d)} \
+ "
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[doctool] = "--enable-doctool,--disable-doctool,python3-mako,"
+
+do_compile_prepend() {
+ # This prevents g-ir-scanner from writing cache data to $HOME
+ export GI_SCANNER_DISABLE_CACHE=1
+
+ # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
+ export GIR_EXTRA_LIBS_PATH=$B/.libs
+}
+
+# Our wrappers need to be available system-wide, because they will be used
+# to build introspection files for all other gobject-based packages
+do_install_append_class-target() {
+ install -d ${D}${bindir}/
+ install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
+ install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
+ install ${B}/g-ir-compiler-wrapper ${D}${bindir}/
+ install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/
+}
+
+# .typelib files are needed at runtime and so they go to the main package
+FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
+
+# .gir files go to dev package, as they're needed for developing (but not for running)
+# things that depends on introspection.
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
+
+# These are used by gobject-based packages
+# to generate transient introspection binaries
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \
+ ${datadir}/gobject-introspection-1.0/Makefile.introspection"
+
+# These are used by dependent packages (e.g. pygobject) to build their
+# testsuites.
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
+ ${datadir}/gobject-introspection-1.0/tests/*.h"
+
+FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
+FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
+
+# we need target versions of introspection tools in sysroot so that they can be run via qemu
+# when building introspection files in other packages
+SYSROOT_DIRS_append_class-target = " ${bindir}"
+
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess"
+gi_binaries_sysroot_preprocess() {
+ # Tweak the binary names in the introspection pkgconfig file, so that it
+ # picks up our wrappers which do the cross-compile and qemu magic.
+ sed -i \
+ -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
+ -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
+ ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
+}
+
+# Need to ensure ld.so.conf exists so prelink-native works
+# both before we build and if we install from sstate
+do_configure[prefuncs] += "gobject_introspection_preconfigure"
+python gobject_introspection_preconfigure () {
+ oe.utils.write_ld_so_conf(d)
+}
+
+SSTATEPOSTINSTFUNCS += "gobject_introspection_postinst"
+python gobject_introspection_postinst () {
+ if d.getVar("BB_CURRENTTASK", True).startswith("populate_sysroot"):
+ oe.utils.write_ld_so_conf(d)
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.19.3.bb b/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.19.3.bb
deleted file mode 100644
index 25fdabade..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.19.3.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "GNOME desktop-wide GSettings schemas"
-HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "glib-2.0 intltool-native"
-
-inherit gnomebase gsettings gettext gobject-introspection
-
-SRC_URI[archive.md5sum] = "fdc92abcffe46821be423193b275cf8b"
-SRC_URI[archive.sha256sum] = "9084989b75ca9b3fc5984c8a0d297a93d3d124f51cadd2bdaaaa75a783c80635"
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.20.0.bb b/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.20.0.bb
new file mode 100644
index 000000000..bb924ce74
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.20.0.bb
@@ -0,0 +1,13 @@
+SUMMARY = "GNOME desktop-wide GSettings schemas"
+HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "glib-2.0 intltool-native"
+
+inherit gnomebase gsettings gettext gobject-introspection upstream-version-is-even
+
+SRC_URI[archive.md5sum] = "c5d87ea480aa9bf66b134ddb5b8ea0f8"
+SRC_URI[archive.sha256sum] = "55a41b533c0ab955e0a36a84d73829451c88b027d8d719955d8f695c35c6d9c1"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc
index 5bbfe6b8e..c240baa2c 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc
@@ -58,7 +58,14 @@ FILES_libgail = " \
${libdir}/gtk-2.0/modules/libferret.so \
"
-GTKBASE_RRECOMMENDS ?= "liberation-fonts gdk-pixbuf-loader-png gdk-pixbuf-loader-jpeg gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm shared-mime-info"
+GTKBASE_RRECOMMENDS ?= "liberation-fonts \
+ gdk-pixbuf-loader-png \
+ gdk-pixbuf-loader-jpeg \
+ gdk-pixbuf-loader-gif \
+ gdk-pixbuf-loader-xpm \
+ shared-mime-info \
+ gnome-theme-adwaita \
+ "
GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
index bd29300d5..83e9b927b 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -6,7 +6,7 @@ BUGTRACKER = "https://bugzilla.gnome.org/"
SECTION = "libs"
DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \
- docbook-utils-native gdk-pixbuf-native libepoxy"
+ docbook-utils-native gdk-pixbuf-native"
LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
@@ -21,6 +21,8 @@ do_configure_prepend() {
# Do this because the configure script is running ./libtool directly
rm -f libtool
ln -s ${TARGET_PREFIX}libtool libtool
+ #delete a file that will get confused with generated one in ${B}
+ rm -f ${S}/gtk/gtktypefuncs.c
}
EXTRA_OECONF += " \
@@ -29,19 +31,25 @@ EXTRA_OECONF += " \
--enable-modules \
--disable-cups \
--disable-colord \
-"
+ WAYLAND_PROTOCOLS_SYSROOT_DIR=${STAGING_DIR}/${MACHINE} \
+ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "--disable-gtk-doc", d)} \
+ "
+EXTRA_OECONF[vardepsexclude] = "MACHINE"
do_compile_prepend() {
export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs"
}
PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \
+ ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "opengl", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "opengl x11", "glx", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}"
PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes"
+# this is provided by oe-core patch that removes epoxy/gl dependency from a X11 build
+PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,libepoxy"
PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl"
-PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa wayland-native"
+PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland wayland-protocols libxkbcommon virtual/mesa wayland-native"
do_install_append() {
mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
@@ -61,10 +69,6 @@ FILES_${PN}-demo = "${bindir}/gtk3-demo \
${datadir}/icons/hicolor/*/apps/gtk3-demo*.png \
${datadir}/icons/hicolor/*/apps/gtk3-widget-factory*.png"
-# The demo uses PNG files and mime type sniffing, so ensure that these
-# dependencies are present.
-RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info"
-
FILES_${PN}_append = " ${bindir}/gtk-update-icon-cache-3.0 \
${bindir}/gtk-query-immodules-3.0 \
${bindir}/gtk-launch \
@@ -75,6 +79,7 @@ FILES_${PN}_append = " ${bindir}/gtk-update-icon-cache-3.0 \
FILES_${PN}-dev += " \
${datadir}/gtk-3.0/gtkbuilder.rng \
${datadir}/gtk-3.0/include \
+ ${datadir}/gettext/its \
${libdir}/gtk-3.0/include \
${libdir}/gtk-3.0/${LIBV}/loaders/*.la \
${libdir}/gtk-3.0/${LIBV}/immodules/*.la \
@@ -84,9 +89,22 @@ FILES_${PN}-dev += " \
${bindir}/gtk-builder-convert \
${bindir}/gtk-encode-symbolic-svg \
${bindir}/gtk-builder-tool \
+ ${bindir}/gtk-query-settings \
"
-RRECOMMENDS_${PN} = "adwaita-icon-theme-symbolic"
+GTKBASE_RRECOMMENDS ?= "liberation-fonts \
+ gdk-pixbuf-loader-png \
+ gdk-pixbuf-loader-jpeg \
+ gdk-pixbuf-loader-gif \
+ gdk-pixbuf-loader-xpm \
+ shared-mime-info \
+ adwaita-icon-theme-symbolic \
+ "
+GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
+
+RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
+RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}"
+RDEPENDS_${PN}-dev += "${@bb.utils.contains("PACKAGECONFIG", "wayland", "wayland-protocols", "", d)}"
PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*"
@@ -110,4 +128,3 @@ python populate_packages_prepend () {
if (d.getVar('DEBIAN_NAMES', True)):
d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-3.0')
}
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch
new file mode 100644
index 000000000..0bda1f107
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch
@@ -0,0 +1,47 @@
+From 5a73a5b92566e314bbc8a1bd40f1ec204837c111 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 21 Jun 2016 14:53:56 +0300
+Subject: [PATCH 1/4] Hardcoded libtool
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 23d3077..b6931d6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -610,7 +610,7 @@ AC_MSG_CHECKING([whether to write dependencies into .pc files])
+ case $enable_explicit_deps in
+ auto)
+ export SED
+- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
++ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
+ if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then
+ enable_explicit_deps=yes
+ else
+@@ -876,7 +876,7 @@ else
+ dnl Now we check to see if our libtool supports shared lib deps
+ dnl (in a rather ugly way even)
+ if $dynworks; then
+- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
++ module_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
+ module_deplibs_check=`$module_libtool_config | \
+ grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
+ sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
+@@ -1630,7 +1630,7 @@ AC_SUBST(GTK_PRINT_BACKENDS)
+ # We are using gmodule-no-export now, but I'm leaving the stripping
+ # code in place for now, since pango and atk still require gmodule.
+ export SED
+-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ if test -n "$export_dynamic"; then
+ GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+ GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0001-Redo-focus-handling-in-treeview-once-more.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0001-Redo-focus-handling-in-treeview-once-more.patch
new file mode 100644
index 000000000..e819add88
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0001-Redo-focus-handling-in-treeview-once-more.patch
@@ -0,0 +1,39 @@
+Upstream-Status: Backport [29faa2db]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+
+From 29faa2db44b04b9cf7f4d96e32691f424490c730 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Sun, 11 Sep 2016 11:47:55 -0400
+Subject: [PATCH] Redo focus handling in treeview once more
+
+The fix for bug 767468 had some unintended side-effects. This is
+an attempt at doing the same fix (don't grab focus when we are
+grab-shadowed), while avoiding the breakage, by using GTK+'s
+internal tracking for grab-shadowed-ness.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=770508
+---
+ gtk/gtktreeview.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
+index a7463cc..73d3557 100644
+--- a/gtk/gtktreeview.c
++++ b/gtk/gtktreeview.c
+@@ -3050,11 +3050,10 @@ static void
+ grab_focus_and_unset_draw_keyfocus (GtkTreeView *tree_view)
+ {
+ GtkWidget *widget = GTK_WIDGET (tree_view);
+- GtkWidget *grab_widget = gtk_grab_get_current ();
+
+ if (gtk_widget_get_can_focus (widget) &&
+ !gtk_widget_has_focus (widget) &&
+- (!grab_widget || grab_widget == widget))
++ !_gtk_widget_get_shadowed (widget))
+ gtk_widget_grab_focus (widget);
+
+ tree_view->priv->draw_keyfocus = 0;
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
new file mode 100644
index 000000000..989716e51
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
@@ -0,0 +1,60 @@
+From d63b926f8c8d8b5c9f9ec33d078b775f0409d88a Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 16 Oct 2015 16:35:16 +0300
+Subject: [PATCH 2/4] Do not try to initialize GL without libGL
+
+_gdk_x11_screen_update_visuals_for_gl() will end up calling epoxys
+GLX api which will exit() if libGL.so.1 is not present. We do not
+want that to happen and we don't want every app to have to set
+"GDK_GL=disabled" environment variable: so use #ifdef set based on
+opengl distro feature.
+
+Upstream is not interested in the fix as it is: Either epoxy should be
+fixed (to not exit) or GTK+ possibly could do some additional probing
+before calling epoxy APIs.
+
+Upstream-Status: Denied
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 7 +++++++
+ gdk/x11/gdkvisual-x11.c | 5 +++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index b6931d6..e27da49 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -342,6 +342,13 @@ AC_ARG_ENABLE(mir-backend,
+ [enable the Mir gdk backend])],
+ [backend_set=yes])
+
++AC_ARG_ENABLE(glx,
++ [AS_HELP_STRING([--enable-glx],
++ [When enabled Gdk will try to initialize GLX])])
++AS_IF([test "x$enable_glx" != "xno"], [
++ AC_DEFINE([HAVE_GLX], [], [GLX will be available at runtime])
++])
++
+ if test -z "$backend_set"; then
+ if test "$platform_win32" = yes; then
+ enable_win32_backend=yes
+diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
+index 81479d8..3c8c5c0 100644
+--- a/gdk/x11/gdkvisual-x11.c
++++ b/gdk/x11/gdkvisual-x11.c
+@@ -306,7 +306,12 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
+ /* If GL is available we want to pick better default/rgba visuals,
+ as we care about glx details such as alpha/depth/stencil depth,
+ stereo and double buffering */
++ /* update_visuals_for_gl() will end up calling epoxy GLX api which
++ will exit if libgl is not there: so only do this if we know GL
++ is available */
++#ifdef HAVE_GLX
+ _gdk_x11_screen_update_visuals_for_gl (screen);
++#endif
+ }
+
+ gint
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
new file mode 100644
index 000000000..0912c44ff
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
@@ -0,0 +1,954 @@
+From a8fa547fdc1416b330aced805f5343ad912932ae Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 21 Jun 2016 15:11:39 +0300
+Subject: [PATCH 3/4] Add --disable-opengl configure option
+
+--disable-opengl will remove the dependency on libepoxy and on the
+OpenGL APIs. This is useful for those who want to keep using gtk+3
+without the "opengl" distro feature.
+
+GtkGLArea is still part of the API (it just doesn't work) even when
+OpenGL is disabled. GdkX11GLContext was removed from the Gtk API
+completely: that object exposes GL API elements so it had to be at
+the very least modified.
+
+The patch is _not_ great from a maintenance point of view and
+modifying the library API is also a fairly nasty thing to do.
+Long-term it would be good to find an alternative solution to this
+(maybe a no-op backend for libepoxy?)
+
+Upstream-Status: Inappropriate [Evil eye expected from upstream]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 13 +++++++++++--
+ demos/gtk-demo/glarea.c | 13 +++++++++++++
+ docs/tools/Makefile.am | 9 +++++++--
+ docs/tools/widgets.c | 4 +++-
+ gdk/gdkdisplay.c | 4 +++-
+ gdk/gdkgl.c | 10 ++++++++++
+ gdk/gdkglcontext.c | 6 ++++++
+ gdk/gdkwindow.c | 13 +++++++++++++
+ gdk/x11/Makefile.am | 30 ++++++++++++++++++++++++++----
+ gdk/x11/gdkdisplay-x11.c | 6 +++++-
+ gdk/x11/gdkscreen-x11.c | 5 +++++
+ gdk/x11/gdkwindow-x11.c | 4 ++++
+ gdk/x11/gdkx-autocleanups.h | 2 ++
+ gdk/x11/gdkx-with-gl-context.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gdk/x11/gdkx-without-gl-context.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gdk/x11/gdkx.h | 59 -----------------------------------------------------------
+ gtk/Makefile.am | 3 +--
+ gtk/gtkglarea.c | 20 +++++++++++++++++++-
+ gtk/inspector/general.c | 6 ++++++
+ tests/Makefile.am | 10 +++++++---
+ testsuite/gtk/objects-finalize.c | 2 ++
+ 21 files changed, 260 insertions(+), 76 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index a01824e..dde9dc5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -342,6 +342,15 @@ AC_ARG_ENABLE(mir-backend,
+ [enable the Mir gdk backend])],
+ [backend_set=yes])
+
++AC_ARG_ENABLE(opengl,
++ [AS_HELP_STRING([--enable-opengl],
++ [When enabled, Gtk+ will use libepoxy and exposes GtkGLArea widget ])])
++AS_IF([test "x$enable_opengl" != "xno"], [
++ AC_DEFINE([HAVE_OPENGL], [1], [libepoxy and opengl APIs are available at buildtime])
++ EPOXY_PACKAGES="epoxy >= epoxy_required_version"
++])
++AM_CONDITIONAL([HAVE_OPENGL],[test "x$enable_opengl" != "xno"])
++
+ AC_ARG_ENABLE(glx,
+ [AS_HELP_STRING([--enable-glx],
+ [When enabled Gdk will try to initialize GLX])])
+@@ -1333,7 +1342,7 @@ CFLAGS="$saved_cflags"
+ LDFLAGS="$saved_ldflags"
+
+ GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
+-GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version"
++GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends $EPOXY_PACKAGES"
+
+ PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES)
+ GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB"
+@@ -1367,7 +1376,7 @@ fi
+ PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
+
+ GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
+-GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version"
++GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $EPOXY_PACKAGES"
+ if test "x$enable_x11_backend" = xyes -o "x$enable_wayland_backend" = xyes; then
+ GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
+ fi
+diff --git a/demos/gtk-demo/glarea.c b/demos/gtk-demo/glarea.c
+index 3aba729..c6c79f7 100644
+--- a/demos/gtk-demo/glarea.c
++++ b/demos/gtk-demo/glarea.c
+@@ -5,7 +5,9 @@
+
+ #include <math.h>
+ #include <gtk/gtk.h>
++#if HAVE_OPENGL
+ #include <epoxy/gl.h>
++#endif
+
+ static GtkWidget *demo_window = NULL;
+
+@@ -23,6 +25,8 @@ enum {
+ /* Rotation angles on each axis */
+ static float rotation_angles[N_AXIS] = { 0.0 };
+
++#ifdef HAVE_OPENGL
++
+ /* The object we are drawing */
+ static const GLfloat vertex_data[] = {
+ 0.f, 0.5f, 0.f, 1.f,
+@@ -213,6 +217,7 @@ compute_mvp (float *res,
+ static GLuint position_buffer;
+ static GLuint program;
+ static GLuint mvp_location;
++#endif
+
+ /* We need to set up our state when we realize the GtkGLArea widget */
+ static void
+@@ -223,8 +228,10 @@ realize (GtkWidget *widget)
+ if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
+ return;
+
++#ifdef HAVE_OPENGL
+ init_buffers (&position_buffer, NULL);
+ init_shaders (&program, &mvp_location);
++#endif
+ }
+
+ /* We should tear down the state when unrealizing */
+@@ -236,10 +243,13 @@ unrealize (GtkWidget *widget)
+ if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
+ return;
+
++#ifdef HAVE_OPENGL
+ glDeleteBuffers (1, &position_buffer);
+ glDeleteProgram (program);
++#endif
+ }
+
++#ifdef HAVE_OPENGL
+ static void
+ draw_triangle (void)
+ {
+@@ -272,6 +282,7 @@ draw_triangle (void)
+ glBindBuffer (GL_ARRAY_BUFFER, 0);
+ glUseProgram (0);
+ }
++#endif
+
+ static gboolean
+ render (GtkGLArea *area,
+@@ -280,6 +291,7 @@ render (GtkGLArea *area,
+ if (gtk_gl_area_get_error (area) != NULL)
+ return FALSE;
+
++#ifdef HAVE_OPENGL
+ /* Clear the viewport */
+ glClearColor (0.5, 0.5, 0.5, 1.0);
+ glClear (GL_COLOR_BUFFER_BIT);
+@@ -289,6 +301,7 @@ render (GtkGLArea *area,
+
+ /* Flush the contents of the pipeline */
+ glFlush ();
++#endif
+
+ return TRUE;
+ }
+diff --git a/docs/tools/Makefile.am b/docs/tools/Makefile.am
+index 6a6d70f..5cdf312 100644
+--- a/docs/tools/Makefile.am
++++ b/docs/tools/Makefile.am
+@@ -9,13 +9,18 @@ AM_CPPFLAGS = \
+ $(GTK_DEBUG_FLAGS) \
+ $(GTK_DEP_CFLAGS)
+
++if HAVE_OPENGL
++GEARS_LDADD = $(top_builddir)/tests/gtkgears.o
++endif
++
+ DEPS = \
+- $(top_builddir)/gtk/libgtk-3.la
++ $(top_builddir)/gtk/libgtk-3.la \
++ $(GEARS_LDADD)
+
+ LDADDS = \
+ $(top_builddir)/gtk/libgtk-3.la \
+ $(top_builddir)/gdk/libgdk-3.la \
+- $(top_builddir)/tests/gtkgears.o \
++ $(GEARS_LDADD) \
+ $(GTK_DEP_LIBS) \
+ $(GDK_DEP_LIBS) \
+ -lm
+diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
+index 932daf1..54239d6 100644
+--- a/docs/tools/widgets.c
++++ b/docs/tools/widgets.c
+@@ -1526,9 +1526,11 @@ create_gl_area (void)
+ widget = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
+
++#ifdef HAVE_OPENGL
+ gears = gtk_gears_new ();
+ gtk_container_add (GTK_CONTAINER (widget), gears);
+-
++#endif
++
+ info = new_widget_info ("glarea", widget, MEDIUM);
+
+ return info;
+diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
+index 6150ef7..2223629 100644
+--- a/gdk/gdkdisplay.c
++++ b/gdk/gdkdisplay.c
+@@ -2360,7 +2360,9 @@ gboolean
+ gdk_display_make_gl_context_current (GdkDisplay *display,
+ GdkGLContext *context)
+ {
+- return GDK_DISPLAY_GET_CLASS (display)->make_gl_context_current (display, context);
++ if (GDK_DISPLAY_GET_CLASS (display)->make_gl_context_current)
++ return GDK_DISPLAY_GET_CLASS (display)->make_gl_context_current (display, context);
++ return FALSE;
+ }
+
+ GdkRenderingMode
+diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c
+index e8ba770..ba7c84b 100644
+--- a/gdk/gdkgl.c
++++ b/gdk/gdkgl.c
+@@ -22,7 +22,9 @@
+
+ #include "gdkinternals.h"
+
++#ifdef HAVE_OPENGL
+ #include <epoxy/gl.h>
++#endif
+ #include <math.h>
+ #include <string.h>
+
+@@ -36,6 +38,7 @@ gdk_cairo_surface_mark_as_direct (cairo_surface_t *surface,
+ g_object_ref (window), g_object_unref);
+ }
+
++#ifdef HAVE_OPENGL
+ static const char *
+ get_vertex_type_name (int type)
+ {
+@@ -254,6 +257,7 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data)
+ glUseProgram (paint_data->current_program->program);
+ }
+ }
++#endif
+
+ void
+ gdk_gl_texture_quads (GdkGLContext *paint_context,
+@@ -261,6 +265,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
+ int n_quads,
+ GdkTexturedQuad *quads)
+ {
++#ifdef HAVE_OPENGL
+ GdkGLContextPaintData *paint_data = gdk_gl_context_get_paint_data (paint_context);
+ GdkGLContextProgram *program;
+ GdkWindow *window = gdk_gl_context_get_window (paint_context);
+@@ -324,6 +329,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
+
+ glDisableVertexAttribArray (program->position_location);
+ glDisableVertexAttribArray (program->uv_location);
++#endif
+ }
+
+ /* x,y,width,height describes a rectangle in the gl render buffer
+@@ -372,6 +378,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
+ int width,
+ int height)
+ {
++#ifdef HAVE_OPENGL
+ GdkGLContext *paint_context;
+ cairo_surface_t *image;
+ cairo_matrix_t matrix;
+@@ -692,6 +699,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
+ if (clip_region)
+ cairo_region_destroy (clip_region);
+
++#endif
+ }
+
+ /* This is always called with the paint context current */
+@@ -699,6 +707,7 @@ void
+ gdk_gl_texture_from_surface (cairo_surface_t *surface,
+ cairo_region_t *region)
+ {
++#ifdef HAVE_OPENGL
+ GdkGLContext *paint_context;
+ cairo_surface_t *image;
+ double device_x_offset, device_y_offset;
+@@ -799,4 +808,5 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
+
+ glDisable (GL_SCISSOR_TEST);
+ glDeleteTextures (1, &texture_id);
++#endif
+ }
+diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
+index 00a33eb..bd8a793 100644
+--- a/gdk/gdkglcontext.c
++++ b/gdk/gdkglcontext.c
+@@ -85,7 +85,9 @@
+ #include "gdkintl.h"
+ #include "gdk-private.h"
+
++#ifdef HAVE_OPENGL
+ #include <epoxy/gl.h>
++#endif
+
+ typedef struct {
+ GdkDisplay *display;
+@@ -239,6 +241,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
+ int height,
+ guint texture_target)
+ {
++#ifdef HAVE_OPENGL
+ g_return_if_fail (GDK_IS_GL_CONTEXT (context));
+
+ glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
+@@ -246,6 +249,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
+ glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
+ cairo_image_surface_get_data (image_surface));
+ glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
++#endif
+ }
+
+ static void
+@@ -635,6 +639,7 @@ gdk_gl_context_realize (GdkGLContext *context,
+ static void
+ gdk_gl_context_check_extensions (GdkGLContext *context)
+ {
++#ifdef HAVE_OPENGL
+ GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
+ gboolean has_npot, has_texture_rectangle;
+
+@@ -677,6 +682,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
+ priv->use_texture_rectangle ? "yes" : "no"));
+
+ priv->extensions_checked = TRUE;
++#endif
+ }
+
+ /**
+diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
+index 66ebb9d..74a0c3a 100644
+--- a/gdk/gdkwindow.c
++++ b/gdk/gdkwindow.c
+@@ -44,7 +44,9 @@
+
+ #include <math.h>
+
++#ifdef HAVE_OPENGL
+ #include <epoxy/gl.h>
++#endif
+
+ /* for the use of round() */
+ #include "fallback-c89.c"
+@@ -2759,6 +2761,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window,
+ {
+ GError *internal_error = NULL;
+
++#ifndef HAVE_OPENGL
++ g_set_error_literal (error, GDK_GL_ERROR,
++ GDK_GL_ERROR_NOT_AVAILABLE,
++ _("GL support disabled with --disable-opengl"));
++ return NULL;
++#endif
++
+ if (_gdk_gl_flags & GDK_GL_DISABLE)
+ {
+ g_set_error_literal (error, GDK_GL_ERROR,
+@@ -2955,6 +2964,7 @@ gdk_window_begin_paint_region (GdkWindow *window,
+ }
+ else
+ {
++#ifdef HAVE_OPENGL
+ gdk_gl_context_make_current (context);
+ /* With gl we always need a surface to combine the gl
+ drawing with the native drawing. */
+@@ -2969,6 +2979,7 @@ gdk_window_begin_paint_region (GdkWindow *window,
+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+
+ glViewport (0, 0, ww, wh);
++#endif
+ }
+ }
+
+@@ -3117,6 +3128,7 @@ gdk_window_end_paint (GdkWindow *window)
+
+ gdk_gl_context_make_current (window->gl_paint_context);
+
++#ifdef HAVE_OPENGL
+ if (!cairo_region_is_empty (opaque_region))
+ gdk_gl_texture_from_surface (window->current_paint.surface,
+ opaque_region);
+@@ -3127,6 +3139,7 @@ gdk_window_end_paint (GdkWindow *window)
+ window->current_paint.need_blend_region);
+ glDisable(GL_BLEND);
+ }
++#endif
+
+ cairo_region_destroy (opaque_region);
+
+diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am
+index c488a31..4ce3c07 100644
+--- a/gdk/x11/Makefile.am
++++ b/gdk/x11/Makefile.am
+@@ -39,8 +39,6 @@ libgdk_x11_la_SOURCES = \
+ gdkeventtranslator.c \
+ gdkeventtranslator.h \
+ gdkgeometry-x11.c \
+- gdkglcontext-x11.c \
+- gdkglcontext-x11.h \
+ gdkkeys-x11.c \
+ gdkmain-x11.c \
+ gdkproperty-x11.c \
+@@ -53,14 +51,32 @@ libgdk_x11_la_SOURCES = \
+ gdkwindow-x11.h \
+ gdkxftdefaults.c \
+ gdkxid.c \
+- gdkx.h \
+ gdkprivate-x11.h \
+ xsettings-client.h \
+ xsettings-client.c
+
++if HAVE_OPENGL
++libgdk_x11_la_SOURCES += \
++ gdkglcontext-x11.c \
++ gdkglcontext-x11.h
++endif
++
+ libgdkinclude_HEADERS = \
+ gdkx.h
+
++if HAVE_OPENGL
++GDKX_HEADER = gdkx-with-gl-context.h
++else
++GDKX_HEADER = gdkx-without-gl-context.h
++endif
++
++BUILT_SOURCES = gdkx.h
++
++.PHONY: gdkx.h
++gdkx.h:
++ $(AM_V_GEN) cd $(srcdir) \
++ && (cmp -s $(GDKX_HEADER) gdkx.h || cp $(GDKX_HEADER) gdkx.h )
++
+ libgdkx11include_HEADERS = \
+ gdkx-autocleanups.h \
+ gdkx11applaunchcontext.h \
+@@ -74,7 +90,6 @@ libgdkx11include_HEADERS = \
+ gdkx11display.h \
+ gdkx11displaymanager.h \
+ gdkx11dnd.h \
+- gdkx11glcontext.h \
+ gdkx11keys.h \
+ gdkx11property.h \
+ gdkx11screen.h \
+@@ -83,9 +98,16 @@ libgdkx11include_HEADERS = \
+ gdkx11visual.h \
+ gdkx11window.h
+
++if HAVE_OPENGL
++libgdkx11include_HEADERS += gdkx11glcontext.h
++endif
++
+ # We need to include all these C files here since the conditionals
+ # don't seem to be correctly expanded for the dist files.
+ EXTRA_DIST += \
++ gdkx.h \
+ gdksettings.c
+
++MAINTAINERCLEANFILES = gdkx.h
++
+ -include $(top_srcdir)/git.mk
+diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
+index de91c64..42d50f6 100644
+--- a/gdk/x11/gdkdisplay-x11.c
++++ b/gdk/x11/gdkdisplay-x11.c
+@@ -37,7 +37,9 @@
+ #include "gdkdisplay-x11.h"
+ #include "gdkprivate-x11.h"
+ #include "gdkscreen-x11.h"
++#ifdef HAVE_OPENGL
+ #include "gdkglcontext-x11.h"
++#endif
+ #include "gdk-private.h"
+
+ #include <glib.h>
+@@ -2959,7 +2961,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
+ display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
+ display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target;
+
+- display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current;
++#ifdef HAVE_OPENGL
++ display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current;
++#endif
+
+ display_class->get_default_seat = gdk_x11_display_get_default_seat;
+
+diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
+index 9d8ed20..bd46b00 100644
+--- a/gdk/x11/gdkscreen-x11.c
++++ b/gdk/x11/gdkscreen-x11.c
+@@ -1968,3 +1968,8 @@ gdk_x11_screen_get_current_desktop (GdkScreen *screen)
+ {
+ return get_netwm_cardinal_property (screen, "_NET_CURRENT_DESKTOP");
+ }
++
++#ifndef HAVE_OPENGL
++/* Function from in gdk/x11/gdkglcontext-x11.c */
++void _gdk_x11_screen_update_visuals_for_gl (GdkScreen *screen) {}
++#endif
+diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
+index 9ed087a..30d6eb7 100644
+--- a/gdk/x11/gdkwindow-x11.c
++++ b/gdk/x11/gdkwindow-x11.c
+@@ -36,7 +36,9 @@
+ #include "gdkasync.h"
+ #include "gdkeventsource.h"
+ #include "gdkdisplay-x11.h"
++#ifdef HAVE_OPENGL
+ #include "gdkglcontext-x11.h"
++#endif
+ #include "gdkprivate-x11.h"
+ #include "gdk-private.h"
+
+@@ -5782,7 +5784,9 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
+ impl_class->set_opaque_region = gdk_x11_window_set_opaque_region;
+ impl_class->set_shadow_width = gdk_x11_window_set_shadow_width;
+ impl_class->show_window_menu = gdk_x11_window_show_window_menu;
++#ifdef HAVE_OPENGL
+ impl_class->create_gl_context = gdk_x11_window_create_gl_context;
+ impl_class->invalidate_for_new_frame = gdk_x11_window_invalidate_for_new_frame;
++#endif
+ impl_class->get_unscaled_size = gdk_x11_window_get_unscaled_size;
+ }
+diff --git a/gdk/x11/gdkx-autocleanups.h b/gdk/x11/gdkx-autocleanups.h
+index edb0ea7..a317d61 100644
+--- a/gdk/x11/gdkx-autocleanups.h
++++ b/gdk/x11/gdkx-autocleanups.h
+@@ -30,7 +30,9 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11DeviceXI2, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Display, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11DisplayManager, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11DragContext, g_object_unref)
++#ifdef HAVE_OPENGL
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11GLContext, g_object_unref)
++#endif
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Visual, g_object_unref)
+diff --git a/gdk/x11/gdkx-with-gl-context.h b/gdk/x11/gdkx-with-gl-context.h
+new file mode 100644
+index 0000000..ae05fa6
+--- /dev/null
++++ b/gdk/x11/gdkx-with-gl-context.h
+@@ -0,0 +1,59 @@
++/* GDK - The GIMP Drawing Kit
++ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
++ */
++
++/*
++ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
++ * file for a list of people on the GTK+ Team. See the ChangeLog
++ * files for a list of changes. These files are distributed with
++ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
++ */
++
++#ifndef __GDK_X_H__
++#define __GDK_X_H__
++
++#include <gdk/gdk.h>
++
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++#define __GDKX_H_INSIDE__
++
++#include <gdk/x11/gdkx11applaunchcontext.h>
++#include <gdk/x11/gdkx11cursor.h>
++#include <gdk/x11/gdkx11device.h>
++#include <gdk/x11/gdkx11device-core.h>
++#include <gdk/x11/gdkx11device-xi2.h>
++#include <gdk/x11/gdkx11devicemanager.h>
++#include <gdk/x11/gdkx11devicemanager-core.h>
++#include <gdk/x11/gdkx11devicemanager-xi2.h>
++#include <gdk/x11/gdkx11display.h>
++#include <gdk/x11/gdkx11displaymanager.h>
++#include <gdk/x11/gdkx11dnd.h>
++#include <gdk/x11/gdkx11glcontext.h>
++#include <gdk/x11/gdkx11keys.h>
++#include <gdk/x11/gdkx11property.h>
++#include <gdk/x11/gdkx11screen.h>
++#include <gdk/x11/gdkx11selection.h>
++#include <gdk/x11/gdkx11utils.h>
++#include <gdk/x11/gdkx11visual.h>
++#include <gdk/x11/gdkx11window.h>
++
++#include <gdk/x11/gdkx-autocleanups.h>
++
++#undef __GDKX_H_INSIDE__
++
++#endif /* __GDK_X_H__ */
+diff --git a/gdk/x11/gdkx-without-gl-context.h b/gdk/x11/gdkx-without-gl-context.h
+new file mode 100644
+index 0000000..c9e2617
+--- /dev/null
++++ b/gdk/x11/gdkx-without-gl-context.h
+@@ -0,0 +1,58 @@
++/* GDK - The GIMP Drawing Kit
++ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
++ */
++
++/*
++ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
++ * file for a list of people on the GTK+ Team. See the ChangeLog
++ * files for a list of changes. These files are distributed with
++ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
++ */
++
++#ifndef __GDK_X_H__
++#define __GDK_X_H__
++
++#include <gdk/gdk.h>
++
++#include <X11/Xlib.h>
++#include <X11/Xutil.h>
++
++#define __GDKX_H_INSIDE__
++
++#include <gdk/x11/gdkx11applaunchcontext.h>
++#include <gdk/x11/gdkx11cursor.h>
++#include <gdk/x11/gdkx11device.h>
++#include <gdk/x11/gdkx11device-core.h>
++#include <gdk/x11/gdkx11device-xi2.h>
++#include <gdk/x11/gdkx11devicemanager.h>
++#include <gdk/x11/gdkx11devicemanager-core.h>
++#include <gdk/x11/gdkx11devicemanager-xi2.h>
++#include <gdk/x11/gdkx11display.h>
++#include <gdk/x11/gdkx11displaymanager.h>
++#include <gdk/x11/gdkx11dnd.h>
++#include <gdk/x11/gdkx11keys.h>
++#include <gdk/x11/gdkx11property.h>
++#include <gdk/x11/gdkx11screen.h>
++#include <gdk/x11/gdkx11selection.h>
++#include <gdk/x11/gdkx11utils.h>
++#include <gdk/x11/gdkx11visual.h>
++#include <gdk/x11/gdkx11window.h>
++
++#include <gdk/x11/gdkx-autocleanups.h>
++
++#undef __GDKX_H_INSIDE__
++
++#endif /* __GDK_X_H__ */
+diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
+deleted file mode 100644
+index ae05fa6..0000000
+--- a/gdk/x11/gdkx.h
++++ /dev/null
+@@ -1,59 +0,0 @@
+-/* GDK - The GIMP Drawing Kit
+- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+- *
+- * This library is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This library is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+- */
+-
+-/*
+- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
+- * file for a list of people on the GTK+ Team. See the ChangeLog
+- * files for a list of changes. These files are distributed with
+- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+- */
+-
+-#ifndef __GDK_X_H__
+-#define __GDK_X_H__
+-
+-#include <gdk/gdk.h>
+-
+-#include <X11/Xlib.h>
+-#include <X11/Xutil.h>
+-
+-#define __GDKX_H_INSIDE__
+-
+-#include <gdk/x11/gdkx11applaunchcontext.h>
+-#include <gdk/x11/gdkx11cursor.h>
+-#include <gdk/x11/gdkx11device.h>
+-#include <gdk/x11/gdkx11device-core.h>
+-#include <gdk/x11/gdkx11device-xi2.h>
+-#include <gdk/x11/gdkx11devicemanager.h>
+-#include <gdk/x11/gdkx11devicemanager-core.h>
+-#include <gdk/x11/gdkx11devicemanager-xi2.h>
+-#include <gdk/x11/gdkx11display.h>
+-#include <gdk/x11/gdkx11displaymanager.h>
+-#include <gdk/x11/gdkx11dnd.h>
+-#include <gdk/x11/gdkx11glcontext.h>
+-#include <gdk/x11/gdkx11keys.h>
+-#include <gdk/x11/gdkx11property.h>
+-#include <gdk/x11/gdkx11screen.h>
+-#include <gdk/x11/gdkx11selection.h>
+-#include <gdk/x11/gdkx11utils.h>
+-#include <gdk/x11/gdkx11visual.h>
+-#include <gdk/x11/gdkx11window.h>
+-
+-#include <gdk/x11/gdkx-autocleanups.h>
+-
+-#undef __GDKX_H_INSIDE__
+-
+-#endif /* __GDK_X_H__ */
+diff --git a/gtk/Makefile.am b/gtk/Makefile.am
+index 6a53a2b..49a35e6 100644
+--- a/gtk/Makefile.am
++++ b/gtk/Makefile.am
+@@ -1351,14 +1351,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources) gtkprivatetypebuiltins.
+ && cp xgen-gptbc gtkprivatetypebuiltins.c \
+ && rm -f xgen-gptbc
+
+-
+ gtktypefuncs.c: stamp-gtktypebuiltins.h stamp-gtkprivatetypebuiltins.h $(top_srcdir)/gtk/*.h $(top_srcdir)/gtk/a11y/*.h $(top_srcdir)/gtk/deprecated/*.h $(top_srcdir)/gdk/*.h Makefile
+ $(AM_V_GEN) (echo '#undef GTK_COMPILATION' && echo '#include <gtk/gtkx.h>') > xgen-gtfsrc.c && \
+ echo 'G_GNUC_BEGIN_IGNORE_DEPRECATIONS' > xgen-gtf && \
+ ${CPP} $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-gtfsrc.c | \
+ $(GREP) -o '\bg[td]k_[a-zA-Z0-9_]*_get_type\b' | \
+ sort | uniq | \
+- $(SED) '{ s/^/*tp++ = /; s/$$/();/; s/^.*\(gdk_x11\|gtk_plug_\|gtk_socket_\).*$$/#ifdef GDK_WINDOWING_X11\n&\n#endif/; }' >> xgen-gtf \
++ $(SED) '{ s/^/*tp++ = /; s/$$/();/; s/^.*\(gdk_x11\|gtk_plug_\|gtk_socket_\).*$$/#ifdef GDK_WINDOWING_X11\n&\n#endif/; s/^.*gdk_x11_gl.*$$/#ifdef HAVE_OPENGL\n&\n#endif/; }' >> xgen-gtf \
+ && cp xgen-gtf $@ && rm -f xgen-gtf
+ gtktestutils.c: gtktypefuncs.c
+
+diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
+index 245fc6b..4214ad1 100644
+--- a/gtk/gtkglarea.c
++++ b/gtk/gtkglarea.c
+@@ -28,7 +28,9 @@
+ #include "gtkprivate.h"
+ #include "gtkrender.h"
+
++#ifdef HAVE_OPENGL
+ #include <epoxy/gl.h>
++#endif
+
+ /**
+ * SECTION:gtkglarea
+@@ -357,9 +359,12 @@ gtk_gl_area_real_create_context (GtkGLArea *area)
+ static void
+ gtk_gl_area_resize (GtkGLArea *area, int width, int height)
+ {
++#ifdef HAVE_OPENGL
+ glViewport (0, 0, width, height);
++#endif
+ }
+
++#ifdef HAVE_OPENGL
+ /*
+ * Creates all the buffer objects needed for rendering the scene
+ */
+@@ -467,6 +472,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area)
+
+ priv->needs_render = TRUE;
+ }
++#endif
+
+ /**
+ * gtk_gl_area_attach_buffers:
+@@ -485,6 +491,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area)
+ void
+ gtk_gl_area_attach_buffers (GtkGLArea *area)
+ {
++#ifdef HAVE_OPENGL
+ GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
+
+ g_return_if_fail (GTK_IS_GL_AREA (area));
+@@ -517,11 +524,13 @@ gtk_gl_area_attach_buffers (GtkGLArea *area)
+ glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT,
+ GL_RENDERBUFFER_EXT, priv->depth_stencil_buffer);
+ }
++#endif
+ }
+
+ static void
+ gtk_gl_area_delete_buffers (GtkGLArea *area)
+ {
++#ifdef HAVE_OPENGL
+ GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
+
+ if (priv->context == NULL)
+@@ -553,6 +562,7 @@ gtk_gl_area_delete_buffers (GtkGLArea *area)
+ glDeleteFramebuffersEXT (1, &priv->frame_buffer);
+ priv->frame_buffer = 0;
+ }
++#endif
+ }
+
+ static void
+@@ -663,6 +673,7 @@ gtk_gl_area_draw (GtkWidget *widget,
+ GtkGLArea *area = GTK_GL_AREA (widget);
+ GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
+ gboolean unused;
++#ifdef HAVE_OPENGL
+ int w, h, scale;
+ GLenum status;
+
+@@ -674,7 +685,6 @@ gtk_gl_area_draw (GtkWidget *widget,
+ gtk_widget_get_allocated_height (widget));
+ return FALSE;
+ }
+-
+ if (priv->context == NULL)
+ return FALSE;
+
+@@ -720,6 +730,14 @@ gtk_gl_area_draw (GtkWidget *widget,
+ }
+
+ return TRUE;
++#else
++ if (priv->error != NULL)
++ gtk_gl_area_draw_error_screen (area,
++ cr,
++ gtk_widget_get_allocated_width (widget),
++ gtk_widget_get_allocated_height (widget));
++ return FALSE;
++#endif
+ }
+
+ static gboolean
+diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
+index 4eab3a7..c4e900e 100644
+--- a/gtk/inspector/general.c
++++ b/gtk/inspector/general.c
+@@ -33,8 +33,10 @@
+
+ #ifdef GDK_WINDOWING_X11
+ #include "x11/gdkx.h"
++#ifdef HAVE_OPENGL
+ #include <epoxy/glx.h>
+ #endif
++#endif
+
+ #ifdef GDK_WINDOWING_WIN32
+ #include "win32/gdkwin32.h"
+@@ -147,6 +149,7 @@ append_extension_row (GtkInspectorGeneral *gen,
+ gtk_size_group_add_widget (GTK_SIZE_GROUP (gen->priv->labels), label);
+ }
+
++#ifdef HAVE_OPENGL
+ #ifdef GDK_WINDOWING_X11
+ static void
+ append_glx_extension_row (GtkInspectorGeneral *gen,
+@@ -156,6 +159,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen,
+ append_extension_row (gen, ext, epoxy_has_glx_extension (dpy, 0, ext));
+ }
+ #endif
++#endif
+
+ #ifdef GDK_WINDOWING_WAYLAND
+ static void
+@@ -171,6 +175,7 @@ append_egl_extension_row (GtkInspectorGeneral *gen,
+ static void
+ init_gl (GtkInspectorGeneral *gen)
+ {
++#ifdef HAVE_OPENGL
+ #ifdef GDK_WINDOWING_X11
+ if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
+ {
+@@ -197,6 +202,7 @@ init_gl (GtkInspectorGeneral *gen)
+ }
+ else
+ #endif
++#endif
+ #ifdef GDK_WINDOWING_WAYLAND
+ if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
+ {
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 681807d..2941a36 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -80,8 +80,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \
+ testfullscreen \
+ testgeometry \
+ testgiconpixbuf \
+- testglarea \
+- testglblending \
+ testgrid \
+ testgtk \
+ testheaderbar \
+@@ -169,11 +167,17 @@ noinst_PROGRAMS = $(TEST_PROGS) \
+ testactionbar \
+ testwindowsize \
+ testpopover \
+- gdkgears \
+ listmodel \
+ testpopup \
+ $(NULL)
+
++if HAVE_OPENGL
++noinst_PROGRAMS +=
++ testglarea \
++ testglblending \
++ gdkgears
++endif
++
+ if USE_X11
+ noinst_PROGRAMS += testerrors
+ endif
+diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c
+index e0ebee0..703643c 100644
+--- a/testsuite/gtk/objects-finalize.c
++++ b/testsuite/gtk/objects-finalize.c
+@@ -115,8 +115,10 @@ main (int argc, char **argv)
+ all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_CORE &&
+ all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_XI2 &&
+ all_types[i] != GDK_TYPE_X11_DISPLAY_MANAGER &&
++#ifdef HAVE_OPENGL
+ all_types[i] != GDK_TYPE_X11_GL_CONTEXT &&
+ #endif
++#endif
+ /* Not allowed to finalize a GdkPixbufLoader without calling gdk_pixbuf_loader_close() */
+ all_types[i] != GDK_TYPE_PIXBUF_LOADER &&
+ all_types[i] != gdk_pixbuf_simple_anim_iter_get_type())
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
new file mode 100644
index 000000000..634b3a46f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
@@ -0,0 +1,36 @@
+From 97b78e566634579bbae51be914aeaaa921137a8b Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 9 Jun 2016 11:21:36 +0300
+Subject: [PATCH 4/4] configure.ac: Fix wayland-protocols path
+
+The wayland-protocols directory is used during build: Fix the path
+to point to sysroot specified in recipe.
+
+Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that
+breaks multilib gtk+ as it would point to multilib sysroot when the
+(allarch) wayland-protocols is actually in the machine sysroot.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index a3e9beb..dde9dc5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -461,7 +461,7 @@ fi
+ if test "$enable_wayland_backend" = "yes"; then
+ # For the cairo image backend
+ cairo_backends="$cairo_backends cairo"
+- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
++ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, ${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
+ GDK_BACKENDS="$GDK_BACKENDS wayland"
+ GDK_WINDOWING="$GDK_WINDOWING
+ #define GDK_WINDOWING_WAYLAND"
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch
deleted file mode 100644
index c8c480c5e..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From fc22058a10db913534f11348f86681fe9e1838e5 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Fri, 16 Oct 2015 16:35:16 +0300
-Subject: [PATCH] Do not try to initialize GL without libGL
-
-_gdk_x11_screen_update_visuals_for_gl() will end up calling epoxys
-GLX api which will exit() if libGL.so.1 is not present. We do not
-want that to happen and we don't want every app to have to set
-"GDK_GL=disabled" environment variable: so use #ifdef set based on
-opengl distro feature.
-
-Upstream is not interested in the fix as it is: Either epoxy should be
-fixed (to not exit) or GTK+ possibly could do some additional probing
-before calling epoxy APIs.
-
-Upstream-Status: Denied
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 7 +++++++
- gdk/x11/gdkvisual-x11.c | 5 +++++
- 2 files changed, 12 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 729a62e..58cc1ac 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -328,6 +328,13 @@ AC_ARG_ENABLE(mir-backend,
- [enable the Mir gdk backend])],
- [backend_set=yes])
-
-+AC_ARG_ENABLE(glx,
-+ [AS_HELP_STRING([--enable-glx],
-+ [When enabled Gdk will try to initialize GLX])])
-+AS_IF([test "x$enable_glx" != "xno"], [
-+ AC_DEFINE([HAVE_GLX], [], [GLX will be available at runtime])
-+])
-+
- if test -z "$backend_set"; then
- if test "$platform_win32" = yes; then
- enable_win32_backend=yes
-diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
-index f3b062d..c8243f4 100644
---- a/gdk/x11/gdkvisual-x11.c
-+++ b/gdk/x11/gdkvisual-x11.c
-@@ -345,7 +345,12 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
- /* If GL is available we want to pick better default/rgba visuals,
- as we care about glx details such as alpha/depth/stencil depth,
- stereo and double buffering */
-+ /* update_visuals_for_gl() will end up calling epoxy GLX api which
-+ will exit if libgl is not there: so only do this if we know GL
-+ is available */
-+#ifdef HAVE_GLX
- _gdk_x11_screen_update_visuals_for_gl (screen);
-+#endif
- }
-
- gint
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch
deleted file mode 100644
index 32d8a8479..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-window: Check if we can use CSD before enabling them
-
-Upstream-Status: Backport
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-
-From c5e5ee67490e7e7af56052d8f8beb75db002c2f1 Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Wed, 3 Jun 2015 14:07:29 +0100
-Subject: window: Check if we can use CSD before enabling them
-
-The change in 03213b9509fc1df16c66194ea168aed6c15110e9 changed the rules
-as to when CSD can be enabled, but it also unconditionally enables CSD
-with the implicit assumption that client-side shadows were the real
-issue, and that we could work around that by drawing our own borders.
-This also means that setting a titlebar for a GtkWindow will enable CSD
-unconditionally.
-
-In reality, some window managers (like Matchbox) *only* support
-server-side decorations, and will ignore all hints to the contrary, to
-the point of drawing decorations at random locations on top of the
-window.
-
-Since CSD are enabled unconditionally, the GTK_CSD environment variable
-is also not a suitable escape hatch.
-
-In the grand tradition of asking ourselves if we should do something
-just because we can, we should split the environment checks from the
-checks on what the user requested; by doing that, we can also check
-when enabling client-side decorations, and ideally bail out if needed.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=750343
-
-diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
-index 423c6bd..9fe882f 100644
---- a/gtk/gtkwindow.c
-+++ b/gtk/gtkwindow.c
-@@ -4056,6 +4056,32 @@ gtk_window_supports_client_shadow (GtkWindow *window)
- return TRUE;
- }
-
-+static gboolean
-+gtk_window_can_use_csd (GtkWindow *window)
-+{
-+ const gchar *csd_env;
-+
-+#ifdef GDK_WINDOWING_BROADWAY
-+ if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
-+ return TRUE;
-+#endif
-+
-+#ifdef GDK_WINDOWING_WAYLAND
-+ if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
-+ return TRUE;
-+#endif
-+
-+#ifdef GDK_WINDOWING_MIR
-+ if (GDK_IS_MIR_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
-+ return TRUE;
-+#endif
-+
-+ csd_env = g_getenv ("GTK_CSD");
-+
-+ /* If GTK_CSD is unset we default to CSD support */
-+ return csd_env == NULL || (strcmp (csd_env, "1") == 0);
-+}
-+
- static void
- gtk_window_enable_csd (GtkWindow *window)
- {
-@@ -4063,6 +4089,10 @@ gtk_window_enable_csd (GtkWindow *window)
- GtkWidget *widget = GTK_WIDGET (window);
- GdkVisual *visual;
-
-+ /* If the environment does not support CSD, then there's no point in enabling them */
-+ if (!gtk_window_can_use_csd (window))
-+ return;
-+
- /* We need a visual with alpha for client shadows */
- if (priv->use_client_shadow)
- {
-@@ -5839,7 +5869,6 @@ static gboolean
- gtk_window_should_use_csd (GtkWindow *window)
- {
- GtkWindowPrivate *priv = window->priv;
-- const gchar *csd_env;
-
- if (priv->csd_requested)
- return TRUE;
-@@ -5850,24 +5879,7 @@ gtk_window_should_use_csd (GtkWindow *window)
- if (priv->type == GTK_WINDOW_POPUP)
- return FALSE;
-
--#ifdef GDK_WINDOWING_BROADWAY
-- if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
-- return TRUE;
--#endif
--
--#ifdef GDK_WINDOWING_WAYLAND
-- if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
-- return TRUE;
--#endif
--
--#ifdef GDK_WINDOWING_MIR
-- if (GDK_IS_MIR_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
-- return TRUE;
--#endif
--
-- csd_env = g_getenv ("GTK_CSD");
--
-- return (g_strcmp0 (csd_env, "1") == 0);
-+ return gtk_window_can_use_csd (window);
- }
-
- static void
---
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch
deleted file mode 100644
index 3b4beeb71..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-
-Index: gtk+-3.8.2/configure.ac
-===================================================================
---- gtk+-3.8.2.orig/configure.ac
-+++ gtk+-3.8.2/configure.ac
-@@ -531,7 +531,7 @@ AC_MSG_CHECKING([Whether to write depend
- case $enable_explicit_deps in
- auto)
- export SED
-- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
-+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
- if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then
- enable_explicit_deps=yes
- else
-@@ -793,7 +793,7 @@ else
- dnl Now we check to see if our libtool supports shared lib deps
- dnl (in a rather ugly way even)
- if $dynworks; then
-- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
-+ module_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
- module_deplibs_check=`$module_libtool_config | \
- grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
- sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
-@@ -1528,7 +1528,7 @@ fi
- # We are using gmodule-no-export now, but I'm leaving the stripping
- # code in place for now, since pango and atk still require gmodule.
- export SED
--export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-+export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
- if test -n "$export_dynamic"; then
- GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
- GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb
deleted file mode 100644
index b76c0cc1c..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require gtk+3.inc
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
- file://hardcoded_libtool.patch \
- file://Dont-force-csd.patch \
- file://Do-not-try-to-initialize-GL-without-libGL.patch \
- "
-
-SRC_URI[md5sum] = "9671acb41dc13561d19233f1a75cf184"
-SRC_URI[sha256sum] = "1c53ef1bb55364698f7183ecd185b547f92f4a3a7abfafd531400232e2e052f8"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
- file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
- file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
- file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb
new file mode 100644
index 000000000..38e095ab9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb
@@ -0,0 +1,20 @@
+require gtk+3.inc
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+ file://0001-Hardcoded-libtool.patch \
+ file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
+ file://0003-Add-disable-opengl-configure-option.patch \
+ file://0004-configure.ac-Fix-wayland-protocols-path.patch \
+ file://0001-Redo-focus-handling-in-treeview-once-more.patch \
+ "
+SRC_URI[md5sum] = "cc76cac5e18c772c6784bf19a3dff08b"
+SRC_URI[sha256sum] = "83a609ba2f3424b5509e73967c49c67833af466d6f91081b24ee5c64fce6ac17"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+ file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+ file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+ file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.29.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.29.bb
deleted file mode 100644
index cf55d2070..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.29.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-require gtk+.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
- file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
- file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
- file://xsettings.patch \
- file://hardcoded_libtool.patch \
- file://toggle-font.diff;striplevel=0 \
- file://doc-fixes.patch \
- file://strict-prototypes.patch \
- "
-
-SRC_URI[md5sum] = "1b7a3689f65617387b5b54520f4439e8"
-SRC_URI[sha256sum] = "0741c59600d3d810a223866453dc2bbb18ce4723828681ba24aa6519c37631b8"
-
-EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
-
-LIBV = "2.10.0"
-
-PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
-
-python populate_packages_prepend () {
- gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
- immodules_root = os.path.join(gtk_libdir, 'immodules')
- printmodules_root = os.path.join(gtk_libdir, 'printbackends');
-
- d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
- do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
-
- if (d.getVar('DEBIAN_NAMES', True)):
- d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.30.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.30.bb
new file mode 100644
index 000000000..4fe990d5c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.30.bb
@@ -0,0 +1,34 @@
+require gtk+.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
+ file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
+ file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
+ file://xsettings.patch \
+ file://hardcoded_libtool.patch \
+ file://toggle-font.diff;striplevel=0 \
+ file://doc-fixes.patch \
+ file://strict-prototypes.patch \
+ "
+
+SRC_URI[md5sum] = "04568ba5c58b75e3c7543e45628ad789"
+SRC_URI[sha256sum] = "0d15cec3b6d55c60eac205b1f3ba81a1ed4eadd9d0f8e7c508bc7065d0c4ca50"
+
+EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
+
+LIBV = "2.10.0"
+
+PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
+
+python populate_packages_prepend () {
+ gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
+ immodules_root = os.path.join(gtk_libdir, 'immodules')
+ printmodules_root = os.path.join(gtk_libdir, 'printbackends');
+
+ d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
+ do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
+
+ if (d.getVar('DEBIAN_NAMES', True)):
+ d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.18.8.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.18.8.bb
deleted file mode 100644
index 793f14a54..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.18.8.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "Native icon utils for GTK+"
-DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
-SECTION = "libs"
-
-DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
-
-LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
- file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
-SRC_URI[md5sum] = "9671acb41dc13561d19233f1a75cf184"
-SRC_URI[sha256sum] = "1c53ef1bb55364698f7183ecd185b547f92f4a3a7abfafd531400232e2e052f8"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
- file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
- file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
- file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-inherit pkgconfig native upstream-version-is-even
-
-PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
-
-do_configure() {
- # Quite ugly but defines enough to compile the tools.
- if ! test -f gtk/config.h; then
- echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
- echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
- echo "#define HAVE_FTW_H 1" >> gtk/config.h
- fi
- if ! test -f gdk/config.h; then
- touch gdk/config.h
- fi
-}
-
-do_compile() {
- ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
- ${S}/gtk/updateiconcache.c \
- $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
- -o gtk-update-icon-cache
-
- ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
- ${S}/gtk/encodesymbolic.c \
- $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
- -o gtk-encode-symbolic-svg
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
- install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
-
- create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
- create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
- GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
-}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.20.9.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.20.9.bb
new file mode 100644
index 000000000..71c1d6280
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.20.9.bb
@@ -0,0 +1,60 @@
+SUMMARY = "Native icon utils for GTK+"
+DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
+SECTION = "libs"
+
+DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
+
+LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+ file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
+SRC_URI[md5sum] = "cc76cac5e18c772c6784bf19a3dff08b"
+SRC_URI[sha256sum] = "83a609ba2f3424b5509e73967c49c67833af466d6f91081b24ee5c64fce6ac17"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+ file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+ file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+ file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+inherit pkgconfig native upstream-version-is-even
+
+PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
+
+do_configure() {
+ # Quite ugly but defines enough to compile the tools.
+ if ! test -f gtk/config.h; then
+ echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
+ echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
+ echo "#define HAVE_FTW_H 1" >> gtk/config.h
+ fi
+ if ! test -f gdk/config.h; then
+ touch gdk/config.h
+ fi
+}
+
+do_compile() {
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ ${S}/gtk/updateiconcache.c \
+ $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
+ -o gtk-update-icon-cache
+
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ ${S}/gtk/encodesymbolic.c \
+ $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
+ -o gtk-encode-symbolic-svg
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
+ install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
+
+ create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+ create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
+ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc-stub/files/0001-Revert-Import-introspection-stub-machinery-too.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc-stub/files/0001-Revert-Import-introspection-stub-machinery-too.patch
deleted file mode 100644
index 80b0521d4..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc-stub/files/0001-Revert-Import-introspection-stub-machinery-too.patch
+++ /dev/null
@@ -1,305 +0,0 @@
-From d636be29bf95396b4e27fcd17ff84cb7091cca91 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 8 Oct 2015 15:37:40 +0300
-Subject: [PATCH] Revert "Import introspection stub machinery too"
-
-This reverts commit 3dfd0a09de696ec8c544762747f8a0f77153622e.
-As we provide the full introspection support, we need to remove
-the stubs from this package that conflict with it.
-
-Upstream-Status: Pending [review on oe-core list]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- Makefile | 4 --
- Makefile.introspection | 163 -------------------------------------------------
- introspection.m4 | 96 -----------------------------
- 3 files changed, 263 deletions(-)
- delete mode 100644 Makefile.introspection
- delete mode 100644 introspection.m4
-
-diff --git a/Makefile b/Makefile
-index 7cb6ce5..ad4231a 100644
---- a/Makefile
-+++ b/Makefile
-@@ -23,7 +23,3 @@ install: $(bin_programs)
-
- mkdir -p $(DESTDIR)$(datarootdir)/aclocal/
- install -m 0644 $(srcdir)/gtk-doc.m4 $(DESTDIR)$(datarootdir)/aclocal/gtk-doc.m4
--
-- mkdir -p $(DESTDIR)$(datarootdir)/gobject-introspection-1.0
-- install -m 0644 $(srcdir)/Makefile.introspection $(DESTDIR)$(datarootdir)/gobject-introspection-1.0/Makefile.introspection
-- install -m 0644 $(srcdir)/introspection.m4 $(DESTDIR)$(datarootdir)/aclocal/introspection.m4
-diff --git a/Makefile.introspection b/Makefile.introspection
-deleted file mode 100644
-index 755dd15..0000000
---- a/Makefile.introspection
-+++ /dev/null
-@@ -1,163 +0,0 @@
--# -*- Mode: make -*-
--# Copyright 2009-2010 Johan Dahlin
--#
--# This file is free software; the author(s) gives unlimited
--# permission to copy and/or distribute it, with or without
--# modifications, as long as this notice is preserved.
--#
--# * Input variables:
--#
--# INTROSPECTION_GIRS - List of GIRS that should be generated
--# INTROSPECTION_SCANNER - Command to invoke scanner, normally set by
--# GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
--# INTROSPECTION_SCANNER_ARGS - Additional args to pass in to the scanner
--# INTROSPECTION_SCANNER_ENV - Environment variables to set before running
--# the scanner
--# INTROSPECTION_COMPILER - Command to invoke compiler, normally set by
--# GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
--# INTROSPECTION_COMPILER_ARGS - Additional args to pass in to the compiler
--#
--# * Simple tutorial
--#
--# Add this to configure.ac:
--# -Wno-portability to AM_INIT_AUTOMAKE
--# GOBJECT_INTROSPECTION_CHECK([0.6.7])
--#
--# Add this to Makefile.am where your library/program is built:
--# include $(INTROSPECTION_MAKEFILE)
--# INTROSPECTION_GIRS = YourLib-1.0.gir
--# YourLib_1_0_gir_NAMESPACE = YourLib
--# YourLib_1_0_gir_VERSION = 1.0
--# YourLib_1_0_gir_LIBS = libyourlib.la
--# YourLib_1_0_gir_FILES = $(libyourlib_1_0_SOURCES)
--# girdir = $(datadir)/gir-1.0
--# dist_gir_DATA = YourLib-1.0.gir
--# typelibdir = $(libdir)/girepository-1.0
--# typelib_DATA = YourLib-1.0.typelib
--# CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
--#
--
--# Make sure the required variables are set, these should under normal
--# circumstances come from introspection.m4
--$(if $(INTROSPECTION_SCANNER),,$(error Need to define INTROSPECTION_SCANNER))
--$(if $(INTROSPECTION_COMPILER),,$(error Need to define INTROSPECTION_COMPILER))
--
--# Private functions
--
--## Transform the gir filename to something which can reference through a variable
--## without automake/make complaining, eg Gtk-2.0.gir -> Gtk_2_0_gir
--_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1))))
--
--# Namespace and Version is either fetched from the gir filename
--# or the _NAMESPACE/_VERSION variable combo
--_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1)))))
--_gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=))))
--
--# _PROGRAM is an optional variable which needs it's own --program argument
--_gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM))
--
--# Variables which provides a list of things
--_gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib))
--_gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg))
--_gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include))
--_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg))
--
--# Reuse the LIBTOOL variable from automake if it's set, but
--# work around MSYS weirdness: When running g-ir-scanner, MSYS changes
--# a command-line argument --libtool="/bin/sh ../../libtool" into
--# --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path
--# because we already "know" where the libtool configure produced is.
--_gir_libtool = $(if $(findstring MINGW32,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if $(LIBTOOL),--libtool="$(LIBTOOL)"))
--
--# Macros for AM_SILENT_RULES prettiness
--_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
--
--_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V))
--_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity))
--_gir_silent_scanner_prefix_0 = @echo " GISCAN $(1)";
--_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V))
--_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity))
--_gir_silent_scanner_opts_0 = --quiet
--
--_gir_silent_compiler = $(_gir_silent_compiler_$(V))
--_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity))
--_gir_silent_compiler_0 = @echo " GICOMP $(1)";
--
--#
--# Creates a GIR by scanning C headers/sources
--# $(1) - Name of the gir file (output)
--#
--# If output is Gtk-2.0.gir then you should name the variables like
--# Gtk_2_0_gir_NAMESPACE, Gtk_2_0_gir_VERSION etc.
--# Required variables:
--# FILES - C sources and headers which should be scanned
--#
--# One of these variables are required:
--# LIBS - Library where the symbol represented in the gir can be found
--# PROGRAM - Program where the symbol represented in the gir can be found
--#
--# Optional variables
--# NAMESPACE - Namespace of the gir, first letter capital,
--# rest should be lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'.
--# If not present the namespace will be fetched from the gir filename,
--# the part before the first dash. For 'Gtk-2.0', namespace will be 'Gtk'.
--# VERSION - Version of the gir, if not present, will be fetched from gir
--# filename, the part after the first dash. For 'Gtk-2.0', version will be '2.0'.
--# LIBTOOL - Command to invoke libtool, usually set by automake
--# SCANNERFLAGS - Flags to pass in to the scanner, see g-ir-scanner(1) for a list
--# CFLAGS - Flags to pass in to the parser when scanning headers
--# LDFLAGS - Linker flags used by the scanner
--# PACKAGES - list of pkg-config names which cflags are required to parse
--# the headers of this gir
--# INCLUDES - Gir files to include without the .gir suffix, for instance
--# GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that
--# provides introspection information.
--# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir.
--# By default the names in the PACKAGES variable will be used.
--#
--
--define introspection-scanner
--
--# Basic sanity check, to make sure required variables are set
--$(if $($(_gir_name)_FILES),,$(error Need to define $(_gir_name)_FILES))
--$(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)),
-- $($(_gir_name)_LIBS),
-- $($(_gir_name)_PROGRAM)),,
-- $(error Need to define $(_gir_name)_LIBS or $(_gir_name)_PROGRAM))
--
--# Only dependencies we know are actually filenames goes into _FILES, make
--# sure these are built before running the scanner. Libraries and programs
--# needs to be added manually.
--$(1): $$($(_gir_name)_FILES)
-- @ $(MKDIR_P) $(dir $(1))
-- $(_gir_silent_scanner_prefix) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \
-- $(INTROSPECTION_SCANNER_ARGS) \
-- --namespace=$(_gir_namespace) \
-- --nsversion=$(_gir_version) \
-- $(_gir_libtool) \
-- $(_gir_packages) \
-- $(_gir_includes) \
-- $(_gir_export_packages) \
-- $(_gir_program) \
-- $(_gir_libraries) \
-- $($(_gir_name)_SCANNERFLAGS) \
-- $($(_gir_name)_CFLAGS) \
-- $($(_gir_name)_LDFLAGS) \
-- $$^ \
-- --output $(1)
--endef
--
--$(foreach gir,$(INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
--
--#
--# Compiles a gir into a typelib
--# $(1): gir filename (input)
--# $(2): typelib filename (output)
--#
--define introspection-compiler
--$(_gir_silent_compiler) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $(1) -o $(2)
--endef
--
--# Simple rule to compile a typelib.
--%.typelib: %.gir
-- $(call introspection-compiler,$<,$@)
-diff --git a/introspection.m4 b/introspection.m4
-deleted file mode 100644
-index d89c3d9..0000000
---- a/introspection.m4
-+++ /dev/null
-@@ -1,96 +0,0 @@
--dnl -*- mode: autoconf -*-
--dnl Copyright 2009 Johan Dahlin
--dnl
--dnl This file is free software; the author(s) gives unlimited
--dnl permission to copy and/or distribute it, with or without
--dnl modifications, as long as this notice is preserved.
--dnl
--
--# serial 1
--
--m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
--[
-- AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
-- AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
-- AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
--
-- dnl enable/disable introspection
-- m4_if([$2], [require],
-- [dnl
-- enable_introspection=yes
-- ],[dnl
-- AC_ARG_ENABLE(introspection,
-- AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
-- [Enable introspection for this build]),,
-- [enable_introspection=auto])
-- ])dnl
--
-- AC_MSG_CHECKING([for gobject-introspection])
--
-- dnl presence/version checking
-- AS_CASE([$enable_introspection],
-- [no], [dnl
-- found_introspection="no (disabled, use --enable-introspection to enable)"
-- ],dnl
-- [yes],[dnl
-- PKG_CHECK_EXISTS([gobject-introspection-1.0],,
-- AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
-- PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
-- found_introspection=yes,
-- AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
-- ],dnl
-- [auto],[dnl
-- PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
-- dnl Canonicalize enable_introspection
-- enable_introspection=$found_introspection
-- ],dnl
-- [dnl
-- AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
-- ])dnl
--
-- AC_MSG_RESULT([$found_introspection])
--
-- INTROSPECTION_SCANNER=
-- INTROSPECTION_COMPILER=
-- INTROSPECTION_GENERATE=
-- INTROSPECTION_GIRDIR=
-- INTROSPECTION_TYPELIBDIR=
-- if test "x$found_introspection" = "xyes"; then
-- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
-- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
-- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
-- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
-- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
-- INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
-- INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
-- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
-- fi
-- AC_SUBST(INTROSPECTION_SCANNER)
-- AC_SUBST(INTROSPECTION_COMPILER)
-- AC_SUBST(INTROSPECTION_GENERATE)
-- AC_SUBST(INTROSPECTION_GIRDIR)
-- AC_SUBST(INTROSPECTION_TYPELIBDIR)
-- AC_SUBST(INTROSPECTION_CFLAGS)
-- AC_SUBST(INTROSPECTION_LIBS)
-- AC_SUBST(INTROSPECTION_MAKEFILE)
--
-- AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
--])
--
--
--dnl Usage:
--dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
--
--AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
--[
-- _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
--])
--
--dnl Usage:
--dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
--
--
--AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
--[
-- _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
--])
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
deleted file mode 100644
index 84e49c13a..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Stub implementation of gtk-doc"
-DESCRIPTION = "Stub implementation of gtk-doc, as we don't want to build the API documentation"
-SECTION = "x11/base"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-PROVIDES = "gtk-doc"
-
-SRCREV = "1dea266593edb766d6d898c79451ef193eb17cfa"
-PV = "1.1+git${SRCPV}"
-
-SRC_URI = "git://git.gnome.org/${BPN} \
- file://0001-Revert-Import-introspection-stub-machinery-too.patch \
- "
-
-S = "${WORKDIR}/git"
-
-do_configure() {
- ./configure --prefix=${prefix} \
- --sysconfdir=${sysconfdir} \
- --bindir=${bindir} \
- --libdir=${libdir} \
- --datadir=${datadir} \
- --datarootdir=${datadir}
-}
-
-do_install() {
- oe_runmake install DESTDIR="${D}"
-}
-
-FILES_${PN} += "${datadir}"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch
new file mode 100644
index 000000000..4a9028742
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch
@@ -0,0 +1,40 @@
+From e733241fb580f032efbbe684ec35d4c9d27f1595 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 8 Sep 2016 13:38:39 +0300
+Subject: [PATCH] Do not error out if perl is not found or its version is too
+ old.
+
+This allows use to avoid depending on perl-native if we're not going
+to use it (when api-docs are disabled).
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2a61d6e..29415bd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -36,7 +36,7 @@ dnl Check for Perl.
+ dnl
+ AC_PATH_PROG([PERL], [perl])
+ if test -z "$PERL"; then
+- AC_MSG_ERROR([perl not found])
++ AC_MSG_WARN([perl not found])
+ fi
+
+ AC_MSG_CHECKING([if Perl version >= 5.18.0])
+@@ -44,7 +44,7 @@ if "$PERL" -e "require v5.18.0"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+- AC_MSG_ERROR([perl >= 5.18.0 is required for gtk-doc])
++ AC_MSG_WARN([perl >= 5.18.0 is required for gtk-doc])
+ fi
+
+ dnl
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-xsltproc-is-not-found.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-xsltproc-is-not-found.patch
new file mode 100644
index 000000000..99ae4d441
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-xsltproc-is-not-found.patch
@@ -0,0 +1,31 @@
+From 8b7fbbb405959f2868ad6eadd7dd00018758a8a5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 7 Sep 2016 14:52:04 +0300
+Subject: [PATCH] Do not error out if xsltproc is not found.
+
+This allows us to drop the hard xsltproc dependency, if we're not
+going to actually run the gtkdoc scripts (when api documentation is
+disabled).
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b0c88d7..2a61d6e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -58,7 +58,7 @@ dnl Check for xsltproc
+ dnl
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test -z "$XSLTPROC"; then
+- AC_MSG_ERROR([xsltproc not found])
++ AC_MSG_WARN([xsltproc not found])
+ fi
+
+ dnl
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
new file mode 100644
index 000000000..477fc9ae8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch
@@ -0,0 +1,139 @@
+From 6fab82b93c7bd301eb42448515b02f7cb3306897 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 31 Aug 2016 16:44:46 +0300
+Subject: [PATCH] Do not hardocode paths to perl/python in scripts.
+
+Doing so when the interpreters are somewhere deep in a sysroot directory
+can reach the shebang line limit, and resulting scripts wouldn't work
+on targets either.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gtkdoc-check.in | 2 +-
+ gtkdoc-common.pl.in | 2 +-
+ gtkdoc-depscan.in | 2 +-
+ gtkdoc-fixxref.in | 2 +-
+ gtkdoc-mkdb.in | 2 +-
+ gtkdoc-mktmpl.in | 2 +-
+ gtkdoc-rebase.in | 2 +-
+ gtkdoc-scan.in | 2 +-
+ gtkdoc-scangobj.in | 2 +-
+ tests/tools.sh.in | 4 ++--
+ 10 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/gtkdoc-check.in b/gtkdoc-check.in
+index 560d69b..b60857f 100755
+--- a/gtkdoc-check.in
++++ b/gtkdoc-check.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!/usr/bin/env perl
+ # -*- cperl -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-common.pl.in b/gtkdoc-common.pl.in
+index 4747396..cfadb78 100644
+--- a/gtkdoc-common.pl.in
++++ b/gtkdoc-common.pl.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!/usr/bin/env perl
+ # -*- cperl -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-depscan.in b/gtkdoc-depscan.in
+index 83af01b..917e247 100644
+--- a/gtkdoc-depscan.in
++++ b/gtkdoc-depscan.in
+@@ -1,4 +1,4 @@
+-#!@PYTHON@
++#!/usr/bin/env python
+
+ import gzip, os.path, re
+
+diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
+index 3d9e8d0..d55190b 100755
+--- a/gtkdoc-fixxref.in
++++ b/gtkdoc-fixxref.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!/usr/bin/env perl
+ # -*- cperl -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
+index 8dd6d5e..d808750 100755
+--- a/gtkdoc-mkdb.in
++++ b/gtkdoc-mkdb.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!/usr/bin/env perl
+ # -*- cperl -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-mktmpl.in b/gtkdoc-mktmpl.in
+index c64dfd3..2f46c18 100755
+--- a/gtkdoc-mktmpl.in
++++ b/gtkdoc-mktmpl.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!/usr/bin/env perl
+ # -*- cperl -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-rebase.in b/gtkdoc-rebase.in
+index 375482d..cf05b45 100644
+--- a/gtkdoc-rebase.in
++++ b/gtkdoc-rebase.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!/usr/bin/env perl
+ # -*- cperl -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
+index 048e5c9..78c6136 100755
+--- a/gtkdoc-scan.in
++++ b/gtkdoc-scan.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!/usr/bin/env perl
+ # -*- cperl -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in
+index fb66b76..67ee8f7 100644
+--- a/gtkdoc-scangobj.in
++++ b/gtkdoc-scangobj.in
+@@ -1,4 +1,4 @@
+-#!@PERL@ -w
++#!/usr/bin/env perl
+ # -*- cperl -*-
+ #
+ # gtk-doc - GTK DocBook documentation generator.
+diff --git a/tests/tools.sh.in b/tests/tools.sh.in
+index a114a42..7073883 100644
+--- a/tests/tools.sh.in
++++ b/tests/tools.sh.in
+@@ -11,7 +11,7 @@ echo "Running suite(s): gtk-doc-$suite";
+
+ # test perl scripts
+ for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj ; do
+- @PERL@ -cwT `which $file`
++ perl -cwT `which $file`
+ if test $? = 1 ; then failed=`expr $failed + 1`; fi
+ tested=`expr $tested + 1`
+ done
+@@ -34,7 +34,7 @@ done
+
+
+ # test python scripts
+-@PYTHON@ -m py_compile `which gtkdoc-depscan`
++python -m py_compile `which gtkdoc-depscan`
+ if test $? != 0 ; then failed=`expr $failed + 1`; fi
+ tested=`expr $tested + 1`
+
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
new file mode 100644
index 000000000..c7688704e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch
@@ -0,0 +1,34 @@
+Use native pkg-config when looking for gtk-doc.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gtk-doc.m4 b/gtk-doc.m4
+index 3675543..94881ae 100644
+--- a/gtk-doc.m4
++++ b/gtk-doc.m4
+@@ -1,6 +1,6 @@
+ dnl -*- mode: autoconf -*-
+
+-# serial 2
++# serial 2.1
+
+ dnl Usage:
+ dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
+@@ -10,11 +10,16 @@ AC_DEFUN([GTK_DOC_CHECK],
+ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+ AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+
++ gtkdoc_pkgconfig_save=$PKG_CONFIG
++ PKG_CONFIG=pkg-config-native
++
+ ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
+ AC_MSG_CHECKING([for gtk-doc])
+ PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
+ AC_MSG_RESULT($have_gtk_doc)
+
++ PKG_CONFIG=$gtkdoc_pkgconfig_save
++
+ if test "$have_gtk_doc" = "no"; then
+ AC_MSG_WARN([
+ You will not be able to create source packages with 'make dist'
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
new file mode 100644
index 000000000..6af996e35
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Documentation generator for glib-based software"
+DESCRIPTION = "Gtk-doc is a set of scripts that extract specially formatted comments \
+ from glib-based software and produce a set of html documentation files from them"
+HOMEPAGE = "http://www.gtk.org/gtk-doc/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+inherit gnomebase
+
+# Configure the scripts correctly (and build their dependencies) only if they are actually
+# going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball.
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", "working-scripts", "", d)}"
+
+# This will cause target gtk-doc to hardcode paths of native dependencies
+# into its scripts. This means that target gtk-doc package is broken;
+# hopefully no one minds because its scripts are not used for anything during build
+# and shouldn't be used on targets.
+PACKAGECONFIG[working-scripts] = "--with-highlight=source-highlight,--with-highlight=no,libxslt-native xmlto-native source-highlight-native perl-native"
+
+# We cannot use host perl, because it may be too old for gtk-doc
+EXTRANATIVEPATH += "perl-native"
+
+SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
+ file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
+ file://0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch \
+ "
+SRC_URI_append_class-native = " file://pkg-config-native.patch"
+
+SRC_URI[archive.md5sum] = "0dc6570953112a464a409fb99258ccbc"
+SRC_URI[archive.sha256sum] = "1ea46ed400e6501f975acaafea31479cea8f32f911dca4dff036f59e6464fd42"
+
+BBCLASSEXTEND = "native"
+
+# Do not check for XML catalogs when building because that
+# information is not used for anything during build. Recipe
+# dependencies make sure we have all the right bits.
+do_configure_prepend() {
+ sed -i -e 's,^JH_CHECK_XML_CATALOG.*,,' ${S}/configure.ac
+}
+
+FILES_${PN} += "${datadir}/sgml"
+FILES_${PN}-dev += "${libdir}/cmake"
+FILES_${PN}-doc = ""
+
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " gtkdoc_makefiles_sysroot_preprocess"
+gtkdoc_makefiles_sysroot_preprocess() {
+ # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+ # instead of libtool wrapper or running them directly
+ sed -i \
+ -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+ ${SYSROOT_DESTDIR}${datadir}/gtk-doc/data/gtk-doc*make
+}
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines-2.20.2/glib-2.32.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines-2.20.2/glib-2.32.patch
deleted file mode 100644
index f0b878d37..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines-2.20.2/glib-2.32.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 8d49a386f467cbf8e0842d2218126f643e50f834 Mon Sep 17 00:00:00 2001
-From: Dominique Leuenberger <dimstar@opensuse.org>
-Date: Sun, 27 Nov 2011 14:24:57 +0000
-Subject: Fix build with glib 2.31: Only glib.h can be #include'd. Fixes bug #664914
-
-Upstream-Status: Backport
-
----
-diff --git a/engines/clearlooks/src/animation.c b/engines/clearlooks/src/animation.c
-index 1f7a41f..56a9286 100644
---- a/engines/clearlooks/src/animation.c
-+++ b/engines/clearlooks/src/animation.c
-@@ -28,7 +28,7 @@
- #include "animation.h"
-
- #ifdef HAVE_WORKING_ANIMATION
--#include <glib/gtimer.h>
-+#include <glib.h>
-
- struct _AnimationInfo {
- GTimer *timer;
---
-cgit v0.9.0.2
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines-2.20.2/substitute-tests.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines-2.20.2/substitute-tests.patch
deleted file mode 100644
index 5c557ba68..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines-2.20.2/substitute-tests.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd gtk-engines-2.20.2/configure.ac gtk-engines-2.20.2/configure.ac
---- gtk-engines-2.20.2/configure.ac 2010-10-01 15:42:37.000000000 +0300
-+++ gtk-engines-2.20.2/configure.ac 2013-08-20 02:50:27.930510565 +0300
-@@ -166,6 +166,9 @@
-
- AC_SUBST(DEVELOPMENT_CFLAGS)
-
-+AC_SUBST([exported_symbols_tests], [[$(EXPORTED_SYMBOLS_TESTS)]])
-+AC_SUBST([torture_test_tests], [[$(TORTURE_TEST_TESTS)]])
-+
- AM_CONFIG_HEADER([engines/support/config.h])
-
- AC_CONFIG_FILES([
-diff -Nurd gtk-engines-2.20.2/test/Makefile.am gtk-engines-2.20.2/test/Makefile.am
---- gtk-engines-2.20.2/test/Makefile.am 2010-09-19 18:18:21.000000000 +0300
-+++ gtk-engines-2.20.2/test/Makefile.am 2013-08-20 02:50:36.842510865 +0300
-@@ -66,7 +66,7 @@
- # Prefix with exported_
- EXPORTED_SYMBOLS_TESTS = $(patsubst %,exported_%,$(BUILD_ENGINES))
-
--TESTS += $(EXPORTED_SYMBOLS_TESTS)
-+TESTS += @exported_symbols_tests@
-
-
- #############################################################
-@@ -88,7 +88,7 @@
- TORTURE_TEST_TESTS = torture_buildin $(patsubst %,torture_%,$(TORTURE_TEST_ENGINES))
-
- # Add TORTURE_TEST_ENGINES to list of tests
--TESTS += $(TORTURE_TEST_TESTS)
-+TESTS += @torture_test_tests@
-
- # Possible other tests:
- # - An extensive theme switch tests that loads/unloads the engine
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb
deleted file mode 100644
index c0ac911a6..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "GTK+ theme engines"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-SECTION = "x11/base"
-DEPENDS = "intltool-native gtk+ gettext-native"
-
-PR = "r3"
-
-PACKAGES += "${PN}-schemas"
-PACKAGES_DYNAMIC += "^gtk-engine-.* ^gtk-theme-.*"
-
-RDEPENDS_gtk-theme-redmond = "gtk-engine-redmond95"
-RDEPENDS_gtk-theme-metal = "gtk-engine-metal"
-RDEPENDS_gtk-theme-mist = "gtk-engine-mist"
-RDEPENDS_gtk-theme-crux = "gtk-engine-crux-engine"
-RDEPENDS_gtk-theme-lighthouseblue = "gtk-engine-lighthouseblue"
-RDEPENDS_gtk-theme-thinice = "gtk-engine-thinice"
-RDEPENDS_gtk-theme-industrial = "gtk-engine-industrial"
-RDEPENDS_gtk-theme-clearlooks = "gtk-engine-clearlooks"
-
-FILES_${PN} = ""
-FILES_${PN}-dev += "${libdir}/gtk-2.0/*/engines/*.la"
-FILES_${PN}-schemas = "${datadir}/gtk-engines/*.xml"
-
-CFLAGS_prepend = "-DHAVE_ANIMATION "
-
-RDEPENDS_${PN}-dev = ""
-
-inherit gnomebase
-GNOME_COMPRESS_TYPE="bz2"
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-# This picks stable releases in the 2.x series (but not 2.90 onwards,
-# which were GNOME 3 betas).
-UPSTREAM_CHECK_REGEX = "(?P<pver>2\.([0-8]*[02468])+(\.\d+)+)"
-
-python populate_packages_prepend() {
- engines_root = os.path.join(d.getVar('libdir', True), "gtk-2.0/2.10.0/engines")
- themes_root = os.path.join(d.getVar('datadir', True), "themes")
-
- do_split_packages(d, engines_root, '^lib(.*)\.so$', 'gtk-engine-%s', 'GTK %s theme engine', extra_depends='')
- do_split_packages(d, themes_root, '(.*)', 'gtk-theme-%s', 'GTK theme %s', allow_dirs=True, extra_depends='')
- # TODO: mark theme packages as arch all
-}
-
-SRC_URI += "file://glib-2.32.patch \
- file://substitute-tests.patch"
-SRC_URI[archive.md5sum] = "5deb287bc6075dc21812130604c7dc4f"
-SRC_URI[archive.sha256sum] = "15b680abca6c773ecb85253521fa100dd3b8549befeecc7595b10209d62d66b5"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.0.4.bb b/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.0.4.bb
deleted file mode 100644
index 3ce38cec5..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.0.4.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-SUMMARY = "JSON-GLib implements a full JSON parser using GLib and GObject"
-DESCRIPTION = "Use JSON-GLib it is possible to parse and generate valid JSON\
- data structures, using a DOM-like API. JSON-GLib also offers GObject \
-integration, providing the ability to serialize and deserialize GObject \
-instances to and from JSON data types."
-HOMEPAGE = "http://live.gnome.org/JsonGlib"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI[archive.md5sum] = "3131b0417ecde3da1ae72acceaa375cf"
-SRC_URI[archive.sha256sum] = "80f3593cb6bd13f1465828e46a9f740e2e9bd3cd2257889442b3e62bd6de05cd"
-
-inherit gnomebase gettext lib_package gobject-introspection
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.2.bb b/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.2.bb
new file mode 100644
index 000000000..8df2a42b9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.2.2.bb
@@ -0,0 +1,18 @@
+SUMMARY = "JSON-GLib implements a full JSON parser using GLib and GObject"
+DESCRIPTION = "Use JSON-GLib it is possible to parse and generate valid JSON\
+ data structures, using a DOM-like API. JSON-GLib also offers GObject \
+integration, providing the ability to serialize and deserialize GObject \
+instances to and from JSON data types."
+HOMEPAGE = "http://live.gnome.org/JsonGlib"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI[archive.md5sum] = "c1daefb8d0fb59612af0c072c8aabb58"
+SRC_URI[archive.sha256sum] = "ea128ab52a824fcd06e5448fbb2bd8d9a13740d51c66d445828edba71321a621"
+
+inherit gnomebase gettext lib_package gobject-introspection gtk-doc
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/glade-cruft.patch b/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/glade-cruft.patch
deleted file mode 100644
index c5d586465..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/glade-cruft.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-Upstream-Status: Pending
-
-diff -ur libglade-2.4.0~/configure.in libglade-2.4.0/configure.in
---- libglade-2.4.0~/configure.in 2004-05-17 12:38:31.000000000 +0100
-+++ libglade-2.4.0/configure.in 2004-07-28 16:53:09.000000000 +0100
-@@ -147,6 +147,18 @@
- AM_CONDITIONAL(HAVE_PYTHON, $have_python)
- AC_SUBST(PYTHON)
-
-+AC_MSG_CHECKING([for cruft in libgtk])
-+AC_TRY_LINK([
-+#include <gtk/gtk.h>
-+#include <stdio.h>
-+], [ gtk_tree_get_type (); return 0; ],
-+ [ AC_MSG_RESULT(yes)
-+ have_cruft=yes ],
-+ [ AC_MSG_RESULT(no)
-+ AC_DEFINE(DISABLE_CRUFT,,[leave out support for old, broken widgets])
-+ have_cruft=no ])
-+AC_SUBST(DISABLE_CRUFT)
-+
- dnl add debugging options ...
- changequote(,)dnl
- if test "x$GCC" = xyes; then
-Only in libglade-2.4.0: configure.in.orig
-diff -ur libglade-2.4.0~/glade/glade-gtk.c libglade-2.4.0/glade/glade-gtk.c
---- libglade-2.4.0~/glade/glade-gtk.c 2004-03-13 13:47:35.000000000 +0000
-+++ libglade-2.4.0/glade/glade-gtk.c 2004-07-28 16:53:52.000000000 +0100
-@@ -213,6 +213,8 @@
- gtk_clist_column_titles_hide (GTK_CLIST (w));
- }
-
-+#ifndef DISABLE_CRUFT
-+
- static void
- tree_set_selection_mode (GladeXML *xml, GtkWidget *w,
- const char *name, const char *value)
-@@ -238,6 +240,8 @@
- gtk_tree_set_view_lines (GTK_TREE (w), BOOL (value));
- }
-
-+#endif
-+
- static void
- list_set_selection_mode (GladeXML *xml, GtkWidget *w,
- const char *name, const char *value)
-@@ -254,6 +258,7 @@
- gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (w), BOOL (value));
- }
-
-+#ifndef DISABLE_CRUFT
- static void
- text_set_text (GladeXML *xml, GtkWidget *w,
- const char *name, const char *value)
-@@ -262,6 +267,7 @@
-
- gtk_editable_insert_text (GTK_EDITABLE (w), value, -1, &pos);
- }
-+#endif
-
- static void
- radio_menu_item_set_group (GladeXML *xml, GtkWidget *w,
-@@ -1125,13 +1131,17 @@
- glade_register_custom_prop (GTK_TYPE_CLIST, "selection_mode", clist_set_selection_mode);
- glade_register_custom_prop (GTK_TYPE_CLIST, "shadow_type", clist_set_shadow_type);
- glade_register_custom_prop (GTK_TYPE_CLIST, "show_titles", clist_set_show_titles);
-+#ifndef DISABLE_CRUFT
- glade_register_custom_prop (GTK_TYPE_TREE, "selection_mode", tree_set_selection_mode);
- glade_register_custom_prop (GTK_TYPE_TREE, "view_mode", tree_set_view_mode);
- glade_register_custom_prop (GTK_TYPE_TREE, "view_line", tree_set_view_line);
-+#endif
- glade_register_custom_prop (GTK_TYPE_LIST, "selection_mode", list_set_selection_mode);
- glade_register_custom_prop (GTK_TYPE_CHECK_MENU_ITEM, "always_show_toggle",
- check_menu_item_set_always_show_toggle);
-+#ifndef DISABLE_CRUFT
- glade_register_custom_prop (GTK_TYPE_TEXT, "text", text_set_text);
-+#endif
- glade_register_custom_prop (GTK_TYPE_RADIO_MENU_ITEM, "group",
- radio_menu_item_set_group);
- glade_register_custom_prop (GTK_TYPE_TOOLBAR, "tooltips", toolbar_set_tooltips);
-@@ -1288,8 +1298,10 @@
- glade_standard_build_children, NULL);
- glade_register_widget (GTK_TYPE_TEAROFF_MENU_ITEM, glade_standard_build_widget,
- NULL, NULL);
-+#ifndef DISABLE_CRUFT
- glade_register_widget (GTK_TYPE_TEXT, glade_standard_build_widget,
- NULL, NULL);
-+#endif
- glade_register_widget (GTK_TYPE_TEXT_VIEW, glade_standard_build_widget,
- NULL, NULL);
- glade_register_widget (GTK_TYPE_TIPS_QUERY, glade_standard_build_widget,
-@@ -1304,8 +1316,10 @@
- glade_standard_build_children, NULL);
- glade_register_widget (GTK_TYPE_TOOL_BUTTON, glade_standard_build_widget,
- NULL, NULL);
-+#ifndef DISABLE_CRUFT
- glade_register_widget (GTK_TYPE_TREE, glade_standard_build_widget,
- NULL, NULL);
-+#endif
- glade_register_widget (GTK_TYPE_TREE_VIEW, glade_standard_build_widget,
- NULL, NULL);
- glade_register_widget (GTK_TYPE_VBUTTON_BOX, glade_standard_build_widget,
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/no-xml2.patch b/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/no-xml2.patch
deleted file mode 100644
index dc4c092fd..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/no-xml2.patch
+++ /dev/null
@@ -1,501 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-diff -urN libglade-2.4.2.orig/configure.in libglade-2.4.2/configure.in
---- libglade-2.4.2.orig/configure.in 2005-02-11 12:42:58.000000000 +0100
-+++ libglade-2.4.2/configure.in 2005-03-22 01:22:00.000000000 +0100
-@@ -52,11 +52,33 @@
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-
- PKG_CHECK_MODULES(LIBGLADE, [dnl
-- libxml-2.0 >= required_libxml_version dnl
- atk >= required_atk_version dnl
- gtk+-2.0 >= required_gtk_version dnl
- glib-2.0 >= required_glib_version])
-
-+disable_xml2=no
-+AC_ARG_WITH([libxml2],
-+ AC_HELP_STRING([--without-libxml2], [Don't use libxml2, use Glib's GMarkupParser instead]),
-+ [disable_xml2=yes],
-+ [disable_xml2=no])
-+
-+AC_MSG_CHECKING([if we are using libxml2])
-+if test "x$disable_xml2" == "xno"; then
-+ AC_MSG_RESULT(yes)
-+ PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.4.10)
-+ PKGCFG_REQUIRE_LIBXML2="libxml-2.0"
-+ LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS $XML2_CFLAGS"
-+ LIBGLADE_LIBS="$LIBGLADE_LIBS $XML2_LIBS"
-+else
-+ LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS -DUSE_GMARKUP_PARSER"
-+ PKGCFG_REQUIRE_LIBXML2=""
-+ AC_MSG_RESULT(no)
-+fi
-+
-+AC_SUBST(XML2_LIBS)
-+AC_SUBST(XML2_CFLAGS)
-+AC_SUBST(PKGCFG_REQUIRE_LIBXML2)
-+
- AC_MSG_CHECKING([for native Win32])
- case "$host" in
- *-*-mingw*)
-@@ -116,6 +138,21 @@
- fi
- fi
-
-+if test "x$disable_xml2" == "xyes"; then
-+ echo "*****************************************************"
-+ echo " You chose to disable libxml2 and use Glib's"
-+ echo " GMarkupParser instead."
-+ echo
-+ echo " Please bear in mind that using libglade with"
-+ echo " GMarkupParser is an experimental feature only."
-+ echo
-+ echo " Please post problems or success stories to"
-+ echo " the glade-devel mailing list. Thank you."
-+ echo "*****************************************************"
-+fi
-+
-+
-+
- GTK_DOC_CHECK(1.0)
-
- dnl gettext stuff ... there is no message catalog for libglade -- libglade
-diff -urN libglade-2.4.2.orig/glade/glade-parser.c libglade-2.4.2/glade/glade-parser.c
---- libglade-2.4.2.orig/glade/glade-parser.c 2004-11-11 11:56:13.000000000 +0100
-+++ libglade-2.4.2/glade/glade-parser.c 2005-03-22 01:20:00.000000000 +0100
-@@ -34,7 +34,15 @@
- # define dgettext(Domain, String) (String)
- #endif
-
--#include <libxml/parser.h>
-+#ifdef USE_GMARKUP_PARSER
-+# include <zlib.h>
-+#else
-+# include <libxml/parser.h>
-+#endif
-+
-+#ifdef USE_GMARKUP_PARSER
-+# define xmlChar gchar
-+#endif
-
- #include "glade-parser.h"
- #include "glade-private.h"
-@@ -508,7 +516,9 @@
- case PARSER_START:
- if (!strcmp(name, "glade-interface")) {
- state->state = PARSER_GLADE_INTERFACE;
--#if 0
-+
-+#ifndef USE_GMARKUP_PARSER
-+ #if 0
- /* check for correct XML namespace */
- for (i = 0; attrs && attrs[i] != NULL; i += 2) {
- if (!strcmp(attrs[i], "xmlns") &&
-@@ -518,7 +528,9 @@
- g_warning("unknown attribute `%s' for <glade-interface>",
- attrs[i]);
- }
-+ #endif
- #endif
-+
- } else {
- g_warning("Expected <glade-interface>. Got <%s>.", name);
- state->prev_state = state->state;
-@@ -1063,12 +1075,18 @@
- }
- }
-
-+#ifndef USE_GMARKUP_PARSER
-+
- static xmlEntityPtr
- glade_parser_get_entity(GladeParseState *state, const xmlChar *name)
- {
- return xmlGetPredefinedEntity(name);
- }
-
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static void
- glade_parser_warning(GladeParseState *state, const char *msg, ...)
- {
-@@ -1079,6 +1097,10 @@
- va_end(args);
- }
-
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static void
- glade_parser_error(GladeParseState *state, const char *msg, ...)
- {
-@@ -1089,6 +1111,10 @@
- va_end(args);
- }
-
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static void
- glade_parser_fatal_error(GladeParseState *state, const char *msg, ...)
- {
-@@ -1099,6 +1125,10 @@
- va_end(args);
- }
-
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static xmlSAXHandler glade_parser = {
- (internalSubsetSAXFunc)NULL, /* internalSubset */
- (isStandaloneSAXFunc)NULL, /* isStandalone */
-@@ -1126,6 +1156,82 @@
- (fatalErrorSAXFunc)glade_parser_fatal_error, /* fatalError */
- };
-
-+#else /* USE_GMARKUP_PARSER */
-+
-+static void
-+glade_parser_start_element_wrapper(GMarkupParseContext *context,
-+ const gchar *name,
-+ const gchar **attr_names,
-+ const gchar **attr_values,
-+ gpointer state,
-+ GError **error)
-+{
-+ guint i = 0;
-+
-+ /* Pack attribute names/values from two separate
-+ * arrays (GMarkupParser style) into one single
-+ * array (libxml SAXParser style). This is not
-+ * very efficient, but we do it to make the
-+ * GMarkupParser code as little invasive as
-+ * possible. */
-+
-+ while (attr_names[i] != NULL) {
-+ ++i;
-+ }
-+
-+ if (1)
-+ {
-+ const gchar *attr[(i*2)+1];
-+ guint j, k;
-+
-+ for (j=0, k=0; k < i; j += 2)
-+ {
-+ attr[j] = attr_names[k];
-+ attr[j+1] = attr_values[k];
-+ ++k;
-+ }
-+ attr[i*2] = NULL;
-+
-+ glade_parser_start_element((GladeParseState*)state, name, attr);
-+ }
-+}
-+
-+static void
-+glade_parser_end_element_wrapper(GMarkupParseContext *context,
-+ const gchar *name,
-+ gpointer state,
-+ GError **err)
-+{
-+ glade_parser_end_element((GladeParseState*)state, name);
-+}
-+
-+static void
-+glade_parser_characters_wrapper(GMarkupParseContext *context,
-+ const gchar *chars,
-+ gsize len,
-+ gpointer state,
-+ GError **err)
-+{
-+ glade_parser_characters((GladeParseState*)state, chars, (int) len);
-+}
-+
-+static void
-+glade_parser_error(GMarkupParseContext *context, GError *err, gpointer data)
-+{
-+ g_log("Glade-Parser", G_LOG_LEVEL_CRITICAL, "%s", err->message);
-+}
-+
-+static const GMarkupParser glade_parser = {
-+ glade_parser_start_element_wrapper, /* element open */
-+ glade_parser_end_element_wrapper, /* element close */
-+ glade_parser_characters_wrapper, /* text content */
-+ NULL, /* passthrough */
-+ glade_parser_error, /* parse error */
-+};
-+
-+#endif /* USE_GMARKUP_PARSER */
-+
-+
- static void
- widget_info_free(GladeWidgetInfo *info)
- {
-@@ -1191,6 +1297,9 @@
- *
- * Returns: the GladeInterface structure for the XML file.
- */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- GladeInterface *
- glade_parser_parse_file(const gchar *file, const gchar *domain)
- {
-@@ -1222,6 +1331,31 @@
- return state.interface;
- }
-
-+#else /* defined(USE_GMARKUP_PARSER) */
-+
-+GladeInterface *
-+glade_parser_parse_file(const gchar *file, const gchar *domain)
-+{
-+ GladeInterface *interface;
-+ GError *err = NULL;
-+ gchar *content = NULL;
-+ gsize clen;
-+
-+ if (!g_file_get_contents(file, &content, &clen, &err)) {
-+ g_warning("could not load glade file: %s", err->message);
-+ g_error_free(err);
-+ return NULL;
-+ }
-+
-+ interface = glade_parser_parse_buffer(content, (gint) clen, domain);
-+
-+ g_free(content);
-+
-+ return interface;
-+}
-+
-+#endif /* USE_GMARKUP_PARSER */
-+
- /**
- * glade_parser_parse_buffer
- * @buffer: a buffer in memory containing XML data.
-@@ -1237,6 +1371,9 @@
- *
- * Returns: the GladeInterface structure for the XML buffer.
- */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- GladeInterface *
- glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain)
- {
-@@ -1263,6 +1400,161 @@
- return state.interface;
- }
-
-+#else /* defined(USE_GMARKUP_PARSER) */
-+
-+
-+static GladeInterface *
-+glade_parser_parse_buffer_internal(const gchar *buffer, gint len, const gchar *domain)
-+{
-+ GMarkupParseContext *context;
-+ GladeParseState state = { 0 };
-+ GError *err = NULL;
-+
-+ state.interface = NULL;
-+ if (domain)
-+ state.domain = domain;
-+ else
-+ state.domain = textdomain(NULL);
-+
-+ /* FIXME: This strstr() is not safe, as it ignores the len
-+ * argument and assumes the buffer is NUL-terminated */
-+ if (strstr(buffer, "<?xml") == NULL) {
-+ g_warning("No XML header found in document!");
-+ return NULL;
-+ }
-+
-+ context = g_markup_parse_context_new(&glade_parser, (GMarkupParseFlags) 0, &state, NULL);
-+
-+ glade_parser_start_document(&state);
-+
-+ if (!g_markup_parse_context_parse(context, buffer, (gssize) len, &err)) {
-+ g_warning("document not well formed: %s", err->message);
-+ g_error_free(err);
-+ if (state.interface)
-+ glade_interface_destroy (state.interface);
-+ return NULL;
-+ }
-+
-+ glade_parser_end_document(&state);
-+
-+ if (state.state != PARSER_FINISH) {
-+ g_warning("did not finish in PARSER_FINISH state!");
-+
-+ if (state.interface)
-+ glade_interface_destroy(state.interface);
-+
-+ return NULL;
-+ }
-+
-+ return state.interface;
-+}
-+
-+struct _gzip_rfc1952_hdr
-+{
-+ guint8 id1, id2, cm, flags;
-+ guint32 mtime;
-+ guint8 xflags;
-+ guint8 os;
-+};
-+
-+static GladeInterface *
-+glade_parser_parse_gzipped_buffer(const gchar *buffer, gint len, const gchar *domain)
-+{
-+ struct _gzip_rfc1952_hdr *hdr = (struct _gzip_rfc1952_hdr*)buffer;
-+ struct z_stream_s zstream;
-+ GladeInterface *interface;
-+ const guint8 *cbuf; /* start of compressed data */
-+ guint8 *decompress_buf;
-+ gulong decompress_len = 0;
-+ gint ret;
-+
-+ g_assert(hdr != NULL && hdr->id1 == 0x1f && hdr->id2 == 0x8b);
-+
-+ if (hdr->cm != Z_DEFLATED) {
-+ g_warning("Unknown decompression method %u", (guint) hdr->cm);
-+ return NULL;
-+ }
-+
-+ /* Uncompressed size (modulo 2^32) is last
-+ * 4 bytes of gzipped file, and little endian.
-+ * See RFC 1952 */
-+ decompress_len = GUINT32_FROM_LE(*((guint32*)(((guint8*)buffer) + len - 4)));
-+
-+ /* paranoid mode: glade files > 5MB are unlikely */
-+ g_return_val_if_fail(decompress_len < 5*1024*1024, NULL);
-+
-+ decompress_buf = g_malloc0(decompress_len + 1); /* +1 for NUL-terminator */
-+
-+ /* find start of compressed data, skipping header stuff */
-+ cbuf = (guint8*)buffer + 10;
-+ if (hdr->flags & 0x04) {
-+ guint16 xlen = GUINT16_FROM_LE(*((guint16*)cbuf));
-+ cbuf += xlen + 2;
-+ }
-+ if (hdr->flags & 0x08) {
-+ guint16 onamelen = strlen(cbuf);
-+ cbuf += onamelen + 1;
-+ }
-+ if (hdr->flags & 0x10) {
-+ guint16 commentlen = strlen(cbuf);
-+ cbuf += commentlen + 1;
-+ }
-+ if (hdr->flags & 0x02)
-+ {
-+ cbuf += 2; /* skip header CRC16 */
-+ }
-+
-+ zstream.next_in = (void*)cbuf;
-+ zstream.avail_in = (uLongf) len - ((void*)cbuf-(void*)buffer) - 4 - 4 +1;
-+ zstream.next_out = decompress_buf;
-+ zstream.avail_out= decompress_len;
-+ zstream.zalloc = Z_NULL;
-+ zstream.zfree = Z_NULL;
-+ zstream.opaque = Z_NULL;
-+
-+ ret = inflateInit2(&zstream, -MAX_WBITS);
-+
-+ if (ret != Z_OK) {
-+ g_warning("inflateInit2() failed. zlib error code: %d", ret);
-+ g_free(decompress_buf);
-+ return NULL;
-+ }
-+
-+ ret = inflate(&zstream, Z_FINISH);
-+
-+ if (ret != Z_STREAM_END) {
-+ g_warning("zlib decompression failed. zlib error code: %d", ret);
-+ g_free(decompress_buf);
-+ return NULL;
-+ }
-+
-+ interface = glade_parser_parse_buffer_internal(decompress_buf, decompress_len, domain);
-+
-+ g_free(decompress_buf);
-+
-+ return interface;
-+}
-+
-+GladeInterface *
-+glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain)
-+{
-+ g_return_val_if_fail(buffer != NULL, NULL);
-+ g_return_val_if_fail(len > 0, NULL);
-+
-+ /* Check if buffer is gzipped */
-+ if (buffer[0] == 0x1f && buffer[1] == (gchar)0x8b) {
-+ return glade_parser_parse_gzipped_buffer(buffer, len, domain);
-+ }
-+
-+ /* Buffer is cleartext. */
-+ return glade_parser_parse_buffer_internal(buffer, len, domain);
-+}
-+
-+#endif /* USE_GMARKUP_PARSER */
-+
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- static void
- dump_widget(xmlNode *parent, GladeWidgetInfo *info, gint indent)
- {
-@@ -1382,6 +1674,8 @@
- xmlNodeAddContent(widget, " ");
- }
-
-+#endif /* !defined(USE_GMARKUP_PARSER) */
-+
- /**
- * glade_interface_dump
- * @interface: the GladeInterface
-@@ -1390,6 +1684,9 @@
- * This function dumps the contents of a GladeInterface into a file as
- * XML. It is intended mainly as a debugging tool.
- */
-+
-+#ifndef USE_GMARKUP_PARSER
-+
- void
- glade_interface_dump(GladeInterface *interface, const gchar *filename)
- {
-@@ -1428,6 +1725,17 @@
- xmlFreeDoc(doc);
- }
-
-+#else /* defined(USE_GMARKUP_PARSER) */
-+
-+void
-+glade_interface_dump(GladeInterface *interface, const gchar *filename)
-+{
-+ g_warning("glade_interface_dump() is only available with libxml2.");
-+}
-+
-+#endif /* USE_GMARKUP_PARSER */
-+
-+
- #if 0
- int
- main(int argc, char **argv) {
-diff -urN libglade-2.4.2.orig/libglade-2.0.pc.in libglade-2.4.2/libglade-2.0.pc.in
---- libglade-2.4.2.orig/libglade-2.0.pc.in 2001-12-12 15:28:23.000000000 +0100
-+++ libglade-2.4.2/libglade-2.0.pc.in 2005-03-22 01:20:00.000000000 +0100
-@@ -11,7 +11,7 @@
- Name: Libglade
- Description: a library for dynamically loading GLADE interface files
- Version: @VERSION@
--Requires: gtk+-2.0 libxml-2.0
-+Requires: gtk+-2.0 @PKGCFG_REQUIRE_LIBXML2@
- Libs: -L${libdir} -lglade-2.0
- Cflags: -I${includedir}/libglade-2.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/python_environment.patch b/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/python_environment.patch
deleted file mode 100644
index b5b2ec453..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade-2.6.4/python_environment.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Using @PYTHON@ for this path would result in the build system python being
-referred to. Instead we want to locate python from the environment.
-
-Upstream-Status: Inappropriate [configuration]
-
-diff -ruN libglade-2.6.4-orig//libglade-convert.in libglade-2.6.4/libglade-convert.in
---- libglade-2.6.4-orig//libglade-convert.in 2011-09-22 10:18:28.991164003 +0800
-+++ libglade-2.6.4/libglade-convert.in 2011-09-22 10:18:55.431164003 +0800
-@@ -1,4 +1,4 @@
--#!@PYTHON@
-+#!/usr/bin/env python
- # -*- mode: python -*-
-
- # yes, this requires python 2.x and an XML parser module (eg. PyExpat)
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade_2.6.4.bb b/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade_2.6.4.bb
deleted file mode 100644
index 553e19c60..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/libglade/libglade_2.6.4.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Runtime support for the GTK+ interface builder"
-HOMEPAGE = "http://library.gnome.org/devel/libglade/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2 & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
- file://glade/glade.h;endline=22;md5=a04f461c964ba4b57a172d1fbcd8f8fc \
- file://glade/glade-gtk.c;endline=22;md5=766f993433e2642fec87936d319990ff"
-
-SECTION = "libs"
-PR = "r5"
-DEPENDS = "zlib gdk-pixbuf gtk+"
-
-inherit autotools pkgconfig gnomebase gtk-doc distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-GNOME_COMPRESS_TYPE="bz2"
-
-SRC_URI += "file://glade-cruft.patch file://no-xml2.patch file://python_environment.patch"
-
-SRC_URI[archive.md5sum] = "d1776b40f4e166b5e9c107f1c8fe4139"
-SRC_URI[archive.sha256sum] = "64361e7647839d36ed8336d992fd210d3e8139882269bed47dc4674980165dec"
-
-EXTRA_OECONF += "--without-libxml2"
-
-CFLAGS += "-lz"
-
-PACKAGES += " ${PN}-data"
-FILES_${PN} = "${libdir}/lib*.so.*"
-FILES_${PN}-data = "${datadir}/xml/libglade/glade-2.0.dtd"
-FILES_${PN}-dev += "${bindir}/libglade-convert"
-#RDEPENDS_${PN} = "${PN}-data"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_230.bb b/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_230.bb
index 6a105023b..709553bd0 100644
--- a/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_230.bb
+++ b/import-layers/yocto-poky/meta/recipes-gnome/libgudev/libgudev_230.bb
@@ -10,5 +10,7 @@ RCONFLICTS_${PN} = "systemd (<= 220)"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-inherit gnomebase gobject-introspection
+inherit gnomebase gobject-introspection gtk-doc
+UPSTREAM_CHECK_URI = "http://ftp.gnome.org/pub/GNOME/sources/libgudev/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>(\d+))"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.13.bb b/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.13.bb
deleted file mode 100644
index 2ac52f779..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.13.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "Library for rendering SVG files"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
-
-SECTION = "x11/utils"
-DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
-BBCLASSEXTEND = "native"
-
-inherit autotools pkgconfig gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection
-
-SRC_URI += "file://gtk-option.patch"
-
-SRC_URI[archive.md5sum] = "ad03780e12c56e52474d8edf86976c73"
-SRC_URI[archive.sha256sum] = "4d6ea93ec05f5dabe7262d711d246a0a99b2311e215360dd3dcabd6afe3b9804"
-
-CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
-
-# The older ld (2.22) on the host (Centos 6.5) doesn't have the
-# -Bsymbolic-functions option, we can disable it for native.
-EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
-
-PACKAGECONFIG ??= "gdkpixbuf"
-# The gdk-pixbuf loader
-PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
-# GTK+ test application (rsvg-view)
-PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
-
-do_install_append() {
- # Loadable modules don't need .a or .la on Linux
- rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
-}
-
-PACKAGES =+ "librsvg-gtk rsvg"
-FILES_rsvg = "${bindir}/rsvg* \
- ${datadir}/pixmaps/svg-viewer.svg \
- ${datadir}/themes"
-FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so"
-
-PIXBUF_PACKAGES = "librsvg-gtk"
-
-PIXBUFCACHE_SYSROOT_DEPS_append_class-native = " harfbuzz-native:do_populate_sysroot_setscene pango-native:do_populate_sysroot_setscene icu-native:do_populate_sysroot_setscene"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.16.bb b/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.16.bb
new file mode 100644
index 000000000..49243c8aa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.16.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Library for rendering SVG files"
+HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
+
+SECTION = "x11/utils"
+DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
+BBCLASSEXTEND = "native"
+
+inherit autotools pkgconfig gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://gtk-option.patch"
+
+SRC_URI[archive.md5sum] = "f474fe37177a2bf8050787df2046095c"
+SRC_URI[archive.sha256sum] = "d48bcf6b03fa98f07df10332fb49d8c010786ddca6ab34cbba217684f533ff2e"
+
+CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+# The older ld (2.22) on the host (Centos 6.5) doesn't have the
+# -Bsymbolic-functions option, we can disable it for native.
+EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
+
+PACKAGECONFIG ??= "gdkpixbuf"
+# The gdk-pixbuf loader
+PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
+# GTK+ test application (rsvg-view)
+PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
+
+do_install_append() {
+ # Loadable modules don't need .a or .la on Linux
+ rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
+}
+
+PACKAGES =+ "librsvg-gtk rsvg"
+FILES_rsvg = "${bindir}/rsvg* \
+ ${datadir}/pixmaps/svg-viewer.svg \
+ ${datadir}/themes"
+FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so"
+
+PIXBUF_PACKAGES = "librsvg-gtk"
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.4.bb b/import-layers/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.4.bb
deleted file mode 100644
index beaaba03e..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.4.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "libsecret is a library for storing and retrieving passwords and other secrets"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
-
-inherit gnomebase gtk-doc vala gobject-introspection
-
-DEPENDS += "glib-2.0 libgcrypt gettext-native intltool-native"
-
-EXTRA_OECONF += "--disable-manpages"
-
-SRC_URI[archive.md5sum] = "5190da1ee686437046bc10068f120d1d"
-SRC_URI[archive.sha256sum] = "0f29b51698198e6999c91f4adce3119c8c457f546b133a85baea5ea9010a19ed"
-
-# http://errors.yoctoproject.org/Errors/Details/20228/
-ARM_INSTRUCTION_SET = "arm"
-
-# vapigen.m4 bundled with the tarball does not yet have our cross-compilation fixes
-do_configure_prepend() {
- rm -f ${S}/build/m4/vapigen.m4
-}
-
-# Secret-1: poky/build-mips64/tmp/work/mips64-poky-linux/libgpg-error/1.19-r0/libgpg-error-1.19/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
-# qemu: uncaught target signal 6 (Aborted) - core dumped
-EXTRA_OECONF_append_mips64 = " --disable-introspection"
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.5.bb b/import-layers/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.5.bb
new file mode 100644
index 000000000..bcb3046dd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.5.bb
@@ -0,0 +1,25 @@
+SUMMARY = "libsecret is a library for storing and retrieving passwords and other secrets"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
+
+inherit gnomebase gtk-doc vala gobject-introspection
+
+DEPENDS += "glib-2.0 libgcrypt gettext-native intltool-native"
+
+EXTRA_OECONF += "--disable-manpages"
+
+SRC_URI[archive.md5sum] = "2d688825921313da8731313b0a7f394c"
+SRC_URI[archive.sha256sum] = "9ce7bd8dd5831f2786c935d82638ac428fa085057cc6780aba0e39375887ccb3"
+
+# http://errors.yoctoproject.org/Errors/Details/20228/
+ARM_INSTRUCTION_SET = "arm"
+
+# vapigen.m4 bundled with the tarball does not yet have our cross-compilation fixes
+do_configure_prepend() {
+ rm -f ${S}/build/m4/vapigen.m4
+}
+
+# Secret-1: poky/build-mips64/tmp/work/mips64-poky-linux/libgpg-error/1.19-r0/libgpg-error-1.19/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
+# qemu: uncaught target signal 6 (Aborted) - core dumped
+EXTRA_OECONF_append_mips64 = " --disable-introspection --disable-gtk-doc"
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.1.bb
deleted file mode 100644
index 495894b89..000000000
--- a/import-layers/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Window navigation construction toolkit"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-BPN = "libwnck"
-
-SECTION = "x11/libs"
-DEPENDS = "gtk+3 gdk-pixbuf-native libxres"
-
-PACKAGECONFIG ??= "startup-notification"
-PACKAGECONFIG[startup-notification] = "--enable-startup-notification,--disable-startup-notification,startup-notification"
-
-inherit gnomebase gobject-introspection
-SRC_URI[archive.md5sum] = "d96c0b74c4dc5fdae758964098603c90"
-SRC_URI[archive.sha256sum] = "bb643c9c423c8aa79c59973ce27ce91d3b180d1e9907902278fb79391f52befa"
-
-inherit distro_features_check
-# libxres means x11 only
-REQUIRED_DISTRO_FEATURES = "x11"
-
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb b/import-layers/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb
new file mode 100644
index 000000000..fd4ef6949
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Window navigation construction toolkit"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+BPN = "libwnck"
+
+SECTION = "x11/libs"
+DEPENDS = "intltool-native gtk+3 gdk-pixbuf-native libxres"
+
+PACKAGECONFIG ??= "startup-notification"
+PACKAGECONFIG[startup-notification] = "--enable-startup-notification,--disable-startup-notification,startup-notification"
+
+inherit gnomebase gobject-introspection gtk-doc
+SRC_URI[archive.md5sum] = "487938d65d4bfae1f2501052b1bd7492"
+SRC_URI[archive.sha256sum] = "1cb03716bc477058dfdf3ebfa4f534de3b13b1aa067fcd064d0b7813291cba72"
+
+inherit distro_features_check
+# libxres means x11 only
+REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/builder/files/builder_session.sh b/import-layers/yocto-poky/meta/recipes-graphics/builder/files/builder_session.sh
index 001a03357..4e509a701 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/builder/files/builder_session.sh
+++ b/import-layers/yocto-poky/meta/recipes-graphics/builder/files/builder_session.sh
@@ -23,8 +23,8 @@ if [ ! -d /home/builder/.local/share/applications ]; then
xdg-mime default epiphany.desktop x-scheme-handler/https
xdg-mime default epiphany.desktop text/html
- #register text files with leafpad text editor
- xdg-mime default leafpad.desktop text/plain
+ #register text files with l3afpad text editor
+ xdg-mime default l3afpad.desktop text/plain
fi
cd /home/builder/poky
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo.inc b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo.inc
index c7e686d5a..c4b6f329e 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo.inc
@@ -36,7 +36,7 @@ EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)} \
--enable-tee \
"
-inherit autotools pkgconfig
+inherit autotools pkgconfig upstream-version-is-even gtk-doc
# We don't depend on binutils so we need to disable this
export ac_cv_lib_bfd_bfd_openr="no"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb
index 20b46689f..d2c1e12cd 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb
@@ -7,8 +7,6 @@ SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz"
SRC_URI[md5sum] = "23a0b2f0235431d35238df1d3a517fdb"
SRC_URI[sha256sum] = "613cb38447b76a93ff7235e17acd55a78b52ea84a9df128c3f2257f8eaa7b252"
-UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+)\.tar"
-
PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
SUMMARY_${PN} = "The Cairo 2D vector graphics library"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
index 127f0a1c3..e3e4cde2c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
@@ -10,10 +10,11 @@ SECTION = "fonts"
LICENSE = "OFL-1.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=df91e3ffcab8cfb972a66bf11255188d"
-PV = "0.0.21+git${SRCPV}"
+PV = "0.0.24"
-SRCREV = "611c169df5287c059d63b0c8f0570647c75c9189"
+SRCREV = "07b6ea2cbbebfc360aa4668612a376be5e214eaa"
SRC_URI = "git://git.gnome.org/cantarell-fonts;protocol=git;branch=master"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(?!0\.13)(?!0\.10\.1)\d+\.\d+(\.\d+)+)"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch
new file mode 100644
index 000000000..7b3c1980b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch
@@ -0,0 +1,143 @@
+From 3a0404dfbc65c6a864e01d1200a48074e19d5def Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 2 Sep 2016 14:28:38 +0300
+Subject: [PATCH] Remove clutter.types as it is build configuration-specific.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ doc/reference/clutter.types | 122 --------------------------------------------
+ 1 file changed, 122 deletions(-)
+ delete mode 100644 doc/reference/clutter.types
+
+diff --git a/doc/reference/clutter.types b/doc/reference/clutter.types
+deleted file mode 100644
+index 0037acc..0000000
+--- a/doc/reference/clutter.types
++++ /dev/null
+@@ -1,122 +0,0 @@
+-cally_actor_get_type
+-cally_clone_get_type
+-cally_group_get_type
+-cally_rectangle_get_type
+-cally_root_get_type
+-cally_stage_get_type
+-cally_text_get_type
+-cally_texture_get_type
+-cally_util_get_type
+-clutter_action_get_type
+-clutter_actor_box_get_type
+-clutter_actor_get_type
+-clutter_actor_meta_get_type
+-clutter_align_constraint_get_type
+-clutter_alpha_get_type
+-clutter_animatable_get_type
+-clutter_animation_get_type
+-clutter_animator_get_type
+-clutter_animator_key_get_type
+-clutter_backend_get_type
+-clutter_behaviour_depth_get_type
+-clutter_behaviour_ellipse_get_type
+-clutter_behaviour_get_type
+-clutter_behaviour_opacity_get_type
+-clutter_behaviour_path_get_type
+-clutter_behaviour_rotate_get_type
+-clutter_behaviour_scale_get_type
+-clutter_bin_layout_get_type
+-clutter_bind_constraint_get_type
+-clutter_binding_pool_get_type
+-clutter_blur_effect_get_type
+-clutter_box_get_type
+-clutter_box_layout_get_type
+-clutter_brightness_contrast_effect_get_type
+-clutter_cairo_texture_get_type
+-clutter_canvas_get_type
+-clutter_child_meta_get_type
+-clutter_click_action_get_type
+-clutter_clip_node_get_type
+-clutter_clone_get_type
+-clutter_color_get_type
+-clutter_color_node_get_type
+-clutter_colorize_effect_get_type
+-clutter_constraint_get_type
+-clutter_container_get_type
+-clutter_content_get_type
+-clutter_deform_effect_get_type
+-clutter_desaturate_effect_get_type
+-clutter_device_manager_get_type
+-clutter_drag_action_get_type
+-clutter_drop_action_get_type
+-clutter_effect_get_type
+-clutter_event_get_type
+-clutter_event_sequence_get_type
+-clutter_fixed_layout_get_type
+-clutter_flow_layout_get_type
+-clutter_fog_get_type
+-clutter_geometry_get_type
+-clutter_gesture_action_get_type
+-clutter_glx_texture_pixmap_get_type
+-clutter_grid_layout_get_type
+-clutter_group_get_type
+-clutter_image_get_type
+-clutter_input_device_get_type
+-clutter_interval_get_type
+-clutter_keyframe_transition_get_type
+-clutter_knot_get_type
+-clutter_layout_manager_get_type
+-clutter_layout_meta_get_type
+-clutter_list_model_get_type
+-clutter_margin_get_type
+-clutter_media_get_type
+-clutter_model_get_type
+-clutter_model_iter_get_type
+-clutter_offscreen_effect_get_type
+-clutter_page_turn_effect_get_type
+-clutter_paint_node_get_type
+-clutter_paint_volume_get_type
+-clutter_pan_action_get_type
+-clutter_param_color_get_type
+-clutter_param_fixed_get_type
+-clutter_param_units_get_type
+-clutter_path_constraint_get_type
+-clutter_path_get_type
+-clutter_path_node_get_type
+-clutter_perspective_get_type
+-clutter_pipeline_node_get_type
+-clutter_point_get_type
+-clutter_property_transition_get_type
+-clutter_rect_get_type
+-clutter_rectangle_get_type
+-clutter_rotate_action_get_type
+-clutter_score_get_type
+-clutter_script_get_type
+-clutter_scriptable_get_type
+-clutter_scroll_actor_get_type
+-clutter_settings_get_type
+-clutter_shader_effect_get_type
+-clutter_shader_float_get_type
+-clutter_shader_get_type
+-clutter_shader_int_get_type
+-clutter_shader_matrix_get_type
+-clutter_size_get_type
+-clutter_snap_constraint_get_type
+-clutter_stage_get_type
+-clutter_stage_manager_get_type
+-clutter_state_get_type
+-clutter_state_key_get_type
+-clutter_swipe_action_get_type
+-clutter_table_layout_get_type
+-clutter_tap_action_get_type
+-clutter_text_buffer_get_type
+-clutter_text_get_type
+-clutter_text_node_get_type
+-clutter_texture_get_type
+-clutter_texture_node_get_type
+-clutter_timeline_get_type
+-clutter_transition_get_type
+-clutter_transition_group_get_type
+-clutter_units_get_type
+-clutter_vertex_get_type
+-clutter_zoom_action_get_type
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch
deleted file mode 100644
index c4edff395..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 483a4bb00e7dd2f14d86e167c8013c8638723c33 Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Thu, 18 Feb 2016 17:19:09 +0000
-Subject: [PATCH] build: Use AC_COMPILE_IFELSE
-
-Instead of AC_TRY_COMPILE, which has been deprecated by newer autoconf.
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- configure.ac | 66 ++++++++++++++++++++++++++++++------------------------------
- 1 file changed, 33 insertions(+), 33 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4d72e0c..8ca3f94 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -348,24 +348,25 @@ AS_IF([test "x$enable_wayland" != xno],
- # We need to manually check for Wayland support in Cogl because
- # the windowing systems are not exposed in the pkg-config file
- saved_CFLAGS="${CFLAGS}"
-- CFLAGS="`$PKG_CONFIG --cflags $CLUTTER_BASE_PC_FILES`"
-+ CFLAGS="`$PKG_CONFIG --cflags cogl-1.0`"
-
- AC_MSG_CHECKING([for Wayland Cogl backend])
-- AC_TRY_COMPILE([#include <cogl/cogl.h>],
-- [
-- #ifndef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
-- #error "No Wayland support in Cogl"
-- #endif
-- int main (void) { return 0; }
-- ],
-- [
-- AC_MSG_RESULT(yes)
-- have_cogl_wayland=yes
-- ],
-- [
-- AC_MSG_RESULT(no)
-- have_cogl_wayland=no
-- ])
-+
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-+#include <cogl/cogl.h>
-+]],
-+[[
-+#ifndef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
-+#error Cogl compiled without Wayland support
-+#endif
-+]])], [
-+ AC_MSG_RESULT(yes)
-+ have_cogl_wayland=yes
-+ ], [
-+ AC_MSG_RESULT(no)
-+ have_cogl_wayland=no
-+ ])
-+
- CFLAGS="${saved_CFLAGS}"
- AS_IF([test "x$have_cogl_wayland" = xyes],
- [
-@@ -499,26 +500,25 @@ AS_IF([test "x$enable_mir" = "xyes"],
- # We need to manually check for Mir support in Cogl because
- # the windowing systems are not exposed in the pkg-config file
- saved_CFLAGS="${CFLAGS}"
-- CFLAGS="`$PKG_CONFIG --cflags $CLUTTER_BASE_PC_FILES`"
-+ CFLAGS="`$PKG_CONFIG --cflags cogl-1.0`"
-
- AC_MSG_CHECKING([for Mir Cogl backend])
-- AC_TRY_COMPILE([#include <cogl/cogl.h>],
-- [
-- #ifndef COGL_HAS_EGL_PLATFORM_MIR_SUPPORT
-- #error "No Mir support in Cogl"
-- #endif
-- int main (void) { return 0; }
-- ],
-- [
-- AC_MSG_RESULT(yes)
-- have_cogl_mir=yes
-- ],
-- [
-- AC_MSG_RESULT(no)
-- have_cogl_mir=no
-- ])
-
-- CFLAGS="${saved_CFLAGS}"
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-+#include <cogl/cogl.h>
-+]],
-+[[
-+#ifndef COGL_HAS_EGL_PLATFORM_MIR_SUPPORT
-+#error Cogl compiled without Mir support
-+#endif
-+]])], [
-+ AC_MSG_RESULT(yes)
-+ have_cogl_mir=yes
-+ ], [
-+ AC_MSG_RESULT(no)
-+ have_cogl_mir=no
-+ ])
-+
- AS_IF([test "x$have_cogl_mir" = xno], [AC_MSG_ERROR("*** Cogl is missing Mir support.")])
-
- PKG_CHECK_EXISTS([mirclient],
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb
deleted file mode 100644
index c53b3e71b..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require clutter-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI[archive.md5sum] = "3b98e1b33719982a5736ae42cbf7183e"
-SRC_URI[archive.sha256sum] = "9631c98cb4bcbfec15e1bbe9eaa6eef0f127201552fce40d7d28f2133803cd63"
-SRC_URI += "file://install-examples.patch \
- file://run-installed-tests-with-tap-output.patch \
- file://0001-build-Use-AC_COMPILE_IFELSE.patch \
- file://run-ptest"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.26.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.26.0.bb
new file mode 100644
index 000000000..dfa1cfe77
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.26.0.bb
@@ -0,0 +1,10 @@
+require clutter-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI[archive.md5sum] = "b065e9ca53d1f6bc1ec26aeb27338bb7"
+SRC_URI[archive.sha256sum] = "67514e7824b3feb4723164084b36d6ce1ae41cb3a9897e9f1a56c8334993ce06"
+SRC_URI += "file://install-examples.patch \
+ file://run-installed-tests-with-tap-output.patch \
+ file://0001-Remove-clutter.types-as-it-is-build-configuration-sp.patch \
+ file://run-ptest"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.16.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.16.bb
deleted file mode 100644
index fcf5242c5..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.16.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require clutter-gst-3.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
- file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4"
-
-SRC_URI[archive.md5sum] = "ca24eb92a0d34fc9e66fd686a965d51c"
-SRC_URI[archive.sha256sum] = "803e8b7265e63e0581e21fd0c6064792dfe951512e9f515e9e7a9b452caaf9f0"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb
new file mode 100644
index 000000000..9626cd905
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb
@@ -0,0 +1,7 @@
+require clutter-gst-3.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4"
+
+SRC_URI[archive.md5sum] = "3e4f64477f26d9cfd2db06d3aaed203a"
+SRC_URI[archive.sha256sum] = "0aec0d0c6020cd19a5bb0dab1165a92748f81a9a3acdfabb0f966d5f53bc8093"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.6.bb
deleted file mode 100644
index 23257bb9c..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.6.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require clutter-gtk-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-SRC_URI[archive.md5sum] = "79dc3d7a8645f87d83a9ccca8a08aa8e"
-SRC_URI[archive.sha256sum] = "9440a68600f58d00fe0af35383738943e8ead9907f4cf507a102d96822434a28"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb
new file mode 100644
index 000000000..675365cbb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb
@@ -0,0 +1,6 @@
+require clutter-gtk-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI[archive.md5sum] = "351cf9229cf941d36b441ede2236d742"
+SRC_URI[archive.sha256sum] = "742ef9d68ece36cbb1b2e1a4a6fbdad932f6645360be7e6de75abbb140dfbf1d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
index 690ea3b86..7a79aa789 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -73,3 +73,5 @@ FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
RPROVIDES_libcogl = "cogl-1.0"
RCONFLICTS_libcogl = "cogl-1.0"
RREPLACES_libcogl = "cogl-1.0"
+
+COMPATIBLE_HOST_armv4 = 'null'
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch
deleted file mode 100644
index 0717ea6f8..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb-examples/configure.in-Fix-string-argument-syntax.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 88077ed156a714f32bb408f422278d61611ffd41 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Sat, 26 Jul 2014 16:57:46 -0300
-Subject: [PATCH] configure.in: Fix string argument syntax
-
-Upstream-Status: Submitted
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----
- configure.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index bfe1b82..e939bbd 100644
---- a/configure.in
-+++ b/configure.in
-@@ -65,7 +65,7 @@ fi)
-
- DIRECTFB_REQUIRED_VERSION=1.4.14
-
--PKG_CHECK_MODULES(DIRECTFB, directfb >= $DIRECTFB_REQUIRED_VERSION,[ WATER=`$PKG_CONFIG --variable=water directfb` ],
-+PKG_CHECK_MODULES([DIRECTFB], directfb >= $DIRECTFB_REQUIRED_VERSION,[ WATER=`$PKG_CONFIG --variable=water directfb` ],
- AC_MSG_ERROR([$DIRECTFB_PKG_ERRORS
- *** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. The latest version
- *** of DirectFB is available from http://www.directfb.org/.]))
---
-1.7.10.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
deleted file mode 100644
index 7907c5c0d..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Example DirectFB applications"
-DESCRIPTION = "The DirectFB-examples package contains a set of simple DirectFB \
- applications that can be used to test and demonstrate various DirectFB \
- features"
-DEPENDS = "directfb"
-SECTION = "libs"
-LICENSE = "MIT"
-
-SRC_URI = " \
- http://downloads.yoctoproject.org/mirror/sources/DirectFB-examples-${PV}.tar.gz \
- file://configure.in-Fix-string-argument-syntax.patch \
- "
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=ecf6fd2b19915afc4da56043926ca18f"
-
-S = "${WORKDIR}/DirectFB-examples-${PV}"
-
-inherit autotools pkgconfig
-
-SRC_URI[md5sum] = "8b60c867af295481c32a8c7fc5802307"
-SRC_URI[sha256sum] = "9a2104cc4da8123c8371813551b66b943198979f745cbebc034bb5e10844122a"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb.inc b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb.inc
deleted file mode 100644
index f6b7cbe1a..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb.inc
+++ /dev/null
@@ -1,79 +0,0 @@
-SUMMARY = "Graphics abstraction library for the Linux Framebuffer Device"
-DESCRIPTION = "DirectFB is a thin library that provides developers \
-with hardware graphics acceleration, input device handling and \
-abstraction, an integrated windowing system with support for \
-translucent windows and multiple display layers on top of the \
-Linux framebuffer device."
-SECTION = "libs"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=dcf3c825659e82539645da41a7908589"
-
-HOMEPAGE = "http://directfb.org"
-DEPENDS = "jpeg libpng freetype zlib tslib sysfsutils"
-
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.gz \
- file://configurefix.patch \
- file://fusion.patch \
- file://bashism.patch \
- file://0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch \
- file://compar_fn_t.patch \
- file://union-sigval.patch \
- file://use-PTHREAD_MUTEX_RECURSIVE.patch \
- "
-
-S = "${WORKDIR}/DirectFB-${PV}"
-
-LDFLAGS_append =" -lts -lm"
-
-# Workaround for linking issues seen with armv7a + gold
-LDFLAGS_append_arm = "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
-
-BINCONFIG = "${bindir}/directfb-config"
-
-inherit autotools binconfig-disabled pkgconfig
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[jpeg2000] = "--enable-jpeg2000,--disable-jpeg2000,jasper"
-PACKAGECONFIG[drmkms] = "--enable-drmkms,--disable-drmkms,libdrm"
-PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
-PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
-
-EXTRA_OECONF = "\
- --with-gfxdrivers=none \
- --enable-freetype=yes \
- --enable-zlib \
- --disable-imlib2 \
- --disable-mesa \
- --disable-sdl \
- --disable-vnc \
- --disable-x11 \
-"
-
-#Once -fno-omit-frame-pointer option of gcc is added into TARGET_CLFAGS as default
-#this will cause directfb build failure on x86 arch, so filter out it.
-TARGET_CFLAGS_remove_x86 = "-fno-omit-frame-pointer"
-
-#PACKAGES_DYNAMIC += "^directfb-inputdrivers-.*"
-#
-#python populate_packages_prepend () {
-# inputdrivers_libdir = d.expand('${libdir}/directfb-${RV}/inputdrivers')
-# do_split_packages(d, inputdrivers_libdir, '*.so$', 'directfb-inputdrivers-%s', 'Directfb plugin for %s')
-#}
-
-# NOTE: monolithic packaging for now, should improve that eventually
-
-FILES_${PN}-dev += "\
- ${bindir}/directfb-config \
- ${libdir}/directfb-${RV}/systems/*.la \
- ${libdir}/directfb-${RV}/inputdrivers/*.la \
- ${libdir}/directfb-${RV}/interfaces/*/*.la \
- ${libdir}/directfb-${RV}/wm/*.la \
-"
-
-FILES_${PN} += "\
- ${libdir}/directfb-${RV}/systems/*.so \
- ${libdir}/directfb-${RV}/inputdrivers/*.so \
- ${libdir}/directfb-${RV}/interfaces/*/*.so \
- ${libdir}/directfb-${RV}/wm/*.so \
- ${datadir}/directfb-${PV} \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch
deleted file mode 100644
index 76e0f7530..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From f43ef44806ffb8e3b35d99070dde9b6cc1714d3d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 8 Sep 2015 21:32:20 +0000
-Subject: [PATCH] gfx,direct: Aboid usng VLAs and printf formats
-
-VLAs are flagged by clang when using non-POD types, therefore replace
-the usage with alloca which is exact same allocation on stack
-
- __attribute__((__format__ (__printf__))) is not portable as used here
- therefore disable the check for clang here, we lose no functionality
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- lib/direct/util.h | 2 +-
- src/gfx/util.cpp | 8 ++++----
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/lib/direct/util.h b/lib/direct/util.h
-index 72941e9..8e7fa4a 100644
---- a/lib/direct/util.h
-+++ b/lib/direct/util.h
-@@ -98,7 +98,7 @@
- #define D_CONST_FUNC
- #endif
-
--#if __GNUC__ >= 3
-+#if __GNUC__ >= 3 && !defined __clang__
- #define D_FORMAT_PRINTF(n) __attribute__((__format__ (__printf__, n, n+1)))
- #define D_FORMAT_VPRINTF(n) __attribute__((__format__ (__printf__, n, 0)))
- #else
-diff --git a/src/gfx/util.cpp b/src/gfx/util.cpp
-index 40032bc..d1015d4 100644
---- a/src/gfx/util.cpp
-+++ b/src/gfx/util.cpp
-@@ -294,8 +294,8 @@ dfb_gfx_copy_regions_stereo( CoreSurface *source,
- {
- unsigned int i, n = 0;
- DFBRectangle rect = { 0, 0, source->config.size.w, source->config.size.h };
-- DFBRectangle rects[num];
-- DFBPoint points[num];
-+ DFBRectangle *rects = (DFBRectangle*)alloca( sizeof(struct DFBRectangle) * num);
-+ DFBPoint *points = (DFBPoint*)alloca( sizeof(struct DFBPoint) * num);
-
- for (i=0; i<num; i++) {
- DFB_REGION_ASSERT( &regions[i] );
-@@ -351,8 +351,8 @@ dfb_gfx_copy_regions_client( CoreSurface *source,
- {
- unsigned int i, n = 0;
- DFBRectangle rect = { 0, 0, source->config.size.w, source->config.size.h };
-- DFBRectangle rects[num];
-- DFBPoint points[num];
-+ DFBRectangle *rects = (DFBRectangle*)alloca( sizeof(struct DFBRectangle) * num);
-+ DFBPoint *points = (DFBPoint*)alloca( sizeof(struct DFBPoint) * num);
- CoreGraphicsStateClient *client = _client ? _client : &StateClient::Get()->client;
- CardState *state = client->state;
- CardState backup;
---
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/bashism.patch b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/bashism.patch
deleted file mode 100644
index 2ef4e9385..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/bashism.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-${x//y/} is a bash syntax. Replace with something dash compatible
-
-RP 2015/5/3
-Upstream-Status: Pending
-
-Index: DirectFB-1.7.7/configure.in
-===================================================================
---- DirectFB-1.7.7.orig/configure.in
-+++ DirectFB-1.7.7/configure.in
-@@ -2696,7 +2696,7 @@ AM_CONDITIONAL(BUILD_TOOLS, test "$with_
- AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
-
- CFLAGS="$CFLAGS $DFB_INTERNAL_CFLAGS"
--CXXFLAGS="$CXXFLAGS ${CFLAGS//-Werror-implicit-function-declaration/}"
-+CXXFLAGS="$CXXFLAGS $(printf '%s\n' "$CFLAGS" | sed 's/-Werror-implicit-function-declaration//g')"
- DFB_LDFLAGS="$LDFLAGS $ZLIB_LIBS"
-
- CFLAGS="$CFLAGS $CFLAGS_STD"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/compar_fn_t.patch b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/compar_fn_t.patch
deleted file mode 100644
index ee4d900ba..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/compar_fn_t.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-test for __compar_fn_t and if not defined by libc then define it
-help make directfb compile with musl
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: DirectFB-1.7.7/configure.in
-===================================================================
---- DirectFB-1.7.7.orig/configure.in
-+++ DirectFB-1.7.7/configure.in
-@@ -112,6 +112,17 @@ AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_FUNCS(fork)
-
-+AC_CACHE_CHECK([for compar_fn_t in stdlib.h],ccache_cv_COMPAR_FN_T, [
-+ AC_TRY_COMPILE(
-+ [#include <stdlib.h>],
-+ [void test_fn(void) { qsort(NULL, 0, 0, (__compar_fn_t)NULL); }],
-+ ccache_cv_COMPAR_FN_T=yes,
-+ ccache_cv_COMPAR_FN_T=no)])
-+if test x"$ccache_cv_COMPAR_FN_T" = x"yes"; then
-+ AC_DEFINE(HAVE_COMPAR_FN_T, 1,
-+ Define to 1 if you have the `__compar_fn_t' typedef.)
-+fi
-+
- AC_PATH_PROGS(PERL, perl5 perl)
-
- AC_PATH_PROG(MAN2HTML, man2html, no)
-Index: DirectFB-1.7.7/inputdrivers/lirc/lirc.c
-===================================================================
---- DirectFB-1.7.7.orig/inputdrivers/lirc/lirc.c
-+++ DirectFB-1.7.7/inputdrivers/lirc/lirc.c
-@@ -59,6 +59,11 @@
-
- #include <core/input_driver.h>
-
-+#if HAVE_COMPAR_FN_T
-+#define COMPAR_FN_T __compar_fn_t
-+#else
-+typedef int (*COMPAR_FN_T)(const void *, const void *);
-+#endif
-
- DFB_INPUT_DRIVER( lirc )
-
-@@ -97,7 +102,7 @@ static DFBInputDeviceKeySymbol lirc_pars
- qsort ( keynames,
- D_ARRAY_SIZE( keynames ),
- sizeof(keynames[0]),
-- (__compar_fn_t) keynames_sort_compare );
-+ (COMPAR_FN_T) keynames_sort_compare );
- keynames_sorted = true;
- }
-
-@@ -124,7 +129,7 @@ static DFBInputDeviceKeySymbol lirc_pars
- symbol_name = bsearch( name, keynames,
- D_ARRAY_SIZE( keynames ),
- sizeof(keynames[0]),
-- (__compar_fn_t) keynames_compare );
-+ (COMPAR_FN_T) keynames_compare );
- if (symbol_name)
- return symbol_name->symbol;
- break;
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/configurefix.patch b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/configurefix.patch
deleted file mode 100644
index dd8c01905..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/configurefix.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Libtool needs these set correctly else we end up with pointless rpaths
-such as the QA warnings:
-
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfblayer contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbmaster contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/mkdgifft contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbdump contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbinput contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbfx contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbscreen contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/mkdgiff contains probably-redundant RPATH /usr/libWARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbinspector contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/mkdfiff contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbinfo contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbpenmount contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/bin/dfbg contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/libfusion-1.4.so.6 contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/libdirectfb-1.4.so.6.0.9 contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/libdirectfb-1.4.so.6 contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/libfusion-1.4.so.6.0.9 contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/systems/libdirectfb_fbdev.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/systems/libdirectfb_devmem.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/systems/libdirectfb_dummy.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBVideoProvider/libidirectfbvideoprovider_v4l.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBVideoProvider/libidirectfbvideoprovider_gif.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/ICoreResourceManager/libicoreresourcemanager_test.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_jpeg.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_png.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_dfiff.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_gif.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidirectfbfont_ft2.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/interfaces/IDirectFBFont/libidirectfbfont_dgiff.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/wm/libdirectfbwm_default.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_zytronic.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_penmount.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_linux_input.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_serialmouse.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_mutouch.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_tslib.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_joystick.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_sonypi.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_lirc.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_wm97xx_ts.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_ps2mouse.so contains probably-redundant RPATH /usr/lib
-WARNING: QA Issue: directfb: /work/i586-poky-linux/directfb-1.4.15-r1/packages-split/directfb/usr/lib/directfb-1.4-6/inputdrivers/libdirectfb_keyboard.so contains probably-redundant RPATH /usr/lib
-
-Upstream-Status: Pending
-
-RP 2012/03/16
-
-Index: DirectFB-1.4.15/configure.in
-===================================================================
---- DirectFB-1.4.15.orig/configure.in 2012-03-16 13:32:23.692402879 +0000
-+++ DirectFB-1.4.15/configure.in 2012-03-16 13:33:22.312400960 +0000
-@@ -97,13 +97,6 @@
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_FUNCS(fork)
-
--
--## Work around libstuhl during cross build...
--if test "$host" != "$build"; then
-- sys_lib_dlsearch_path_spec=""
-- sys_lib_search_path_spec=""
--fi
--
- AC_PATH_PROGS(PERL, perl5 perl)
-
- AC_PATH_PROG(MAN2HTML, man2html, no)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/fusion.patch b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/fusion.patch
deleted file mode 100644
index 1f81a6796..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/fusion.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-directfb: Fix for hangs in direct_test, fusion_skirmish on exit
-
-Upstream-Status: Pending
-Signed-off-by: Lauren Post <lauren.post@freescale.com>
-
---- a/lib/fusion/fusion.c 2013-01-18 22:57:11.000000000 +0800
-+++ b/lib/fusion/fusion.c 2013-07-04 10:42:56.502699119 +0800
-@@ -2853,9 +2853,14 @@
- direct_mutex_lock( &world->event_dispatcher_mutex );
-
- while (1) {
-- if (!world->event_dispatcher_buffers)
-+ if (!world->event_dispatcher_buffers){
- direct_waitqueue_wait( &world->event_dispatcher_cond, &world->event_dispatcher_mutex );
--
-+ if (world->dispatch_stop) {
-+ D_DEBUG_AT( Fusion_Main_Dispatch, " -> IGNORING (dispatch_stop!)\n" );
-+ direct_mutex_unlock( &world->event_dispatcher_mutex );
-+ return NULL;
-+ }
-+ }
- buf = (FusionEventDispatcherBuffer *)world->event_dispatcher_buffers;
- D_MAGIC_ASSERT( buf, FusionEventDispatcherBuffer );
-
-@@ -2872,6 +2877,11 @@
- //D_INFO("waiting...\n");
- D_ASSERT( buf->read_pos == buf->write_pos );
- direct_waitqueue_wait( &world->event_dispatcher_cond, &world->event_dispatcher_mutex );
-+ if (world->dispatch_stop) {
-+ D_DEBUG_AT( Fusion_Main_Dispatch, " -> IGNORING (dispatch_stop!)\n" );
-+ direct_mutex_unlock( &world->event_dispatcher_mutex );
-+ return NULL;
-+ }
- }
-
- buf = (FusionEventDispatcherBuffer *)world->event_dispatcher_buffers;
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/union-sigval.patch b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/union-sigval.patch
deleted file mode 100644
index 29f45c797..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/union-sigval.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-This patch is taken from gentoo musl overlay
-sigval_t is glibc only construct, we use a union of sigval
-which pretty much is same effect as sigval_t
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-diff -Naur DirectFB-1.7.6.orig/lib/direct/os/linux/glibc/system.c DirectFB-1.7.6/lib/direct/os/linux/glibc/system.c
---- DirectFB-1.7.6.orig/lib/direct/os/linux/glibc/system.c 2014-07-15 02:54:58.000000000 -0400
-+++ DirectFB-1.7.6/lib/direct/os/linux/glibc/system.c 2015-07-18 16:55:35.077989166 -0400
-@@ -111,7 +111,7 @@
- void
- direct_trap( const char *domain, int sig )
- {
-- sigval_t val;
-+ union sigval val;
-
- if (direct_config->delay_trap_ms) {
- D_LOG( Direct_Trap, VERBOSE, "NOT RAISING signal %d from %s, waiting for %dms... attach gdb --pid=%d\n", sig, domain, direct_config->delay_trap_ms, getpid() );
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch
deleted file mode 100644
index ac48f68db..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Remove use of DIRECT_RECURSIVE_MUTEX_INITIALIZER its not portable
-use portable way to initialize recursive mutex using pthread_once() and direct_recursive_mutex_init()
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: DirectFB-1.7.7/lib/direct/os/linux/glibc/mutex.h
-===================================================================
---- DirectFB-1.7.7.orig/lib/direct/os/linux/glibc/mutex.h
-+++ DirectFB-1.7.7/lib/direct/os/linux/glibc/mutex.h
-@@ -46,7 +46,6 @@ struct __D_DirectMutex {
- /**********************************************************************************************************************/
-
- #define DIRECT_MUTEX_INITIALIZER(name) { PTHREAD_MUTEX_INITIALIZER }
--#define DIRECT_RECURSIVE_MUTEX_INITIALIZER(name) { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP }
-
- #endif
-
-Index: DirectFB-1.7.7/lib/direct/trace.c
-===================================================================
---- DirectFB-1.7.7.orig/lib/direct/trace.c
-+++ DirectFB-1.7.7/lib/direct/trace.c
-@@ -89,8 +89,15 @@ struct __D_DirectTraceBuffer {
- /**************************************************************************************************/
-
- static DirectLink *buffers;
--static DirectMutex buffers_lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(buffers_lock);
-
-+static pthread_once_t buffers_lock_init_once = PTHREAD_ONCE_INIT;
-+static DirectMutex buffers_lock;
-+
-+static void
-+buffers_lock_init( void )
-+{
-+ direct_recursive_mutex_init(&buffers_lock);
-+}
- /**************************************************************************************************/
-
- __dfb_no_instrument_function__
-@@ -113,6 +120,7 @@ get_trace_buffer( void )
-
- D_MAGIC_SET( buffer, DirectTraceBuffer );
-
-+ pthread_once(&buffers_lock_init_once, buffers_lock_init);
- direct_mutex_lock( &buffers_lock );
- direct_list_append( &buffers, &buffer->link );
- direct_mutex_unlock( &buffers_lock );
-@@ -138,8 +146,14 @@ typedef struct {
- } SymbolTable;
-
- static DirectLink *tables = NULL;
--static DirectMutex tables_lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(tables_lock);
-+static pthread_once_t tables_lock_init_once = PTHREAD_ONCE_INIT;
-+static DirectMutex tables_lock;
-
-+static void
-+tables_lock_init( void )
-+{
-+ direct_recursive_mutex_init(&tabless_lock);
-+}
-
- __dfb_no_instrument_function__
- static void
-@@ -370,6 +384,7 @@ direct_trace_lookup_symbol( const char *
- Symbol *symbol;
- SymbolTable *table;
-
-+ pthread_once(&tables_lock_init_once, tables_lock_init);
- direct_mutex_lock( &tables_lock );
-
- table = find_table( filename );
-@@ -514,6 +529,7 @@ direct_trace_print_stacks()
- DirectTraceBuffer *b;
- DirectTraceBuffer *buffer = get_trace_buffer();
-
-+ pthread_once(&buffers_lock_init_once, buffers_lock_init);
- direct_mutex_lock( &buffers_lock );
-
- if (buffer && buffer->level)
-@@ -611,6 +627,7 @@ direct_trace_free_buffer( DirectTraceBuf
- D_MAGIC_ASSERT( buffer, DirectTraceBuffer );
-
- if (buffer->thread) {
-+ pthread_once(&buffers_lock_init_once, buffers_lock_init);
- direct_mutex_lock( &buffers_lock );
- direct_list_remove( &buffers, &buffer->link );
- direct_mutex_unlock( &buffers_lock );
-Index: DirectFB-1.7.7/src/directfb.c
-===================================================================
---- DirectFB-1.7.7.orig/src/directfb.c
-+++ DirectFB-1.7.7/src/directfb.c
-@@ -99,6 +99,15 @@ const unsigned int directfb_micro_versio
- const unsigned int directfb_binary_age = DIRECTFB_BINARY_AGE;
- const unsigned int directfb_interface_age = DIRECTFB_INTERFACE_AGE;
-
-+static pthread_once_t lock_init_once = PTHREAD_ONCE_INIT;
-+static DirectMutex lock;
-+
-+static void
-+lock_init( void )
-+{
-+ direct_recursive_mutex_init(&lock);
-+}
-+
- const char *
- DirectFBCheckVersion( unsigned int required_major,
- unsigned int required_minor,
-@@ -215,8 +224,7 @@ DirectFBCreate( IDirectFB **interface_pt
- if (dfb_config->remote.host)
- return CreateRemote( dfb_config->remote.host, dfb_config->remote.port, interface_ptr );
-
-- static DirectMutex lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(lock);
--
-+ pthread_once(&lock_init_once, lock_init);
- direct_mutex_lock( &lock );
-
- if (!dfb_config->no_singleton && idirectfb_singleton) {
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb_1.7.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb_1.7.7.bb
deleted file mode 100644
index c6c070eda..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/directfb/directfb_1.7.7.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require directfb.inc
-
-RV = "1.7-7"
-
-LEAD_SONAME = "libdirectfb-1.7.so.0"
-
-SRC_URI[md5sum] = "152cf1863b1a3a28aa1370e9053440bf"
-SRC_URI[sha256sum] = "b785c638dc31b8fe3a7c81be1475c89b2255ab3d67b777c747d3fbc52f8027a3"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
new file mode 100644
index 000000000..bf526370b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch
@@ -0,0 +1,56 @@
+From e6bd4205b0b546afe991ae6f72256645f4404ad4 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Mon, 5 Sep 2016 14:41:37 +0300
+Subject: [PATCH libdrm] configure.ac: Allow explicit enabling of cunit tests
+
+Add --with-cunit to make it easier to do reproducible builds. Default
+is still to probe cunit and build opportunistically.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Submitted [mailing list]
+---
+ configure.ac | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index e3048c7..918d21d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -137,6 +137,12 @@ AC_ARG_ENABLE(install-test-programs,
+ [Install test programs (default: no)]),
+ [INSTALL_TESTS=$enableval], [INSTALL_TESTS=no])
+
++AC_ARG_WITH([cunit],
++ [AS_HELP_STRING([--with-cunit],
++ [Build tests that use cunit (default: auto)])],
++ [],
++ [with_cunit=auto])
++
+ dnl ===========================================================================
+ dnl check compiler flags
+ AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
+@@ -372,7 +378,7 @@ if test "x$RADEON" = xyes; then
+ AC_DEFINE(HAVE_RADEON, 1, [Have radeon support])
+ fi
+
+-if test "x$AMDGPU" != xno; then
++if test "x$with_cunit" != xno -a "x$AMDGPU" != xno; then
+ # Detect cunit library
+ PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
+ # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We
+@@ -399,7 +406,11 @@ if test "x$AMDGPU" = xyes; then
+ AC_DEFINE(HAVE_CUNIT, [test "x$have_cunit" != "xno"], [Enable CUNIT Have amdgpu support])
+
+ if test "x$have_cunit" = "xno"; then
+- AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
++ if test "x$with_cunit" = "xyes"; then
++ AC_MSG_ERROR([Could not find cunit library but --with-cunit was given])
++ elif test "x$with_cunit" = "xauto"; then
++ AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests])
++ fi
+ fi
+ fi
+
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
index 286e548bc..4708bf1eb 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
@@ -19,6 +19,6 @@ diff -Naur libdrm-2.4.66-orig/tests/drmdevice.c libdrm-2.4.66/tests/drmdevice.c
*/
+#include <config.h>
+ #include <errno.h>
#include <stdio.h>
#include <stdlib.h>
- #include <sys/stat.h>
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.67.bb b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.67.bb
deleted file mode 100644
index ddd697f34..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.67.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "Userspace interface to the kernel DRM services"
-DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
-stands for \"Direct Rendering Manager\", which is the kernel portion of the \
-\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
-accelerated OpenGL drivers."
-HOMEPAGE = "http://dri.freedesktop.org"
-SECTION = "x11/base"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
-PROVIDES = "drm"
-DEPENDS = "libpthread-stubs udev libpciaccess"
-
-SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
- file://installtests.patch \
- file://fix_O_CLOEXEC_undeclared.patch \
- "
-
-SRC_URI[md5sum] = "b844c6af34e613ebf52f80b3cd8d7055"
-SRC_URI[sha256sum] = "ee5b71e1113be37544d0752681c12f040c01f782e2933df7d7bc21fd0d10cebe"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF += "--disable-cairo-tests \
- --enable-omap-experimental-api \
- --enable-install-test-programs \
- --disable-manpages \
- --disable-valgrind \
- "
-
-ALLOW_EMPTY_${PN}-drivers = "1"
-PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
- ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu"
-
-RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
- ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu"
-
-FILES_${PN}-tests = "${bindir}/*"
-FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
-FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
-FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
-FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
-FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
-FILES_${PN}-kms = "${libdir}/libkms*.so.*"
-FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
-FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.70.bb b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.70.bb
new file mode 100644
index 000000000..a2b5282ea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.70.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Userspace interface to the kernel DRM services"
+DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
+stands for \"Direct Rendering Manager\", which is the kernel portion of the \
+\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
+accelerated OpenGL drivers."
+HOMEPAGE = "http://dri.freedesktop.org"
+SECTION = "x11/base"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
+PROVIDES = "drm"
+DEPENDS = "libpthread-stubs udev libpciaccess"
+
+SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
+ file://installtests.patch \
+ file://fix_O_CLOEXEC_undeclared.patch \
+ file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \
+ "
+
+SRC_URI[md5sum] = "920957cfe25a80efb02be9bd90bf3c1e"
+SRC_URI[sha256sum] = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += "--disable-cairo-tests \
+ --without-cunit \
+ --enable-omap-experimental-api \
+ --enable-install-test-programs \
+ --disable-manpages \
+ --disable-valgrind \
+ "
+
+ALLOW_EMPTY_${PN}-drivers = "1"
+PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
+ ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu"
+
+RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
+ ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu"
+
+FILES_${PN}-tests = "${bindir}/*"
+FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
+FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
+FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
+FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
+FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
+FILES_${PN}-kms = "${libdir}/libkms*.so.*"
+FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
+FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Revert-changes-made-to-FcConfigAppFontAddDir-recentl.patch b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Revert-changes-made-to-FcConfigAppFontAddDir-recentl.patch
deleted file mode 100644
index f2fd5d473..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Revert-changes-made-to-FcConfigAppFontAddDir-recentl.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From 46ec6a52d4cc447cc3ff4a13b2067ecb76c9db2e Mon Sep 17 00:00:00 2001
-From: Behdad Esfahbod <behdad@behdad.org>
-Date: Fri, 26 Jun 2015 17:02:13 -0700
-Subject: [PATCH] Revert changes made to FcConfigAppFontAddDir() recently
-
-In 32ac7c75e8db0135ef37cf86f92d8b9be000c8bb the behavior of
-FcConfigAppFontAddFile/Dir() were changed to return false
-if not fonts were found. While this is welldefined and useful
-for AddFile(), it's quite problematic for AddDir(). For example,
-if the directory is empty, is that a failure or success? Worse,
-the false value from AddDir() was being propagated all the way
-to FcInit() returning false now. This only happened upon memory
-allocation failure before, and some clients assert that FcInit()
-is successful.
-
-With this change, AddDir() is reverted back to what it was.
-AddFont() change (which was actually in fcdir.c) from the original
-commit is left in.
-
-Upstream-Status: backport
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- doc/fcconfig.fncs | 2 +-
- src/fccfg.c | 29 +++++++++++------------------
- src/fcint.h | 3 ---
- src/fcstr.c | 8 --------
- 4 files changed, 12 insertions(+), 30 deletions(-)
-
-Index: fontconfig-2.11.94/doc/fcconfig.fncs
-===================================================================
---- fontconfig-2.11.94.orig/doc/fcconfig.fncs
-+++ fontconfig-2.11.94/doc/fcconfig.fncs
-@@ -232,7 +232,7 @@ the current configuration is used.
- @DESC@
- Scans the specified directory for fonts, adding each one found to the
- application-specific set of fonts. Returns FcFalse
--if the fonts cannot be added (due to allocation failure or no fonts found).
-+if the fonts cannot be added (due to allocation failure).
- Otherwise returns FcTrue. If <parameter>config</parameter> is NULL,
- the current configuration is used.
- @@
-Index: fontconfig-2.11.94/src/fccfg.c
-===================================================================
---- fontconfig-2.11.94.orig/src/fccfg.c
-+++ fontconfig-2.11.94/src/fccfg.c
-@@ -368,7 +368,6 @@ FcConfigAddDirList (FcConfig *config, Fc
- FcStrList *dirlist;
- FcChar8 *dir;
- FcCache *cache;
-- FcBool ret = FcFalse;
-
- dirlist = FcStrListCreate (dirSet);
- if (!dirlist)
-@@ -383,10 +382,9 @@ FcConfigAddDirList (FcConfig *config, Fc
- continue;
- FcConfigAddCache (config, cache, set, dirSet);
- FcDirCacheUnload (cache);
-- ret = FcTrue;
- }
- FcStrListDone (dirlist);
-- return ret;
-+ return FcTrue;
- }
-
- /*
-@@ -2199,7 +2197,6 @@ FcConfigAppFontAddFile (FcConfig *con
- FcStrSet *subdirs;
- FcStrList *sublist;
- FcChar8 *subdir;
-- FcBool ret = FcFalse;
-
- if (!config)
- {
-@@ -2229,19 +2226,16 @@ FcConfigAppFontAddFile (FcConfig *con
- FcStrSetDestroy (subdirs);
- return FcFalse;
- }
-- if (subdirs->num == 0)
-- ret = FcTrue;
-- else if ((sublist = FcStrListCreate (subdirs)))
-+ if ((sublist = FcStrListCreate (subdirs)))
- {
- while ((subdir = FcStrListNext (sublist)))
- {
-- if (FcConfigAppFontAddDir (config, subdir))
-- ret = FcTrue;
-+ FcConfigAppFontAddDir (config, subdir);
- }
- FcStrListDone (sublist);
- }
- FcStrSetDestroy (subdirs);
-- return ret;
-+ return FcTrue;
- }
-
- FcBool
-@@ -2250,7 +2244,6 @@ FcConfigAppFontAddDir (FcConfig *con
- {
- FcFontSet *set;
- FcStrSet *dirs;
-- FcBool ret = FcTrue;
-
- if (!config)
- {
-@@ -2269,8 +2262,8 @@ FcConfigAppFontAddDir (FcConfig *con
- set = FcFontSetCreate ();
- if (!set)
- {
-- ret = FcFalse;
-- goto bail;
-+ FcStrSetDestroy (dirs);
-+ return FcFalse;
- }
- FcConfigSetFonts (config, set, FcSetApplication);
- }
-@@ -2278,10 +2271,12 @@ FcConfigAppFontAddDir (FcConfig *con
- FcStrSetAddFilename (dirs, dir);
-
- if (!FcConfigAddDirList (config, FcSetApplication, dirs))
-- ret = FcFalse;
--bail:
-+ {
-+ FcStrSetDestroy (dirs);
-+ return FcFalse;
-+ }
- FcStrSetDestroy (dirs);
-- return ret;
-+ return FcTrue;
- }
-
- void
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.11.94.bb b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.11.94.bb
deleted file mode 100644
index b427947a9..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.11.94.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "Generic font configuration library"
-DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
-does not depend on the X Window System. It is designed to locate \
-fonts within the system and select them according to requirements \
-specified by applications. \
-Fontconfig is not a rasterization library, nor does it impose a \
-particular rasterization library on the application. The X-specific \
-library 'Xft' uses fontconfig along with freetype to specify and \
-rasterize fonts."
-
-HOMEPAGE = "http://www.fontconfig.org"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
-
-LICENSE = "MIT-style & MIT & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
- file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
- file://src/fccache.c;beginline=1199;endline=1214;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
-
-SECTION = "libs"
-
-DEPENDS = "expat freetype zlib"
-
-SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
- file://revert-static-pkgconfig.patch \
- file://0001-Revert-changes-made-to-FcConfigAppFontAddDir-recentl.patch \
- "
-SRC_URI[md5sum] = "479be870c7f83f15f87bac085b61d641"
-SRC_URI[sha256sum] = "73f6d323c7bcfbde25d78397675191d55b8f4139132c6a9444410f3a2d8a9a95"
-
-PACKAGES =+ "fontconfig-utils"
-FILES_${PN} =+ "${datadir}/xml/*"
-FILES_fontconfig-utils = "${bindir}/*"
-
-# Work around past breakage in debian.bbclass
-RPROVIDES_fontconfig-utils = "libfontconfig-utils"
-RREPLACES_fontconfig-utils = "libfontconfig-utils"
-RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
-DEBIAN_NOAUTONAME_fontconfig-utils = "1"
-
-inherit autotools pkgconfig
-
-FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
-
-# comma separated list of additional directories
-# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
-FONTCONFIG_FONT_DIRS ?= "no"
-
-EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb
new file mode 100644
index 000000000..115f558ee
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Generic font configuration library"
+DESCRIPTION = "Fontconfig is a font configuration and customization library, which \
+does not depend on the X Window System. It is designed to locate \
+fonts within the system and select them according to requirements \
+specified by applications. \
+Fontconfig is not a rasterization library, nor does it impose a \
+particular rasterization library on the application. The X-specific \
+library 'Xft' uses fontconfig along with freetype to specify and \
+rasterize fonts."
+
+HOMEPAGE = "http://www.fontconfig.org"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig"
+
+LICENSE = "MIT-style & MIT & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7a0449e9bc5370402a94c00204beca3d \
+ file://src/fcfreetype.c;endline=45;md5=5d9513e3196a1fbfdfa94051c09dfc84 \
+ file://src/fccache.c;beginline=1360;endline=1375;md5=0326cfeb4a7333dd4dd25fbbc4b9f27f"
+
+SECTION = "libs"
+
+DEPENDS = "expat freetype zlib"
+
+SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
+ file://revert-static-pkgconfig.patch \
+ "
+SRC_URI[md5sum] = "ce55e525c37147eee14cc2de6cc09f6c"
+SRC_URI[sha256sum] = "a9f42d03949f948a3a4f762287dbc16e53a927c91a07ee64207ebd90a9e5e292"
+
+PACKAGES =+ "fontconfig-utils"
+FILES_${PN} =+ "${datadir}/xml/*"
+FILES_fontconfig-utils = "${bindir}/*"
+
+# Work around past breakage in debian.bbclass
+RPROVIDES_fontconfig-utils = "libfontconfig-utils"
+RREPLACES_fontconfig-utils = "libfontconfig-utils"
+RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
+DEBIAN_NOAUTONAME_fontconfig-utils = "1"
+
+inherit autotools pkgconfig
+
+FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
+
+# comma separated list of additional directories
+# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
+FONTCONFIG_FONT_DIRS ?= "no"
+
+EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.3.bb
deleted file mode 100644
index 3ed907012..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.3.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "Freetype font rendering library"
-DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
-highly customizable, and portable while capable of producing high-quality output (glyph \
-images). It can be used in graphics libraries, display servers, font conversion tools, text \
-image generation tools, and many other products as well."
-HOMEPAGE = "http://www.freetype.org/"
-BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
-SECTION = "libs"
-
-LICENSE = "FreeType | GPLv2+"
-LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 \
- file://docs/FTL.TXT;md5=d479e83797f699fe873b38dadd0fcd4c \
- file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
- file://use-right-libtool.patch"
-
-SRC_URI[md5sum] = "0037b25a8c090bc8a1218e867b32beb1"
-SRC_URI[sha256sum] = "371e707aa522acf5b15ce93f11183c725b8ed1ee8546d7b3af549863045863a2"
-
-inherit autotools pkgconfig binconfig-disabled multilib_header
-
-# Adapt autotools to work with the minimal autoconf usage in freetype
-AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
-CONFIGURE_SCRIPT = "${S}/configure"
-EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
-
-PACKAGECONFIG ??= "zlib"
-
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
-# harfbuzz results in a circular dependency so enabling is non-trivial
-PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
-PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-
-EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
-
-TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
-
-do_install_append() {
- oe_multilib_header freetype2/freetype/config/ftconfig.h
-}
-
-BINCONFIG = "${bindir}/freetype-config"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.5.bb
new file mode 100644
index 000000000..97dde3a62
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.5.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Freetype font rendering library"
+DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
+highly customizable, and portable while capable of producing high-quality output (glyph \
+images). It can be used in graphics libraries, display servers, font conversion tools, text \
+image generation tools, and many other products as well."
+HOMEPAGE = "http://www.freetype.org/"
+BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
+SECTION = "libs"
+
+LICENSE = "FreeType | GPLv2+"
+LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 \
+ file://docs/FTL.TXT;md5=13b25413274c9b3b09b63e4028216ff4 \
+ file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
+ file://use-right-libtool.patch"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/freetype/files/freetype2/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
+
+SRC_URI[md5sum] = "6a386964e18ba28cb93370e57a19031b"
+SRC_URI[sha256sum] = "e20a6e1400798fd5e3d831dd821b61c35b1f9a6465d6b18a53a9df4cf441acf0"
+
+inherit autotools pkgconfig binconfig-disabled multilib_header
+
+# Adapt autotools to work with the minimal autoconf usage in freetype
+AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
+CONFIGURE_SCRIPT = "${S}/configure"
+EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
+
+PACKAGECONFIG ??= "zlib"
+
+PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
+# harfbuzz results in a circular dependency so enabling is non-trivial
+PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
+PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+
+EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
+
+TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
+
+do_install_append() {
+ oe_multilib_header freetype2/freetype/config/ftconfig.h
+}
+
+BINCONFIG = "${bindir}/freetype-config"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_1.13.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_1.13.0.bb
deleted file mode 100644
index a25c405f3..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_1.13.0.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "OpenGL extension loading library"
-DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
-HOMEPAGE = "http://glew.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
-SECTION = "x11"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
-
-DEPENDS = "virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
- file://no-strip.patch"
-
-SRC_URI[md5sum] = "7cbada3166d2aadfc4169c4283701066"
-SRC_URI[sha256sum] = "aa25dc48ed84b0b64b8d41cdd42c8f40f149c37fa2ffa39cd97f42c78d128bc7"
-
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
-UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
-
-inherit lib_package pkgconfig distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-# Override SYSTEM to avoid calling config.guess, we're cross-compiling. Pass
-# our CFLAGS via POPT as that's the optimisation variable and safely
-# overwritten.
-EXTRA_OEMAKE = "SYSTEM='linux' \
- CC='${CC}' LD='${CC}' STRIP='' \
- LDFLAGS.EXTRA='${LDFLAGS}' \
- POPT='${CFLAGS}' \
- GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
- LIBDIR='${libdir}' INCDIR='${includedir}/GL'"
-
-do_compile() {
- oe_runmake
-}
-
-do_install() {
- oe_runmake 'DESTDIR=${D}' install.all
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb
new file mode 100644
index 000000000..489dd7c8f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb
@@ -0,0 +1,40 @@
+SUMMARY = "OpenGL extension loading library"
+DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
+HOMEPAGE = "http://glew.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
+
+DEPENDS = "virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
+ file://no-strip.patch"
+
+SRC_URI[md5sum] = "2a2cd7c98f13854d2fcddae0d2b20411"
+SRC_URI[sha256sum] = "c572c30a4e64689c342ba1624130ac98936d7af90c3103f9ce12b8a0c5736764"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
+UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
+
+inherit lib_package pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+# Override SYSTEM to avoid calling config.guess, we're cross-compiling. Pass
+# our CFLAGS via POPT as that's the optimisation variable and safely
+# overwritten.
+EXTRA_OEMAKE = "SYSTEM='linux' \
+ CC='${CC}' LD='${CC}' STRIP='' \
+ LDFLAGS.EXTRA='${LDFLAGS}' \
+ POPT='${CFLAGS}' \
+ GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
+ LIBDIR='${libdir}' INCDIR='${includedir}/GL' PKGDIR='${libdir}/pkgconfig'"
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install.all
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.2.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.2.3.bb
deleted file mode 100644
index cfe885fe7..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.2.3.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Text shaping library"
-DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
- file://src/hb-ucdn/COPYING;md5=994ba0f1295f15b4bda4999a5bbeddef \
-"
-
-DEPENDS = "glib-2.0 cairo fontconfig freetype"
-
-SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "da8d97e262e6ef8288e1ae76369421bd"
-SRC_URI[sha256sum] = "8216d2404aaab7fde87be0365a90d64aa6c55928e104557cfcb37b54a096cb8c"
-
-inherit autotools pkgconfig lib_package
-
-PACKAGECONFIG ??= "icu"
-PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
-
-EXTRA_OECONF = " \
- --with-cairo \
- --with-fontconfig \
- --with-freetype \
- --with-glib \
- --without-graphite2 \
-"
-
-PACKAGES =+ "${PN}-icu ${PN}-icu-dev"
-
-FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
-FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
- ${libdir}/libharfbuzz-icu.so \
- ${libdir}/pkgconfig/harfbuzz-icu.pc \
-"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb
new file mode 100644
index 000000000..f24c443a7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Text shaping library"
+DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
+ file://src/hb-ucdn/COPYING;md5=994ba0f1295f15b4bda4999a5bbeddef \
+"
+
+DEPENDS = "glib-2.0 cairo fontconfig freetype"
+
+SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "a82d49ff67197bc3c96ea34b98880c52"
+SRC_URI[sha256sum] = "b04be31633efee2cae1d62d46434587302554fa837224845a62565ec68a0334d"
+
+inherit autotools pkgconfig lib_package gtk-doc
+
+PACKAGECONFIG ??= "icu"
+PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
+
+EXTRA_OECONF = " \
+ --with-cairo \
+ --with-fontconfig \
+ --with-freetype \
+ --with-glib \
+ --without-graphite2 \
+"
+
+PACKAGES =+ "${PN}-icu ${PN}-icu-dev"
+
+FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
+FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
+ ${libdir}/libharfbuzz-icu.so \
+ ${libdir}/pkgconfig/harfbuzz-icu.pc \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/images/core-image-directfb.bb b/import-layers/yocto-poky/meta/recipes-graphics/images/core-image-directfb.bb
deleted file mode 100644
index 5641195e8..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/images/core-image-directfb.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "An image that uses DirectFB instead of X11"
-LICENSE = "MIT"
-
-
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
- file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-inherit core-image distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "directfb"
-CONFLICT_DISTRO_FEATURES = "x11"
-
-IMAGE_INSTALL += "\
- ${CORE_IMAGE_BASE_INSTALL} \
- packagegroup-core-full-cmdline \
- packagegroup-core-directfb \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/images/core-image-weston.bb b/import-layers/yocto-poky/meta/recipes-graphics/images/core-image-weston.bb
index 52e271dac..e36655ffc 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/images/core-image-weston.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/images/core-image-weston.bb
@@ -9,3 +9,4 @@ inherit core-image distro_features_check
REQUIRED_DISTRO_FEATURES = "wayland"
CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples gtk+3-demo clutter-1.0-examples"
+CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland matchbox-terminal', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb
new file mode 100644
index 000000000..c9e70d73d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Hardware accelerated JPEG compression/decompression library"
+DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
+HOMEPAGE = "http://libjpeg-turbo.org/"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=13;md5=05bab7c7ad899d85bfba60da1a1271f2 \
+ file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \
+ file://djpeg.c;endline=11;md5=b90b6d2b4119f9e5807cd273f525d2af \
+"
+DEPENDS = "nasm-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "3fc5d9b6a8bce96161659ae7a9939257"
+SRC_URI[sha256sum] = "9f397c31a67d2b00ee37597da25898b03eb282ccd87b135a50a69993b6a2035f"
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
+UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
+
+PE= "1"
+
+# Drop-in replacement for jpeg
+PROVIDES = "jpeg"
+RPROVIDES_${PN} += "jpeg"
+RREPLACES_${PN} += "jpeg"
+RCONFLICTS_${PN} += "jpeg"
+
+inherit autotools pkgconfig
+
+# Work around missing x32 ABI support
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--without-simd", "", d)}"
+
+# Work around missing non-floating point ABI support in MIPS
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "--without-simd", "", d)}"
+
+# Provide a workaround if Altivec unit is not present in PPC
+EXTRA_OECONF_append_class-target_powerpc = "${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
+EXTRA_OECONF_append_class-target_powerpc64 = "${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
+
+PACKAGES =+ "jpeg-tools libturbojpeg"
+
+DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
+FILES_jpeg-tools = "${bindir}/*"
+
+DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
+FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_8d+1.4.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_8d+1.4.2.bb
deleted file mode 100644
index 485943194..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_8d+1.4.2.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
-HOMEPAGE = "http://libjpeg-turbo.org/"
-
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=12;md5=cad955d15145c3fdceec6855e078e953 \
- file://jpeglib.h;endline=14;md5=dfc803dc51ae21178d1376ec73c4454d \
- file://djpeg.c;endline=9;md5=e93a8f2061e8a0ac71c7a485c10489e2 \
-"
-
-DEPENDS = "nasm-native"
-
-BASEPV = "${@d.getVar('PV',True).split('+')[1]}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${BASEPV}.tar.gz"
-SRC_URI[md5sum] = "86b0d5f7507c2e6c21c00219162c3c44"
-SRC_URI[sha256sum] = "521bb5d3043e7ac063ce3026d9a59cc2ab2e9636c655a2515af5f4706122233e"
-UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
-UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
-
-S = "${WORKDIR}/${BPN}-${BASEPV}"
-
-# Drop-in replacement for jpeg
-PROVIDES = "jpeg"
-RPROVIDES_${PN} += "jpeg"
-RREPLACES_${PN} += "jpeg"
-RCONFLICTS_${PN} += "jpeg"
-
-inherit autotools pkgconfig
-
-# Work around missing x32 ABI support
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--without-simd", "", d)}"
-
-PACKAGES =+ "jpeg-tools libturbojpeg"
-
-DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality. These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
-FILES_jpeg-tools = "${bindir}/*"
-
-DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
-FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox/libpng.patch b/import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox/libpng.patch
deleted file mode 100644
index 8cd507f79..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox/libpng.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 19c3d242034748b3c60765683e1ff4e2df970205 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 10 Dec 2013 11:37:32 +0000
-Subject: [PATCH] configure: improve libpng detection
-
-Instead of looking for "libpng12" explicitly though pkg-config and then falling
-back to library hunting, just use pkg-config to find "libpng" which is provided
-by both libpng12 and libpng16.
-
-This also makes the libpng detection deterministic.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- configure.ac | 29 +++++------------------------
- 1 file changed, 5 insertions(+), 24 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 8a28076..65d7c79 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -34,7 +34,7 @@ AC_ARG_ENABLE(jpeg,
- enable_jpeg=$enableval, enable_jpeg=no)
-
- AC_ARG_ENABLE(png,
-- [ --disable-png disable png support [default=no]],
-+ [ --disable-png disable PNG support [default=enabled]],
- enable_png=$enableval, enable_png=yes )
-
- AC_ARG_ENABLE(doxygen-docs,
-@@ -156,29 +156,10 @@ fi
- dnl ------ Check for PNG ---------------------------------------------------
-
- if test x$enable_png != xno; then
-- AC_MSG_CHECKING(for libpng12)
-- if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists libpng12; then
-- AC_MSG_RESULT(yes)
-- PNG_LIBS=`$PKG_CONFIG --libs libpng12`
-- PNG_CFLAGS=`$PKG_CONFIG --cflags libpng12`
-- AC_DEFINE(USE_PNG, [1], [Use Png])
-- SUPPORTS_PNG=1
-- PNG_REQUIRED="libpng12"
-- else
-- AC_MSG_RESULT(no)
-- # AC_CHECK_HEADERS(png.h, [ have_png_h="yes" ], [ have_png_h="no" ] )
-- AC_CHECK_LIB([png], [png_create_read_struct], [have_png="yes"], [have_png="no"])
--
-- if test x$have_png=xyes && test x$have_png_h=xyes; then
-- AC_DEFINE(USE_PNG, [1], [Use Png])
-- SUPPORTS_PNG=1
-- PNG_LIBS="-lpng -lz"
-- MB_EXTRA_LIBS="$MB_EXTRA_LIBS $PNG_LIBS"
-- else
-- AC_MSG_WARN([*** Cannot find PNG, disabling support])
-- enable_png=no
-- fi
-- fi
-+ PKG_CHECK_MODULES(PNG, libpng)
-+ AC_DEFINE(USE_PNG, [1], [Use PNG])
-+ SUPPORTS_PNG=1
-+ PNG_REQUIRED="libpng"
- fi
-
-
---
-1.8.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.11.bb b/import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.11.bb
deleted file mode 100644
index f2eb67560..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.11.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Matchbox window manager core library"
-SECTION = "x11/libs"
-HOMEPAGE = "http://matchbox-project.org/"
-BUGTRACKER = "http://bugzilla.yoctoproject.com/"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
- file://libmb/mbexp.c;endline=20;md5=28c0aef3b23e308464f5dae6a11b0d2f \
- file://libmb/mbdotdesktop.c;endline=21;md5=5a287156b3207e851c1d68d09c439b51"
-
-DEPENDS = "virtual/libx11 libxext"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/matchbox/${BPN}/${PV}/${BPN}-${PV}.tar.bz2 \
- file://libpng.patch"
-
-SRC_URI[md5sum] = "fc6cc807f55a3e7c752d8013176875d7"
-SRC_URI[sha256sum] = "254cab52e304a3512c8df4be59d690cf3921bbb68a28ede7fe26b93534217b53"
-
-inherit autotools pkgconfig distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGECONFIG ??= "jpeg png xft xsettings"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
-PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
-PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
-PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,libxft"
-PACKAGECONFIG[xsettings] = "--enable-xsettings,--disable-xsettings,libxsettings-client"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb b/import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb
new file mode 100644
index 000000000..ce45e4814
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libmatchbox/libmatchbox_1.12.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Matchbox window manager core library"
+SECTION = "x11/libs"
+HOMEPAGE = "http://matchbox-project.org/"
+BUGTRACKER = "http://bugzilla.yoctoproject.com/"
+
+LICENSE = "LGPLv2+ & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+ file://COPYING.MIT;md5=f45ed9332b4f50a35adf2065adde4ca7 \
+ file://libmb/mbexp.c;endline=20;md5=28c0aef3b23e308464f5dae6a11b0d2f \
+ file://libmb/xsettings-client.c;endline=20;md5=4b106a387602db8d91a50d5cdfd65031"
+
+DEPENDS = "virtual/libx11 libxext"
+
+#SRCREV for 1.12
+SRCREV = "e846ee434f8e23d9db38af13c523f791495e0e87"
+SRC_URI = "git://git.yoctoproject.org/${BPN}"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+PACKAGECONFIG ??= "jpeg png xft"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
+PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
+PACKAGECONFIG[xft] = "--enable-xft,--disable-xft,libxft"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch
new file mode 100644
index 000000000..44e6d4df9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch
@@ -0,0 +1,57 @@
+From b1ed3533433501ec52c8289a5b3a294e57e7f798 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@gmail.com>
+Date: Thu, 26 May 2016 11:31:52 +0000
+Subject: [PATCH] src/video: make it compatible with wayland 1.10
+
+| build/.libs/SDL_waylandevents.o: In function `wl_registry_bind':
+| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
+| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
+| build/.libs/SDL_waylandkeyboard.o: In function `wl_registry_bind':
+| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
+| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
+| build/.libs/SDL_waylandvideo.o: In function `wl_registry_bind':
+| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
+| collect2: error: ld returned 1 exit status
+| make: *** [build/libSDL2.la] Error 1
+| ERROR: oe_runmake failed
+
+Upstream-Status: Pending
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+---
+ src/video/wayland/SDL_waylanddyn.h | 1 +
+ src/video/wayland/SDL_waylandsym.h | 4 ++++
+ src/video/webos/SDL_waylanddyn.h | 1 +
+ src/video/webos/SDL_waylandsym.h | 4 ++++
+ 4 files changed, 10 insertions(+)
+
+diff --git a/src/video/wayland/SDL_waylanddyn.h b/src/video/wayland/SDL_waylanddyn.h
+index 8d9313a..c7b0157 100644
+--- a/src/video/wayland/SDL_waylanddyn.h
++++ b/src/video/wayland/SDL_waylanddyn.h
+@@ -79,6 +79,7 @@ void SDL_WAYLAND_UnloadSymbols(void);
+ #define wl_proxy_get_user_data (*WAYLAND_wl_proxy_get_user_data)
+ #define wl_proxy_add_listener (*WAYLAND_wl_proxy_add_listener)
+ #define wl_proxy_marshal_constructor (*WAYLAND_wl_proxy_marshal_constructor)
++#define wl_proxy_marshal_constructor_versioned (*WAYLAND_wl_proxy_marshal_constructor_versioned)
+
+ #define wl_seat_interface (*WAYLAND_wl_seat_interface)
+ #define wl_surface_interface (*WAYLAND_wl_surface_interface)
+diff --git a/src/video/wayland/SDL_waylandsym.h b/src/video/wayland/SDL_waylandsym.h
+index c3b4fa5..b9a0d97 100644
+--- a/src/video/wayland/SDL_waylandsym.h
++++ b/src/video/wayland/SDL_waylandsym.h
+@@ -55,6 +55,10 @@ SDL_WAYLAND_SYM(void, wl_list_insert_list, (struct wl_list *, struct wl_list *))
+ SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_4)
+ SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor, (struct wl_proxy *, uint32_t opcode, const struct wl_interface *interface, ...))
+
++/* These functions are available in Wayland >= 1.10 */
++SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_10)
++SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor_versioned, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, ...))
++
+ SDL_WAYLAND_INTERFACE(wl_seat_interface)
+ SDL_WAYLAND_INTERFACE(wl_surface_interface)
+ SDL_WAYLAND_INTERFACE(wl_shm_pool_interface)
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb
index 428230711..844ff333c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb
@@ -15,7 +15,9 @@ PROVIDES = "virtual/libsdl2"
DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
- file://linkage.patch"
+ file://linkage.patch \
+ file://0001-src-video-make-it-compatible-with-wayland-1.10.patch \
+"
S = "${WORKDIR}/SDL2-${PV}"
@@ -44,7 +46,7 @@ PACKAGECONFIG ??= " \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
"
PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
-PACKAGECONFIG[directfb] = "--enable-video-directfb --disable-video-directfb,directfb"
+PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/MIT-style-license b/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/MIT-style-license
deleted file mode 100644
index 628de9830..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/MIT-style-license
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright © 2001 Red Hat, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Red Hat not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. Red Hat makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Owen Taylor, Red Hat, Inc.
- */
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/link-x11.patch b/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/link-x11.patch
deleted file mode 100644
index d08d0d5b9..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/link-x11.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: Xsettings-client-0.10/Makefile.am
-===================================================================
---- Xsettings-client-0.10.orig/Makefile.am 2008-02-07 14:49:54.000000000 +0000
-+++ Xsettings-client-0.10/Makefile.am 2008-02-07 14:50:00.000000000 +0000
-@@ -9,4 +9,4 @@
-
- libXsettings_client_la_SOURCES= $(source_c) $(source_h)
-
--libXsettings_client_la_LIBADD = @X_LIBS@
-\ No newline at end of file
-+libXsettings_client_la_LIBADD = @X_LIBS@ -lX11
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/obsolete_automake_macros.patch b/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/obsolete_automake_macros.patch
deleted file mode 100644
index 905d08e61..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd Xsettings-client-0.10/configure.ac Xsettings-client-0.10/configure.ac
---- Xsettings-client-0.10/configure.ac 2003-03-28 12:39:51.000000000 +0200
-+++ Xsettings-client-0.10/configure.ac 2013-01-11 07:37:21.491597743 +0200
-@@ -1,7 +1,7 @@
- # Process this file with autoconf to produce a configure script.
- AC_INIT(xsettings-client.c)
- AM_INIT_AUTOMAKE(Xsettings-client, 0.10)
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADERS(config.h)
-
- CFLAGS="-Os -Wall"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb b/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb
deleted file mode 100644
index 67c5e2777..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "utility functions for the Xsettings protocol"
-DESCRIPTION = "Libraries used for applications making use of the Xsettings configuration \
-setting propagation protocol. Controls setting of double click timeout, drag-and-drop \
-threshold, and default foreground and background colors for all applications running within a \
-desktop."
-HOMEPAGE = "http://matchbox-project.org/sources/optional-dependencies/"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-SECTION = "x/libs"
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7cfac9d2d4dc3694cc7eb605cf32a69b \
- file://xsettings-client.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b \
- file://xsettings-common.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b"
-DEPENDS = "virtual/libx11"
-
-PR = "r5"
-
-headers = "xsettings-common.h xsettings-client.h"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/matchbox/optional-dependencies/Xsettings-client-0.10.tar.gz \
- file://MIT-style-license \
- file://link-x11.patch;apply=yes \
- file://obsolete_automake_macros.patch \
-"
-
-SRC_URI[md5sum] = "c14aa9db6c097e0306dac97fb7da1add"
-SRC_URI[sha256sum] = "f274a4bc969ae192994a856b7f786c6fce96bae77f96c1c2b71dd97599e06e43"
-
-S = "${WORKDIR}/Xsettings-client-0.10"
-
-inherit autotools gettext distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-do_configure_prepend() {
- # This package doesn't ship with its own COPYING file and
- # autotools will install a GPLv2 one instead of the actual MIT-style license here.
- # Add the correct license here to avoid confusion.
- cp -f ${WORKDIR}/MIT-style-license ${S}/COPYING
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb
new file mode 100644
index 000000000..c3d2d23db
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Matchbox lightweight window manager"
+HOMEPAGE = "http://matchbox-project.org"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://src/wm.h;endline=21;md5=a7e844465edbcf79c282369f93caa835 \
+ file://src/main.c;endline=21;md5=3e5d9f832b527b0d72dbe8e3c4c60b95 \
+ file://src/wm.c;endline=21;md5=8dc9d24477d87ef5dfbc2e4927146aab"
+
+SECTION = "x11/wm"
+DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification expat gconf libxcursor libxfixes"
+
+# SRCREV tagged 1.2.1
+SRCREV = "9fd1806dfa7c8f2202db18b7bc880857a3019f8c"
+SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager \
+ file://kbdconfig"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+FILES_${PN} = "${bindir}/* \
+ ${datadir}/matchbox \
+ ${sysconfdir}/matchbox \
+ ${datadir}/themes/blondie/matchbox \
+ ${datadir}/themes/Default/matchbox \
+ ${datadir}/themes/MBOpus/matchbox"
+
+EXTRA_OECONF = " --enable-startup-notification \
+ --disable-xrm \
+ --enable-expat \
+ --with-expat-lib=${STAGING_LIBDIR} \
+ --with-expat-includes=${STAGING_INCDIR}"
+
+do_install_prepend() {
+ install ${WORKDIR}/kbdconfig ${S}/data/kbdconfig
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_git.bb
deleted file mode 100644
index aa768280a..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_git.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Matchbox lightweight window manager"
-HOMEPAGE = "http://matchbox-project.org"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://src/wm.h;endline=21;md5=a7e844465edbcf79c282369f93caa835 \
- file://src/main.c;endline=21;md5=3e5d9f832b527b0d72dbe8e3c4c60b95 \
- file://src/wm.c;endline=21;md5=8dc9d24477d87ef5dfbc2e4927146aab"
-
-SECTION = "x11/wm"
-DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification expat gconf libxcursor libxfixes"
-
-SRCREV = "8178e70d5c742c4cd63b51df228cc8aa3594d518"
-PV = "1.2+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager \
- file://kbdconfig"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-FILES_${PN} = "${bindir}/* \
- ${datadir}/matchbox \
- ${sysconfdir}/matchbox \
- ${datadir}/themes/blondie/matchbox \
- ${datadir}/themes/Default/matchbox \
- ${datadir}/themes/MBOpus/matchbox"
-
-EXTRA_OECONF = " --enable-startup-notification \
- --disable-xrm \
- --enable-expat \
- --with-expat-lib=${STAGING_LIBDIR} \
- --with-expat-includes=${STAGING_INCDIR}"
-
-do_install_prepend() {
- install ${WORKDIR}/kbdconfig ${S}/data/kbdconfig
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb
index eb80cd3bb..a1a8e26e0 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb
@@ -6,7 +6,7 @@ LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING;md5=0964c689fcf4c21c6797ea87408416b6"
SECTION = "x11/libs"
-DEPENDS = "glib-2.0 intltool-native libfm-extra"
+DEPENDS = "glib-2.0 libfm-extra"
SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch
new file mode 100644
index 000000000..48bd32567
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch
@@ -0,0 +1,116 @@
+From 5ec140c17b54c25920091501b665b9aa809cc5e8 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Mon, 11 Jul 2016 10:44:25 -0700
+Subject: mapi: Massage code to allow clang to compile.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+According to https://llvm.org/bugs/show_bug.cgi?id=19778#c3 this code
+was violating the spec, resulting in it failing to compile.
+
+Cc: mesa-stable@lists.freedesktop.org
+Co-authored-by: Tomasz Paweł Gajc <tpgxyz@gmail.com>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89599
+Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+diff --git a/configure.ac b/configure.ac
+index 3799d8d..1ca8359 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -226,6 +226,7 @@ AX_GCC_FUNC_ATTRIBUTE([packed])
+ AX_GCC_FUNC_ATTRIBUTE([pure])
+ AX_GCC_FUNC_ATTRIBUTE([returns_nonnull])
+ AX_GCC_FUNC_ATTRIBUTE([unused])
++AX_GCC_FUNC_ATTRIBUTE([visibility])
+ AX_GCC_FUNC_ATTRIBUTE([warn_unused_result])
+ AX_GCC_FUNC_ATTRIBUTE([weak])
+
+diff --git a/src/mapi/entry_x86-64_tls.h b/src/mapi/entry_x86-64_tls.h
+index 38faccc..c5262a1 100644
+--- a/src/mapi/entry_x86-64_tls.h
++++ b/src/mapi/entry_x86-64_tls.h
+@@ -25,6 +25,11 @@
+ * Chia-I Wu <olv@lunarg.com>
+ */
+
++#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
++#define HIDDEN __attribute__((visibility("hidden")))
++#else
++#define HIDDEN
++#endif
+
+ __asm__(".text\n"
+ ".balign 32\n"
+@@ -54,8 +59,8 @@ entry_patch_public(void)
+ {
+ }
+
+-static char
+-x86_64_entry_start[];
++extern char
++x86_64_entry_start[] HIDDEN;
+
+ mapi_func
+ entry_get_public(int slot)
+diff --git a/src/mapi/entry_x86_tls.h b/src/mapi/entry_x86_tls.h
+index 46d2ece..231b409 100644
+--- a/src/mapi/entry_x86_tls.h
++++ b/src/mapi/entry_x86_tls.h
+@@ -27,6 +27,12 @@
+
+ #include <string.h>
+
++#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
++#define HIDDEN __attribute__((visibility("hidden")))
++#else
++#define HIDDEN
++#endif
++
+ __asm__(".text");
+
+ __asm__("x86_current_tls:\n\t"
+@@ -71,8 +77,8 @@ __asm__(".text");
+ extern unsigned long
+ x86_current_tls();
+
+-static char x86_entry_start[];
+-static char x86_entry_end[];
++extern char x86_entry_start[] HIDDEN;
++extern char x86_entry_end[] HIDDEN;
+
+ void
+ entry_patch_public(void)
+diff --git a/src/mapi/entry_x86_tsd.h b/src/mapi/entry_x86_tsd.h
+index ea7bacb..03d9735 100644
+--- a/src/mapi/entry_x86_tsd.h
++++ b/src/mapi/entry_x86_tsd.h
+@@ -25,6 +25,11 @@
+ * Chia-I Wu <olv@lunarg.com>
+ */
+
++#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
++#define HIDDEN __attribute__((visibility("hidden")))
++#else
++#define HIDDEN
++#endif
+
+ #define X86_ENTRY_SIZE 32
+
+@@ -58,8 +63,8 @@ __asm__(".balign 32\n"
+ #include <string.h>
+ #include "u_execmem.h"
+
+-static const char x86_entry_start[];
+-static const char x86_entry_end[];
++extern const char x86_entry_start[] HIDDEN;
++extern const char x86_entry_end[] HIDDEN;
+
+ void
+ entry_patch_public(void)
+--
+cgit v0.10.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch
new file mode 100644
index 000000000..d2d67558b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch
@@ -0,0 +1,29 @@
+Configure checks for compiler to be gcc and then it enables asm_offsets
+generation. see
+
+https://cgit.freedesktop.org/mesa/mesa/commit/?id=73c9b4b0e05fc66629ba250846948dc55c0e7a0d
+
+However, we missed the check when enabling this on cross compilation
+when architecture for both host and target is x86
+
+Fixes errors like
+./gen_matypes > matypes.h
+/bin/bash: ./gen_matypes: No such file or directory
+
+-Khem
+
+Upstream-Status: Submitted
+
+Index: mesa-12.0.1/configure.ac
+===================================================================
+--- mesa-12.0.1.orig/configure.ac
++++ mesa-12.0.1/configure.ac
+@@ -732,7 +732,7 @@ test "x$enable_asm" = xno && AC_MSG_RESU
+ if test "x$enable_asm" = xyes -a "x$cross_compiling" = xyes; then
+ case "$host_cpu" in
+ i?86 | x86_64 | amd64)
+- if test "x$host_cpu" != "x$target_cpu"; then
++ if test "x$host_cpu" != "x$target_cpu" -o "x$acv_mesa_CLANG" = xyes; then
+ enable_asm=no
+ AC_MSG_RESULT([no, cross compiling])
+ fi
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
deleted file mode 100644
index 09054cb75..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 36829a8d7ad2888515fbee95c2a70b3d636d7538 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 9 Jul 2014 14:30:33 +0200
-Subject: [PATCH 2/9] Correctly implement with AC_WITH(glut) so that
- --without-glut works.
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Upstream-Status: Submitted (https://patchwork.freedesktop.org/patch/64417/)
-
----
- configure.ac | 26 +++++++++++++++-----------
- 1 file changed, 15 insertions(+), 11 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index c4ee12b..9445424 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -67,21 +67,25 @@ DEMO_CFLAGS="$DEMO_CFLAGS $GL_CFLAGS"
- DEMO_LIBS="$DEMO_LIBS $GL_LIBS"
-
- dnl Check for GLUT
--GLUT_CFLAGS=""
--GLUT_LIBS=-lglut
--glut_enabled=yes
-+glut_enabled=no
- AC_ARG_WITH([glut],
- [AS_HELP_STRING([--with-glut=DIR],
- [glut install directory])],
- [GLUT_CFLAGS="-I$withval/include"
-- GLUT_LIBS="-L$withval/lib -lglut"])
--AC_CHECK_HEADER([GL/glut.h],
-- [],
-- [glut_enabled=no])
--AC_CHECK_LIB([glut],
-- [glutInit],
-- [],
-- [glut_enabled=no])
-+ GLUT_LIBS="-L$withval/lib -lglut"],
-+ [GLUT_CFLAGS=""
-+ GLUT_LIBS="-lglut"]
-+ )
-+AS_IF([test "x$with_glut" != xno],
-+ [AC_CHECK_HEADER([GL/glut.h],
-+ [],
-+ [glut_enabled=no])
-+ AC_CHECK_LIB([glut],
-+ [glutInit],
-+ [],
-+ [glut_enabled=no])
-+ glut_enabled=yes
-+])
-
- dnl Check for FreeGLUT 2.6 or later
- AC_EGREP_HEADER([glutInitContextProfile],
---
-2.0.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
index 6b58c2b77..f6b59a11f 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
@@ -1,8 +1,7 @@
-From b25e9c675cf560b8b037dc855c6b3b1d09957867 Mon Sep 17 00:00:00 2001
+From 779438770bedf3d53e6ad8f7cd6889b7f50daf3b Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 9 Jul 2014 14:23:41 +0200
-Subject: [PATCH 3/9] configure: Allow to disable demos which require GLEW or
- GLU
+Subject: [PATCH] configure: Allow to disable demos which require GLEW or GLU
* in some systems without X11 support we don't have GLEW, but
mesa-demos are still useful
@@ -10,17 +9,20 @@ Subject: [PATCH 3/9] configure: Allow to disable demos which require GLEW or
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Port to 8.3.0
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
configure.ac | 49 ++++++++++++++++++++---------
- src/Makefile.am | 14 ++++++---
+ src/Makefile.am | 18 ++++++++---
src/demos/Makefile.am | 73 ++++++++++++++++++++++++-------------------
src/egl/Makefile.am | 8 +++--
- src/egl/opengles1/Makefile.am | 44 +++++++++++++++-----------
- src/egl/opengles2/Makefile.am | 33 ++++++++++---------
- 6 files changed, 135 insertions(+), 86 deletions(-)
+ src/egl/opengles1/Makefile.am | 10 ++++--
+ src/egl/opengles2/Makefile.am | 29 ++++++++---------
+ 6 files changed, 117 insertions(+), 70 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 9445424..bc4c8d1 100644
+index 0525b09..28834cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,25 +93,44 @@ AC_EGREP_HEADER([glutInitContextProfile],
@@ -92,10 +94,11 @@ index 9445424..bc4c8d1 100644
AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
diff --git a/src/Makefile.am b/src/Makefile.am
-index 1647d64..754c47c 100644
+index 1647d64..8b89dee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -23,14 +23,18 @@
+@@ -22,15 +22,19 @@
+ # Authors:
# Eric Anholt <eric@anholt.net>
+if HAVE_GLEW
@@ -116,7 +119,7 @@ index 1647d64..754c47c 100644
objviewer \
osdemos \
perf \
-@@ -40,8 +39,12 @@ SUBDIRS = \
+@@ -40,8 +44,12 @@ SUBDIRS = \
slang \
tests \
tools \
@@ -289,10 +292,10 @@ index d64a49e..4fe1ca8 100644
+ openvg
+endif
diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
-index 7a9828d..3455e75 100644
+index fa397c2..21853e8 100644
--- a/src/egl/opengles1/Makefile.am
+++ b/src/egl/opengles1/Makefile.am
-@@ -36,28 +36,43 @@ AM_LDFLAGS = \
+@@ -36,9 +36,12 @@ AM_LDFLAGS = \
$(EGL_LIBS) \
-lm
@@ -301,42 +304,13 @@ index 7a9828d..3455e75 100644
if HAVE_EGL
if HAVE_GLESV1
-noinst_PROGRAMS = \
-- bindtex \
-- clear \
-+noinst_PROGRAMS += \
- drawtex_screen \
-+ gears_screen \
-+ torus_screen \
-+ tri_screen
-+
-+drawtex_screen_SOURCES = drawtex.c
-+gears_screen_SOURCES = gears.c
-+torus_screen_SOURCES = torus.c
-+tri_screen_SOURCES = tri.c
-+
-+drawtex_screen_LDADD = ../eglut/libeglut_screen.la
-+gears_screen_LDADD = ../eglut/libeglut_screen.la
-+torus_screen_LDADD = ../eglut/libeglut_screen.la
-+tri_screen_LDADD = ../eglut/libeglut_screen.la
-+
+if HAVE_X11
-+noinst_PROGRAMS += \
-+ clear
-+
+bin_PROGRAMS = \
-+ bindtex \
+ bindtex \
+ clear \
drawtex_x11 \
- eglfbdev \
- es1_info \
-- gears_screen \
- gears_x11 \
- msaa \
- pbuffer\
- render_tex \
- texture_from_pixmap \
-- torus_screen \
+@@ -52,8 +55,6 @@ noinst_PROGRAMS = \
torus_x11 \
-- tri_screen \
tri_x11 \
two_win
-endif
@@ -344,26 +318,7 @@ index 7a9828d..3455e75 100644
bindtex_LDADD = $(X11_LIBS)
es1_info_LDADD = $(X11_LIBS)
-@@ -71,22 +86,15 @@ two_win_LDADD = $(X11_LIBS)
- clear_LDADD = ../eglut/libeglut_x11.la $(EGL_LIBS) $(X11_LIBS)
- clear_LDFLAGS =
-
--drawtex_screen_SOURCES = drawtex.c
--gears_screen_SOURCES = gears.c
--torus_screen_SOURCES = torus.c
--tri_screen_SOURCES = tri.c
--
- drawtex_x11_SOURCES = drawtex.c
- gears_x11_SOURCES = gears.c
- torus_x11_SOURCES = torus.c
- tri_x11_SOURCES = tri.c
-
--drawtex_screen_LDADD = ../eglut/libeglut_screen.la
--gears_screen_LDADD = ../eglut/libeglut_screen.la
--torus_screen_LDADD = ../eglut/libeglut_screen.la
--tri_screen_LDADD = ../eglut/libeglut_screen.la
--
- drawtex_x11_LDADD = ../eglut/libeglut_x11.la
+@@ -76,3 +77,6 @@ drawtex_x11_LDADD = ../eglut/libeglut_x11.la
gears_x11_LDADD = ../eglut/libeglut_x11.la
torus_x11_LDADD = ../eglut/libeglut_x11.la
tri_x11_LDADD = ../eglut/libeglut_x11.la
@@ -371,35 +326,35 @@ index 7a9828d..3455e75 100644
+endif
+endif
diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am
-index 41c1b80..74af460 100644
+index b80ba50..17f8d49 100644
--- a/src/egl/opengles2/Makefile.am
+++ b/src/egl/opengles2/Makefile.am
-@@ -36,26 +36,29 @@ AM_LDFLAGS = \
+@@ -33,27 +33,28 @@ AM_LDFLAGS = \
+ $(EGL_LIBS) \
+ -lm
+
++bin_PROGRAMS =
++
if HAVE_EGL
if HAVE_GLESV2
- bin_PROGRAMS = \
+-bin_PROGRAMS =
+-if HAVE_X11
+-bin_PROGRAMS += \
- es2_info \
-- es2gears_screen \
- es2gears_x11 \
- es2tri
-+ es2gears_screen
-+
-+es2gears_screen_SOURCES = es2gears.c
-+es2gears_screen_LDADD = ../eglut/libeglut_screen.la
-+
+-endif
if HAVE_WAYLAND
bin_PROGRAMS += es2gears_wayland
-endif
-endif
--endif
-
--es2_info_LDADD = $(X11_LIBS)
--es2tri_LDADD = $(X11_LIBS)
++
+es2gears_wayland_SOURCES = es2gears.c
+es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
-+endif
+ endif
--es2gears_screen_SOURCES = es2gears.c
+-es2_info_LDADD = $(X11_LIBS)
+-es2tri_LDADD = $(X11_LIBS)
+if HAVE_X11
+bin_PROGRAMS += \
+ es2tri \
@@ -409,8 +364,6 @@ index 41c1b80..74af460 100644
+es2_info_LDADD = $(X11_LIBS)
es2gears_x11_SOURCES = es2gears.c
-
--es2gears_screen_LDADD = ../eglut/libeglut_screen.la
--
es2gears_x11_LDADD = ../eglut/libeglut_x11.la
+es2tri_LDADD = $(X11_LIBS)
+endif
@@ -420,5 +373,5 @@ index 41c1b80..74af460 100644
-es2gears_wayland_SOURCES = es2gears.c
-es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
--
-2.0.0
+2.1.4
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch
deleted file mode 100644
index aac2a3729..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch
+++ /dev/null
@@ -1,267 +0,0 @@
-From 453353a221de9c64479f4372565d2cd8591b36cc Mon Sep 17 00:00:00 2001
-From: Frank Binns <frank.binns@imgtec.com>
-Date: Fri, 29 Jun 2012 11:26:04 +0100
-Subject: [PATCH 5/9] Fix build when EGL_MESA_screen_surface extension isn't
- present
-
-The EGL demos won't build against EGL implementations that don't support
-the EGL_MESA_screen_surface extension. Fix this, in most cases, by
-wrapping relevant bits of code in #ifdef EGL_MESA_screen_surface.
-
-Signed-off-by: Frank Binns <frank.binns@imgtec.com>
-
-Applied and fixed up in Yocto by...
-
-Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com>
-
-Upstream-Status: Pending
----
- src/egl/eglut/eglut.c | 9 +++++++--
- src/egl/eglut/eglut_screen.c | 14 ++++++++++++++
- src/egl/opengl/demo1.c | 2 ++
- src/egl/opengl/demo2.c | 7 ++++++-
- src/egl/opengl/demo3.c | 7 ++++++-
- 5 files changed, 35 insertions(+), 4 deletions(-)
-
-diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c
-index 2ee6f15..f6a2ad4 100644
---- a/src/egl/eglut/eglut.c
-+++ b/src/egl/eglut/eglut.c
-@@ -76,8 +76,9 @@ _eglutNow(void)
- static void
- _eglutDestroyWindow(struct eglut_window *win)
- {
-- if (_eglut->surface_type != EGL_PBUFFER_BIT &&
-- _eglut->surface_type != EGL_SCREEN_BIT_MESA)
-+
-+ if (_eglut->surface_type == EGL_WINDOW_BIT ||
-+ _eglut->surface_type == EGL_PIXMAP_BIT)
- eglDestroySurface(_eglut->dpy, win->surface);
-
- _eglutNativeFiniWindow(win);
-@@ -175,7 +176,9 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h)
- win->config, win->native.u.pixmap, NULL);
- break;
- case EGL_PBUFFER_BIT:
-+#ifdef EGL_MESA_screen_surface
- case EGL_SCREEN_BIT_MESA:
-+#endif
- win->surface = win->native.u.surface;
- break;
- default:
-@@ -289,8 +292,10 @@ eglutDestroyWindow(int win)
- if (window->index != win)
- return;
-
-+#ifdef EGL_MESA_screen_surface
- /* XXX it causes some bug in st/egl KMS backend */
- if ( _eglut->surface_type != EGL_SCREEN_BIT_MESA)
-+#endif
- eglMakeCurrent(_eglut->dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
-
- _eglutDestroyWindow(_eglut->current);
-diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c
-index 021a8f1..094a4e2 100644
---- a/src/egl/eglut/eglut_screen.c
-+++ b/src/egl/eglut/eglut_screen.c
-@@ -35,26 +35,33 @@
-
- #define MAX_MODES 100
-
-+#ifdef EGL_MESA_screen_surface
- static EGLScreenMESA kms_screen;
- static EGLModeMESA kms_mode;
- static EGLint kms_width, kms_height;
-+#endif
-
- void
- _eglutNativeInitDisplay(void)
- {
-+#ifdef EGL_MESA_screen_surface
- _eglut->native_dpy = EGL_DEFAULT_DISPLAY;
- _eglut->surface_type = EGL_SCREEN_BIT_MESA;
-+#endif
- }
-
- void
- _eglutNativeFiniDisplay(void)
- {
-+#ifdef EGL_MESA_screen_surface
- kms_screen = 0;
- kms_mode = 0;
- kms_width = 0;
- kms_height = 0;
-+#endif
- }
-
-+#ifdef EGL_MESA_screen_surface
- static void
- init_kms(void)
- {
-@@ -94,19 +101,23 @@ init_kms(void)
- kms_width = width;
- kms_height = height;
- }
-+#endif
-
- void
- _eglutNativeInitWindow(struct eglut_window *win, const char *title,
- int x, int y, int w, int h)
- {
-+#ifdef EGL_MESA_screen_surface
- EGLint surf_attribs[16];
- EGLint i;
-+#endif
- const char *exts;
-
- exts = eglQueryString(_eglut->dpy, EGL_EXTENSIONS);
- if (!exts || !strstr(exts, "EGL_MESA_screen_surface"))
- _eglutFatal("EGL_MESA_screen_surface is not supported\n");
-
-+#ifdef EGL_MESA_screen_surface
- init_kms();
-
- i = 0;
-@@ -128,14 +139,17 @@ _eglutNativeInitWindow(struct eglut_window *win, const char *title,
-
- win->native.width = kms_width;
- win->native.height = kms_height;
-+#endif
- }
-
- void
- _eglutNativeFiniWindow(struct eglut_window *win)
- {
-+#ifdef EGL_MESA_screen_surface
- eglShowScreenSurfaceMESA(_eglut->dpy,
- kms_screen, EGL_NO_SURFACE, 0);
- eglDestroySurface(_eglut->dpy, win->native.u.surface);
-+#endif
- }
-
- void
-diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
-index d892734..3a3564c 100644
---- a/src/egl/opengl/demo1.c
-+++ b/src/egl/opengl/demo1.c
-@@ -18,6 +18,7 @@
- static void
- TestScreens(EGLDisplay dpy)
- {
-+#ifdef EGL_MESA_screen_surface
- #define MAX 8
- EGLScreenMESA screens[MAX];
- EGLint numScreens;
-@@ -28,6 +29,7 @@ TestScreens(EGLDisplay dpy)
- for (i = 0; i < numScreens; i++) {
- printf(" Screen %d handle: %d\n", i, (int) screens[i]);
- }
-+#endif
- }
-
- /**
-diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c
-index 505b474..bfef59e 100644
---- a/src/egl/opengl/demo2.c
-+++ b/src/egl/opengl/demo2.c
-@@ -16,6 +16,7 @@
-
- /*#define FRONTBUFFER*/
-
-+#ifdef EGL_MESA_screen_surface
- static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,
- GLfloat r, GLfloat g, GLfloat b)
- {
-@@ -95,12 +96,13 @@ TestScreens(EGLDisplay dpy)
- printf(" Screen %d handle: %d\n", i, (int) screens[i]);
- }
- }
--
-+#endif
-
- int
- main(int argc, char *argv[])
- {
- int maj, min;
-+#ifdef EGL_MESA_screen_surface
- EGLContext ctx;
- EGLSurface pbuffer, screen_surf;
- EGLConfig configs[10];
-@@ -115,6 +117,7 @@ main(int argc, char *argv[])
- EGLModeMESA mode;
- EGLScreenMESA screen;
- EGLint count;
-+#endif
-
- EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- assert(d);
-@@ -132,6 +135,7 @@ main(int argc, char *argv[])
- exit(1);
- }
-
-+#ifdef EGL_MESA_screen_surface
- eglGetConfigs(d, configs, 10, &numConfigs);
- printf("Got %d EGL configs:\n", numConfigs);
- for (i = 0; i < numConfigs; i++) {
-@@ -211,6 +215,7 @@ main(int argc, char *argv[])
- eglDestroySurface(d, pbuffer);
- eglDestroyContext(d, ctx);
- eglTerminate(d);
-+#endif
-
- return 0;
- }
-diff --git a/src/egl/opengl/demo3.c b/src/egl/opengl/demo3.c
-index f84ca23..31b5d8b 100644
---- a/src/egl/opengl/demo3.c
-+++ b/src/egl/opengl/demo3.c
-@@ -46,7 +46,7 @@ GLubyte OpenGL_bits[] = {
- 0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00,
- };
-
--
-+#ifdef EGL_MESA_screen_surface
- static void Init(void)
- {
-
-@@ -551,11 +551,13 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
- fclose(f);
- }
- }
-+#endif
-
- int
- main(int argc, char *argv[])
- {
- int maj, min;
-+#ifdef EGL_MESA_screen_surface
- EGLContext ctx;
- EGLSurface screen_surf;
- EGLConfig configs[10];
-@@ -566,6 +568,7 @@ main(int argc, char *argv[])
- const GLubyte *bitmap;
- EGLint screenAttribs[32];
- EGLint i;
-+#endif
-
- EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- assert(d);
-@@ -583,6 +586,7 @@ main(int argc, char *argv[])
- exit(1);
- }
-
-+#ifdef EGL_MESA_screen_surface
- eglGetConfigs(d, configs, 10, &numConfigs);
- eglGetScreensMESA(d, &screen, 1, &count);
- eglGetModesMESA(d, screen, &mode, 1, &count);
-@@ -642,6 +646,7 @@ main(int argc, char *argv[])
- eglDestroySurface(d, screen_surf);
- eglDestroyContext(d, ctx);
- eglTerminate(d);
-+#endif
-
- return 0;
- }
---
-2.0.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch
deleted file mode 100644
index 12e0805f1..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 6a19dba1d275579c73e7763b0554410ff4e1e650 Mon Sep 17 00:00:00 2001
-From: Frank Binns <frank.binns@imgtec.com>
-Date: Fri, 29 Jun 2012 12:00:26 +0100
-Subject: [PATCH 6/9] Query display for EGL_MESA_screen_surface extension
- before using it
-
-This code makes heavy use of the EGL_MESA_screen_surface extension so
-check the display to determine if it's supported by the underlying EGL
-implementation. If it doesn't then bail.
-
-Signed-off-by: Frank Binns <frank.binns@imgtec.com>
-
-Applied and fixed up in Yocto by...
-
-Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com>
-
-Upstream-Status: Pending
----
- src/egl/opengl/demo1.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
-index 3a3564c..06e2138 100644
---- a/src/egl/opengl/demo1.c
-+++ b/src/egl/opengl/demo1.c
-@@ -110,6 +110,12 @@ main(int argc, char *argv[])
- printf("EGL version = %d.%d\n", maj, min);
- printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
-
-+ if (!strstr(eglQueryString(d, EGL_EXTENSIONS),
-+ "EGL_MESA_screen_surface")) {
-+ printf("EGL_MESA_screen_surface is not supported\n");
-+ exit(1);
-+ }
-+
- eglGetConfigs(d, NULL, 0, &numConfigs);
- configs = malloc(sizeof(*configs) *numConfigs);
- eglGetConfigs(d, configs, numConfigs, &numConfigs);
---
-2.0.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
index 89d2fac4f..6b676cdd2 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
@@ -1,11 +1,13 @@
-From d930b2da57f7c9efb80c8cef8f8adad15bbbc0d3 Mon Sep 17 00:00:00 2001
+From c59e286fa4e818ca015dd40e4725636309970ea8 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 10 Jul 2014 14:30:52 +0200
-Subject: [PATCH 7/9] Install few more test programs
+Subject: [PATCH] Install few more test programs
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
src/egl/opengl/Makefile.am | 2 +-
src/egl/opengles1/Makefile.am | 10 ++++------
@@ -13,7 +15,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
-index 0c7228f..87b2f1a 100644
+index fe7faa9..3e48141 100644
--- a/src/egl/opengl/Makefile.am
+++ b/src/egl/opengl/Makefile.am
@@ -50,7 +50,7 @@ endif
@@ -22,42 +24,11 @@ index 0c7228f..87b2f1a 100644
if HAVE_EGL
-noinst_PROGRAMS = \
+bin_PROGRAMS = \
- demo1 \
- demo2 \
- demo3 \
-diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
-index 3455e75..516e516 100644
---- a/src/egl/opengles1/Makefile.am
-+++ b/src/egl/opengles1/Makefile.am
-@@ -36,11 +36,11 @@ AM_LDFLAGS = \
- $(EGL_LIBS) \
- -lm
-
--noinst_PROGRAMS =
-+bin_PROGRAMS =
-
- if HAVE_EGL
- if HAVE_GLESV1
--noinst_PROGRAMS += \
-+bin_PROGRAMS += \
- drawtex_screen \
- gears_screen \
- torus_screen \
-@@ -57,10 +57,8 @@ torus_screen_LDADD = ../eglut/libeglut_screen.la
- tri_screen_LDADD = ../eglut/libeglut_screen.la
-
- if HAVE_X11
--noinst_PROGRAMS += \
-- clear
--
--bin_PROGRAMS = \
-+bin_PROGRAMS += \
-+ clear \
- bindtex \
- drawtex_x11 \
- eglfbdev \
+ eglinfo \
+ peglgears \
+ $(EGL_DRM_DEMOS) \
diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
-index 7318a43..b545225 100644
+index b0f1212..5fd1cf8 100644
--- a/src/egl/openvg/Makefile.am
+++ b/src/egl/openvg/Makefile.am
@@ -49,7 +49,7 @@ endif
@@ -66,9 +37,9 @@ index 7318a43..b545225 100644
if HAVE_VG
-noinst_PROGRAMS = \
+bin_PROGRAMS = \
- lion_screen \
- sp_screen \
$(EGL_X11_DEMOS)
+ endif
+ endif
--
-2.0.0
+2.1.4
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
deleted file mode 100644
index 04e1b446f..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0010-sharedtex_mt-fix-rendering-thread-hang.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 525fa9ded72d22b53c5eb366f61e2ac1d407a2db Mon Sep 17 00:00:00 2001
-From: Awais Belal <awais_belal@mentor.com>
-Date: Thu, 8 Oct 2015 13:49:31 +0500
-Subject: [PATCH] sharedtex_mt: fix rendering thread hang
-
-XNextEvent is a blocking call which locks up the display mutex
-this causes the rendering threads to hang when they try call
-glXSwapBuffers() as that tries to take the same mutex in
-underlying calls through XCopyArea().
-So we only go to XNextEvent when it has at least one event
-and we wouldn't lock indefinitely.
-
-Signed-off-by: Awais Belal <awais_belal@mentor.com>
-Upstream-Status: Backport (2b304e765695d385fd3bf414e6e444020bedb0a8)
-
----
- src/xdemos/sharedtex_mt.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/xdemos/sharedtex_mt.c b/src/xdemos/sharedtex_mt.c
-index a90903a..1d503c4 100644
---- a/src/xdemos/sharedtex_mt.c
-+++ b/src/xdemos/sharedtex_mt.c
-@@ -420,9 +420,14 @@ Resize(struct window *h, unsigned int width, unsigned int height)
- static void
- EventLoop(void)
- {
-+ int i;
-+ XEvent event;
- while (1) {
-- int i;
-- XEvent event;
-+ /* Do we have an event? */
-+ if (XPending(gDpy) == 0) {
-+ usleep(10000);
-+ continue;
-+ }
- XNextEvent(gDpy, &event);
- for (i = 0; i < NumWindows; i++) {
- struct window *h = &Windows[i];
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch
new file mode 100644
index 000000000..c68764740
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch
@@ -0,0 +1,44 @@
+From 3aa84c47e88a4c38446ce1323abf6f2c77389104 Mon Sep 17 00:00:00 2001
+From: Prabhu <prabhu.sundararaj@freescale.com>
+Date: Mon, 16 Nov 2015 17:09:32 -0600
+Subject: [PATCH] mesa-demos: OpenVG demos with single frame need eglSwapBuffer
+
+sp and text demos rendering single frame. to display the
+single frame rendered needed a eglSwapBuffer to diplay to window.
+Hence added eglutPostRedisplay to display the frame
+
+Upstream-Status: Pending
+
+Signed-off-by: Prabhu <prabhu.sundararaj@freescale.com>
+---
+ src/egl/openvg/sp.c | 1 +
+ src/egl/openvg/text.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/egl/openvg/sp.c b/src/egl/openvg/sp.c
+index a20c0a3..468e91e 100644
+--- a/src/egl/openvg/sp.c
++++ b/src/egl/openvg/sp.c
+@@ -500,6 +500,7 @@ draw(void)
+ }
+
+ vgFlush();
++ eglutPostRedisplay();
+ }
+
+
+diff --git a/src/egl/openvg/text.c b/src/egl/openvg/text.c
+index f5c6de8..492581c 100644
+--- a/src/egl/openvg/text.c
++++ b/src/egl/openvg/text.c
+@@ -360,6 +360,7 @@ display(void)
+ {
+ vgClear(0, 0, width, height);
+ glyph_string_draw(10.0, 10.0);
++ eglutPostRedisplay();
+ }
+
+
+--
+2.5.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch
new file mode 100644
index 000000000..e7be4dfbe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch
@@ -0,0 +1,62 @@
+From 322af294390a7f4e1524c5a79312be6cbebce988 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_belal@mentor.com>
+Date: Wed, 11 Nov 2015 17:22:12 +0500
+Subject: [PATCH] only build GLX demos if needed
+
+There are platforms that default to EGL only configurations
+in which case the GLX applications are not required
+at all. Allow the user to control generation of these
+demos as needed through a configure switch.
+
+Signed-off-by: Awais Belal <awais_belal@mentor.com>
+Upstream-Status: Pending
+---
+ configure.ac | 9 +++++++++
+ src/Makefile.am | 6 +++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index f8ec7e3..1a4d96d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -132,6 +132,11 @@ if test "x$enable_glu" = xyes; then
+ DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
+ fi
+
++AC_ARG_ENABLE([glx-demos],
++ [AS_HELP_STRING([--enable-glx-demos],
++ [enable GLX demos @<:@default=auto@:>@])],
++ [glx_demos_enabled="$enableval"],
++ [glx_demos_enabled=yes])
+ AC_ARG_ENABLE([egl],
+ [AS_HELP_STRING([--enable-egl],
+ [enable EGL library @<:@default=auto@:>@])],
+@@ -325,6 +333,7 @@ AC_SUBST([WAYLAND_LIBS])
+
+ AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
++AM_CONDITIONAL(HAVE_GLX, test "x$glx_demos_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
+ AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8b89dee..a4d7e8f 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -44,8 +44,12 @@ SUBDIRS = \
+ slang \
+ tests \
+ tools \
+- wgl \
++ wgl
++
++if HAVE_GLX
++SUBDIRS += \
+ xdemos
++endif
+
+ if HAVE_GLEW
+ SUBDIRS += \
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
deleted file mode 100644
index 557b8c65d..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "Mesa demo applications"
-DESCRIPTION = "This package includes the demonstration application, such as glxgears. \
-These applications can be used for Mesa validation and benchmarking."
-HOMEPAGE = "http://mesa3d.org"
-BUGTRACKER = "https://bugs.freedesktop.org"
-SECTION = "x11"
-
-LICENSE = "MIT & PD"
-LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
- file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
-
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
- file://0001-mesa-demos-Add-missing-data-files.patch \
- file://0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch \
- file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
- file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
- file://0005-Fix-build-when-EGL_MESA_screen_surface-extension-isn.patch \
- file://0006-Query-display-for-EGL_MESA_screen_surface-extension-.patch \
- file://0007-Install-few-more-test-programs.patch \
- file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
- file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
- file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \
-"
-SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
-SRC_URI[sha256sum] = "e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
-
-inherit autotools pkgconfig distro_features_check
-# depends on virtual/egl, virtual/libgl ...
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew glu', '', d)}"
-
-# The Wayland code doesn't work with Wayland 1.0, so disable it for now
-#${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
-
-EXTRA_OECONF = "--with-system-data-files"
-
-PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm"
-PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
-PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype"
-PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl"
-PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1"
-PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
-PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,"
-PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
-PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libopenvg"
-PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
-PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
-PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
-PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
-
-do_install_append() {
- # it can be completely empty when all PACKAGECONFIG options are disabled
- rmdir --ignore-fail-on-non-empty ${D}${bindir}
-
- if [ -f ${D}${bindir}/clear ]; then
- mv ${D}${bindir}/clear ${D}${bindir}/clear.mesa-demos
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
new file mode 100644
index 000000000..fab0bdb2e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Mesa demo applications"
+DESCRIPTION = "This package includes the demonstration application, such as glxgears. \
+These applications can be used for Mesa validation and benchmarking."
+HOMEPAGE = "http://mesa3d.org"
+BUGTRACKER = "https://bugs.freedesktop.org"
+SECTION = "x11"
+
+LICENSE = "MIT & PD"
+LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
+ file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
+
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
+ file://0001-mesa-demos-Add-missing-data-files.patch \
+ file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
+ file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
+ file://0007-Install-few-more-test-programs.patch \
+ file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
+ file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
+ file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
+ file://0013-only-build-GLX-demos-if-needed.patch \
+ "
+SRC_URI[md5sum] = "628e75c23c17394f11a316c36f8e4164"
+SRC_URI[sha256sum] = "c173154bbd0d5fb53d732471984def42fb1b14ac85fcb834138fb9518b3e0bef"
+
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/egl, virtual/libgl ...
+REQUIRED_DISTRO_FEATURES = "opengl x11"
+
+PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
+ x11 glew glu glx"
+
+# The Wayland code doesn't work with Wayland 1.0, so disable it for now
+#${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
+
+EXTRA_OECONF = "--with-system-data-files"
+
+PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm"
+PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
+PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype"
+PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl"
+PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1"
+PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
+PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,"
+PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
+PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libopenvg"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
+PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
+PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
+PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos"
+
+do_install_append() {
+ # it can be completely empty when all PACKAGECONFIG options are disabled
+ rmdir --ignore-fail-on-non-empty ${D}${bindir}
+
+ if [ -f ${D}${bindir}/clear ]; then
+ mv ${D}${bindir}/clear ${D}${bindir}/clear.mesa-demos
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_11.1.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_11.1.1.bb
deleted file mode 100644
index fc2bca998..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_11.1.1.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require mesa_${PV}.bb
-
-SUMMARY += " (OpenGL only, no EGL/GLES)"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/mesa:"
-
-PROVIDES = "virtual/libgl virtual/mesa"
-
-S = "${WORKDIR}/mesa-${PV}"
-
-PACKAGECONFIG ??= "dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb
new file mode 100644
index 000000000..f06a3e9b5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb
@@ -0,0 +1,13 @@
+require mesa_${PV}.bb
+
+SUMMARY += " (OpenGL only, no EGL/GLES)"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/mesa:"
+
+PROVIDES = "virtual/libgl virtual/mesa"
+
+S = "${WORKDIR}/mesa-${PV}"
+
+PACKAGECONFIG ??= "dri ${MESA_CRYPTO} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
index 442479ae6..e4880ffed 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
@@ -10,7 +10,7 @@ HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://docs/license.html;md5=6a23445982a7a972ac198e93cc1cb3de"
+LIC_FILES_CHKSUM = "file://docs/license.html;md5=899fbe7e42d494c7c8c159c7001693d5"
PE = "2"
@@ -24,11 +24,13 @@ REQUIRED_DISTRO_FEATURES = "opengl"
EXTRA_OECONF = "--enable-shared-glapi"
-PACKAGECONFIG ??= "egl gles dri ${MESA_CRYPTO} \
+PACKAGECONFIG ??= "gbm egl gles dri ${MESA_CRYPTO} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\
"
+PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
+
X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes"
PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
@@ -37,7 +39,7 @@ PACKAGECONFIG[wayland] = ",,wayland-native wayland"
DRIDRIVERS = "swrast"
DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915"
-PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS} --enable-gbm, --disable-dri, dri2proto libdrm"
+PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, dri2proto libdrm"
PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, dri3proto presentproto libxshmfence"
PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
@@ -140,16 +142,17 @@ python mesa_populate_packages() {
d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
import re
- dri_drivers_root = os.path.join(d.getVar('libdir', True), "dri")
- dri_pkgs = os.listdir(d.getVar('PKGD', True) + dri_drivers_root)
- lib_name = d.expand("${MLPREFIX}mesa-megadriver")
- for p in dri_pkgs:
- m = re.match('^(.*)_dri\.so$', p)
- if m:
- pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
- d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
- d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name)
- d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
+ dri_drivers_root = oe.path.join(d.getVar('PKGD', True), d.getVar('libdir', True), "dri")
+ if os.path.isdir(dri_drivers_root):
+ dri_pkgs = os.listdir(dri_drivers_root)
+ lib_name = d.expand("${MLPREFIX}mesa-megadriver")
+ for p in dri_pkgs:
+ m = re.match('^(.*)_dri\.so$', p)
+ if m:
+ pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
+ d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
+ d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name)
+ d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
pipe_drivers_root = os.path.join(d.getVar('libdir', True), "gallium-pipe")
do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_11.1.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_11.1.1.bb
deleted file mode 100644
index 502afcfd8..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_11.1.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \
- file://replace_glibc_check_with_linux.patch \
-"
-
-SRC_URI[md5sum] = "1043dfb907beecb2a761272455960427"
-SRC_URI[sha256sum] = "64db074fc514136b5fb3890111f0d50604db52f0b1e94ba3fcb0fe8668a7fd20"
-
-#because we cannot rely on the fact that all apps will use pkgconfig,
-#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
-do_install_append() {
- if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
- sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_12.0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_12.0.1.bb
new file mode 100644
index 000000000..80189e3ff
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_12.0.1.bb
@@ -0,0 +1,18 @@
+require ${BPN}.inc
+
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \
+ file://replace_glibc_check_with_linux.patch \
+ file://clang-compile-PR89599.patch \
+ file://disable-asm-on-non-gcc.patch \
+"
+
+SRC_URI[md5sum] = "972fd5ad5a63aeabf173fb9adefc6522"
+SRC_URI[sha256sum] = "bab24fb79f78c876073527f515ed871fc9c81d816f66c8a0b051d8d653896389"
+
+#because we cannot rely on the fact that all apps will use pkgconfig,
+#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
+do_install_append() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
+ sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch b/import-layers/yocto-poky/meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch
deleted file mode 100644
index 3c8a83202..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mx/mx-1.0/fix-build-dir.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Fix build for S != B
-
-This patch is specific to version 1.4.x
-Upstream-Status: Submitted @ https://github.com/clutter-project/mx/issues/81
-Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
---
-Index: git/docs/reference/libmx-gtk/Makefile.am
-===================================================================
---- git.orig/docs/reference/libmx-gtk/Makefile.am 2013-05-08 15:07:02.027154788 +0100
-+++ git/docs/reference/libmx-gtk/Makefile.am 2013-05-08 15:14:33.684318650 +0100
-@@ -1,3 +1,6 @@
-+EXTRA_DIST=
-+CLEANFILES=
-+
- ## Process this file with automake to produce Makefile.in
-
- # We require automake 1.6 at least.
-@@ -77,7 +80,7 @@
- GTKDOC_LIBS=$(MX_LIBS) $(top_builddir)/mx-gtk/libmx-gtk-$(MX_API_VERSION).la
-
- # This includes the standard gtk-doc make rules, copied by gtkdocize.
--include $(top_srcdir)/gtk-doc.make
-+include $(top_builddir)/gtk-doc.make
-
- # Other files to distribute
- EXTRA_DIST += version.xml.in
-Index: git/docs/reference/libmx/Makefile.am
-===================================================================
---- git.orig/docs/reference/libmx/Makefile.am 2013-05-08 15:07:02.027154788 +0100
-+++ git/docs/reference/libmx/Makefile.am 2013-05-08 15:14:24.456378135 +0100
-@@ -1,3 +1,6 @@
-+EXTRA_DIST=
-+CLEANFILES=
-+
- ## Process this file with automake to produce Makefile.in
-
- # We require automake 1.6 at least.
-@@ -106,7 +109,7 @@
- GTKDOC_LIBS=$(MX_LIBS) $(top_builddir)/mx/libmx-$(MX_API_VERSION).la
-
- # This includes the standard gtk-doc make rules, copied by gtkdocize.
--include $(top_srcdir)/gtk-doc.make
-+include $(top_builddir)/gtk-doc.make
-
- # Other files to distribute
- EXTRA_DIST += version.xml.in
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mx/mx-1.0_1.4.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/mx/mx-1.0_1.4.7.bb
index 5545c1e81..58a6997ff 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mx/mx-1.0_1.4.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mx/mx-1.0_1.4.7.bb
@@ -8,7 +8,6 @@ PV = "1.4.7+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>^\d+(\.(?!99)\d+)+)"
SRC_URI = "git://github.com/clutter-project/mx.git;branch=mx-1.4 \
- file://fix-build-dir.patch \
file://fix-test-includes.patch \
"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mx/mx.inc b/import-layers/yocto-poky/meta/recipes-graphics/mx/mx.inc
index 4f1095793..d30483748 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mx/mx.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mx/mx.inc
@@ -1,16 +1,15 @@
SUMMARY = "Clutter based UI widget library"
LICENSE = "LGPLv2.1"
-inherit clutter autotools-brokensep distro_features_check gobject-introspection
+inherit clutter autotools distro_features_check gobject-introspection gtk-doc
# depends on clutter-1.0 which depends on cogl-1.0
REQUIRED_DISTRO_FEATURES = "opengl"
-DEPENDS = "clutter-1.0 dbus-glib gdk-pixbuf"
+DEPENDS = "intltool-native clutter-1.0 dbus-glib gdk-pixbuf"
SRC_URI = "http://source.clutter-project.org/sources/mx/${@get_verdir("${PV}")}/mx-${PV}.tar.xz"
-EXTRA_OECONF = "--disable-gtk-doc \
- --disable-gtk-widgets \
+EXTRA_OECONF = "--disable-gtk-widgets \
--with-dbus \
--with-winsys=none \
--without-clutter-imcontext \
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
index 5734b2785..87c700e02 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
@@ -3,7 +3,6 @@
#
SUMMARY = "Clutter package groups"
-LICENSE = "MIT"
PR = "r6"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
deleted file mode 100644
index a657a1a4e..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "DirectFB without X11"
-LICENSE = "MIT"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-inherit packagegroup
-
-TOUCH = ' ${@bb.utils.contains("MACHINE_FEATURES", "touchscreen", "tslib tslib-calibrate tslib-tests", "",d)}'
-
-RDEPENDS_${PN} = " \
- directfb \
- directfb-examples \
- pango \
- fontconfig \
- ${TOUCH} \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
index 17301a052..7ea72d55a 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-base.bb
@@ -1,6 +1,5 @@
SUMMARY = "Basic X11 session"
DESCRIPTION = "Packages required to set up a basic working X11 session"
-LICENSE = "MIT"
PR = "r1"
inherit packagegroup distro_features_check
@@ -11,7 +10,6 @@ RDEPENDS_${PN} = "\
packagegroup-core-x11-xserver \
packagegroup-core-x11-utils \
dbus \
- pointercal \
matchbox-terminal \
matchbox-wm \
mini-x-session \
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
index c53f1b758..6b5002856 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
@@ -3,7 +3,6 @@
#
SUMMARY = "X11 display server"
-LICENSE = "MIT"
PR = "r40"
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
index 3537d8cbb..42914246d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
@@ -2,7 +2,6 @@
# Copyright (C) 2011 Intel Corporation
#
-LICENSE = "MIT"
PR = "r40"
inherit packagegroup distro_features_check
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch
new file mode 100644
index 000000000..6784a105a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango/0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch
@@ -0,0 +1,147 @@
+From 526a6a9fc9a1cfe75c521c8bb39b61754fe42fe8 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 2 Sep 2016 14:00:24 +0300
+Subject: [PATCH] Enforce recreation of docs/pango.types; it is build
+ configuration-specific.
+
+In particular, it needs to exclude references to PangoXft if Xft is not available.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ docs/Makefile.am | 17 ++++--------
+ docs/pango.types | 80 --------------------------------------------------------
+ 2 files changed, 5 insertions(+), 92 deletions(-)
+ delete mode 100644 docs/pango.types
+
+diff --git a/docs/Makefile.am b/docs/Makefile.am
+index f5f1317..8947a99 100644
+--- a/docs/Makefile.am
++++ b/docs/Makefile.am
+@@ -49,6 +49,10 @@ IGNORE_HFILES= \
+ pangocoretext-private.h \
+ pangoatsui-private.h
+
++if !HAVE_XFT
++IGNORE_HFILES += pangoxft pangoxft-render.h
++endif
++
+ # CFLAGS and LDFLAGS for compiling scan program. Only needed
+ # if $(DOC_MODULE).types is non-empty.
+ INCLUDES = \
+@@ -103,16 +107,6 @@ include $(top_srcdir)/gtk-doc.make
+ # This line really belongs in gtk-doc.mk
+ $(REPORT_FILES): sgml-build.stamp
+
+-pango.types:
+- @echo "Rebuilding $@"
+- @LANG=C; LIST=$$(grep 'pango_[_a-zA-Z0-9]*_get_type' $(HFILE_GLOB) | grep -v '\(private\|atsui\|core_text\|win32\)' | sed 's/\([^:]*:\).*\(pango[_a-zA-Z0-9]*_get_type\).*/\1\2/') && \
+- echo "$$LIST" | sed 's/.*\/\(pango\/.*\):.*/#include <\1>/' | sort -u > $@.tmp && \
+- echo >> $@.tmp && \
+- echo "$$LIST" | cut -d : -f 2 | sort -u >> $@.tmp && \
+- mv $@.tmp $@
+-
+-BUILT_SOURCES = pango.types
+-
+ ########################################################################
+
+ MAINTAINERCLEANFILES = $(BUILT_SOURCES)
+@@ -120,8 +114,7 @@ EXTRA_DIST += \
+ layout.fig \
+ layout.eps \
+ version.xml.in \
+- check.docs \
+- pango.types
++ check.docs
+
+ # force doc rebulid after configure
+ dist-hook-local: dist-local-check-no-cross-references all-local
+diff --git a/docs/pango.types b/docs/pango.types
+deleted file mode 100644
+index 7d93cda..0000000
+--- a/docs/pango.types
++++ /dev/null
+@@ -1,80 +0,0 @@
+-#include <pango/pango-attributes.h>
+-#include <pango/pango-context.h>
+-#include <pango/pango-engine.h>
+-#include <pango/pango-enum-types.h>
+-#include <pango/pango-font.h>
+-#include <pango/pango-fontmap.h>
+-#include <pango/pango-fontset.h>
+-#include <pango/pango-glyph-item.h>
+-#include <pango/pango-glyph.h>
+-#include <pango/pango-item.h>
+-#include <pango/pango-language.h>
+-#include <pango/pango-layout.h>
+-#include <pango/pango-matrix.h>
+-#include <pango/pango-ot.h>
+-#include <pango/pango-renderer.h>
+-#include <pango/pango-tabs.h>
+-#include <pango/pangocairo-fc.h>
+-#include <pango/pangocairo.h>
+-#include <pango/pangofc-decoder.h>
+-#include <pango/pangofc-font.h>
+-#include <pango/pangofc-fontmap.h>
+-#include <pango/pangoft2.h>
+-#include <pango/pangoxft-render.h>
+-#include <pango/pangoxft.h>
+-
+-pango_alignment_get_type
+-pango_attr_list_get_type
+-pango_attr_type_get_type
+-pango_bidi_type_get_type
+-pango_cairo_fc_font_map_get_type
+-pango_cairo_font_get_type
+-pango_cairo_font_map_get_type
+-pango_color_get_type
+-pango_context_get_type
+-pango_coverage_level_get_type
+-pango_direction_get_type
+-pango_ellipsize_mode_get_type
+-pango_engine_get_type
+-pango_engine_lang_get_type
+-pango_engine_shape_get_type
+-pango_fc_decoder_get_type
+-pango_fc_font_get_type
+-pango_fc_font_map_get_type
+-pango_font_description_get_type
+-pango_font_face_get_type
+-pango_font_family_get_type
+-pango_font_get_type
+-pango_font_map_get_type
+-pango_font_mask_get_type
+-pango_font_metrics_get_type
+-pango_fontset_get_type
+-pango_fontset_simple_get_type
+-pango_ft2_font_map_get_type
+-pango_glyph_item_get_type
+-pango_glyph_item_iter_get_type
+-pango_glyph_string_get_type
+-pango_gravity_get_type
+-pango_gravity_hint_get_type
+-pango_item_get_type
+-pango_language_get_type
+-pango_layout_get_type
+-pango_layout_iter_get_type
+-pango_layout_line_get_type
+-pango_matrix_get_type
+-pango_ot_info_get_type
+-pango_ot_ruleset_get_type
+-pango_render_part_get_type
+-pango_renderer_get_type
+-pango_script_get_type
+-pango_stretch_get_type
+-pango_style_get_type
+-pango_tab_align_get_type
+-pango_tab_array_get_type
+-pango_underline_get_type
+-pango_variant_get_type
+-pango_weight_get_type
+-pango_wrap_mode_get_type
+-pango_xft_font_get_type
+-pango_xft_font_map_get_type
+-pango_xft_renderer_get_type
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.38.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.38.1.bb
deleted file mode 100644
index 7fc65fd43..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.38.1.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Framework for layout and rendering of internationalized text"
-DESCRIPTION = "Pango is a library for laying out and rendering of text, \
-with an emphasis on internationalization. Pango can be used anywhere \
-that text layout is needed, though most of the work on Pango so far has \
-been done in the context of the GTK+ widget toolkit. Pango forms the \
-core of text and font handling for GTK+-2.x."
-HOMEPAGE = "http://www.pango.org/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-SECTION = "libs"
-LICENSE = "LGPLv2.0+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-
-inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection
-
-SRC_URI += "file://run-ptest \
- file://0001-Drop-introspection-macros-from-acinclude.m4.patch \
-"
-
-SRC_URI[archive.md5sum] = "7fde35d4a127b55ce8bbcefe109bc80d"
-SRC_URI[archive.sha256sum] = "1320569f6c6d75d6b66172b2d28e59c56ee864ee9df202b76799c4506a214eb7"
-
-DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[x11] = "--with-xft,--without-xft,virtual/libx11 libxft"
-
-EXTRA_AUTORECONF = ""
-
-EXTRA_OECONF = " \
- --disable-debug \
- "
-
-LEAD_SONAME = "libpango-1.0*"
-LIBV = "1.8.0"
-
-# This binary needs to be compiled for the host architecture. This isn't pretty!
-do_compile_prepend_class-target () {
- if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
- make CC="${BUILD_CC}" CFLAGS="" LDFLAGS="" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
- fi
-}
-
-FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
-FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
-
-RDEPENDS_${PN}-ptest += "liberation-fonts cantarell-fonts"
-
-RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
- pango-module-basic-fc pango-module-arabic-lang"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.1.bb
new file mode 100644
index 000000000..f9f344a86
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.1.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Framework for layout and rendering of internationalized text"
+DESCRIPTION = "Pango is a library for laying out and rendering of text, \
+with an emphasis on internationalization. Pango can be used anywhere \
+that text layout is needed, though most of the work on Pango so far has \
+been done in the context of the GTK+ widget toolkit. Pango forms the \
+core of text and font handling for GTK+-2.x."
+HOMEPAGE = "http://www.pango.org/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+SECTION = "libs"
+LICENSE = "LGPLv2.0+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
+
+inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://run-ptest \
+ file://0001-Drop-introspection-macros-from-acinclude.m4.patch \
+ file://0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch \
+"
+SRC_URI[archive.md5sum] = "6fc88c6529890d6c8e03074d57a3eceb"
+SRC_URI[archive.sha256sum] = "e27af54172c72b3ac6be53c9a4c67053e16c905e02addcf3a603ceb2005c1a40"
+
+DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG[x11] = "--with-xft,--without-xft,virtual/libx11 libxft"
+
+EXTRA_AUTORECONF = ""
+
+EXTRA_OECONF = " \
+ --disable-debug \
+ "
+
+LEAD_SONAME = "libpango-1.0*"
+LIBV = "1.8.0"
+
+# This binary needs to be compiled for the host architecture. This isn't pretty!
+do_compile_prepend_class-target () {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
+ make CC="${BUILD_CC}" CFLAGS="" LDFLAGS="${BUILD_LDFLAGS}" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
+ fi
+}
+
+FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
+FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
+
+RDEPENDS_${PN}-ptest += "liberation-fonts cantarell-fonts"
+
+RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
+ pango-module-basic-fc pango-module-arabic-lang"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
new file mode 100644
index 000000000..2e1c9476f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
@@ -0,0 +1,41 @@
+Backport patch to fix build with gold linker.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Backport
+
+
+
+From 93a7113485cf1c55fd7076116faf5b3a690706b2 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 30 Aug 2016 17:17:28 +0300
+Subject: [PATCH] cmake: Link test utils with "-ldl"
+
+Without this linking CXX executables (e.g. fbo-blit-stretch) fails
+with gold linker:
+
+| libpiglitutil_gl.so.0: error: undefined reference to 'dlsym'
+| libpiglitutil_gl.so.0: error: undefined reference to 'dlerror'
+| libpiglitutil_gl.so.0: error: undefined reference to 'dlopen'
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+---
+ tests/util/CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
+index e1f8073..3d5bef5 100644
+--- a/tests/util/CMakeLists.txt
++++ b/tests/util/CMakeLists.txt
+@@ -11,6 +11,8 @@ set_source_files_properties(
+ PROPERTIES GENERATED 1
+ )
+
++link_libraries(${CMAKE_DL_LIBS})
++
+ if(HAVE_LIBCACA)
+ link_libraries(caca)
+ endif()
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
new file mode 100644
index 000000000..845804dd6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
@@ -0,0 +1,54 @@
+From 73e4fbc5777eddd89bb0fb16e90343551fe3e0ef Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 5 Jul 2016 10:56:23 +0300
+Subject: [PATCH] cmake: Link utils with xcb explicitly
+
+Linking with g++ can reportedly lead to:
+
+libpiglitutil_gl.so.0: error: undefined reference to 'xcb_connect'
+libpiglitutil_gl.so.0: error: undefined reference to 'xcb_get_setup'
+libpiglitutil_gl.so.0: error: undefined reference to 'xcb_setup_roots_iterator'
+
+This may have appeared now because xcb-dri2 used to overlink publicly
+but now does not.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Accepted
+---
+ CMakeLists.txt | 1 +
+ tests/util/CMakeLists.txt | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8e2abba..2e1a473 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -151,6 +151,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+
+ pkg_check_modules(LIBDRM QUIET libdrm)
+ pkg_check_modules(LIBDRM_INTEL QUIET libdrm_intel)
++ pkg_check_modules(XCB QUIET xcb)
+ pkg_check_modules(XCB_DRI2 QUIET xcb-dri2)
+ pkg_check_modules(GLPROTO QUIET glproto)
+ ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
+index fb22ffa..e1f8073 100644
+--- a/tests/util/CMakeLists.txt
++++ b/tests/util/CMakeLists.txt
+@@ -121,11 +121,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+
+ list(APPEND UTIL_GL_LIBS
+ ${LIBDRM_LDFLAGS}
++ ${XCB_LDFLAGS}
+ ${XCB_DRI2_LDFLAGS}
+ )
+
+ list(APPEND UTIL_GL_INCLUDES
+ ${LIBDRM_INCLUDE_DIRS}
++ ${XCB_INCLUDE_DIRS}
+ ${XCB_DRI2_INCLUDE_DIRS}
+ )
+
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch
new file mode 100644
index 000000000..e07e810a7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-install-bash-completions-in-the-right-place.patch
@@ -0,0 +1,35 @@
+From 26faa2c157a27a18a9f767976730fe0c115e3af4 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 13 Jul 2016 19:19:02 +0300
+Subject: [PATCH] cmake: install bash-completions in the right place
+
+The completionsdir variable is a full path and should not be
+prefixed.
+
+This does mean the files may be installed outside of
+CMAKE_INSTALL_PREFIX -- the alternative is more difficult and
+means that bash completion files may be installed where
+bash-completion can't find them.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Submitted [mailing list]
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8e2abba..784a8f9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -532,7 +532,7 @@ install (
+ if (BASH_COMPLETION_FOUND)
+ install(
+ FILES completions/bash/piglit
+- DESTINATION ${CMAKE_INSTALL_PREFIX}/${BASH_COMPLETION_COMPLETIONSDIR}/
++ DESTINATION ${BASH_COMPLETION_COMPLETIONSDIR}/
+ )
+ endif (BASH_COMPLETION_FOUND)
+
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-tests-Fix-missing-include-of-Xutil.h.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-tests-Fix-missing-include-of-Xutil.h.patch
deleted file mode 100644
index c27cc04f0..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-tests-Fix-missing-include-of-Xutil.h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-
-From e40e0a25f996d2e205c4bdec2c8a5cc7f74e5065 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Mon, 15 Jun 2015 16:25:30 -0300
-Subject: tests: Fix missing include of Xutil.h
-
-The EGL tests rely on Xutil.h being included. Some EGL implementation
-does not explitly include it by default and then the build fails.
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Reviewed-by: Neil Roberts <neil@linux.intel.com>
-
-diff --git a/tests/egl/egl-configless-context.c b/tests/egl/egl-configless-context.c
-index 0504a26..154b55c 100644
---- a/tests/egl/egl-configless-context.c
-+++ b/tests/egl/egl-configless-context.c
-@@ -32,6 +32,7 @@
- /* Chunks of code in this file are taken from egl-util.c */
-
- #include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-
- #include "piglit-util-gl.h"
- #include "piglit-util-egl.h"
---
-cgit v0.10.2
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
new file mode 100644
index 000000000..f851a92ce
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch
@@ -0,0 +1,54 @@
+From 0fc2c2932699cfd68be96c820fddfdd79b48b788 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Jul 2016 07:52:19 +0000
+Subject: [PATCH] tests: Use FE_UPWARD only if its defined in fenv.h
+
+On ARM, musl does not define FE_* when arch does not have
+VFP, (which is right interpretation), therefore check if
+its defined before using it
+
+Fixes errors like
+
+tests/general/roundmode-pixelstore.c:82:19: error: 'FE_UPWARD' undeclared (first use in this function)
+ ret = fesetround(FE_UPWARD);
+ ^~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ tests/general/roundmode-getintegerv.c | 2 ++
+ tests/general/roundmode-pixelstore.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/tests/general/roundmode-getintegerv.c b/tests/general/roundmode-getintegerv.c
+index 28ecfaf..5c27579 100644
+--- a/tests/general/roundmode-getintegerv.c
++++ b/tests/general/roundmode-getintegerv.c
+@@ -81,7 +81,9 @@ piglit_init(int argc, char **argv)
+ {
+ int ret;
+ bool pass = true;
++#ifdef FE_UPWARD
+ ret = fesetround(FE_UPWARD);
++#endif
+ if (ret != 0) {
+ printf("Couldn't set rounding mode\n");
+ piglit_report_result(PIGLIT_SKIP);
+diff --git a/tests/general/roundmode-pixelstore.c b/tests/general/roundmode-pixelstore.c
+index 9284f43..3fcb396 100644
+--- a/tests/general/roundmode-pixelstore.c
++++ b/tests/general/roundmode-pixelstore.c
+@@ -79,7 +79,9 @@ piglit_init(int argc, char **argv)
+ {
+ int ret;
+ bool pass = true;
++#ifdef FE_UPWARD
+ ret = fesetround(FE_UPWARD);
++#endif
+ if (ret != 0) {
+ printf("Couldn't set rounding mode\n");
+ piglit_report_result(PIGLIT_SKIP);
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
index 607f236c2..82adcdeca 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
@@ -3,18 +3,22 @@ LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
SRC_URI = "git://anongit.freedesktop.org/piglit \
- file://0001-tests-Fix-missing-include-of-Xutil.h.patch"
-
-# From 2015-02-19
-SRCREV = "c4585427913e4cb28994b4bfb11d49778273aa2c"
+ file://0001-cmake-install-bash-completions-in-the-right-place.patch \
+ file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
+ file://0001-cmake-Link-utils-with-xcb-explicitly.patch \
+ file://0001-cmake-Link-test-utils-with-ldl.patch \
+ "
+
+# From 2016-07-07
+SRCREV = "c39e41a86551eb390b8da23232dc8577639403d0"
# (when PV goes above 1.0 remove the trailing r)
PV = "1.0+gitr${SRCPV}"
S = "${WORKDIR}/git"
-DEPENDS = "virtual/libx11 libxrender waffle virtual/libgl libglu python-mako-native python-numpy-native"
+DEPENDS = "libpng virtual/libx11 libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native"
-inherit cmake pythonnative distro_features_check
+inherit cmake python3native distro_features_check bash-completion
# depends on virtual/libx11
REQUIRED_DISTRO_FEATURES = "x11"
@@ -34,10 +38,15 @@ do_configure_prepend() {
fi
}
-RDEPENDS_${PN} = "waffle python python-mako python-json python-subprocess \
- python-argparse python-importlib python-unixadmin python-xml \
- python-multiprocessing python-textutils python-netserver python-shell \
+do_install() {
+ oe_runmake -C ${B} 'DESTDIR=${D}' install/strip
+}
+
+RDEPENDS_${PN} = "waffle python3 python3-mako python3-json \
+ python3-subprocess python3-misc python3-importlib \
+ python3-unixadmin python3-xml python3-multiprocessing \
+ python3-six python3-shell python3-io python3-argparse \
mesa-demos bash \
"
-INSANE_SKIP_${PN} += "dev-so"
+INSANE_SKIP_${PN} += "dev-so already-stripped"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
index 0e1a7928f..6c3bcd831 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://pong-clock-no-flicker.c;beginline=1;endline=23;md5=dd
S = "${WORKDIR}"
do_compile () {
- ${CC} -o pong-clock pong-clock-no-flicker.c `pkg-config --cflags --libs x11 xau xdmcp`
+ ${CC} ${CFLAGS} ${LDFLAGS} -o pong-clock pong-clock-no-flicker.c `pkg-config --cflags --libs x11 xau xdmcp`
}
do_install () {
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib/ts.conf b/import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib/ts.conf
deleted file mode 100644
index 1b0da937e..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib/ts.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-# Uncomment if you wish to use the linux input layer event interface
-module_raw input
-
-# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
-# module_raw collie
-
-# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
-# module_raw corgi
-
-# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
-# module_raw ucb1x00
-
-# Uncomment if you're using an HP iPaq h3600 or similar
-# module_raw h3600
-
-# Uncomment if you're using a Hitachi Webpad
-# module_raw mk712
-
-# Uncomment if you're using an IBM Arctic II
-# module_raw arctic2
-
-module pthres pmin=1
-module variance delta=30
-module dejitter delta=100
-module linear
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib/tslib.sh b/import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib/tslib.sh
deleted file mode 100644
index 7068e8d92..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib/tslib.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ -e /dev/input/touchscreen0 ]; then
- TSLIB_TSDEVICE=/dev/input/touchscreen0
-
- export TSLIB_TSDEVICE
-fi
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib_1.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib_1.1.bb
deleted file mode 100644
index b0264c3b3..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/tslib/tslib_1.1.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "An abstraction layer for touchscreen panel events"
-DESCRIPTION = "Tslib is an abstraction layer for touchscreen panel \
-events, as well as a filter stack for the manipulation of those events. \
-Tslib is generally used on embedded devices to provide a common user \
-space interface to touchscreen functionality."
-HOMEPAGE = "http://tslib.berlios.de/"
-
-AUTHOR = "Russell King w/ plugins by Chris Larson et. al."
-SECTION = "base"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f30a9716ef3762e3467a2f62bf790f0a"
-
-SRC_URI = "https://github.com/kergoth/tslib/releases/download/${PV}/tslib-${PV}.tar.xz;downloadfilename=tslib-${PV}.tar.xz \
- file://ts.conf \
- file://tslib.sh \
-"
-
-SRC_URI[md5sum] = "14771f8607b341bb4b297819d37e837d"
-SRC_URI[sha256sum] = "fe35e5f710ea933b118f710e2ce4403ac076fe69926b570333867d4de082a51c"
-
-UPSTREAM_CHECK_URI = "https://github.com/kergoth/tslib/releases"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--enable-shared --disable-h3600 --enable-input --disable-corgi --disable-collie --disable-mk712 --disable-arctic2 --disable-ucb1x00"
-
-do_install_prepend() {
- install -m 0644 ${WORKDIR}/ts.conf ${S}/etc/ts.conf
-}
-
-do_install_append() {
- install -d ${D}${sysconfdir}/profile.d/
- install -m 0755 ${WORKDIR}/tslib.sh ${D}${sysconfdir}/profile.d/
-}
-
-# People should consider using udev's /dev/input/touchscreen0 symlink
-# instead of detect-stylus
-#RDEPENDS_tslib-conf_weird-machine = "detect-stylus"
-RPROVIDES_tslib-conf = "libts-0.0-conf"
-
-PACKAGES =+ "tslib-conf tslib-tests tslib-calibrate"
-DEBIAN_NOAUTONAME_tslib-conf = "1"
-DEBIAN_NOAUTONAME_tslib-tests = "1"
-DEBIAN_NOAUTONAME_tslib-calibrate = "1"
-
-RDEPENDS_${PN} = "tslib-conf"
-RRECOMMENDS_${PN} = "pointercal"
-
-FILES_${PN}-dev += "${libdir}/ts/*.la"
-FILES_tslib-conf = "${sysconfdir}/ts.conf ${sysconfdir}/profile.d/tslib.sh ${datadir}/tslib"
-FILES_${PN} = "${libdir}/*.so.* ${libdir}/ts/*.so*"
-FILES_tslib-calibrate += "${bindir}/ts_calibrate"
-FILES_tslib-tests = "${bindir}/ts_harvest ${bindir}/ts_print ${bindir}/ts_print_raw ${bindir}/ts_test"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch
index 97c63bd37..b52b4962b 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput/touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch
@@ -1,7 +1,7 @@
This is a workaround upstream suggests for use with kernel 4.1.
Upstream-Status: Inappropriate [temporary work-around]
-Signed-Off-By: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.1.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.1.4.bb
deleted file mode 100644
index 4167679c2..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.1.4.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Library to handle input devices in Wayland compositors"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
-
-DEPENDS = "libevdev udev mtdev"
-
-SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
- file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \
-"
-SRC_URI[md5sum] = "0945318141c1a9f52857bbf65d175f32"
-SRC_URI[sha256sum] = "302cb76209b9c57a5a318e178f9bc446eede8ea79386103b5291cbfaa5fab5b6"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
-
-FILES_${PN} += "${libdir}/udev/"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.4.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.4.1.bb
new file mode 100644
index 000000000..358039226
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.4.1.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Library to handle input devices in Wayland compositors"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
+
+DEPENDS = "libevdev udev mtdev"
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
+ file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \
+"
+SRC_URI[md5sum] = "2e7ba577ed74d8d1baeb07dbd4fb912a"
+SRC_URI[sha256sum] = "26e7b3ab499358caba499705680ea7e5851af2bd37dc32f2be64181610d6392a"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+PACKAGECONFIG[libwacom] = "--enable-libwacom,--disable-libwacom,libwacom"
+PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
+
+UDEVDIR = "`pkg-config --variable=udevdir udev`"
+
+EXTRA_OECONF += "--with-udev-dir=${UDEVDIR}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.7.bb
new file mode 100644
index 000000000..1d2f0db8f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland-protocols_1.7.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Collection of additional Wayland protocols"
+DESCRIPTION = "Wayland protocols that add functionality not \
+available in the Wayland core protocol. Such protocols either add \
+completely new functionality, or extend the functionality of some other \
+protocol either in Wayland core, or some other protocol in \
+wayland-protocols."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
+ file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ "
+SRC_URI[md5sum] = "9acfc9556f7cfedc44d97af60da66a5f"
+SRC_URI[sha256sum] = "635f2a937d318f1fecb97b54074ca211486e38af943868dd0fa82ea38d091c1f"
+
+inherit allarch autotools pkgconfig
+
+PACKAGES = "${PN}"
+FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch
new file mode 100644
index 000000000..dece95c76
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch
@@ -0,0 +1,30 @@
+From 5516d32e694badca35b6c71b02a3f08f650308bf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Jul 2016 16:23:48 -0700
+Subject: [PATCH] scanner: Use unit32_t instead of uint
+
+uint32_t is C99 defined stdint type
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Submitted
+---
+ src/scanner.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/scanner.c b/src/scanner.c
+index 5f06e8e..10a4023 100644
+--- a/src/scanner.c
++++ b/src/scanner.c
+@@ -808,7 +808,7 @@ find_enumeration(struct protocol *protocol,
+ struct interface *i;
+ struct enumeration *e;
+ char *enum_name;
+- uint idx = 0, j;
++ uint32_t idx = 0, j;
+
+ for (j = 0; j + 1 < strlen(enum_attribute); j++) {
+ if (enum_attribute[j] == '.') {
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.11.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.11.0.bb
new file mode 100644
index 000000000..3413406d0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.11.0.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Wayland, a protocol between a compositor and clients"
+DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
+as well as a C library implementation of that protocol. The compositor can be \
+a standalone display server running on Linux kernel modesetting and evdev \
+input devices, an X application, or a wayland client itself. The clients can \
+be traditional applications, X servers (rootless or fullscreen) or other \
+display servers."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
+ file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ file://0001-scanner-Use-unit32_t-instead-of-uint.patch \
+ "
+SRC_URI[md5sum] = "fccf680be066e234729d5b69e0bd0fa9"
+SRC_URI[sha256sum] = "9540925f7928becfdf5e3b84c70757f6589bf1ceef09bea78784d8e4772c0db0"
+
+EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
+
+DEPENDS = "expat libxml2 libffi wayland-native"
+
+EXTRA_OECONF = "--disable-documentation --with-host-scanner"
+
+# Wayland installs a M4 macro for other projects to use, which uses the target
+# pkg-config to find files. Replace pkg-config with pkg-config-native.
+do_install_append_class-native() {
+ sed -e 's,PKG_CHECK_MODULES(.*),,g' \
+ -e 's,$PKG_CONFIG,pkg-config-native,g' \
+ -i ${D}/${datadir}/aclocal/wayland-scanner.m4
+}
+
+sysroot_stage_all_append_class-target () {
+ rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
+ cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
+}
+
+FILES_${PN} = "${libdir}/*${SOLIBS}"
+FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.9.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.9.0.bb
deleted file mode 100644
index d12ac186c..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.9.0.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "Wayland, a protocol between a compositor and clients"
-DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
-as well as a C library implementation of that protocol. The compositor can be \
-a standalone display server running on Linux kernel modesetting and evdev \
-input devices, an X application, or a wayland client itself. The clients can \
-be traditional applications, X servers (rootless or fullscreen) or other \
-display servers."
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
- file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
-
-SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "5e141b3f2a7005d6c89d6f233c87c317"
-SRC_URI[sha256sum] = "9c8770720aa0034479735f58a4dc4ca9b172ecfede28f5134312e135b7301efa"
-
-EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
-
-DEPENDS = "expat libffi wayland-native"
-
-EXTRA_OECONF = "--disable-documentation --with-host-scanner"
-
-# Wayland installs a M4 macro for other projects to use, which uses the target
-# pkg-config to find files. Replace pkg-config with pkg-config-native.
-do_install_append_class-native() {
- sed -e 's,PKG_CHECK_MODULES(.*),,g' \
- -e 's,$PKG_CONFIG,pkg-config-native,g' \
- -i ${D}/${datadir}/aclocal/wayland-scanner.m4
-}
-
-sysroot_stage_all_append_class-target () {
- rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
- cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
-}
-
-FILES_${PN} = "${libdir}/*${SOLIBS}"
-FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb
index 653541e3c..291cd16b2 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb
@@ -3,16 +3,19 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
SRC_URI = "file://init \
- file://weston.service"
+ file://weston.service \
+ file://weston-start"
S = "${WORKDIR}"
do_install() {
- install -d ${D}/${sysconfdir}/init.d
- install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+ install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+ install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service
- install -d ${D}${systemd_system_unitdir}
- install -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}
+ # Install weston-start script
+ install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
+ sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
+ sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
}
inherit allarch update-rc.d distro_features_check systemd
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/init b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/init
index 2e938f430..d3e87c6ce 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/init
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/init
@@ -31,14 +31,7 @@ case "$1" in
start)
. /etc/profile
- # This is all a nasty hack
- if test -z "$XDG_RUNTIME_DIR"; then
- export XDG_RUNTIME_DIR=/run/user/root
- mkdir --parents $XDG_RUNTIME_DIR
- chmod 0700 $XDG_RUNTIME_DIR
- fi
-
- openvt -s weston -- $OPTARGS
+ weston-start -- $OPTARGS
;;
stop)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston-start b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston-start
new file mode 100755
index 000000000..e72fbaaac
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -0,0 +1,69 @@
+#!/bin/sh
+# Copyright (C) 2016 O.S. Systems Software LTDA.
+# Copyright (C) 2016 Freescale Semiconductor
+
+export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
+
+usage() {
+ cat <<EOF
+ $0 [<openvt arguments>] [-- <weston options>]
+EOF
+}
+
+## Module support
+modules_dir=@DATADIR@/weston-start
+
+# Add weston extra argument
+add_weston_argument() {
+ weston_args="$weston_args $1"
+}
+
+# Add openvt extra argument
+add_openvt_argument() {
+ openvt_args="$openvt_args $1"
+}
+
+if [ -n "$WAYLAND_DISPLAY" ]; then
+ echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
+ exit 1
+fi
+if [ -n "$DISPLAY" ]; then
+ launcher="weston"
+else
+ launcher="weston-launch --"
+fi
+
+openvt_args="-s"
+while [ -n "$1" ]; do
+ if [ "$1" = "--" ]; then
+ shift
+ break
+ fi
+ openvt_args="$openvt_args $1"
+ shift
+done
+
+weston_args=$*
+
+# Load and run modules
+if [ -d "$modules_dir" ]; then
+ for m in "$modules_dir"/*; do
+ # Skip backup files
+ if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
+ continue
+ fi
+
+ # process module
+ . $m
+ done
+fi
+
+if test -z "$XDG_RUNTIME_DIR"; then
+ export XDG_RUNTIME_DIR=/run/user/`id -u`
+ if ! test -d "$XDG_RUNTIME_DIR"; then
+ mkdir --parents $XDG_RUNTIME_DIR
+ chmod 0700 $XDG_RUNTIME_DIR
+ fi
+fi
+
+exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston.service b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston.service
index 4f1f7ff10..689ce4106 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston.service
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -1,14 +1,11 @@
[Unit]
-Description=Weston Wayland compositor startup
+Description=Weston Wayland Compositor
RequiresMountsFor=/run
[Service]
User=root
EnvironmentFile=-/etc/default/weston
-Environment="XDG_RUNTIME_DIR=/run/user/root"
-ExecStartPre=/bin/mkdir -p /run/user/root
-ExecStartPre=/bin/chmod 0700 /run/user/root
-ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
+ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS
[Install]
WantedBy=multi-user.target
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
new file mode 100644
index 000000000..00118d78b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
@@ -0,0 +1,34 @@
+From 1cfc1434a5d385a74de593ec7601674dba39e2fe Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 11 May 2016 16:16:30 +0300
+Subject: [PATCH] configure.ac: Fix wayland-protocols path
+
+The wayland-protocols directory is used during build: Fix the path
+to point to sysroot specified in recipe.
+
+Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that
+breaks multilib weston as it would point to multilib sysroot when the
+(allarch) wayland-protocols is actually in the machine sysroot.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Inappropriate [embedded specific]
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index bc7c329..15a05d3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
+ PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
+
+ PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2],
+- [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
++ [ac_wayland_protocols_pkgdatadir=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
+ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
+
+ AC_ARG_ENABLE(wayland-compositor, [ --enable-wayland-compositor],,
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
new file mode 100644
index 000000000..91ef727d3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
@@ -0,0 +1,28 @@
+From ba02b8abe4e2afac2bfbf2559972d5059d75a041 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 16 Jul 2016 22:50:19 +0300
+Subject: [PATCH weston] shared: include stdint.h for int32_t
+
+This fixes build on musl.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Submitted
+---
+ shared/xalloc.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/shared/xalloc.h b/shared/xalloc.h
+index 85fccb4..484de2d 100644
+--- a/shared/xalloc.h
++++ b/shared/xalloc.h
+@@ -30,6 +30,7 @@
+ extern "C" {
+ #endif
+
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
new file mode 100644
index 000000000..5542036be
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -0,0 +1,173 @@
+From d02226b3d5872b184c1d50c7f4706ac9467ffb81 Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Fri, 15 Jul 2016 11:00:15 +0300
+Subject: [PATCH] weston-launch: Provide a default version that doesn't require
+ PAM
+
+weston-launch requires PAM for starting weston as a non-root user.
+
+Since starting weston as root is a valid use case by itself, if
+PAM is not available, provide a default version of weston-launch
+without non-root-user support.
+
+Upstream-Status: Pending
+
+Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+---
+ configure.ac | 9 +++++++--
+ src/weston-launch.c | 20 ++++++++++++++++++++
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 32fdde7..240966f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -416,13 +416,17 @@ AC_ARG_ENABLE(resize-optimization,
+ AS_IF([test "x$enable_resize_optimization" = "xyes"],
+ [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
+
++AC_ARG_WITH(pam,
++ AS_HELP_STRING([--with-pam], [Use PAM]),
++ [use_pam=$withval], [use_pam=yes])
+ AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes)
+ AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
+-if test x$enable_weston_launch == xyes; then
++if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then
+ WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
+ if test x$have_pam == xno; then
+- AC_ERROR([weston-launch requires pam])
++ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found])
+ fi
++ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available])
+ fi
+
+ AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
+@@ -673,6 +677,7 @@ AC_MSG_RESULT([
+ Enable developer documentation ${enable_devdocs}
+
+ weston-launch utility ${enable_weston_launch}
++ PAM support ${use_pam}
+ systemd-login support ${have_systemd_login}
+ systemd notify support ${enable_systemd_notify}
+
+diff --git a/src/weston-launch.c b/src/weston-launch.c
+index b8b2ba0..a865061 100644
+--- a/src/weston-launch.c
++++ b/src/weston-launch.c
+@@ -51,7 +51,9 @@
+
+ #include <pwd.h>
+ #include <grp.h>
++#ifdef HAVE_PAM
+ #include <security/pam_appl.h>
++#endif
+
+ #ifdef HAVE_SYSTEMD_LOGIN
+ #include <systemd/sd-login.h>
+@@ -93,8 +95,10 @@ drmSetMaster(int drm_fd)
+ #endif
+
+ struct weston_launch {
++#ifdef HAVE_PAM
+ struct pam_conv pc;
+ pam_handle_t *ph;
++#endif
+ int tty;
+ int ttynr;
+ int sock[2];
+@@ -181,6 +185,7 @@ weston_launch_allowed(struct weston_launch *wl)
+ return false;
+ }
+
++#ifdef HAVE_PAM
+ static int
+ pam_conversation_fn(int msg_count,
+ const struct pam_message **messages,
+@@ -221,6 +226,7 @@ setup_pam(struct weston_launch *wl)
+
+ return 0;
+ }
++#endif
+
+ static int
+ setup_launcher_socket(struct weston_launch *wl)
+@@ -414,6 +420,7 @@ quit(struct weston_launch *wl, int status)
+ close(wl->signalfd);
+ close(wl->sock[0]);
+
++#ifdef HAVE_PAM
+ if (wl->new_user) {
+ err = pam_close_session(wl->ph, 0);
+ if (err)
+@@ -421,6 +428,7 @@ quit(struct weston_launch *wl, int status)
+ err, pam_strerror(wl->ph, err));
+ pam_end(wl->ph, err);
+ }
++#endif
+
+ if (ioctl(wl->tty, KDSKBMUTE, 0) &&
+ ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
+@@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl)
+ setenv("HOME", wl->pw->pw_dir, 1);
+ setenv("SHELL", wl->pw->pw_shell, 1);
+
++#ifdef HAVE_PAM
+ env = pam_getenvlist(wl->ph);
+ if (env) {
+ for (i = 0; env[i]; ++i) {
+@@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl)
+ }
+ free(env);
+ }
++#endif
+ }
+
+ static void
+@@ -665,7 +675,9 @@ static void
+ help(const char *name)
+ {
+ fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
++#ifdef HAVE_PAM
+ fprintf(stderr, " -u, --user Start session as specified username\n");
++#endif
+ fprintf(stderr, " -t, --tty Start session on alternative tty\n");
+ fprintf(stderr, " -v, --verbose Be verbose\n");
+ fprintf(stderr, " -h, --help Display this help message\n");
+@@ -678,7 +690,9 @@ main(int argc, char *argv[])
+ int i, c;
+ char *tty = NULL;
+ struct option opts[] = {
++#ifdef HAVE_PAM
+ { "user", required_argument, NULL, 'u' },
++#endif
+ { "tty", required_argument, NULL, 't' },
+ { "verbose", no_argument, NULL, 'v' },
+ { "help", no_argument, NULL, 'h' },
+@@ -690,9 +704,13 @@ main(int argc, char *argv[])
+ while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) {
+ switch (c) {
+ case 'u':
++#ifdef HAVE_PAM
+ wl.new_user = optarg;
+ if (getuid() != 0)
+ error(1, 0, "Permission denied. -u allowed for root only");
++#else
++ error(1, 0, "-u is unsupported in this weston-launch build");
++#endif
+ break;
+ case 't':
+ tty = optarg;
+@@ -730,8 +748,10 @@ main(int argc, char *argv[])
+ if (setup_tty(&wl, tty) < 0)
+ exit(EXIT_FAILURE);
+
++#ifdef HAVE_PAM
+ if (wl.new_user && setup_pam(&wl) < 0)
+ exit(EXIT_FAILURE);
++#endif
+
+ if (setup_launcher_socket(&wl) < 0)
+ exit(EXIT_FAILURE);
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch
deleted file mode 100644
index a40eaf186..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 8e1efcd40b3bad81c83744e2e120d70c2b567ef2 Mon Sep 17 00:00:00 2001
-From: Frederico Cadete <frederico@cadete.eu>
-Date: Mon, 28 Sep 2015 00:30:10 +0200
-Subject: configure.ac: add explicit enable/disable for systemd-login support
-
-Otherwise, auto-enable depending on whether the system has the necessary
-libraries.
-
-[Updated help text as per pq suggestion -- bwh]
-
-Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
-Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
-Upstream-Status: Backport
-Backported from Weston git:
-http://cgit.freedesktop.org/wayland/weston/commit/?id=8e1efc
-
-Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
-
-diff --git a/configure.ac b/configure.ac
-index a9cd429..67e80d0 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -380,18 +380,30 @@ AC_ARG_ENABLE(resize-optimization,
- AS_IF([test "x$enable_resize_optimization" = "xyes"],
- [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
-
--PKG_CHECK_MODULES(SYSTEMD_LOGIN,
-- [libsystemd >= 209],
-- [have_systemd_login_209=yes;have_systemd_login=yes],
-- [have_systemd_login_209=no;have_systemd_login=no])
--
--# Older versions of systemd package systemd-login separately. Fall back on that
--AS_IF([test x$have_systemd_login != xyes],[
-- PKG_CHECK_MODULES(SYSTEMD_LOGIN,
-- [libsystemd-login >= 198],
-- [have_systemd_login=yes],
-- [have_systemd_login=no])
-- ])
-+AC_ARG_ENABLE(systemd-login,
-+ AS_HELP_STRING([--enable-systemd-login],
-+ [Enable logind support]),,
-+ enable_systemd_login=auto)
-+if test x$enable_systemd_login != xno; then
-+ PKG_CHECK_MODULES(SYSTEMD_LOGIN,
-+ [libsystemd >= 209],
-+ [have_systemd_login_209=yes;have_systemd_login=yes],
-+ [have_systemd_login_209=no;have_systemd_login=no])
-+
-+ # Older versions of systemd package systemd-login separately. Fall back on that
-+ AS_IF([test x$have_systemd_login != xyes],[
-+ PKG_CHECK_MODULES(SYSTEMD_LOGIN,
-+ [libsystemd-login >= 198],
-+ [have_systemd_login=yes],
-+ [have_systemd_login=no])
-+ ])
-+else
-+ have_systemd_login=no
-+fi
-+
-+if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then
-+ AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209 or libsystemd-login])
-+fi
-
- AS_IF([test "x$have_systemd_login" = "xyes"],
- [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
---
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/libsystemd.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/libsystemd.patch
deleted file mode 100644
index 2d28d5689..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/libsystemd.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 5eb025a867b42f8bc7bc73279eac8de58e51a13e Mon Sep 17 00:00:00 2001
-From: Frederico Cadete <frederico@cadete.eu>
-Date: Mon, 28 Sep 2015 00:30:09 +0200
-Subject: configure.ac: add support for new versions of systemd
-
-Starting from systemd version 209, a single libsystemd.pc is provided.
-For previous versions, fall back on libsystemd-login.pc.
-
-Signed-off-by: Frederico Cadete <frederico@cadete.eu>
-Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
-Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
-
-Upstream-Status: Backport
-Backported from Weston git:
-http://cgit.freedesktop.org/wayland/weston/commit/?id=5eb025
-
-Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
-
-diff --git a/configure.ac b/configure.ac
-index 045291c..a9cd429 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -380,14 +380,23 @@ AC_ARG_ENABLE(resize-optimization,
- AS_IF([test "x$enable_resize_optimization" = "xyes"],
- [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
-
--PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198],
-- [have_systemd_login=yes], [have_systemd_login=no])
-+PKG_CHECK_MODULES(SYSTEMD_LOGIN,
-+ [libsystemd >= 209],
-+ [have_systemd_login_209=yes;have_systemd_login=yes],
-+ [have_systemd_login_209=no;have_systemd_login=no])
-+
-+# Older versions of systemd package systemd-login separately. Fall back on that
-+AS_IF([test x$have_systemd_login != xyes],[
-+ PKG_CHECK_MODULES(SYSTEMD_LOGIN,
-+ [libsystemd-login >= 198],
-+ [have_systemd_login=yes],
-+ [have_systemd_login=no])
-+ ])
-+
- AS_IF([test "x$have_systemd_login" = "xyes"],
- [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
- AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
-
--PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209],
-- [have_systemd_login_209=yes], [have_systemd_login_209=no])
- AS_IF([test "x$have_systemd_login_209" = "xyes"],
- [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
-
---
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch
deleted file mode 100644
index 35e6d6ff5..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-lcms-explicitly-configurable.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-weston-1.5.0/configure.ac: make lcms explicitly configurable
-
-The lcms package is outside of openembedded-core, so make it
-explicitly configurable. Make it deterministic, so that if lcms
-dependencies are missing, autoconf throws a fatal error. Follow
-upstream style to make it more likely to be merged.
-
-Upstream-Status: Pending
-
-Index: weston-1.5.0/configure.ac
-===================================================================
---- weston-1.5.0.orig/configure.ac
-+++ weston-1.5.0/configure.ac
-@@ -491,12 +491,24 @@ AC_ARG_ENABLE(demo-clients-install,
- enable_demo_clients_install=no)
- AM_CONDITIONAL(INSTALL_DEMO_CLIENTS, [test "x$enable_demo_clients_install" = "xyes"])
-
--PKG_CHECK_MODULES(LCMS, lcms2,
-- [have_lcms=yes], [have_lcms=no])
--if test "x$have_lcms" = xyes; then
-- AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
-+AC_ARG_ENABLE(lcms,
-+ AS_HELP_STRING([--disable-lcms],
-+ [Disable lcms support]),,
-+ enable_lcms=auto)
-+AM_CONDITIONAL(HAVE_LCMS, [test "x$enable_lcms" = xyes])
-+if test "x$enable_lcms" != "xno"; then
-+ PKG_CHECK_MODULES(LCMS,
-+ lcms2,
-+ [have_lcms=yes],
-+ [have_lcms=no])
-+ if test "x$have_lcms" = "xno" -a "x$enable_lcms" = "xyes"; then
-+ AC_MSG_ERROR([lcms support explicitly requested, but lcms couldn't be found])
-+ fi
-+ if test "x$have_lcms" = "xyes"; then
-+ enable_lcms=yes
-+ AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
-+ fi
- fi
--AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
-
- AC_PATH_PROG([wayland_scanner], [wayland-scanner])
- if test x$wayland_scanner = x; then
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch
deleted file mode 100644
index ad07d4fc2..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-libwebp-explicitly-configurable.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-
-The libwebp package is outside of openembedded-core, so make it
-explicitly configurable. Make it deterministic, so that if libwebp
-dependencies are missing, autoconf throws a fatal error.
-
-Upstream-Status: Pending
-
-Index: weston-1.5.0/configure.ac
-===================================================================
---- weston-1.5.0.orig/configure.ac
-+++ weston-1.5.0/configure.ac
-@@ -268,9 +268,22 @@ fi
-
- PKG_CHECK_MODULES(PIXMAN, [pixman-1])
- PKG_CHECK_MODULES(PNG, [libpng])
--PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
--AS_IF([test "x$have_webp" = "xyes"],
-- [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
-+AC_ARG_ENABLE(webp,
-+ AS_HELP_STRING([--disable-webp],
-+ [Disable libwebp support]),,
-+ enable_webp=auto)
-+AM_CONDITIONAL(HAVE_WEBP, [test "x$enable_webp" = xyes])
-+AS_IF([test "x$enable_webp" != "xno"],
-+ PKG_CHECK_MODULES(WEBP,
-+ [libwebp],
-+ [have_webp=yes],
-+ [have_webp=no])
-+ AS_IF([test "x$have_webp" = "xno" -a "x$enable_webp" = "xyes"],
-+ AC_MSG_ERROR([libwebp support explicitly request, but lipwebp could not be found]))
-+ AS_IF([test "x$have_webp" = "xyes"],
-+ [enable_webp=yes]
-+ [AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
-+)
-
- AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],,
- enable_vaapi_recorder=auto)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch
new file mode 100644
index 000000000..0c408a43d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch
@@ -0,0 +1,33 @@
+From e8b615250f700f7854b423aaaf0a0aeea92c05a9 Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Sat, 7 May 2016 08:51:58 -0300
+Subject: [PATCH] weston-launch: Handle invalid command line options
+Organization: O.S. Systems Software LTDA.
+
+Exit the program if an unrecognized command line option is found.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+
+ src/weston-launch.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/weston-launch.c b/src/weston-launch.c
+index b8dfb17..9987d8e 100644
+--- a/src/weston-launch.c
++++ b/src/weston-launch.c
+@@ -703,6 +703,8 @@ main(int argc, char *argv[])
+ case 'h':
+ help("weston-launch");
+ exit(EXIT_FAILURE);
++ default:
++ exit(EXIT_FAILURE);
+ }
+ }
+
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/xwayland.weston-start b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/xwayland.weston-start
new file mode 100644
index 000000000..b483c97cf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/xwayland.weston-start
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if type Xwayland >/dev/null 2>/dev/null; then
+ mkdir -p /tmp/.X11-unix
+
+ add_weston_argument "--modules=xwayland.so"
+fi
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.11.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.11.0.bb
new file mode 100644
index 000000000..3ad309dab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.11.0.bb
@@ -0,0 +1,117 @@
+SUMMARY = "Weston, a Wayland compositor"
+DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
+ file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ file://weston.png \
+ file://weston.desktop \
+ file://0001-make-error-portable.patch \
+ file://0001-configure.ac-Fix-wayland-protocols-path.patch \
+ file://0001-shared-include-stdint.h-for-int32_t.patch \
+ file://xwayland.weston-start \
+ file://make-weston-launch-exit-for-unrecognized-option.patch \
+ file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+"
+SRC_URI[md5sum] = "bc6f90a2039163804aecfa663b69c4c2"
+SRC_URI[sha256sum] = "05e086e9f186a06843b9f7a5e1abf19347b1a6e4be26d7e74927abc17b6b7125"
+
+inherit autotools pkgconfig useradd distro_features_check
+# depends on virtual/egl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
+DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
+
+EXTRA_OECONF = "--enable-setuid-install \
+ --disable-rpi-compositor \
+ --disable-rdp-compositor \
+ WAYLAND_PROTOCOLS_SYSROOT_DIR=${STAGING_DIR}/${MACHINE} \
+ "
+EXTRA_OECONF[vardepsexclude] = "MACHINE"
+
+EXTRA_OECONF_append_qemux86 = "\
+ WESTON_NATIVE_BACKEND=fbdev-backend.so \
+ "
+EXTRA_OECONF_append_qemux86-64 = "\
+ WESTON_NATIVE_BACKEND=fbdev-backend.so \
+ "
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ clients launch"
+#
+# Compositor choices
+#
+# Weston on KMS
+PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
+# Weston on Wayland (nested Weston)
+PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
+# Weston on X11
+PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
+# Headless Weston
+PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
+# Weston on framebuffer
+PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
+# weston-launch
+PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
+# VA-API desktop recorder
+PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
+# Weston with EGL support
+PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
+# Weston with cairo glesv2 support
+PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
+# Weston with lcms support
+PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
+# Weston with webp support
+PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
+# Weston with unwinding support
+PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+# Weston with systemd-login support
+PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
+# Weston with Xwayland support (requires X11 and Wayland)
+PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
+# colord CMS support
+PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
+# Clients support
+PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
+# Weston with PAM support
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
+
+do_install_append() {
+ # Weston doesn't need the .la files to load modules, so wipe them
+ rm -f ${D}/${libdir}/weston/*.la
+
+ # If X11, ship a desktop file to launch it
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
+ install -d ${D}${datadir}/applications
+ install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
+
+ install -d ${D}${datadir}/icons/hicolor/48x48/apps
+ install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
+ fi
+
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
+ install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
+ fi
+}
+
+PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)}"
+PACKAGES += "${PN}-examples"
+
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
+FILES_${PN}-examples = "${bindir}/*"
+
+FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so"
+RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
+
+RDEPENDS_${PN} += "xkeyboard-config"
+RRECOMMENDS_${PN} = "liberation-fonts"
+RRECOMMENDS_${PN}-dev += "wayland-protocols"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.9.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.9.0.bb
deleted file mode 100644
index 16a788d2a..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.9.0.bb
+++ /dev/null
@@ -1,103 +0,0 @@
-SUMMARY = "Weston, a Wayland compositor"
-DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
- file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331"
-
-SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
- file://weston.png \
- file://weston.desktop \
- file://make-lcms-explicitly-configurable.patch \
- file://make-libwebp-explicitly-configurable.patch \
- file://0001-make-error-portable.patch \
- file://libsystemd.patch \
- file://explicit-enable-disable-systemd.patch \
-"
-SRC_URI[md5sum] = "66bbba12f546570b4d97f676bc79a28e"
-SRC_URI[sha256sum] = "9c1b03f3184fa0b0dfdf67e215048085156e1a2ca344af6613fed36794ac48cf"
-
-inherit autotools pkgconfig useradd distro_features_check
-# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
-DEPENDS += "wayland libinput virtual/egl pango wayland-native"
-
-EXTRA_OECONF = "--enable-setuid-install \
- --enable-simple-clients \
- --enable-clients \
- --enable-demo-clients-install \
- --disable-rpi-compositor \
- --disable-rdp-compositor \
- "
-
-EXTRA_OECONF_append_qemux86 = "\
- WESTON_NATIVE_BACKEND=fbdev-backend.so \
- "
-EXTRA_OECONF_append_qemux86-64 = "\
- WESTON_NATIVE_BACKEND=fbdev-backend.so \
- "
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
- "
-#
-# Compositor choices
-#
-# Weston on KMS
-PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
-# Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
-# Weston on X11
-PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
-# Headless Weston
-PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
-# Weston on framebuffer
-PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
-# weston-launch
-PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm"
-# VA-API desktop recorder
-PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
-# Weston with EGL support
-PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
-# Weston with cairo glesv2 support
-PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
-# Weston with lcms support
-PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
-# Weston with webp support
-PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
-# Weston with unwinding support
-PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
-# Weston with systemd-login support
-PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
-# Weston with Xwayland support
-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,libxcb libxcursor cairo"
-# colord CMS support
-PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
-
-do_install_append() {
- # Weston doesn't need the .la files to load modules, so wipe them
- rm -f ${D}/${libdir}/weston/*.la
-
- # If X11, ship a desktop file to launch it
- if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
- install -d ${D}${datadir}/applications
- install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
-
- install -d ${D}${datadir}/icons/hicolor/48x48/apps
- install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
- fi
-}
-
-PACKAGES += "${PN}-examples"
-
-FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
-FILES_${PN}-examples = "${bindir}/*"
-
-RDEPENDS_${PN} += "xkeyboard-config"
-RRECOMMENDS_${PN} = "liberation-fonts"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/Xserver.in b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/Xserver.in
deleted file mode 100644
index b8eed7610..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/Xserver.in
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-#
-
-XSERVER=/usr/bin/Xorg
-
-. /etc/profile
-
-ARGS=" -br -pn @BLANK_ARGS@"
-
-DISPLAY=':0'
-
-exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh
index 91594b9e3..6bd40b2fc 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh
@@ -7,7 +7,7 @@
# In the ideal case where SystemD is booting and userspace is initiated by a
# SystemD user session this will have been set already, so don't overwrite it.
-if [ -z "$XGD_RUNTIME_DIR" ]; then
- XDG_RUNTIME_DIR="/tmp"
- export XDG_RUNTIME_DIR
+if [ -z "$XDG_RUNTIME_DIR" ]; then
+ XDG_RUNTIME_DIR="/tmp"
+ export XDG_RUNTIME_DIR
fi
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb
index 6d7c347c0..ab9a939ce 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb
@@ -9,22 +9,14 @@ inherit distro_features_check
REQUIRED_DISTRO_FEATURES = "x11"
SRC_URI = "file://etc \
- file://Xserver.in \
file://gplv2-license.patch"
S = "${WORKDIR}"
-PACKAGECONFIG ??= "blank"
-# dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG
-PACKAGECONFIG[blank] = ""
-
do_install() {
cp -R ${S}/etc ${D}${sysconfdir}
- sed -e 's/@BLANK_ARGS@/${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}/' \
- ${S}/Xserver.in > ${D}${sysconfdir}/X11/Xserver
-
chmod -R 755 ${D}${sysconfdir}
}
-RDEPENDS_${PN} = "dbus-x11 xmodmap xdpyinfo xtscal xinit formfactor"
+RDEPENDS_${PN} = "dbus-x11 xmodmap xdpyinfo xinput-calibrator formfactor"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init.bb b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
index b68d40e1b..a6d0d5eee 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
@@ -5,10 +5,10 @@ SECTION = "x11"
PR = "r31"
SRC_URI = "file://xserver-nodm \
- file://Xusername \
+ file://Xserver \
file://gplv2-license.patch \
- file://xserver-nodm.service \
- file://xserver-nodm.conf \
+ file://xserver-nodm.service.in \
+ file://xserver-nodm.conf.in \
"
S = "${WORKDIR}"
@@ -16,35 +16,44 @@ S = "${WORKDIR}"
# Since we refer to ROOTLESS_X which is normally enabled per-machine
PACKAGE_ARCH = "${MACHINE_ARCH}"
-inherit update-rc.d systemd
+inherit update-rc.d systemd distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+PACKAGECONFIG ??= "blank"
+# dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG
+PACKAGECONFIG[blank] = ""
do_install() {
- install -d ${D}${sysconfdir}/init.d
- install xserver-nodm ${D}${sysconfdir}/init.d
+ install -d ${D}${sysconfdir}/default
+ install xserver-nodm.conf.in ${D}${sysconfdir}/default/xserver-nodm
+ install -d ${D}${sysconfdir}/xserver-nodm
+ install Xserver ${D}${sysconfdir}/xserver-nodm/Xserver
+
+ BLANK_ARGS="${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}"
+ if [ "${ROOTLESS_X}" = "1" ] ; then
+ XUSER_HOME="/home/xuser"
+ XUSER="xuser"
+ else
+ XUSER_HOME=${ROOT_HOME}
+ XUSER="root"
+ fi
+ sed -i "s:@HOME@:${XUSER_HOME}:; s:@USER@:${XUSER}:; s:@BLANK_ARGS@:${BLANK_ARGS}:" \
+ ${D}${sysconfdir}/default/xserver-nodm
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${sysconfdir}/default
- install xserver-nodm.conf ${D}${sysconfdir}/default/xserver-nodm
install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/xserver-nodm.service ${D}${systemd_unitdir}/system
- if [ "${ROOTLESS_X}" = "1" ] ; then
- sed -i 's!^HOME=.*!HOME=/home/xuser!' ${D}${sysconfdir}/default/xserver-nodm
- sed -i 's!^User=.*!User=xuser!' ${D}${systemd_unitdir}/system/xserver-nodm.service
- else
- sed -i 's!^HOME=.*!HOME=${ROOT_HOME}!' ${D}${sysconfdir}/default/xserver-nodm
- sed -i '/^User=/d' ${D}${systemd_unitdir}/system/xserver-nodm.service
- fi
+ install -m 0644 ${WORKDIR}/xserver-nodm.service.in ${D}${systemd_unitdir}/system/xserver-nodm.service
+ sed -i "s:@USER@:${XUSER}:" ${D}${systemd_unitdir}/system/xserver-nodm.service
fi
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
- if [ "${ROOTLESS_X}" = "1" ] ; then
- install -d ${D}${sysconfdir}/X11
- install Xusername ${D}${sysconfdir}/X11
- fi
+ install -d ${D}${sysconfdir}/init.d
+ install xserver-nodm ${D}${sysconfdir}/init.d
fi
}
-RDEPENDS_${PN} = "${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
+RDEPENDS_${PN} = "xinit ${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
INITSCRIPT_NAME = "xserver-nodm"
INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ."
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver
new file mode 100644
index 000000000..0edbfbfc2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# This script is only needed to make sure /etc/X11/xserver-common
+# can affect XSERVER, ARGS & DPI: otherwise systemd could just use
+# /etc/default/xserver-nodm as EnvironmentFile and sysvinit could just
+# source the same file
+
+. /etc/profile
+
+# load default values for XSERVER, ARGS, DISPLAY...
+. /etc/default/xserver-nodm
+
+# Allow xserver-common to override ARGS, XSERVER, DPI
+if [ -e /etc/X11/xserver-common ] ; then
+ . /etc/X11/xserver-common
+ if [ ! -e $XSERVER ] ; then
+ XSERVER=$(which $XSERVER)
+ fi
+fi
+
+if [ -n "$DPI" ] ; then
+ ARGS="$ARGS -dpi $DPI"
+fi
+
+exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername
deleted file mode 100644
index 7060e5ec1..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername
+++ /dev/null
@@ -1 +0,0 @@
-xuser
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
index bfa0a8d6c..6c548551b 100755
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
@@ -26,10 +26,11 @@ done
case "$1" in
start)
. /etc/profile
- username=root
+
+ #default for USER
+ . /etc/default/xserver-nodm
echo "Starting Xserver"
- if [ -f /etc/X11/Xusername ]; then
- username=`cat /etc/X11/Xusername`
+ if [ "$USER" != "root" ]; then
# setting for rootless X
chmod o+w /var/log
chmod g+r /dev/tty[0-3]
@@ -38,8 +39,9 @@ case "$1" in
chmod o+rw /dev/hidraw*
fi
fi
+
# Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
- su -l -c '/etc/X11/Xserver&' $username
+ su -l -c '/etc/xserver-nodm/Xserver &' $USER
# Wait for the desktop to say its finished loading
# before loading the rest of the system
# dbus-wait org.matchbox_project.desktop Loaded
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf
deleted file mode 100644
index 3c0582a87..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf
+++ /dev/null
@@ -1 +0,0 @@
-HOME=/home/root
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
new file mode 100644
index 000000000..757c23d95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
@@ -0,0 +1,7 @@
+# common environment file for sysvinit and systemd
+
+XSERVER=/usr/bin/Xorg
+DISPLAY=:0
+ARGS=" -br -pn @BLANK_ARGS@ "
+HOME=@HOME@
+USER=@USER@
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service
deleted file mode 100644
index 62d979f1d..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Xserver startup without a display manager
-
-[Service]
-User=root
-EnvironmentFile=/etc/default/xserver-nodm
-ExecStart=/etc/X11/Xserver
-
-[Install]
-Alias=display-manager.service
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
new file mode 100644
index 000000000..324a26f54
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in
@@ -0,0 +1,10 @@
+[Unit]
+Description=Xserver startup without a display manager
+
+[Service]
+EnvironmentFile=/etc/default/xserver-nodm
+User=@USER@
+ExecStart=/etc/xserver-nodm/Xserver
+
+[Install]
+Alias=display-manager.service
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/qemuall/pointercal.xinput b/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/qemuall/pointercal.xinput
new file mode 100644
index 000000000..a816d6d10
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/pointercal-xinput/qemuall/pointercal.xinput
@@ -0,0 +1,2 @@
+# Dummy pointercal.xinput file to prevent xinput_calibrator
+# from running on qemu startup
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch b/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
index 9351331be..9dc94ae49 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
@@ -1,33 +1,34 @@
-Upstream-Status: Inappropriate [no longer maintained]
-
-From 93abf28d602da637376b78de8c88b7ab5cf13b4f Mon Sep 17 00:00:00 2001
-From: Jonathan David <jonathan.david@ni.com>
-Date: Mon, 30 Nov 2015 12:12:20 -0600
+From 1cb83759632bb218559c4d0d65ff79f868c03dc5 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Tue, 9 Aug 2016 17:03:31 +0300
Subject: [PATCH] add geometry input when calibrating
Send monitor geometry to xinput_calibrator when running the script
+Update:
+ Remove bashism
+
+Upstream-Status: Inappropriate [no longer maintained]
Signed-off-by: Jonathan David <jonathan.david@ni.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
- scripts/xinput_calibrator_pointercal.sh | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
+ scripts/xinput_calibrator_pointercal.sh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh
-index 0ada7da..6a3aded 100755
+index fccb197..fea7c2f 100755
--- a/scripts/xinput_calibrator_pointercal.sh
+++ b/scripts/xinput_calibrator_pointercal.sh
-@@ -37,7 +37,10 @@ done
-
- [ "$USER" != "root" ] && CALFILE=$USER_CALFILE
+@@ -24,7 +24,8 @@ if [ -e $CALFILE ] ; then
+ fi
+ fi
-CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
-+read RESOLUTION <<< $(xrandr | awk -F '[[:space:]+]' '/ connected/ \
-+ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }')
-+
++RESOLUTION=$(xrandr | awk -F '[[:space:]+]' '/ connected/ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }')
+CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee $LOGFILE | grep ' xinput set' | sed 's/^ //g; s/$/;/g'`
if [ ! -z "$CALDATA" ] ; then
echo $CALDATA > $CALFILE
echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
--
-1.9.1
+2.4.0
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index ac5b70cba..57c3a7a9a 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -34,5 +34,5 @@ do_install_append() {
}
FILES_${PN} += "${sysconfdir}/xdg/autostart"
-RDEPENDS_${PN} = "xinput formfactor"
+RDEPENDS_${PN} = "xinput formfactor xrandr"
RRECOMMENDS_${PN} = "pointercal-xinput"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb
index b173f4fe8..59b332373 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb
@@ -10,3 +10,6 @@ PE = "1"
SRC_URI[md5sum] = "7d6003f32838d5b688e2c8a131083271"
SRC_URI[sha256sum] = "56ce1523eb48b1f8a4f4244fe1c3d8e6af1a3b7d4b0e6063582421b0b68dc28f"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb
index 825737f39..f23d258e0 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb
@@ -15,3 +15,6 @@ PE = "1"
SRC_URI[md5sum] = "f5d490738b148cb7f2fe760f40f92516"
SRC_URI[sha256sum] = "93e619ee15471f576cfb30c663e18f5bc70aca577a63d2c2c03f006a7837c29a"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb
deleted file mode 100644
index 41bd42069..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xrandr_1.4.3.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "XRandR: X Resize, Rotate and Reflect extension command"
-
-DESCRIPTION = "Xrandr is used to set the size, orientation and/or \
-reflection of the outputs for a screen. It can also set the screen \
-size."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fe1608bdb33cf8c62a4438f7d34679b3"
-DEPENDS += "libxrandr libxrender"
-PE = "1"
-
-SRC_URI[md5sum] = "441fdb98d2abc6051108b7075d948fc7"
-SRC_URI[sha256sum] = "7154ac3486b86923692f2d6cdb2991a2ee72bc32af2c4379a6f1c068f204be1b"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xrandr_1.5.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xrandr_1.5.0.bb
new file mode 100644
index 000000000..ea6897948
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xrandr_1.5.0.bb
@@ -0,0 +1,15 @@
+require xorg-app-common.inc
+
+SUMMARY = "XRandR: X Resize, Rotate and Reflect extension command"
+
+DESCRIPTION = "Xrandr is used to set the size, orientation and/or \
+reflection of the outputs for a screen. It can also set the screen \
+size."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fe1608bdb33cf8c62a4438f7d34679b3"
+DEPENDS += "libxrandr libxrender"
+PE = "1"
+
+SRC_URI[md5sum] = "ebffac98021b8f1dc71da0c1918e9b57"
+SRC_URI[sha256sum] = "c1cfd4e1d4d708c031d60801e527abc9b6d34b85f2ffa2cadd21f75ff38151cd"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb
deleted file mode 100644
index cf77ad209..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- event devices (evdev) input driver"
-
-DESCRIPTION = "evdev is an Xorg input driver for Linux's generic event \
-devices. It therefore supports all input devices that the kernel knows \
-about, including most mice and keyboards. \
-\
-The evdev driver can serve as both a pointer and a keyboard input \
-device, and may be used as both the core keyboard and the core pointer. \
-Multiple input devices are supported by multiple instances of this \
-driver, with one Load directive for evdev in the Module section of your \
-xorg.conf for each input device that will use this driver. "
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=fefe33b1cf0cacba0e72e3b0fa0f0e16"
-
-DEPENDS += "mtdev libevdev"
-
-SRC_URI[md5sum] = "96d89d9406a02f5e36bdaa4edd9a243a"
-SRC_URI[sha256sum] = "af9c2b47f5b272ae56b45da6bd84610fc9a3d80a4b32c8215842a39d862de017"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb
new file mode 100644
index 000000000..f81c3ec64
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb
@@ -0,0 +1,20 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- event devices (evdev) input driver"
+
+DESCRIPTION = "evdev is an Xorg input driver for Linux's generic event \
+devices. It therefore supports all input devices that the kernel knows \
+about, including most mice and keyboards. \
+\
+The evdev driver can serve as both a pointer and a keyboard input \
+device, and may be used as both the core keyboard and the core pointer. \
+Multiple input devices are supported by multiple instances of this \
+driver, with one Load directive for evdev in the Module section of your \
+xorg.conf for each input device that will use this driver. "
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=fefe33b1cf0cacba0e72e3b0fa0f0e16"
+
+DEPENDS += "mtdev libevdev"
+
+SRC_URI[md5sum] = "aa3363ce5061d0c4d1e7f7019b99716d"
+SRC_URI[sha256sum] = "5aa21ba4be8df927e5676a99c7f4f0343abc089f5451b7e73e39536f29b332a2"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb
deleted file mode 100644
index 0252baff1..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "Generic input driver for the X.Org server based on libinput"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
-
-DEPENDS += "libinput"
-
-SRC_URI[md5sum] = "2c8cb520f88da7bafaceebc0b34ea1d4"
-SRC_URI[sha256sum] = "fdade531e91e79acf6dce8ac55fa4f65abe3f1358c5d3d777ae48dbc74b76f49"
-
-FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb
new file mode 100644
index 000000000..5e5c4710a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb
@@ -0,0 +1,11 @@
+require xorg-driver-input.inc
+
+SUMMARY = "Generic input driver for the X.Org server based on libinput"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
+
+DEPENDS += "libinput"
+
+SRC_URI[md5sum] = "52c38b1369764243bfcf6ead1e4c6d32"
+SRC_URI[sha256sum] = "6c5d30dc7c8b8ae34261340e1dc9cbb8ef435078e084b8ef507527a8a21af477"
+
+FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb
index 8615b48da..92a1b25eb 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-vmmouse_13.1.0.bb
@@ -23,4 +23,4 @@ do_install_append () {
EXTRA_OECONF = "--with-udev-rules-dir=${nonarch_base_libdir}/udev/rules.d"
-FILES_${PN} += "${nonarch_base_libdir}/udev/rules.d/ ${datadir}/X11/xorg.conf.d"
+FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch
deleted file mode 100644
index 35762192f..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From c43617b739e358064396912c7a7a8028ca91d201 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
-Date: Thu, 16 Apr 2015 20:40:39 +0300
-Subject: [PATCH] gen8: Fix the YUV->RGB shader
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Use the correct register (Yn_01) with first half of the
-Y samples instead of using the register (Yn_23) with the
-second half twice when computing the green channel.
-
-Also use the Yn_01 register name instead of Yn for the red
-channel as well, just for a bit of extra consistency.
-
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89807
-Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
-Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
-
-Upstream-Status: Backport
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
----
- src/render_program/exa_wm_yuv_rgb.g8a | 4 ++--
- src/render_program/exa_wm_yuv_rgb.g8b | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/render_program/exa_wm_yuv_rgb.g8a b/src/render_program/exa_wm_yuv_rgb.g8a
-index 7def093..34973ba 100644
---- a/src/render_program/exa_wm_yuv_rgb.g8a
-+++ b/src/render_program/exa_wm_yuv_rgb.g8a
-@@ -76,7 +76,7 @@ add (16) Cbn<1>F Cb<8,8,1>F -0.501961F { compr align1 };
- /*
- * R = Y + Cr * 1.596
- */
--mov (8) acc0<1>F Yn<8,8,1>F { compr align1 };
-+mov (8) acc0<1>F Yn_01<8,8,1>F { compr align1 };
- mac.sat(8) src_sample_r_01<1>F Crn_01<8,8,1>F 1.596F { compr align1 };
-
- mov (8) acc0<1>F Yn_23<8,8,1>F { compr align1 };
-@@ -84,7 +84,7 @@ mac.sat(8) src_sample_r_23<1>F Crn_23<8,8,1>F 1.596F { compr align1 };
- /*
- * G = Crn * -0.813 + Cbn * -0.392 + Y
- */
--mov (8) acc0<1>F Yn_23<8,8,1>F { compr align1 };
-+mov (8) acc0<1>F Yn_01<8,8,1>F { compr align1 };
- mac (8) acc0<1>F Crn_01<8,8,1>F -0.813F { compr align1 };
- mac.sat(8) src_sample_g_01<1>F Cbn_01<8,8,1>F -0.392F { compr align1 };
-
-diff --git a/src/render_program/exa_wm_yuv_rgb.g8b b/src/render_program/exa_wm_yuv_rgb.g8b
-index 4494953..2cd6fc4 100644
---- a/src/render_program/exa_wm_yuv_rgb.g8b
-+++ b/src/render_program/exa_wm_yuv_rgb.g8b
-@@ -6,7 +6,7 @@
- { 0x80600048, 0x21c03ae8, 0x3e8d02c0, 0x3fcc49ba },
- { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
- { 0x80600048, 0x21e03ae8, 0x3e8d02e0, 0x3fcc49ba },
-- { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
-+ { 0x00600001, 0x24003ae0, 0x008d0300, 0x00000000 },
- { 0x00600048, 0x24003ae0, 0x3e8d02c0, 0xbf5020c5 },
- { 0x80600048, 0x22003ae8, 0x3e8d0340, 0xbec8b439 },
- { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
---
-2.5.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
deleted file mode 100644
index 29924bb90..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 2c5063938cc809f624e56efd4673041fa8141e81 Mon Sep 17 00:00:00 2001
-From: Martin Peres <martin.peres@linux.intel.com>
-Date: Thu, 9 Jul 2015 11:26:38 +0300
-Subject: [PATCH] uxa: fix the call to PixmapSyncDirtyHelper, broken by
- xserver's 90db5ed
-
-[ickle: switch to HAS_DIRTYTRACKING_ROTATION as suggested by Dave Airlie]
-Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
-
-Upstream-Status: Backport
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- src/compat-api.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/compat-api.h b/src/compat-api.h
-index aa93bee..293e9d7 100644
---- a/src/compat-api.h
-+++ b/src/compat-api.h
-@@ -247,3 +247,7 @@ static inline void FreePixmap(PixmapPtr pixmap)
- #endif
-
- #endif
-+
-+#if HAS_DIRTYTRACKING_ROTATION
-+#define PixmapSyncDirtyHelper(d, dd) PixmapSyncDirtyHelper(d)
-+#endif
---
-2.5.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
index dda508dcf..3dddd334b 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/disable-x11-dri3.patch
@@ -12,6 +12,6 @@ diff --git a/configure.ac b/configure.ac
index bd654f3..78a0e0d 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -251 +251 @@ fi
--PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-present x11-xcb xshmfence x11 xrender xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
-+#PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-present x11-xcb xshmfence x11 xrender xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
+@@ -279 +279 @@ fi
+-PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-xfixes xcb-present x11-xcb xshmfence x11 xcomposite xdamage xrender xrandr xxf86vm xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
++#PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-xfixes xcb-present x11-xcb xshmfence x11 xcomposite xdamage xrender xrandr xxf86vm xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch
deleted file mode 100644
index 589d52e0f..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/sna-Protect-against-ABI-breakage-in-recent-versions-.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 7fe2b2948652443ff43d907855bd7a051d54d309 Mon Sep 17 00:00:00 2001
-From: Chris Wilson <chris@chris-wilson.co.uk>
-Date: Thu, 19 Mar 2015 23:14:17 +0000
-Subject: [PATCH] sna: Protect against ABI breakage in recent versions of
- libdrm
-
-commit 7fe2b2948652443ff43d907855bd7a051d54d309 upstream.
-
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-Upstream-Status: Backport
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-diff --git a/src/sna/kgem.c b/src/sna/kgem.c
-index 11f0828f2bbc..6f16cbac87f2 100644
---- a/src/sna/kgem.c
-+++ b/src/sna/kgem.c
-@@ -182,6 +182,15 @@ struct local_i915_gem_caching {
- #define LOCAL_IOCTL_I915_GEM_SET_CACHING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_SET_CACHING, struct local_i915_gem_caching)
- #define LOCAL_IOCTL_I915_GEM_GET_CACHING DRM_IOW(DRM_COMMAND_BASE + LOCAL_I915_GEM_GET_CACHING, struct local_i915_gem_caching)
-
-+struct local_i915_gem_mmap {
-+ uint32_t handle;
-+ uint32_t pad;
-+ uint64_t offset;
-+ uint64_t size;
-+ uint64_t addr_ptr;
-+};
-+#define LOCAL_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct local_i915_gem_mmap)
-+
- struct local_i915_gem_mmap2 {
- uint32_t handle;
- uint32_t pad;
-@@ -514,15 +523,15 @@ retry_wc:
-
- static void *__kgem_bo_map__cpu(struct kgem *kgem, struct kgem_bo *bo)
- {
-- struct drm_i915_gem_mmap mmap_arg;
-+ struct local_i915_gem_mmap arg;
- int err;
-
- retry:
-- VG_CLEAR(mmap_arg);
-- mmap_arg.handle = bo->handle;
-- mmap_arg.offset = 0;
-- mmap_arg.size = bytes(bo);
-- if ((err = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_MMAP, &mmap_arg))) {
-+ VG_CLEAR(arg);
-+ arg.handle = bo->handle;
-+ arg.offset = 0;
-+ arg.size = bytes(bo);
-+ if ((err = do_ioctl(kgem->fd, LOCAL_IOCTL_I915_GEM_MMAP, &arg))) {
- assert(err != EINVAL);
-
- if (__kgem_throttle_retire(kgem, 0))
-@@ -536,10 +545,10 @@ retry:
- return NULL;
- }
-
-- VG(VALGRIND_MAKE_MEM_DEFINED(mmap_arg.addr_ptr, bytes(bo)));
-+ VG(VALGRIND_MAKE_MEM_DEFINED(arg.addr_ptr, bytes(bo)));
-
- DBG(("%s: caching CPU vma for %d\n", __FUNCTION__, bo->handle));
-- return bo->map__cpu = (void *)(uintptr_t)mmap_arg.addr_ptr;
-+ return bo->map__cpu = (void *)(uintptr_t)arg.addr_ptr;
- }
-
- static int gem_write(int fd, uint32_t handle,
---
-2.4.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch
deleted file mode 100644
index 0e675ee9f..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/udev-fstat.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 12af8a575d1518d40416f83195049157c3a062a5 Mon Sep 17 00:00:00 2001
-From: Chris Wilson <chris@chris-wilson.co.uk>
-Date: Tue, 24 Feb 2015 15:25:40 +0000
-Subject: sna: udev integration depends on fstat and sys/stat.h
-
-src/sna/sna_driver.c: In function 'sna_handle_uevents':
-src/sna/sna_driver.c:759:2: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
-
-Also take the opportunity to include udev support in the configure
-summary.
-
-Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-
-diff --git a/configure.ac b/configure.ac
-index 7476e2b..de3a4b3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -197,11 +197,15 @@ AC_ARG_ENABLE(udev,
-
- if test "x$UDEV" != "xno"; then
- PKG_CHECK_MODULES(UDEV, [libudev], [udev="yes"], [udev="no"])
-+ AC_CHECK_HEADERS([sys/stat.h], [], [udev="no"])
- if test "x$UDEV" = "xyes" -a "x$udev" != "xyes"; then
- AC_MSG_ERROR([udev support requested but not found (libudev)])
- fi
- if test "x$udev" = "xyes"; then
- AC_DEFINE(HAVE_UDEV,1,[Enable udev-based monitor hotplug detection])
-+ udev_msg=" yes"
-+ else
-+ udev_msg=" no"
- fi
- fi
-
-@@ -911,6 +915,7 @@ echo " Support for Kernel Mode Setting? $KMS"
- echo " Support for legacy User Mode Setting (for i810)? $UMS"
- echo " Support for Direct Rendering Infrastructure:$dri_msg"
- echo " Support for Xv motion compensation (XvMC and libXvMC):$xvmc_msg"
-+echo " Support for display hotplug notifications (udev):$udev_msg"
- echo " Build additional tools and utilities?$tools_msg"
- if test -n "$xp_msg"; then
- echo " Experimental support:$xp_msg"
-diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
-index 8c0d0b5..bc20ef0 100644
---- a/src/sna/sna_driver.c
-+++ b/src/sna/sna_driver.c
-@@ -740,6 +740,8 @@ sna_wakeup_handler(WAKEUPHANDLER_ARGS_DECL)
- }
-
- #if HAVE_UDEV
-+#include <sys/stat.h>
-+
- static void
- sna_handle_uevents(int fd, void *closure)
- {
---
-cgit v0.10.2
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
deleted file mode 100644
index d75b44f17..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-require xorg-driver-video.inc
-
-SUMMARY = "X.Org X server -- Intel integrated graphics chipsets driver"
-
-DESCRIPTION = "intel is an Xorg driver for Intel integrated graphics \
-chipsets. The driver supports depths 8, 15, 16 and 24. On some chipsets, \
-the driver supports hardware accelerated 3D via the Direct Rendering \
-Infrastructure (DRI)."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
-
-SRC_URI += "file://disable-x11-dri3.patch \
- file://always_include_xorg_server.h.patch \
- file://sna-Protect-against-ABI-breakage-in-recent-versions-.patch \
- file://udev-fstat.patch \
- file://0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch \
- file://0001-gen8-Fix-the-YUV-RGB-shader.patch \
- "
-
-SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
-SRC_URI[sha256sum] = "00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9"
-
-DEPENDS += "virtual/libx11 drm libpciaccess pixman"
-
-PACKAGECONFIG ??= "xvmc sna udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri1 dri2', '', d)}"
-
-PACKAGECONFIG[dri] = "--enable-dri,--disable-dri"
-PACKAGECONFIG[dri1] = "--enable-dri1,--disable-dri1,xf86driproto"
-PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
-PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
-PACKAGECONFIG[sna] = "--enable-sna,--disable-sna"
-PACKAGECONFIG[uxa] = "--enable-uxa,--disable-uxa"
-PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
-PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc xcb-util"
-PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,libxinerama libxrandr libxdamage libxfixes libxcursor libxtst libxext libxrender"
-
-# --enable-kms-only option is required by ROOTLESS_X
-EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
-
-COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
-
-FILES_${PN} += "${datadir}/polkit-1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
new file mode 100644
index 000000000..06cc730f4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
@@ -0,0 +1,43 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- Intel integrated graphics chipsets driver"
+
+DESCRIPTION = "intel is an Xorg driver for Intel integrated graphics \
+chipsets. The driver supports depths 8, 15, 16 and 24. On some chipsets, \
+the driver supports hardware accelerated 3D via the Direct Rendering \
+Infrastructure (DRI)."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
+
+SRCREV = "8f33f80100096f7790c7b819ce37a3ed8ce8b5fa"
+PV = "2.99.917+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+SRC_URI = "git://anongit.freedesktop.org/xorg/driver/xf86-video-intel \
+ file://disable-x11-dri3.patch \
+ file://always_include_xorg_server.h.patch \
+ "
+
+SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
+SRC_URI[sha256sum] = "00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9"
+
+DEPENDS += "virtual/libx11 drm libpciaccess pixman"
+
+PACKAGECONFIG ??= "xvmc sna udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri dri1 dri2', '', d)}"
+
+PACKAGECONFIG[dri] = "--enable-dri,--disable-dri"
+PACKAGECONFIG[dri1] = "--enable-dri1,--disable-dri1,xf86driproto"
+PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
+PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
+PACKAGECONFIG[sna] = "--enable-sna,--disable-sna"
+PACKAGECONFIG[uxa] = "--enable-uxa,--disable-uxa"
+PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
+PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc xcb-util"
+PACKAGECONFIG[tools] = "--enable-tools,--disable-tools,libxinerama libxrandr libxdamage libxfixes libxcursor libxtst libxext libxrender"
+
+# --enable-kms-only option is required by ROOTLESS_X
+EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
+
+COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
+
+FILES_${PN} += "${datadir}/polkit-1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
index 90846d818..36766f2f4 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9da93f2daf2d5572faa2bfaf0dbd9e76"
PE = "1"
PR = "${INC_PR}.1"
-DEPENDS = "mkfontscale-native font-util-native"
+DEPENDS = "mkfontscale-native mkfontdir-native font-util-native"
RDEPENDS_${PN} = ""
SRC_URI += "file://nocompiler.patch"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
index 228512498..34646ff99 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
@@ -19,7 +19,4 @@ BBCLASSEXTEND = "native"
SRC_URI[md5sum] = "23756dab809f9ec5011bb27fb2c3c7d6"
SRC_URI[sha256sum] = "aa7ebdb0715106dd255082f2310dbaa2cd7e225957c2a77d719720c7cc92b921"
-SYSROOT_PREPROCESS_FUNCS += "fontutil_sysroot_preprocess"
-fontutil_sysroot_preprocess () {
- sysroot_stage_dir ${D}${datadir}/fonts/ ${SYSROOT_DESTDIR}${datadir}/fonts/
-}
+SYSROOT_DIRS_BLACKLIST_remove = "${datadir}/fonts"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
index 5049b7ee0..b361ad6dd 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
@@ -23,5 +23,6 @@ BBCLASSEXTEND = "native"
SRC_URI[md5sum] = "addfb1e897ca8079531669c7c7711726"
SRC_URI[sha256sum] = "8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202"
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
PACKAGECONFIG[arc4] = "ac_cv_lib_bsd_arc4random_buf=yes,ac_cv_lib_bsd_arc4random_buf=no,libbsd"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
index 192513636..da4ed9251 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
@@ -26,3 +26,6 @@ BBCLASSEXTEND = "native"
SRC_URI[md5sum] = "499a7773c65aba513609fe651853c5f3"
SRC_URI[sha256sum] = "0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/Fix-inconsistent-use-of-tabs-vs.-space.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/Fix-inconsistent-use-of-tabs-vs.-space.patch
new file mode 100644
index 000000000..899238635
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb/Fix-inconsistent-use-of-tabs-vs.-space.patch
@@ -0,0 +1,62 @@
+From 8740a288ca468433141341347aa115b9544891d3 Mon Sep 17 00:00:00 2001
+From: Thomas Klausner <wiz@NetBSD.org>
+Date: Thu, 19 May 2016 17:31:18 +0200
+Subject: [PATCH] Fix inconsistent use of tabs vs. space.
+
+Needed for at least python-3.5.x.
+
+Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+
+Upstream-Status: Backport
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ src/c_client.py | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/c_client.py b/src/c_client.py
+index 57de3fb..043338d 100644
+--- a/src/c_client.py
++++ b/src/c_client.py
+@@ -1364,7 +1364,7 @@ def _c_serialize(context, self):
+ _c(' unsigned int xcb_align_to = 0;')
+ if self.is_switch:
+ _c(' unsigned int xcb_padding_offset = %d;',
+- self.get_align_offset() )
++ self.get_align_offset() )
+ prefix = [('_aux', '->', self)]
+ aux_ptr = 'xcb_out'
+
+@@ -1390,7 +1390,7 @@ def _c_serialize(context, self):
+ _c(' unsigned int xcb_align_to = 0;')
+ if self.is_switch:
+ _c(' unsigned int xcb_padding_offset = %d;',
+- self.get_align_offset() )
++ self.get_align_offset() )
+
+ elif 'sizeof' == context:
+ param_names = [p[2] for p in params]
+@@ -1930,14 +1930,14 @@ def _c_accessors_list(self, field):
+ # from the request size and divide that by the member size
+ return '(((R->length * 4) - sizeof('+ self.c_type + '))/'+'sizeof('+field.type.member.c_wiretype+'))'
+ else:
+- # use the accessor to get the start of the list, then
+- # compute the length of it by subtracting it from
++ # use the accessor to get the start of the list, then
++ # compute the length of it by subtracting it from
+ # the adress of the first byte after the end of the
+ # request
+- after_end_of_request = '(((char*)R) + R->length * 4)'
+- start_of_list = '%s(R)' % (field.c_accessor_name)
++ after_end_of_request = '(((char*)R) + R->length * 4)'
++ start_of_list = '%s(R)' % (field.c_accessor_name)
+ bytesize_of_list = '%s - (char*)(%s)' % (after_end_of_request, start_of_list)
+- return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
++ return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
+ else:
+ raise Exception(
+ "lengthless lists with varsized members are not supported. Fieldname '%s'"
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.1.bb
deleted file mode 100644
index 0856c190a..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "XCB: The X protocol C binding library"
-DESCRIPTION = "The X protocol C-language Binding (XCB) is a replacement \
-for Xlib featuring a small footprint, latency hiding, direct access to \
-the protocol, improved threading support, and extensibility."
-HOMEPAGE = "http://xcb.freedesktop.org"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
-SECTION = "x11/libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
-
-SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
- file://xcbincludedir.patch \
- file://disable-check.patch \
- file://gcc-mips-pr68302-mips-workaround.patch \
- "
-SRC_URI[md5sum] = "f97a65e6158775de518ac391935634c2"
-SRC_URI[sha256sum] = "b720fd6c7d200e5371affdb3f049cc8f88cff9aed942ff1b824d95eedbf69d30"
-
-BBCLASSEXTEND = "native nativesdk"
-
-DEPENDS = "xcb-proto xproto libxau libpthread-stubs libxdmcp"
-
-PACKAGES_DYNAMIC = "^libxcb-.*"
-
-FILES_${PN} = "${libdir}/libxcb.so.*"
-
-inherit autotools pkgconfig distro_features_check
-
-# The libxau and others requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-REQUIRED_DISTRO_FEATURES_class-native = ""
-
-python populate_packages_prepend () {
- do_split_packages(d, '${libdir}', '^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True)
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb
new file mode 100644
index 000000000..a38bdea5d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.12.bb
@@ -0,0 +1,39 @@
+SUMMARY = "XCB: The X protocol C binding library"
+DESCRIPTION = "The X protocol C-language Binding (XCB) is a replacement \
+for Xlib featuring a small footprint, latency hiding, direct access to \
+the protocol, improved threading support, and extensibility."
+HOMEPAGE = "http://xcb.freedesktop.org"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
+SECTION = "x11/libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
+
+SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
+ file://xcbincludedir.patch \
+ file://disable-check.patch \
+ file://gcc-mips-pr68302-mips-workaround.patch \
+ file://Fix-inconsistent-use-of-tabs-vs.-space.patch \
+ "
+SRC_URI[md5sum] = "28e552bd78bc1050b6b26ca1db0e5bb6"
+SRC_URI[sha256sum] = "4adfb1b7c67e99bc9c2ccb110b2f175686576d2f792c8a71b9c8b19014057b5b"
+
+BBCLASSEXTEND = "native nativesdk"
+
+DEPENDS = "xcb-proto xproto libxau libpthread-stubs libxdmcp"
+
+PACKAGES_DYNAMIC = "^libxcb-.*"
+
+FILES_${PN} = "${libdir}/libxcb.so.*"
+
+inherit autotools pkgconfig distro_features_check
+
+# The libxau and others requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+
+export PYTHON = "python3"
+
+python populate_packages_prepend () {
+ do_split_packages(d, '${libdir}', '^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True)
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb
index a8e4f24b6..17629047b 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxcursor_1.1.14.bb
@@ -12,7 +12,7 @@ LICENSE = "MIT-style"
LIC_FILES_CHKSUM = "file://COPYING;md5=8902e6643f7bcd7793b23dcd5d8031a4"
DEPENDS += "libxrender libxfixes"
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
PE = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb
index efa8b65ac..063e531c0 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxext_1.3.3.bb
@@ -13,7 +13,7 @@ require xorg-lib-common.inc
LICENSE = "MIT-style"
LIC_FILES_CHKSUM = "file://COPYING;md5=879ce266785414bd1cbc3bc2f4d9d7c8"
-DEPENDS += "xproto virtual/libx11 xextproto libxau libxdmcp"
+DEPENDS += "xproto virtual/libx11 xextproto"
PROVIDES = "xext"
PE = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxext_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxext_git.bb
deleted file mode 100644
index b799186ef..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxext_git.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "XExt: X Extension library"
-
-DESCRIPTION = "libXext provides an X Window System client interface to \
-several extensions to the X protocol. The supported protocol extensions \
-are DOUBLE-BUFFER, DPMS, Extended-Visual-Information, LBX, MIT_SHM, \
-MIT_SUNDRY-NONSTANDARD, Multi-Buffering, SECURITY, SHAPE, SYNC, TOG-CUP, \
-XC-APPGROUP, XC-MISC, XTEST. libXext also provides a small set of \
-utility functions to aid authors of client APIs for X protocol \
-extensions."
-
-DEPENDS += "xproto virtual/libx11 xextproto libxau libxdmcp"
-PROVIDES = "xext"
-SRCREV = "d1f3bc77a48c8e42771579e3fdf3370b35d3209d"
-PE = "1"
-PV = "1.0.99.1+gitr${SRCPV}"
-
-XORG_PN = "libXext"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/lib/${XORG_PN}"
-S = "${WORKDIR}/git/"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.1.bb
deleted file mode 100644
index 6e2740c9a..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "XFixes: X Fixes extension library"
-
-DESCRIPTION = "X applications have often needed to work around various \
-shortcomings in the core X window system. This extension is designed to \
-provide the minimal server-side support necessary to eliminate problems \
-caused by these workarounds."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3c1ce42c334a6f5cccb0277556a053e0"
-
-DEPENDS += "virtual/libx11 xproto fixesproto xextproto"
-
-PE = "1"
-
-XORG_PN = "libXfixes"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "b985b85f8b9386c85ddcfe1073906b4d"
-SRC_URI[sha256sum] = "63bec085084fa3caaee5180490dd871f1eb2020ba9e9b39a30f93693ffc34767"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb
new file mode 100644
index 000000000..f078aed19
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb
@@ -0,0 +1,22 @@
+SUMMARY = "XFixes: X Fixes extension library"
+
+DESCRIPTION = "X applications have often needed to work around various \
+shortcomings in the core X window system. This extension is designed to \
+provide the minimal server-side support necessary to eliminate problems \
+caused by these workarounds."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3c1ce42c334a6f5cccb0277556a053e0"
+
+DEPENDS += "virtual/libx11 xproto fixesproto xextproto"
+
+PE = "1"
+
+XORG_PN = "libXfixes"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "544d73df94e638ba7b64147be416e576"
+SRC_URI[sha256sum] = "9bd20edfec084a1bed481d48dd4815dee88139fffad091418cdda081129a9aea"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb
index 1b6e33c71..e01f3311f 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb
@@ -20,3 +20,6 @@ BBCLASSEXTEND = "native"
SRC_URI[md5sum] = "96f76ba94b4c909230bac1e2dcd551c4"
SRC_URI[sha256sum] = "b70898527c73f9758f551bbab612af611b8a0962202829568d94f3edf4d86098"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxinerama_1.1.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxinerama_1.1.3.bb
index 027c8043d..bb03f44e2 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxinerama_1.1.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxinerama_1.1.3.bb
@@ -18,3 +18,5 @@ XORG_PN = "libXinerama"
SRC_URI[md5sum] = "9336dc46ae3bf5f81c247f7131461efd"
SRC_URI[sha256sum] = "7a45699f1773095a3f821e491cbd5e10c887c5a5fce5d8d3fced15c2ff7698e2"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb
deleted file mode 100644
index de22a8197..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Generic XKB keymap library"
-DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
-processes a reduced subset of keymaps as defined by the XKB specification."
-HOMEPAGE = "http://www.xkbcommon.org"
-LIC_FILES_CHKSUM = "file://COPYING;md5=09457b156e3155972abebcaaaa0cb434"
-LICENSE = "MIT & MIT-style"
-
-DEPENDS = "util-macros flex-native bison-native"
-
-SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "2e1faeafcc609c30af3a561a91e84158"
-SRC_URI[sha256sum] = "90bd7824742b9a6f52a6cf80e2cadd6f5349cf600a358d08260772615b89d19c"
-
-UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--disable-docs"
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
new file mode 100644
index 000000000..fc08109c8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Generic XKB keymap library"
+DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
+processes a reduced subset of keymaps as defined by the XKB specification."
+HOMEPAGE = "http://www.xkbcommon.org"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=09457b156e3155972abebcaaaa0cb434"
+LICENSE = "MIT & MIT-style"
+
+DEPENDS = "util-macros flex-native bison-native"
+
+SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "67a8f322b5fa32352272e811bb90dd73"
+SRC_URI[sha256sum] = "5b0887b080b42169096a61106661f8d35bae783f8b6c58f97ebcd3af83ea8760"
+
+UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-docs"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb
index 003baec6e..d5935ff34 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb
@@ -30,3 +30,6 @@ BBCLASSEXTEND = "native"
SRC_URI[md5sum] = "41d92ab627dfa06568076043f3e089e4"
SRC_URI[sha256sum] = "756edc7c383254eef8b4e1b733c3bf1dc061b523c9f9833ac7058378b8349d0b"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb
index 9fde04061..44cb2e0eb 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb
@@ -11,7 +11,7 @@ require xorg-lib-common.inc
LICENSE = "MIT-style"
LIC_FILES_CHKSUM = "file://COPYING;md5=d8bc71986d3b9b3639f6dfd6fac8f196"
-DEPENDS += "virtual/libx11 renderproto xproto xdmcp"
+DEPENDS += "virtual/libx11 renderproto xproto"
PE = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch
index ce6c756df..ffc2c15d7 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxt/libxt_fix_for_x32.patch
@@ -3,7 +3,7 @@ Upstream-Status: Pending
This fixes compilation with x32 toolchain.
Received this patch from H.J. Lu <hjl.tools@gmail.com>
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/1
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/1
--- libXt-1.1.1/include/X11/Xtos.h.x32 2011-02-08 07:56:40.000000000 -0800
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch
new file mode 100644
index 000000000..782c1db02
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch
@@ -0,0 +1,33 @@
+From 0ccd906b904d21536d5ab41c6196760e3e5d72cb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 17 May 2016 17:30:00 -0700
+Subject: [PATCH] test/utils: Check for FE_INVALID definition before use
+
+Some architectures e.g. nios2 do not support all exceptions
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ test/utils.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/test/utils.c b/test/utils.c
+index f8e42a5..fe32b1e 100644
+--- a/test/utils.c
++++ b/test/utils.c
+@@ -978,9 +978,11 @@ enable_invalid_exceptions (void)
+ {
+ #ifdef HAVE_FENV_H
+ #ifdef HAVE_FEENABLEEXCEPT
++#ifdef FE_INVALID
+ feenableexcept (FE_INVALID);
+ #endif
+ #endif
++#endif
+ }
+
+ void *
+--
+2.8.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch
deleted file mode 100644
index 6b7c1e62a..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From fcd5eb9bd0e8674a6f4987a8fce7dc1ba8f9320c Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Thu, 17 Sep 2015 03:08:36 +0200
-Subject: [PATCH] [v3] test: add a check for FE_DIVBYZERO
-
-Some architectures, such as Microblaze and Nios2, currently do not
-implement FE_DIVBYZERO, even though they have <fenv.h> and
-feenableexcept(). This commit adds a configure.ac check to verify
-whether FE_DIVBYZERO is defined or not, and if not, disables the
-problematic code in test/utils.c.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport [commit 4297e9058]
----
-Changes v1 -> v2:
-
- * Use the ac_cv_have_decl_FE_DIVBYZERO variable, which is
- automatically set by AC_CHECK_DECL, to decide whether or not
- HAVE_FEDIVBYZERO should be defined.
-
-Changes v2 -> v3:
-
- * Use action-if-yes of AC_CHECK_DECL as suggested in
- http://lists.freedesktop.org/archives/pixman/2014-February/003176.html
----
- configure.ac | 5 +++++
- test/utils.c | 2 ++
- 2 files changed, 7 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index f93cc30..424bfd3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -891,6 +891,11 @@ if test x$have_feenableexcept = xyes; then
- AC_DEFINE(HAVE_FEENABLEEXCEPT, 1, [Whether we have feenableexcept()])
- fi
-
-+AC_CHECK_DECL([FE_DIVBYZERO],
-+ [AC_DEFINE(HAVE_FEDIVBYZERO, 1, [Whether we have FE_DIVBYZERO])],
-+ [],
-+ [[#include <fenv.h>]])
-+
- AC_CHECK_FUNC(gettimeofday, have_gettimeofday=yes, have_gettimeofday=no)
- AC_CHECK_HEADER(sys/time.h, have_sys_time_h=yes, have_sys_time_h=no)
- if test x$have_gettimeofday = xyes && test x$have_sys_time_h = xyes; then
-diff --git a/test/utils.c b/test/utils.c
-index 222d4d5..8657966 100644
---- a/test/utils.c
-+++ b/test/utils.c
-@@ -966,9 +966,11 @@ enable_divbyzero_exceptions (void)
- {
- #ifdef HAVE_FENV_H
- #ifdef HAVE_FEENABLEEXCEPT
-+#ifdef HAVE_FEDIVBYZERO
- feenableexcept (FE_DIVBYZERO);
-+#endif
- #endif
- #endif
- }
-
- void
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch
deleted file mode 100644
index 14a5fd209..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/mips-export-revert.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Revert a commit in pixman 0.32.6 which breaks compliation on MIPS machines with
-errors such as:
-
-pixman-0.32.6/pixman/pixman-mips-dspr2-asm.S:4267:
-Error: invalid operands `mflo $14,$ac3'
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
---- b/pixman/pixman-mips-dspr2-asm.h
-+++ a/pixman/pixman-mips-dspr2-asm.h
-@@ -72,10 +72,7 @@
- #define LEAF_MIPS32R2(symbol) \
- .globl symbol; \
- .align 2; \
--#ifdef __ELF__
-- .hidden symbol; \
- .type symbol, @function; \
--#endif
- .ent symbol, 0; \
- symbol: .frame sp, 0, ra; \
- .set push; \
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.8.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.8.bb
deleted file mode 100644
index 553ce369b..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.8.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Pixman: Pixel Manipulation library"
-
-DESCRIPTION = "Pixman provides a library for manipulating pixel regions \
--- a set of Y-X banded rectangles, image compositing using the \
-Porter/Duff model and implicit mask generation for geometric primitives \
-including trapezoids, triangles, and rectangles."
-
-require xorg-lib-common.inc
-
-# see http://cairographics.org/releases/ - only even minor versions are stable
-UPSTREAM_CHECK_REGEX = "pixman-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
-
-LICENSE = "MIT & MIT-style & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3 \
- file://pixman/pixman-matrix.c;endline=25;md5=ba6e8769bfaaee2c41698755af04c4be \
- file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \
- "
-DEPENDS += "zlib libpng"
-BBCLASSEXTEND = "native nativesdk"
-
-PE = "1"
-
-IWMMXT = "--disable-arm-iwmmxt"
-LOONGSON_MMI = "--disable-loongson-mmi"
-# If target supports neon then disable the 'simd' (ie VFPv2) fallback, otherwise disable neon.
-NEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--disable-arm-simd", "--disable-arm-neon" ,d)}"
-
-EXTRA_OECONF = "--disable-gtk ${IWMMXT} ${LOONGSON_MMI} ${NEON}"
-EXTRA_OECONF_class-native = "--disable-gtk"
-EXTRA_OECONF_class-nativesdk = "--disable-gtk"
-
-SRC_URI += "\
- file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
- file://mips-export-revert.patch \
- file://asm_include.patch \
- file://0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch \
-"
-
-SRC_URI[md5sum] = "18d6b62abdb7bc0f8e6b0ddf48986b2c"
-SRC_URI[sha256sum] = "5c63dbb3523fc4d86ed4186677815918a941b7cb390d5eec4f55cb5d66b59fb1"
-
-REQUIRED_DISTRO_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.34.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.34.0.bb
new file mode 100644
index 000000000..c4ca621a8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.34.0.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Pixman: Pixel Manipulation library"
+
+DESCRIPTION = "Pixman provides a library for manipulating pixel regions \
+-- a set of Y-X banded rectangles, image compositing using the \
+Porter/Duff model and implicit mask generation for geometric primitives \
+including trapezoids, triangles, and rectangles."
+
+require xorg-lib-common.inc
+
+# see http://cairographics.org/releases/ - only even minor versions are stable
+UPSTREAM_CHECK_REGEX = "pixman-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
+
+LICENSE = "MIT & MIT-style & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3 \
+ file://pixman/pixman-matrix.c;endline=25;md5=ba6e8769bfaaee2c41698755af04c4be \
+ file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \
+ "
+DEPENDS += "zlib libpng"
+BBCLASSEXTEND = "native nativesdk"
+
+PE = "1"
+
+IWMMXT = "--disable-arm-iwmmxt"
+LOONGSON_MMI = "--disable-loongson-mmi"
+# If target supports neon then disable the 'simd' (ie VFPv2) fallback, otherwise disable neon.
+NEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--disable-arm-simd", "--disable-arm-neon" ,d)}"
+
+EXTRA_OECONF = "--disable-gtk ${IWMMXT} ${LOONGSON_MMI} ${NEON}"
+EXTRA_OECONF_class-native = "--disable-gtk"
+EXTRA_OECONF_class-nativesdk = "--disable-gtk"
+
+SRC_URI += "\
+ file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
+ file://asm_include.patch \
+ file://0001-test-utils-Check-for-FE_INVALID-definition-before-us.patch \
+"
+
+SRC_URI[md5sum] = "002a4fcb644ddfcb4b0e4191576a0d59"
+SRC_URI[sha256sum] = "39ba3438f3d17c464b0cb8be006dacbca0ab5aee97ebde69fec7ecdbf85794a0"
+
+REQUIRED_DISTRO_FEATURES = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.16.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.16.bb
deleted file mode 100644
index 16a1f4f31..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.16.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Keyboard configuration database for X Window"
-
-DESCRIPTION = "The non-arch keyboard configuration database for X \
-Window. The goal is to provide the consistent, well-structured, \
-frequently released open source of X keyboard configuration data for X \
-Window System implementations. The project is targeted to XKB-based \
-systems."
-
-HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
-
-SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "bf6aa31195584cfce01b2194c3e5ea26"
-SRC_URI[sha256sum] = "1e8a1f212c96b7f71ca0b05da361cac1816d27baae1d8e03e7b53049b58d1d58"
-
-SECTION = "x11/libs"
-DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
-
-EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
-
-FILES_${PN} += "${datadir}/X11/xkb"
-
-inherit autotools pkgconfig gettext
-
-do_install_append () {
- install -d ${D}${datadir}/X11/xkb/compiled
- cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
new file mode 100644
index 000000000..79fcbd897
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Keyboard configuration database for X Window"
+
+DESCRIPTION = "The non-arch keyboard configuration database for X \
+Window. The goal is to provide the consistent, well-structured, \
+frequently released open source of X keyboard configuration data for X \
+Window System implementations. The project is targeted to XKB-based \
+systems."
+
+HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
+
+SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
+SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
+SRC_URI[sha256sum] = "c41d917d6c8a59feb7ccbda51c40a6ada824fdd1e9684b52dd48c9530617ddd0"
+
+SECTION = "x11/libs"
+DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
+
+EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
+
+FILES_${PN} += "${datadir}/X11/xkb"
+
+inherit autotools pkgconfig gettext
+
+do_install_append () {
+ install -d ${D}${datadir}/X11/xkb/compiled
+ cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/dri2proto_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/dri2proto_git.bb
deleted file mode 100644
index 9074f48d4..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/dri2proto_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "DRI2: Direct Rendering Infrastructure 2 headers"
-
-DESCRIPTION = "This package provides the wire protocol for the Direct \
-Rendering Ifnrastructure 2. DIR is required for may hardware \
-accelerated OpenGL drivers."
-
-SRCREV = "66c56ab10d917e3f47f93178d7eac6430970d3c4"
-PV = "1.99.3+git${SRCPV}"
-PR = "r2"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/dri2proto"
-
-LIC_FILES_CHKSUM="file://COPYING;md5=2e396fa91834f8786032cad2da5638f3"
-
-S = "${WORKDIR}/git"
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb
deleted file mode 100644
index 7e8e0c155..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_2.3.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XI: X Input extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Input \
-extension. The extension supports input devices other then the core X \
-keyboard and pointer."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e562cc0f6587b961f032211d8160f31e \
- file://XI2proto.h;endline=48;md5=1ac1581e61188da2885cc14ff49b20be"
-
-PE = "1"
-
-inherit gettext
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "6caebead4b779ba031727f66a7ffa358"
-SRC_URI[sha256sum] = "5a47ee62053a6acef3a83f506312494be1461068d0b9269d818839703b95c1d1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_2.3.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_2.3.2.bb
new file mode 100644
index 000000000..eb5e66bd6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_2.3.2.bb
@@ -0,0 +1,22 @@
+require xorg-proto-common.inc
+
+SUMMARY = "XI: X Input extension headers"
+
+DESCRIPTION = "This package provides the wire protocol for the X Input \
+extension. The extension supports input devices other then the core X \
+keyboard and pointer."
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e562cc0f6587b961f032211d8160f31e \
+ file://XI2proto.h;endline=48;md5=1ac1581e61188da2885cc14ff49b20be"
+
+PE = "1"
+
+inherit gettext
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "b290a463af7def483e6e190de460f31a"
+SRC_URI[sha256sum] = "893a6af55733262058a27b38eeb1edc733669f01d404e8581b167f03c03ef31d"
+
+EXTRA_OECONF += "--without-asciidoc"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_git.bb
deleted file mode 100644
index 6520f3bb0..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/inputproto_git.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "XI: X Input extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Input \
-extension. The extension supports input devices other then the core X \
-keyboard and pointer."
-
-PR = "r1"
-PE = "1"
-SRCREV = "7203036522ba9d4b224d282d6afc2d0b947711ee"
-PV = "1.9.99.12+git${SRCPV}"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/inputproto"
-S = "${WORKDIR}/git"
-
-inherit gettext
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/videoproto_2.3.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/videoproto_2.3.2.bb
deleted file mode 100644
index 53aa7593b..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/videoproto_2.3.2.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "Xv: X Video extension headers"
-
-DESCRIPTION = "This package provides the wire protocol for the X Video \
-extension. This extension alows for accerlated drawing of videos."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ce3472a119a864085fa4155cb0979a7b"
-
-PE = "1"
-
-SRC_URI[md5sum] = "e658641595327d3990eab70fdb55ca8b"
-SRC_URI[sha256sum] = "8dae168cb820fcd32f564879afb3f24d27c176300d9af66819a18265539bd4b6"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/videoproto_2.3.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/videoproto_2.3.3.bb
new file mode 100644
index 000000000..6f97a2653
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/videoproto_2.3.3.bb
@@ -0,0 +1,14 @@
+require xorg-proto-common.inc
+
+SUMMARY = "Xv: X Video extension headers"
+
+DESCRIPTION = "This package provides the wire protocol for the X Video \
+extension. This extension alows for accerlated drawing of videos."
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ce3472a119a864085fa4155cb0979a7b"
+
+PE = "1"
+
+SRC_URI[md5sum] = "fe86de8ea3eb53b5a8f52956c5cd3174"
+SRC_URI[sha256sum] = "c7803889fd08e6fcaf7b68cc394fb038b2325d1f315e571a6954577e07cca702"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto.inc
deleted file mode 100644
index 8703d6391..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto.inc
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "XCB: The X protocol C binding headers"
-DESCRIPTION = "Function prototypes for the X protocol C-language Binding \
-(XCB). XCB is a replacement for Xlib featuring a small footprint, \
-latency hiding, direct access to the protocol, improved threading \
-support, and extensibility."
-HOMEPAGE = "http://xcb.freedesktop.org"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
-
-SECTION = "x11/libs"
-LICENSE = "MIT-X"
-
-SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2 \
- file://no-python-native.patch"
-
-inherit autotools pkgconfig
-
-PACKAGES += "python-xcbgen"
-
-FILES_${PN} = ""
-FILES_${PN}-dev += "${datadir}/xcb/*.xml ${datadir}/xcb/*.xsd"
-FILES_python-xcbgen = "${libdir}/xcb-proto"
-
-RDEPENDS_${PN}-dev = ""
-RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/0001-Make-whitespace-use-consistent.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/0001-Make-whitespace-use-consistent.patch
new file mode 100644
index 000000000..89ec66618
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/0001-Make-whitespace-use-consistent.patch
@@ -0,0 +1,215 @@
+From ea7a3ac6c658164690e0febb55f4467cb9e0bcac Mon Sep 17 00:00:00 2001
+From: Thomas Klausner <wiz@NetBSD.org>
+Date: Thu, 19 May 2016 17:30:04 +0200
+Subject: [PATCH 1/2] Make whitespace use consistent.
+
+At least python-3.5.x complains about this forcefully.
+
+Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+
+Upstream-Status: Backport
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ xcbgen/align.py | 96 ++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 48 insertions(+), 48 deletions(-)
+
+diff --git a/xcbgen/align.py b/xcbgen/align.py
+index 5e31838..d4c12ee 100644
+--- a/xcbgen/align.py
++++ b/xcbgen/align.py
+@@ -16,12 +16,12 @@ class Alignment(object):
+ return self.align == other.align and self.offset == other.offset
+
+ def __str__(self):
+- return "(align=%d, offset=%d)" % (self.align, self.offset)
++ return "(align=%d, offset=%d)" % (self.align, self.offset)
+
+ @staticmethod
+ def for_primitive_type(size):
+- # compute the required start_alignment based on the size of the type
+- if size % 8 == 0:
++ # compute the required start_alignment based on the size of the type
++ if size % 8 == 0:
+ # do 8-byte primitives require 8-byte alignment in X11?
+ return Alignment(8,0)
+ elif size % 4 == 0:
+@@ -33,7 +33,7 @@ class Alignment(object):
+
+
+ def align_after_fixed_size(self, size):
+- new_offset = (self.offset + size) % self.align
++ new_offset = (self.offset + size) % self.align
+ return Alignment(self.align, new_offset)
+
+
+@@ -41,7 +41,7 @@ class Alignment(object):
+ '''
+ Assuming the given external_align, checks whether
+ self is fulfilled for all cases.
+- Returns True if yes, False otherwise.
++ Returns True if yes, False otherwise.
+ '''
+ if self.align == 1 and self.offset == 0:
+ # alignment 1 with offset 0 is always fulfilled
+@@ -55,9 +55,9 @@ class Alignment(object):
+ # the external align guarantees less alignment -> not guaranteed
+ return False
+
+- if external_align.align % self.align != 0:
++ if external_align.align % self.align != 0:
+ # the external align cannot be divided by our align
+- # -> not guaranteed
++ # -> not guaranteed
+ # (this can only happen if there are alignments that are not
+ # a power of 2, which is highly discouraged. But better be
+ # safe and check for it)
+@@ -72,7 +72,7 @@ class Alignment(object):
+
+ def combine_with(self, other):
+ # returns the alignment that is guaranteed when
+- # both, self or other, can happen
++ # both, self or other, can happen
+ new_align = gcd(self.align, other.align)
+ new_offset_candidate1 = self.offset % new_align
+ new_offset_candidate2 = other.offset % new_align
+@@ -83,8 +83,8 @@ class Alignment(object):
+ new_align = gcd(new_align, offset_diff)
+ new_offset_candidate1 = self.offset % new_align
+ new_offset_candidate2 = other.offset % new_align
+- assert new_offset_candidate1 == new_offset_candidate2
+- new_offset = new_offset_candidate1
++ assert new_offset_candidate1 == new_offset_candidate2
++ new_offset = new_offset_candidate1
+ # return the result
+ return Alignment(new_align, new_offset)
+
+@@ -92,44 +92,44 @@ class Alignment(object):
+ class AlignmentLog(object):
+
+ def __init__(self):
+- self.ok_list = []
+- self.fail_list = []
+- self.verbosity = 1
++ self.ok_list = []
++ self.fail_list = []
++ self.verbosity = 1
+
+ def __str__(self):
+- result = ""
++ result = ""
+
+- # output the OK-list
+- for (align_before, field_name, type_obj, callstack, align_after) in self.ok_list:
+- stacksize = len(callstack)
++ # output the OK-list
++ for (align_before, field_name, type_obj, callstack, align_after) in self.ok_list:
++ stacksize = len(callstack)
+ indent = ' ' * stacksize
+- if self.ok_callstack_is_relevant(callstack):
++ if self.ok_callstack_is_relevant(callstack):
+ if field_name is None or field_name == "":
+- result += (" %sok: %s:\n\t%sbefore: %s, after: %s\n"
+- % (indent, str(type_obj), indent, str(align_before), str(align_after)))
+- else:
+- result += (" %sok: field \"%s\" in %s:\n\t%sbefore: %s, after: %s\n"
+- % (indent, str(field_name), str(type_obj),
+- indent, str(align_before), str(align_after)))
++ result += (" %sok: %s:\n\t%sbefore: %s, after: %s\n"
++ % (indent, str(type_obj), indent, str(align_before), str(align_after)))
++ else:
++ result += (" %sok: field \"%s\" in %s:\n\t%sbefore: %s, after: %s\n"
++ % (indent, str(field_name), str(type_obj),
++ indent, str(align_before), str(align_after)))
+ if self.verbosity >= 1:
+- result += self.callstack_to_str(indent, callstack)
++ result += self.callstack_to_str(indent, callstack)
+
+- # output the fail-list
+- for (align_before, field_name, type_obj, callstack, reason) in self.fail_list:
+- stacksize = len(callstack)
++ # output the fail-list
++ for (align_before, field_name, type_obj, callstack, reason) in self.fail_list:
++ stacksize = len(callstack)
+ indent = ' ' * stacksize
+- if field_name is None or field_name == "":
+- result += (" %sfail: align %s is incompatible with\n\t%s%s\n\t%sReason: %s\n"
+- % (indent, str(align_before), indent, str(type_obj), indent, reason))
+- else:
+- result += (" %sfail: align %s is incompatible with\n\t%sfield \"%s\" in %s\n\t%sReason: %s\n"
+- % (indent, str(align_before), indent, str(field_name), str(type_obj), indent, reason))
++ if field_name is None or field_name == "":
++ result += (" %sfail: align %s is incompatible with\n\t%s%s\n\t%sReason: %s\n"
++ % (indent, str(align_before), indent, str(type_obj), indent, reason))
++ else:
++ result += (" %sfail: align %s is incompatible with\n\t%sfield \"%s\" in %s\n\t%sReason: %s\n"
++ % (indent, str(align_before), indent, str(field_name), str(type_obj), indent, reason))
+
+ if self.verbosity >= 1:
+- result += self.callstack_to_str(indent, callstack)
++ result += self.callstack_to_str(indent, callstack)
+
+
+- return result
++ return result
+
+
+ def callstack_to_str(self, indent, callstack):
+@@ -137,41 +137,41 @@ class AlignmentLog(object):
+ for stack_elem in callstack:
+ result += "\t %s%s\n" % (indent, str(stack_elem))
+ result += "\t%s]\n" % indent
+- return result
++ return result
+
+
+ def ok_callstack_is_relevant(self, ok_callstack):
+ # determine whether an ok callstack is relevant for logging
+- if self.verbosity >= 2:
+- return True
++ if self.verbosity >= 2:
++ return True
+
+ # empty callstacks are always relevant
+- if len(ok_callstack) == 0:
++ if len(ok_callstack) == 0:
+ return True
+
+- # check whether the ok_callstack is a subset or equal to a fail_callstack
++ # check whether the ok_callstack is a subset or equal to a fail_callstack
+ for (align_before, field_name, type_obj, fail_callstack, reason) in self.fail_list:
+ if len(ok_callstack) <= len(fail_callstack):
+ zipped = zip(ok_callstack, fail_callstack[:len(ok_callstack)])
+- is_subset = all([i == j for i, j in zipped])
+- if is_subset:
++ is_subset = all([i == j for i, j in zipped])
++ if is_subset:
+ return True
+
+ return False
+
+
+ def ok(self, align_before, field_name, type_obj, callstack, align_after):
+- self.ok_list.append((align_before, field_name, type_obj, callstack, align_after))
++ self.ok_list.append((align_before, field_name, type_obj, callstack, align_after))
+
+ def fail(self, align_before, field_name, type_obj, callstack, reason):
+- self.fail_list.append((align_before, field_name, type_obj, callstack, reason))
++ self.fail_list.append((align_before, field_name, type_obj, callstack, reason))
+
+ def append(self, other):
+- self.ok_list.extend(other.ok_list)
+- self.fail_list.extend(other.fail_list)
++ self.ok_list.extend(other.ok_list)
++ self.fail_list.extend(other.fail_list)
+
+ def ok_count(self):
+- return len(self.ok_list)
++ return len(self.ok_list)
+
+
+
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/0002-print-is-a-function-and-needs-parentheses.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/0002-print-is-a-function-and-needs-parentheses.patch
new file mode 100644
index 000000000..542acb82b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/0002-print-is-a-function-and-needs-parentheses.patch
@@ -0,0 +1,75 @@
+From bea5e1c85bdc0950913790364e18228f20395a3d Mon Sep 17 00:00:00 2001
+From: Thomas Klausner <wiz@NetBSD.org>
+Date: Thu, 19 May 2016 17:30:05 +0200
+Subject: [PATCH 2/2] print() is a function and needs parentheses.
+
+Fixes build with python-3.x.
+
+Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
+Signed-off-by: Uli Schlachter <psychon@znc.in>
+
+Upstream-Status: Backport
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ xcbgen/xtypes.py | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py
+index c3b5758..b83b119 100644
+--- a/xcbgen/xtypes.py
++++ b/xcbgen/xtypes.py
+@@ -501,7 +501,7 @@ class ComplexType(Type):
+ int(required_start_align_element.get('align', "4"), 0),
+ int(required_start_align_element.get('offset', "0"), 0))
+ if verbose_align_log:
+- print "Explicit start-align for %s: %s\n" % (self, self.required_start_align)
++ print ("Explicit start-align for %s: %s\n" % (self, self.required_start_align))
+
+ def resolve(self, module):
+ if self.resolved:
+@@ -592,7 +592,7 @@ class ComplexType(Type):
+ if verbose_align_log:
+ print ("calc_required_start_align: %s has start-align %s"
+ % (str(self), str(self.required_start_align)))
+- print "Details:\n" + str(log)
++ print ("Details:\n" + str(log))
+ if self.required_start_align.offset != 0:
+ print (("WARNING: %s\n\thas start-align with non-zero offset: %s"
+ + "\n\tsuggest to add explicit definition with:"
+@@ -619,12 +619,12 @@ class ComplexType(Type):
+ for offset in range(0,align):
+ align_candidate = Alignment(align, offset)
+ if verbose_align_log:
+- print "trying %s for %s" % (str(align_candidate), str(self))
++ print ("trying %s for %s" % (str(align_candidate), str(self)))
+ my_log = AlignmentLog()
+ if self.is_possible_start_align(align_candidate, callstack, my_log):
+ log.append(my_log)
+ if verbose_align_log:
+- print "found start-align %s for %s" % (str(align_candidate), str(self))
++ print ("found start-align %s for %s" % (str(align_candidate), str(self)))
+ return align_candidate
+ else:
+ my_ok_count = my_log.ok_count()
+@@ -641,7 +641,7 @@ class ComplexType(Type):
+ # none of the candidates applies
+ # this type has illegal internal aligns for all possible start_aligns
+ if verbose_align_log:
+- print "didn't find start-align for %s" % str(self)
++ print ("didn't find start-align for %s" % str(self))
+ log.append(best_log)
+ return None
+
+@@ -900,7 +900,7 @@ class SwitchType(ComplexType):
+ # aux function for unchecked_get_alignment_after
+ def get_align_for_selected_case_field(self, case_field, start_align, callstack, log):
+ if verbose_align_log:
+- print "get_align_for_selected_case_field: %s, case_field = %s" % (str(self), str(case_field))
++ print ("get_align_for_selected_case_field: %s, case_field = %s" % (str(self), str(case_field)))
+ total_align = start_align
+ for field in self.bitcases:
+ my_callstack = callstack[:]
+--
+2.9.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
index f808e1963..09b6088db 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
@@ -20,7 +20,7 @@ index d140bfe..c7b68da 100644
-AM_PATH_PYTHON([2.5])
+pythondir="${libdir}/xcb-proto"
+AC_SUBST(pythondir)
-+PYTHON="python"
++PYTHON="python3"
+AC_SUBST(PYTHON)
xcbincludedir='${datadir}/xcb'
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb
deleted file mode 100644
index 5bc5a112e..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.11.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-include xcb-proto.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
- file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65"
-
-
-SRC_URI[md5sum] = "6bf2797445dc6d43e9e4707c082eff9c"
-SRC_URI[sha256sum] = "b4aceee6502a0ce45fc39b33c541a2df4715d00b72e660ebe8c5bb444771e32e"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
new file mode 100644
index 000000000..bc04bc48e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
@@ -0,0 +1,40 @@
+SUMMARY = "XCB: The X protocol C binding headers"
+DESCRIPTION = "Function prototypes for the X protocol C-language Binding \
+(XCB). XCB is a replacement for Xlib featuring a small footprint, \
+latency hiding, direct access to the protocol, improved threading \
+support, and extensibility."
+HOMEPAGE = "http://xcb.freedesktop.org"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
+
+SECTION = "x11/libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \
+ file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65"
+
+SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2 \
+ file://no-python-native.patch \
+ file://0001-Make-whitespace-use-consistent.patch \
+ file://0002-print-is-a-function-and-needs-parentheses.patch \
+ "
+SRC_URI[md5sum] = "14e60919f859560f28426a685a555962"
+SRC_URI[sha256sum] = "5922aba4c664ab7899a29d92ea91a87aa4c1fc7eb5ee550325c3216c480a4906"
+
+inherit autotools pkgconfig
+
+PACKAGES += "python-xcbgen"
+
+FILES_${PN} = ""
+FILES_${PN}-dev += "${datadir}/xcb/*.xml ${datadir}/xcb/*.xsd"
+FILES_python-xcbgen = "${libdir}/xcb-proto"
+
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append() {
+ # Makefile's do_install creates .pyc files for python3, now also create
+ # them for python2 so that they will be recorded by manifest, and can be
+ # cleaned correctly.
+ python -m py_compile ${D}${libdir}/xcb-proto/xcbgen/*.py
+}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_git.bb
deleted file mode 100644
index 2ea4d0421..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto_git.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include xcb-proto.inc
-SRCREV = "d81ca233e98be8fa59e8c90d262c0516944c5a66"
-PV = "1.2+gitr${SRCPV}"
-PR = "r4"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xcb/proto"
-S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xineramaproto_1.2.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xineramaproto_1.2.1.bb
index d00774ece..dde7e9db7 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xineramaproto_1.2.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xineramaproto_1.2.1.bb
@@ -15,3 +15,5 @@ PE = "1"
SRC_URI[md5sum] = "9959fe0bfb22a0e7260433b8d199590a"
SRC_URI[sha256sum] = "977574bb3dc192ecd9c55f59f991ec1dff340be3e31392c95deff423da52485b"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
index 540ad27d4..8a5ff58b9 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto/xproto_fix_for_x32.patch
@@ -8,7 +8,7 @@ __LP64__ before defining LONG64 without checking __amd64__/amd64.
This fixes compilation with x32 toolchain.
Received this patch from H.J. Lu <hjl.tools@gmail.com>
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/1
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/1
--- xproto-7.0.22/Xmd.h.x32 2009-07-11 04:19:50.000000000 -0700
+++ xproto-7.0.22/Xmd.h 2011-11-30 17:14:19.290395893 -0800
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.28.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.28.bb
deleted file mode 100644
index 7427a7d53..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.28.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-proto-common.inc
-
-SUMMARY = "Xlib: C Language X interface headers"
-
-DESCRIPTION = "This package provides the basic headers for the X Window \
-System."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b9e051107d5628966739a0b2e9b32676"
-
-PE = "1"
-
-SRC_URI += "file://xproto_fix_for_x32.patch"
-
-EXTRA_OECONF_append = " --enable-specs=no"
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI[md5sum] = "3ce2f230c5d8fa929f326ad1f0fa40a8"
-SRC_URI[sha256sum] = "29e85568d1f68ceef8a2c081dad9bc0e5500a53cfffde24b564dc43d46ddf6ca"
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb
new file mode 100644
index 000000000..412b6a277
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb
@@ -0,0 +1,19 @@
+require xorg-proto-common.inc
+
+SUMMARY = "Xlib: C Language X interface headers"
+
+DESCRIPTION = "This package provides the basic headers for the X Window \
+System."
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b9e051107d5628966739a0b2e9b32676"
+
+PE = "1"
+
+SRC_URI += "file://xproto_fix_for_x32.patch"
+
+EXTRA_OECONF_append = " --enable-specs=no"
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI[md5sum] = "eeeae1f47d43a33ef0d5c56727410326"
+SRC_URI[sha256sum] = "6c1a477092ca73233902b8d5f33012635c4b0208f17e7833cc7efe5c93ba9f8a"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
index 7ceb6fd63..72e4fbf59 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
@@ -3,7 +3,7 @@ Section "Module"
Load "fb"
Load "shadow"
Load "shadowfb"
+ Load "int10"
Load "vbe"
Load "vgahw"
EndSection
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
index f4c5469b5..29503b1a5 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
@@ -69,7 +69,7 @@ PACKAGES =+ "${PN}-sdl \
xf86-video-modesetting"
SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver"
-INSANE_SKIP_xf86-video-modesetting = "xorg-driver-abi"
+INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi"
XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp"
RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}"
@@ -131,6 +131,7 @@ PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
# DRI3 requires xshmfence to also be enabled
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,glproto virtual/libgl virtual/libx11"
+PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy,libegl"
PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
@@ -167,9 +168,10 @@ python populate_packages_prepend() {
}
p = subprocess.Popen(args="pkg-config --variable=%s xorg-server" % abis[name],
shell=True, env=newenv, stdout=subprocess.PIPE)
- output = p.communicate()[0]
+ stdout, stderr = p.communicate()
+ output = stdout.decode("utf-8").split(".")[0]
mlprefix = d.getVar('MLPREFIX', True) or ''
- return "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
+ return "%sxorg-abi-%s-%s" % (mlprefix, name, output)
pn = d.getVar("PN", True)
d.appendVar("RPROVIDES_" + pn, " " + get_abi("input"))
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch
deleted file mode 100644
index cd3099952..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 0c2153d468229f56e6fef71d2f002e0cae14aa55 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Mon, 16 Nov 2015 16:18:40 +0200
-Subject: [PATCH] configure.ac: Use libsystemd in REQUIRED_LIBS check
-
-REQUIRED_LIBS needs to be set to the correct systemd library,
-otherwise the later check will either fail or use the wrong
-pc file.
-
-Upstream-Status: Submitted [xorg-devel@lists.x.org]
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 13 ++++++++++---
- 1 file changed, 10 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 96c0242..f63eca1 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -837,9 +837,16 @@ AC_ARG_WITH([systemd-daemon],
- [support systemd socket activation (default: auto)]),
- [WITH_SYSTEMD_DAEMON=$withval], [WITH_SYSTEMD_DAEMON=auto])
- PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
-- [HAVE_SYSTEMD_DAEMON=yes],
-+ [REQUIRED_SYSTEMD_DAEMON=libsystemd-daemon],
- [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd],
-- [HAVE_SYSTEMD_DAEMON=yes], [HAVE_SYSTEMD_DAEMON=no])])
-+ [REQUIRED_SYSTEMD_DAEMON=libsystemd],
-+ [REQUIRED_SYSTEMD_DAEMON=])])
-+if test "x$REQUIRED_SYSTEMD_DAEMON" = x; then
-+ HAVE_SYSTEMD_DAEMON=no
-+else
-+ HAVE_SYSTEMD_DAEMON=yes
-+fi
-+
- if test "x$WITH_SYSTEMD_DAEMON" = xauto; then
- WITH_SYSTEMD_DAEMON="$HAVE_SYSTEMD_DAEMON"
- fi
-@@ -848,7 +855,7 @@ if test "x$WITH_SYSTEMD_DAEMON" = xyes; then
- AC_MSG_ERROR([systemd support requested but no library has been found])
- fi
- AC_DEFINE(HAVE_SYSTEMD_DAEMON, 1, [Define to 1 if libsystemd-daemon is available])
-- REQUIRED_LIBS="$REQUIRED_LIBS libsystemd-daemon"
-+ REQUIRED_LIBS="$REQUIRED_LIBS $REQUIRED_SYSTEMD_DAEMON"
- fi
- AM_CONDITIONAL([HAVE_SYSTEMD_DAEMON], [test "x$HAVE_SYSTEMD_DAEMON" = "xyes"])
-
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/modesetting_libdrm_requirements.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/modesetting_libdrm_requirements.patch
deleted file mode 100644
index 5f186cb84..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/modesetting_libdrm_requirements.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From bf23db42a4e5943129501223a47b48884cdeb62f Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Wed, 27 Jan 2016 11:50:13 -0500
-Subject: modesetting: Require sufficiently new libdrm
-
-Bugzilla: https://bugs.freedesktop.org/93883
-Signed-off-by: Adam Jackson <ajax@redhat.com>
-Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-Reviewed-by: Julien Cristau <jcristau@debian.org>
-
-Upstream-Status: Backport
-Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
-
-diff --git a/configure.ac b/configure.ac
-index ac3bb64..312fc69 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2035,8 +2035,7 @@ if test "x$XORG" = xyes; then
-
- if test "x$DRM" = xyes; then
- dnl 2.4.46 is required for cursor hotspot support.
-- PKG_CHECK_EXISTS(libdrm >= 2.4.46)
-- XORG_DRIVER_MODESETTING=yes
-+ PKG_CHECK_EXISTS(libdrm >= 2.4.46, XORG_DRIVER_MODESETTING=yes, XORG_DRIVER_MODESETTING=no)
- fi
-
- AC_SUBST([XORG_LIBS])
---
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.0.bb
deleted file mode 100644
index eb79b4046..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.0.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-require xserver-xorg.inc
-
-SRC_URI += "file://configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch \
- file://musl-arm-inb-outb.patch \
- file://modesetting_libdrm_requirements.patch \
- "
-SRC_URI[md5sum] = "3c1c1057d3ad27380d8dd87ffcc182cd"
-SRC_URI[sha256sum] = "195670819695d9cedd8dde95fbe069be0d0f488a77797a2d409f9f702daf312e"
-
-# These extensions are now integrated into the server, so declare the migration
-# path for in-place upgrades.
-
-RREPLACES_${PN} = "${PN}-extension-dri \
- ${PN}-extension-dri2 \
- ${PN}-extension-record \
- ${PN}-extension-extmod \
- ${PN}-extension-dbe \
- "
-RPROVIDES_${PN} = "${PN}-extension-dri \
- ${PN}-extension-dri2 \
- ${PN}-extension-record \
- ${PN}-extension-extmod \
- ${PN}-extension-dbe \
- "
-RCONFLICTS_${PN} = "${PN}-extension-dri \
- ${PN}-extension-dri2 \
- ${PN}-extension-record \
- ${PN}-extension-extmod \
- ${PN}-extension-dbe \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb
new file mode 100644
index 000000000..670056579
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb
@@ -0,0 +1,27 @@
+require xserver-xorg.inc
+
+SRC_URI += "file://musl-arm-inb-outb.patch"
+SRC_URI[md5sum] = "d4842dfe3bd9a9d062f2fa1df9104a46"
+SRC_URI[sha256sum] = "278459b2c31d61a15655d95a72fb79930c480a6bb8cf9226e48a07df8b1d31c8"
+
+# These extensions are now integrated into the server, so declare the migration
+# path for in-place upgrades.
+
+RREPLACES_${PN} = "${PN}-extension-dri \
+ ${PN}-extension-dri2 \
+ ${PN}-extension-record \
+ ${PN}-extension-extmod \
+ ${PN}-extension-dbe \
+ "
+RPROVIDES_${PN} = "${PN}-extension-dri \
+ ${PN}-extension-dri2 \
+ ${PN}-extension-record \
+ ${PN}-extension-extmod \
+ ${PN}-extension-dbe \
+ "
+RCONFLICTS_${PN} = "${PN}-extension-dri \
+ ${PN}-extension-dri2 \
+ ${PN}-extension-record \
+ ${PN}-extension-extmod \
+ ${PN}-extension-dbe \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh b/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
deleted file mode 100644
index fa43617bd..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/30xTs_Calibrate.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-. /etc/formfactor/config
-
-if [ "$HAVE_TOUCHSCREEN" = "1" ]; then
- n=1
- while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ] && [ $n -le 5 ]
- do
- /usr/bin/xtscal
- sleep 1
- n=$(($n+1))
- done
-fi
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/change-cross.patch b/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/change-cross.patch
deleted file mode 100644
index 1da771786..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/change-cross.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Upstream-Status: Pending
-
---- tmp/main.c.orig 2007-01-02 15:39:54.000000000 +0000
-+++ tmp/main.c 2007-01-02 15:39:54.000000000 +0000
-@@ -131,9 +131,10 @@
- {
- XRenderFillRectangles (dpy, PictOpSrc, pict, &rect_color, rectangles, 2);
-
-- XFillArc (dpy, crosshair_w, crosshair_gc, (CROSSHAIR_SIZE / 2) - (WIDTH / 2) - 1,
-- (CROSSHAIR_SIZE / 2) - (WIDTH / 2) - 1,
-- WIDTH + 1, WIDTH + 1, 0, 360 * 64);
-+ XFillRectangle (dpy, crosshair_w, crosshair_gc,
-+ (CROSSHAIR_SIZE / 2) - (WIDTH / 2),
-+ (CROSSHAIR_SIZE / 2) - (WIDTH / 2),
-+ WIDTH, WIDTH);
- }
-
- void
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/cleanup.patch b/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/cleanup.patch
deleted file mode 100644
index f7b0854c3..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/cleanup.patch
+++ /dev/null
@@ -1,621 +0,0 @@
----
- Makefile.am | 9 --
- configure.ac | 3
- gpe-dist.am | 12 ---
- h3600_ts.h | 216 -----------------------------------------------------------
- main.c | 210 ++-------------------------------------------------------
- xtscal.in | 19 -----
- 6 files changed, 14 insertions(+), 455 deletions(-)
-
-Upstream-Status: Pending
-
-Index: xtscal-0.6.3/xtscal.in
-===================================================================
---- xtscal-0.6.3.orig/xtscal.in 2004-09-10 20:10:36.000000000 +0100
-+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
-@@ -1,19 +0,0 @@
--#!/bin/sh
--
--module_id() {
-- # Get model name
-- echo `grep "^Hardware" /proc/cpuinfo | sed -e "s/.*: *//" | tr a-z A-Z`
--}
--
--case `module_id` in
-- "HP IPAQ H3100" | "HP IPAQ H3800" )
-- ARGS="-rotate 90" ;;
-- "HP IPAQ H3600" | "HP IPAQ H3700" | "HP IPAQ H3900" | *COLLIE | *POODLE)
-- ARGS="-rotate 270" ;;
-- # H2200: works without rotation
--esac
--
--# the things we do for autoconf
--prefix=@prefix@
--exec_prefix=@exec_prefix@
--exec @libexecdir@/xtscal.bin $ARGS $*
-Index: xtscal-0.6.3/main.c
-===================================================================
---- xtscal-0.6.3.orig/main.c 2007-07-01 01:12:52.000000000 +0100
-+++ xtscal-0.6.3/main.c 2007-07-01 01:12:55.000000000 +0100
-@@ -22,12 +22,10 @@
- #include <X11/Xlib.h>
-
- #include <X11/extensions/Xrender.h>
--#include <X11/extensions/Xrandr.h>
- #include <X11/Xft/Xft.h>
- #include <X11/extensions/xcalibrate.h>
- #include <X11/keysym.h>
-
--#include "h3600_ts.h"
- #include "calibrate.h"
-
- Display *dpy;
-@@ -45,15 +43,11 @@ XftColor xftcol;
- XftDraw *xftdraw;
- XftFont *xftfont;
- int screen_x, screen_y;
--int ts_fd;
- int samples;
- Pixmap bg_pixmap;
- int flag_debug;
--int rotation = 0;
- int error_base, event_base;
-
--int using_xcalibrate;
--
- int moving;
-
- #define CROSSHAIR_SIZE 25
-@@ -63,7 +57,6 @@ int moving;
- #define ENOUGH 5
- #define MAX_SAMPLES 40
-
--#define RAW_DEVICE "/dev/h3600_tsraw"
- #define FONTNAME "sans-10"
-
- struct point
-@@ -287,12 +280,8 @@ sort_by_y (const void* a, const void *b)
- void
- set_calibration (calibration *cal)
- {
-- TS_CAL tc;
-- int xtrans, ytrans, xscale, yscale, xyscale, yxscale;
- calibration ocal = *cal;
-
-- if (using_xcalibrate)
-- {
- FILE *fp;
- if (flag_debug)
- printf ("constants are: %d %d %d %d %d %d %d\n", cal->a[1], cal->a[2], cal->a[0], cal->a[4], cal->a[5], cal->a[3], cal->a[6]);
-@@ -304,29 +293,6 @@ set_calibration (calibration *cal)
- }
- fprintf (fp, "%d %d %d %d %d %d %d\n", cal->a[1], cal->a[2], cal->a[0], cal->a[4], cal->a[5], cal->a[3], cal->a[6]);
- fclose (fp);
-- return;
-- }
--
-- xtrans = cal->a[0] / cal->a[6];
-- ytrans = cal->a[3] / cal->a[6];
-- xscale = cal->a[1] * 256 / cal->a[6];
-- yscale = cal->a[5] * 256 / cal->a[6];
-- xyscale = cal->a[2] * 256 / cal->a[6];
-- yxscale = cal->a[4] * 256 / cal->a[6];
--
-- tc.xtrans = xtrans;
-- tc.ytrans = ytrans;
-- tc.xscale = xscale;
-- tc.yscale = yscale;
-- tc.xyswap = 0;
--
-- printf ("%d %d %d %d %d\n", tc.xscale, tc.xtrans, tc.yscale, tc.ytrans, tc.xyswap);
--
-- if (ioctl (ts_fd, TS_SET_CAL, (void *)&tc) != 0)
-- {
-- perror ("TS_SET_CAL");
-- exit (1);
-- }
- }
-
- void
-@@ -398,80 +364,13 @@ handle_ts_event (int x, int y, int press
- }
-
- void
--read_ts (void)
--{
-- TS_EVENT ts_ev;
-- int r;
--
-- r = read (ts_fd, &ts_ev, sizeof (ts_ev));
-- if (r == sizeof (ts_ev))
-- handle_ts_event (ts_ev.x, ts_ev.y, ts_ev.pressure);
--}
--
--void
--do_cal (char **args)
--{
-- TS_CAL tc;
--
-- tc.xscale = atoi (args[0]);
-- tc.xtrans = atoi (args[1]);
-- tc.yscale = atoi (args[2]);
-- tc.ytrans = atoi (args[3]);
-- tc.xyswap = atoi (args[4]);
--
-- if (flag_debug)
-- fprintf (stderr, "setting: %d %d %d %d %d\n",
-- tc.xtrans, tc.ytrans, tc.xscale, tc.yscale, tc.xyswap);
--
-- if (ioctl (ts_fd, TS_SET_CAL, (void *)&tc) != 0)
-- {
-- perror ("TS_SET_CAL");
-- exit (1);
-- }
--
-- exit (0);
--}
--
--void
--show_cal (void)
--{
-- TS_CAL tc;
--
-- if (ioctl (ts_fd, TS_GET_CAL, (void *)&tc) != 0)
-- {
-- perror ("TS_GET_CAL");
-- exit (1);
-- }
--
-- printf ("%d %d %d %d %d\n", tc.xscale, tc.xtrans, tc.yscale, tc.ytrans, tc.xyswap);
--}
--
--void
- usage (const char *name)
- {
-- fprintf (stderr, "usage: %s -view\n", name);
-- fprintf (stderr, " %s [-rotate <0 | 90 | 180 | 270>]\n", name);
-- fprintf (stderr, " %s -cal <xs> <xt> <ys> <yt> <xyswap>\n", name);
--
-+ fprintf (stderr, "usage: %s [-debug]\n", name);
- exit (1);
- }
-
- int
--xrr_supported (void)
--{
-- int xrr_event_base, xrr_error_base;
-- int xrr_major, xrr_minor;
--
-- if (XRRQueryExtension (dpy, &xrr_event_base, &xrr_error_base) == False
-- || XRRQueryVersion (dpy, &xrr_major, &xrr_minor) == 0
-- || xrr_major != 1
-- || xrr_minor < 1)
-- return 0;
--
-- return 1;
--}
--
--int
- main (int argc, char *argv[])
- {
- XSetWindowAttributes attributes;
-@@ -480,31 +379,11 @@ main (int argc, char *argv[])
- int max_fd;
- GC bg_gc;
- int i;
-- int have_xrandr;
-
- for (i = 1; i < argc; i++)
- {
-- if (!strcmp (argv[i], "-view"))
-- {
-- show_cal ();
-- exit (0);
-- }
-- else if (!strcmp (argv[i], "-debug"))
-+ if (!strcmp (argv[i], "-debug"))
- flag_debug = 1;
-- else if (!strcmp (argv[i], "-cal"))
-- {
-- if (argc > (i + 5))
-- do_cal (argv + i + 1);
-- else
-- usage (argv[0]);
-- }
-- else if (!strcmp (argv[i], "-rotate"))
-- {
-- if (argc > (i + 1))
-- rotation = atoi (argv[++i]);
-- else
-- usage (argv[0]);
-- }
- else
- usage (argv[0]);
- }
-@@ -531,48 +410,11 @@ main (int argc, char *argv[])
- fprintf (stderr, "failed to set raw mode: error %d\n", r);
- exit (1);
- }
--
-- using_xcalibrate = 1;
-- }
--
-- have_xrandr = xrr_supported ();
-- if (have_xrandr)
-- {
-- XRRScreenConfiguration *rr_screen;
-- Rotation current_rotation;
--
-- if (flag_debug)
-- fprintf (stderr, "XRANDR is supported\n");
--
-- rr_screen = XRRGetScreenInfo (dpy, RootWindow (dpy, screen));
--
-- XRRRotations (dpy, screen, &current_rotation);
--
-- XRRFreeScreenConfigInfo (rr_screen);
--
-- if (flag_debug)
-- fprintf (stderr, "Current RANDR rotation is %d\n", current_rotation);
--
-- switch (current_rotation)
-- {
-- case RR_Rotate_270:
-- rotation += 90;
-- case RR_Rotate_180:
-- rotation += 90;
-- case RR_Rotate_90:
-- rotation += 90;
-- rotation %= 360;
-- case RR_Rotate_0:
-- break;
-- default:
-- fprintf (stderr, "Unknown RANDR rotation: %d\n", current_rotation);
-- break;
-- }
- }
- else
- {
-- if (flag_debug)
-- fprintf (stderr, "XRANDR not supported\n");
-+ perror ("XCALIBRATE extension missing");
-+ exit (1);
- }
-
- attributes.override_redirect = flag_debug ? False : True;
-@@ -666,45 +508,17 @@ main (int argc, char *argv[])
-
- for (i = 0; i < NR_POINTS; i++)
- {
-- switch (rotation)
-- {
-- case 0:
-- cal.xfb[i] = cal.xscr[i];
-- cal.yfb[i] = cal.yscr[i];
-- break;
-- case 90:
-- cal.xfb[i] = cal.yscr[i];
-- cal.yfb[i] = screen_x - cal.xscr[i];
-- break;
-- case 180:
-- cal.xfb[i] = screen_x - cal.xscr[i];
-- cal.yfb[i] = screen_y - cal.yscr[i];
-- break;
-- case 270:
-- cal.xfb[i] = screen_y - cal.yscr[i];
-- cal.yfb[i] = cal.xscr[i];
-- break;
-- }
-+ cal.xfb[i] = cal.xscr[i];
-+ cal.yfb[i] = cal.yscr[i];
-+ XCalibrateScreenToCoord (dpy, &cal.xfb[i], &cal.yfb[i]);
-
- if (flag_debug)
-- printf ("rotation %d: (%d,%d) -> (%d,%d)\n", rotation,
-+ printf ("rotation conversion: (%d,%d) -> (%d,%d)\n",
- cal.xscr[i], cal.yscr[i], cal.xfb[i], cal.yfb[i]);
- }
-
- next_event ();
-
-- if (!using_xcalibrate)
-- {
-- ts_fd = open (RAW_DEVICE, O_RDONLY);
-- if (ts_fd < 0)
-- {
-- perror (RAW_DEVICE);
-- exit (1);
-- }
-- }
--
-- max_fd = (xfd > ts_fd) ? xfd : ts_fd;
--
- for (;;)
- {
- fd_set fds;
-@@ -713,12 +527,8 @@ main (int argc, char *argv[])
-
- FD_ZERO (&fds);
- FD_SET (xfd, &fds);
-- if (ts_fd != -1)
-- FD_SET (ts_fd, &fds);
-
-- select (max_fd + 1, &fds, NULL, NULL, NULL);
--
-- if (ts_fd != -1 && FD_ISSET (ts_fd, &fds))
-- read_ts ();
-+ select (xfd + 1, &fds, NULL, NULL, NULL);
- }
- }
-+
-Index: xtscal-0.6.3/configure.ac
-===================================================================
---- xtscal-0.6.3.orig/configure.ac 2004-09-10 20:11:12.000000000 +0100
-+++ xtscal-0.6.3/configure.ac 2007-07-01 01:12:55.000000000 +0100
-@@ -9,8 +9,7 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
- # Checks for programs.
- AC_PROG_CC
-
--PKG_CHECK_MODULES(XTSCAL, x11 xft xext xrandr xcalibrate)
-+PKG_CHECK_MODULES(XTSCAL, x11 xft xext xcalibrate)
-
- AC_CONFIG_FILES([Makefile])
--AC_CONFIG_FILES([xtscal])
- AC_OUTPUT
-Index: xtscal-0.6.3/gpe-dist.am
-===================================================================
---- xtscal-0.6.3.orig/gpe-dist.am 2004-06-02 23:07:13.000000000 +0100
-+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
-@@ -1,12 +0,0 @@
--CVSTAG := $(shell echo $(PACKAGE)-$(VERSION) | tr [a-z.] [A-Z_])
--
--dist-upload: dist
-- scp $(PACKAGE)-$(VERSION).tar.bz2 $(USER)@handhelds.org:/home/ftp/pub/projects/gpe/source/
--
--tag:
-- cvs tag $(CVSTAG)
--
--retag:
-- cvs tag -F $(CVSTAG)
--
--source: tag dist-upload
-Index: xtscal-0.6.3/h3600_ts.h
-===================================================================
---- xtscal-0.6.3.orig/h3600_ts.h 2003-07-05 17:27:10.000000000 +0100
-+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
-@@ -1,216 +0,0 @@
--/*
--*
--* Driver for the H3600 Touch Screen and other Atmel controlled devices.
--*
--* Copyright 2000 Compaq Computer Corporation.
--*
--* Use consistent with the GNU GPL is permitted,
--* provided that this copyright notice is
--* preserved in its entirety in all copies and derived works.
--*
--* COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
--* AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
--* FITNESS FOR ANY PARTICULAR PURPOSE.
--*
--* Author: Charles Flynn.
--*
--*/
--
--
--#ifndef __H3600_TS_H__
--#define __H3600_TS_H__
--
--#include <linux/ioctl.h>
--
--enum h3600_ts_minor_devices {
-- TS_MINOR = 0,
-- TSRAW_MINOR = 1,
-- KEY_MINOR = 2
--};
--
--typedef struct h3600_ts_calibration {
-- int xscale;
-- int xtrans;
-- int yscale;
-- int ytrans;
-- int xyswap;
--} TS_CAL;
--
--typedef struct h3600_ts_event {
-- unsigned short pressure;
-- unsigned short x;
-- unsigned short y;
-- unsigned short pad;
--} TS_EVENT;
--
--/* Deprecated - do not use */
--typedef struct h3600_ts_return {
-- unsigned short pressure;
-- unsigned short x;
-- unsigned short y;
-- unsigned short pad;
--} TS_RET;
--
--enum power_button_mode {
-- PBM_SUSPEND = 0,
-- PBM_GENERATE_KEYPRESS = 1
--};
--
--
--/* ++++++++++++++ +++++++++++++++++++++++++++++++++++++ */
--
--typedef struct therm_dev {
-- short data;
--} THERM_DEV;
--
--#define H3600_BATT_CHEM_ALKALINE 0x01
--#define H3600_BATT_CHEM_NICD 0x02
--#define H3600_BATT_CHEM_NIMH 0x03
--#define H3600_BATT_CHEM_LION 0x04
--#define H3600_BATT_CHEM_LIPOLY 0x05
--#define H3600_BATT_CHEM_NOT_INSTALLED 0x06
--#define H3600_BATT_CHEM_UNKNOWN 0xff
--
--/* These should match the apm_bios.h definitions */
--#define H3600_AC_STATUS_AC_OFFLINE 0x00
--#define H3600_AC_STATUS_AC_ONLINE 0x01
--#define H3600_AC_STATUS_AC_BACKUP 0x02 /* What does this mean? */
--#define H3600_AC_STATUS_AC_UNKNOWN 0xff
--
--/* These bitfields are rarely "or'd" together */
--#define H3600_BATT_STATUS_HIGH 0x01
--#define H3600_BATT_STATUS_LOW 0x02
--#define H3600_BATT_STATUS_CRITICAL 0x04
--#define H3600_BATT_STATUS_CHARGING 0x08
--#define H3600_BATT_STATUS_CHARGE_MAIN 0x10
--#define H3600_BATT_STATUS_DEAD 0x20 /* Battery will not charge */
--#define H3600_BATT_NOT_INSTALLED 0x20 /* For expansion pack batteries */
--#define H3600_BATT_STATUS_FULL 0x40 /* Battery fully charged (and connected to AC) */
--#define H3600_BATT_STATUS_NOBATT 0x80
--#define H3600_BATT_STATUS_UNKNOWN 0xff
--
--struct battery_data {
-- unsigned char chemistry;
-- unsigned char status;
-- unsigned short voltage; /* Voltage for battery #0; unknown for battery #1 */
-- unsigned short percentage; /* Percentage of full charge */
-- unsigned short life; /* Life remaining in minutes */
--};
--
--struct h3600_battery {
-- unsigned char ac_status;
-- unsigned char battery_count; /* How many batteries we have */
-- struct battery_data battery[2];
--};
--
--/* -------- EEPROM and SPI Interfaces ---------------*/
--
--#define EEPROM_RD_BUFSIZ 6 /* EEPROM reads are 16 bits */
--#define EEPROM_WR_BUFSIZ 5 /* Allow room for 8bit 'addr' field in buffer*/
--#define SPI_RD_BUFSIZ 16 /* SPI reads are 8 bits */
--#define SPI_WR_BUFSIZ 7
--
--/* The EEPROM is where internal programs are stored on the Amtel.
-- You probably don't want to read or write these values */
--
--typedef struct h3600_eeprom_read_request {
-- unsigned char addr; /* 8bit Address Offset 0-255 */
-- unsigned char len; /* Number of 16bit words to read 0-128 */
-- unsigned short buff[EEPROM_RD_BUFSIZ];
--} EEPROM_READ;
--
--typedef struct h3600_eeprom_write_request {
-- unsigned char len; /* used only to compute the number of bytes to send */
-- unsigned char addr; /* 0-128 */
-- unsigned short buff[EEPROM_WR_BUFSIZ];
--} EEPROM_WRITE;
--
--/* The SPI bus connects to EEPROMs located on sleeves plugged into
-- the iPAQ. You may want to read these values */
--
--typedef struct h3600_spi_read_request {
-- unsigned short addr; /* 16bit Address Offset 0-128 */
-- unsigned char len; /* Number of bytes to read */
-- unsigned char buff[SPI_RD_BUFSIZ];
--} SPI_READ;
--
--#define SPI_READ_STATUS_BYTE 0xffff /* Use this address to read the status byte */
--
--typedef struct h3600_spi_write_request {
-- unsigned short len; /* used only to compute the number of bytes to send */
-- unsigned short addr; /* this 16bit address accesses a single byte */
-- unsigned char buff[SPI_WR_BUFSIZ];
--} SPI_WRITE;
--
--
--/* -------- end of EEPROM and SPI Interfaces ---------------*/
--
--/* User space structures for IOCTL calls */
--
--typedef struct h3600_ts_version {
-- unsigned char host_version[8]; /* ascii "x.yy" */
-- unsigned char pack_version[8]; /* ascii "x.yy" */
-- unsigned char boot_type; /* TODO ?? */
--} VER_RET;
--
--typedef struct h3600_ts_led {
-- unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */
-- unsigned char TotalTime; /* Units of 5 seconds */
-- unsigned char OnTime; /* units of 100m/s */
-- unsigned char OffTime; /* units of 100m/s */
--} LED_IN;
--
--enum flite_mode {
-- FLITE_MODE1 = 1,
-- FLITE_AUTO_MODE = 1, /* for reference only */
-- FLITE_MANUAL_MODE = 2, /* Use this normally? */
-- FLITE_GET_LIGHT_SENSOR = 3 /* Returns light reading in "brightness" field */
--};
--enum flite_pwr {
-- FLITE_PWR_OFF = 0,
-- FLITE_PWR_ON = 1
--};
--
--typedef struct h3600_ts_flite {
-- unsigned char mode;
-- unsigned char pwr;
-- unsigned char brightness;
--} FLITE_IN;
--
--/*************************** Updated "universal" structures *******************/
--
--/* Sets backlight for both H3100 and H3600 models - technically "frontlight" for H3600 */
--struct h3600_ts_backlight {
-- enum flite_pwr power; /* 0 = off, 1 = on */
-- unsigned char brightness; /* 0 - 255 */
--};
--
--struct h3600_ts_contrast { /* Only useful on H3100 model */
-- unsigned char contrast; /* 0 - 255 */
--};
--
--/* IOCTL cmds user or kernel space */
--
--/* Use 'f' as magic number */
--#define IOC_H3600_TS_MAGIC 'f'
--
--/* TODO: Some of these IOWR values are just plain wrong */
--#define GET_VERSION _IOR(IOC_H3600_TS_MAGIC, 1, struct h3600_ts_version )
--#define READ_EEPROM _IOWR(IOC_H3600_TS_MAGIC, 2, struct h3600_eeprom_read_request)
--#define WRITE_EEPROM _IOWR(IOC_H3600_TS_MAGIC, 3, struct h3600_eeprom_write_request)
--#define GET_THERMAL _IOR(IOC_H3600_TS_MAGIC, 4, struct therm_dev)
--#define LED_ON _IOW(IOC_H3600_TS_MAGIC, 5, struct h3600_ts_led)
--#define GET_BATTERY_STATUS _IOR(IOC_H3600_TS_MAGIC, 6, struct h3600_battery)
--#define FLITE_ON _IOW(IOC_H3600_TS_MAGIC, 7, struct h3600_ts_flite)
--#define READ_SPI _IOWR(IOC_H3600_TS_MAGIC, 8, struct h3600_spi_read_request)
--#define WRITE_SPI _IOWR(IOC_H3600_TS_MAGIC, 9, struct h3600_spi_write_request)
--#define TS_GET_CAL _IOR(IOC_H3600_TS_MAGIC, 10, struct h3600_ts_calibration)
--#define TS_SET_CAL _IOW(IOC_H3600_TS_MAGIC, 11, struct h3600_ts_calibration)
--
--/* New IOCTL interfaces - defined to be more user friendly */
--#define TS_GET_BACKLIGHT _IOR(IOC_H3600_TS_MAGIC, 20, struct h3600_ts_backlight)
--#define TS_SET_BACKLIGHT _IOW(IOC_H3600_TS_MAGIC, 20, struct h3600_ts_backlight)
--#define TS_GET_CONTRAST _IOR(IOC_H3600_TS_MAGIC, 21, struct h3600_ts_contrast)
--#define TS_SET_CONTRAST _IOW(IOC_H3600_TS_MAGIC, 21, struct h3600_ts_contrast)
--
--#endif
-Index: xtscal-0.6.3/Makefile.am
-===================================================================
---- xtscal-0.6.3.orig/Makefile.am 2004-06-02 23:07:13.000000000 +0100
-+++ xtscal-0.6.3/Makefile.am 2007-07-02 12:51:02.000000000 +0100
-@@ -1,11 +1,8 @@
--libexec_PROGRAMS = xtscal.bin
--bin_SCRIPTS = xtscal
-+bin_PROGRAMS = xtscal
-
--xtscal_bin_SOURCES = main.c calibrate.c calibrate.h h3600_ts.h
-+xtscal_SOURCES = main.c calibrate.c calibrate.h
-
--xtscal_bin_LDADD = @XTSCAL_LIBS@
-+xtscal_LDADD = @XTSCAL_LIBS@
-
- INCLUDES = @XTSCAL_CFLAGS@ -DNR_POINTS=5
-
--include gpe-dist.am
--
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/dso_linking_change_build_fix.patch b/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/dso_linking_change_build_fix.patch
deleted file mode 100644
index 3e4533f78..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal/dso_linking_change_build_fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-after gcc linking has changed, all the libraries must be explicitely specified
-This patch avoids this linking error:
-
-| ccache i586-poky-linux-gcc -march=i586 --sysroot=/disk0/pokybuild/build1/tmp/sysroots/i586-poky-linux -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o xtscal main.o calibrate.o -lX11 -lXft -lXext -lXcalibrate^M
-| /disk0/pokybuild/build1/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: ^?: invalid DSO for symbol `XRenderChangePicture' definition^M
-| /disk0/pokybuild/build1/tmp/sysroots/i586-poky-linux/usr/lib/libXrender.so.1: could not read symbols: Bad value^M
-| collect2: ld returned 1 exit status^M
-| make: *** [xtscal] Error 1
-
-Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: 2011/01/11
-
-Upstream-Status: Pending
-
-Index: xtscal-0.6.3/configure.ac
-===================================================================
---- xtscal-0.6.3.orig/configure.ac
-+++ xtscal-0.6.3/configure.ac
-@@ -9,7 +9,7 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
- # Checks for programs.
- AC_PROG_CC
-
--PKG_CHECK_MODULES(XTSCAL, x11 xft xext xcalibrate)
-+PKG_CHECK_MODULES(XTSCAL, x11 xft xext xcalibrate xrender)
-
- AC_CONFIG_FILES([Makefile])
- AC_OUTPUT
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal_0.6.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal_0.6.3.bb
deleted file mode 100644
index 4bfddf06b..000000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xtscal/xtscal_0.6.3.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Touchscreen calibration utility"
-
-DESCRIPTION = "Basic touchscreen calibration utility"
-
-HOMEPAGE = "http://gpe.linuxtogo.org"
-BUGTRACKER = "http://bugs.linuxtogo.org"
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://main.c;endline=10;md5=8721bcb08ae9f24e5fe4c82941873c87"
-
-SECTION = "x11/base"
-
-DEPENDS = "virtual/libx11 libxft libxcalibrate"
-
-PR = "r13"
-
-SRC_URI = "${GPE_MIRROR}/xtscal-${PV}.tar.bz2 \
- file://change-cross.patch \
- file://cleanup.patch \
- file://dso_linking_change_build_fix.patch \
- file://30xTs_Calibrate.sh"
-
-SRC_URI[md5sum] = "9bcab80b474d5454477d1ca166a68c34"
-SRC_URI[sha256sum] = "27b9dc2203de9b1706ca39fa6ca80ecab8807909ec901c4a345b8e41178800a1"
-
-inherit autotools pkgconfig distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/X11/Xsession.d/
- install -m 0755 ${WORKDIR}/30xTs_Calibrate.sh ${D}${sysconfdir}/X11/Xsession.d/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
index ade7ef9ce..160ab3084 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
@@ -3,7 +3,9 @@ HOMEPAGE = "http://cryptodev-linux.org/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz"
+SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz \
+ file://06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch \
+ file://cb186f682679383e8b5806240927903730ce85d9.patch"
SRC_URI[md5sum] = "02644cc4cd02301e0b503a332eb2f0b5"
SRC_URI[sha256sum] = "67fabde9fb67b286a96c4f45b594b0eccd0f761b495705c18f2ae9461b831376"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch
new file mode 100644
index 000000000..cb556e1e2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch
@@ -0,0 +1,54 @@
+From f14b4706b0d04988e7e5bc8c4d2aefef9f029d9d Mon Sep 17 00:00:00 2001
+From: Michael Weiser <michael.weiser@gmx.de>
+Date: Fri, 5 Aug 2016 18:43:55 +0200
+Subject: [PATCH] Adjust to recent user page API changes
+
+4.6.0 basically renamed get_user_pages() to get_user_pages_remote() and
+introduced a new get_user_pages() that always works on the current
+task.[1] Distinguish the two APIs based on kernel version we're
+compiling for.
+
+Also, there seems to have been a massive cleansing of
+page_cache_release(page) in favour of put_page(page)[2] which was an
+alias for put_page(page)[3] since 2.6.0. Before that beginning with
+2.4.0 both page_cache_release(page) and put_page(page) have been aliases
+for __free_page(page). So using put_page() instead of
+page_cache_release(page) will produce identical code for anything after
+2.4.0.
+
+[1] https://lkml.org/lkml/2016/2/10/555
+[2] https://www.spinics.net/lists/linux-fsdevel/msg95923.html
+[3] https://www.spinics.net/lists/linux-fsdevel/msg95922.html
+---
+ zc.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+Upstream-Status: Backport [from master for 4.8 kernels]
+
+Index: cryptodev-linux-1.8/zc.c
+===================================================================
+--- cryptodev-linux-1.8.orig/zc.c
++++ cryptodev-linux-1.8/zc.c
+@@ -59,7 +59,12 @@ int __get_userbuf(uint8_t __user *addr,
+ }
+
+ down_read(&mm->mmap_sem);
+- ret = get_user_pages(task, mm,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0))
++ ret = get_user_pages_remote(
++#else
++ ret = get_user_pages(
++#endif
++ task, mm,
+ (unsigned long)addr, pgcount, write, 0, pg, NULL);
+ up_read(&mm->mmap_sem);
+ if (ret != pgcount)
+@@ -119,7 +124,7 @@ void release_user_pages(struct csession
+ else
+ ses->readonly_pages--;
+
+- page_cache_release(ses->pages[i]);
++ put_page(ses->pages[i]);
+ }
+ ses->used_pages = 0;
+ }
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/cb186f682679383e8b5806240927903730ce85d9.patch b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/cb186f682679383e8b5806240927903730ce85d9.patch
new file mode 100644
index 000000000..eb0eab63b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/cryptodev/files/cb186f682679383e8b5806240927903730ce85d9.patch
@@ -0,0 +1,279 @@
+From cb186f682679383e8b5806240927903730ce85d9 Mon Sep 17 00:00:00 2001
+From: Michael Weiser <michael.weiser@gmx.de>
+Date: Fri, 5 Aug 2016 17:26:27 +0200
+Subject: [PATCH] Support skcipher in addition to ablkcipher API
+
+The ablkcipher API is being phased out[1]. The unified skcipher API
+seems to have made its entry with 4.3.[3, 4] By what can be seen from
+migration patches[1.ff.], it's a drop-in replacement.
+
+Also, deallocators such as crypto_free_skcipher() are NULL-safe now[2].
+
+Add a new header cipherapi.h to aid migration from ablkcipher to skcipher and
+retain support for old kernels. Make it decide which API to use and provide
+appropriate function calls and type definitions. Since the ablkcipher and
+skcipher APIs are so similar, those are mainly defines for corresponding
+pseudo-functions in namespace cryptodev_ derived directly from their API
+counterparts.
+
+Compiles and works (i.e. checks pass) with Debian testing 4.6.4 kernel
+as well as 4.8-rc2+ Linus git tree as of today. (Both require a fix for
+changed page access API[5].)
+
+[1] https://www.spinics.net/lists/linux-crypto/msg18133.html
+[2] https://www.spinics.net/lists/linux-crypto/msg18154.html, line 120
+[3] https://www.spinics.net/lists/linux-crypto/msg16373.html
+[4] https://www.spinics.net/lists/linux-crypto/msg16294.html
+[5] https://github.com/cryptodev-linux/cryptodev-linux/pull/14
+---
+ cipherapi.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ cryptlib.c | 40 ++++++++++++++++++----------------------
+ cryptlib.h | 6 ++++--
+ ioctl.c | 4 ++--
+ 4 files changed, 84 insertions(+), 26 deletions(-)
+ create mode 100644 cipherapi.h
+
+Upstream-Status: Backport [from master for 4.8 kernels]
+
+Index: cryptodev-linux-1.8/cipherapi.h
+===================================================================
+--- /dev/null
++++ cryptodev-linux-1.8/cipherapi.h
+@@ -0,0 +1,60 @@
++#ifndef CIPHERAPI_H
++# define CIPHERAPI_H
++
++#include <linux/version.h>
++
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0))
++# include <linux/crypto.h>
++
++typedef struct ablkcipher_alg cryptodev_blkcipher_alg_t;
++typedef struct crypto_ablkcipher cryptodev_crypto_blkcipher_t;
++typedef struct ablkcipher_request cryptodev_blkcipher_request_t;
++
++# define cryptodev_crypto_alloc_blkcipher crypto_alloc_ablkcipher
++# define cryptodev_crypto_blkcipher_alg crypto_ablkcipher_alg
++# define cryptodev_crypto_blkcipher_blocksize crypto_ablkcipher_blocksize
++# define cryptodev_crypto_blkcipher_ivsize crypto_ablkcipher_ivsize
++# define cryptodev_crypto_blkcipher_alignmask crypto_ablkcipher_alignmask
++# define cryptodev_crypto_blkcipher_setkey crypto_ablkcipher_setkey
++
++static inline void cryptodev_crypto_free_blkcipher(cryptodev_crypto_blkcipher_t *c) {
++ if (c)
++ crypto_free_ablkcipher(c);
++}
++
++# define cryptodev_blkcipher_request_alloc ablkcipher_request_alloc
++# define cryptodev_blkcipher_request_set_callback ablkcipher_request_set_callback
++
++static inline void cryptodev_blkcipher_request_free(cryptodev_blkcipher_request_t *r) {
++ if (r)
++ ablkcipher_request_free(r);
++}
++
++# define cryptodev_blkcipher_request_set_crypt ablkcipher_request_set_crypt
++# define cryptodev_crypto_blkcipher_encrypt crypto_ablkcipher_encrypt
++# define cryptodev_crypto_blkcipher_decrypt crypto_ablkcipher_decrypt
++# define cryptodev_crypto_blkcipher_tfm crypto_ablkcipher_tfm
++#else
++#include <crypto/skcipher.h>
++
++typedef struct skcipher_alg cryptodev_blkcipher_alg_t;
++typedef struct crypto_skcipher cryptodev_crypto_blkcipher_t;
++typedef struct skcipher_request cryptodev_blkcipher_request_t;
++
++# define cryptodev_crypto_alloc_blkcipher crypto_alloc_skcipher
++# define cryptodev_crypto_blkcipher_alg crypto_skcipher_alg
++# define cryptodev_crypto_blkcipher_blocksize crypto_skcipher_blocksize
++# define cryptodev_crypto_blkcipher_ivsize crypto_skcipher_ivsize
++# define cryptodev_crypto_blkcipher_alignmask crypto_skcipher_alignmask
++# define cryptodev_crypto_blkcipher_setkey crypto_skcipher_setkey
++# define cryptodev_crypto_free_blkcipher crypto_free_skcipher
++# define cryptodev_blkcipher_request_alloc skcipher_request_alloc
++# define cryptodev_blkcipher_request_set_callback skcipher_request_set_callback
++# define cryptodev_blkcipher_request_free skcipher_request_free
++# define cryptodev_blkcipher_request_set_crypt skcipher_request_set_crypt
++# define cryptodev_crypto_blkcipher_encrypt crypto_skcipher_encrypt
++# define cryptodev_crypto_blkcipher_decrypt crypto_skcipher_decrypt
++# define cryptodev_crypto_blkcipher_tfm crypto_skcipher_tfm
++#endif
++
++#endif
+Index: cryptodev-linux-1.8/cryptlib.c
+===================================================================
+--- cryptodev-linux-1.8.orig/cryptlib.c
++++ cryptodev-linux-1.8/cryptlib.c
+@@ -23,7 +23,6 @@
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+-#include <linux/crypto.h>
+ #include <linux/mm.h>
+ #include <linux/highmem.h>
+ #include <linux/ioctl.h>
+@@ -37,6 +36,7 @@
+ #include <linux/rtnetlink.h>
+ #include <crypto/authenc.h>
+ #include "cryptodev_int.h"
++#include "cipherapi.h"
+
+
+ struct cryptodev_result {
+@@ -133,15 +133,15 @@ int cryptodev_cipher_init(struct cipher_
+ int ret;
+
+ if (aead == 0) {
+- struct ablkcipher_alg *alg;
++ cryptodev_blkcipher_alg_t *alg;
+
+- out->async.s = crypto_alloc_ablkcipher(alg_name, 0, 0);
++ out->async.s = cryptodev_crypto_alloc_blkcipher(alg_name, 0, 0);
+ if (unlikely(IS_ERR(out->async.s))) {
+ ddebug(1, "Failed to load cipher %s", alg_name);
+ return -EINVAL;
+ }
+
+- alg = crypto_ablkcipher_alg(out->async.s);
++ alg = cryptodev_crypto_blkcipher_alg(out->async.s);
+ if (alg != NULL) {
+ /* Was correct key length supplied? */
+ if (alg->max_keysize > 0 &&
+@@ -154,11 +154,11 @@ int cryptodev_cipher_init(struct cipher_
+ }
+ }
+
+- out->blocksize = crypto_ablkcipher_blocksize(out->async.s);
+- out->ivsize = crypto_ablkcipher_ivsize(out->async.s);
+- out->alignmask = crypto_ablkcipher_alignmask(out->async.s);
++ out->blocksize = cryptodev_crypto_blkcipher_blocksize(out->async.s);
++ out->ivsize = cryptodev_crypto_blkcipher_ivsize(out->async.s);
++ out->alignmask = cryptodev_crypto_blkcipher_alignmask(out->async.s);
+
+- ret = crypto_ablkcipher_setkey(out->async.s, keyp, keylen);
++ ret = cryptodev_crypto_blkcipher_setkey(out->async.s, keyp, keylen);
+ } else {
+ out->async.as = crypto_alloc_aead(alg_name, 0, 0);
+ if (unlikely(IS_ERR(out->async.as))) {
+@@ -191,14 +191,14 @@ int cryptodev_cipher_init(struct cipher_
+ init_completion(&out->async.result->completion);
+
+ if (aead == 0) {
+- out->async.request = ablkcipher_request_alloc(out->async.s, GFP_KERNEL);
++ out->async.request = cryptodev_blkcipher_request_alloc(out->async.s, GFP_KERNEL);
+ if (unlikely(!out->async.request)) {
+ derr(1, "error allocating async crypto request");
+ ret = -ENOMEM;
+ goto error;
+ }
+
+- ablkcipher_request_set_callback(out->async.request,
++ cryptodev_blkcipher_request_set_callback(out->async.request,
+ CRYPTO_TFM_REQ_MAY_BACKLOG,
+ cryptodev_complete, out->async.result);
+ } else {
+@@ -218,10 +218,8 @@ int cryptodev_cipher_init(struct cipher_
+ return 0;
+ error:
+ if (aead == 0) {
+- if (out->async.request)
+- ablkcipher_request_free(out->async.request);
+- if (out->async.s)
+- crypto_free_ablkcipher(out->async.s);
++ cryptodev_blkcipher_request_free(out->async.request);
++ cryptodev_crypto_free_blkcipher(out->async.s);
+ } else {
+ if (out->async.arequest)
+ aead_request_free(out->async.arequest);
+@@ -237,10 +235,8 @@ void cryptodev_cipher_deinit(struct ciph
+ {
+ if (cdata->init) {
+ if (cdata->aead == 0) {
+- if (cdata->async.request)
+- ablkcipher_request_free(cdata->async.request);
+- if (cdata->async.s)
+- crypto_free_ablkcipher(cdata->async.s);
++ cryptodev_blkcipher_request_free(cdata->async.request);
++ cryptodev_crypto_free_blkcipher(cdata->async.s);
+ } else {
+ if (cdata->async.arequest)
+ aead_request_free(cdata->async.arequest);
+@@ -289,10 +285,10 @@ ssize_t cryptodev_cipher_encrypt(struct
+ reinit_completion(&cdata->async.result->completion);
+
+ if (cdata->aead == 0) {
+- ablkcipher_request_set_crypt(cdata->async.request,
++ cryptodev_blkcipher_request_set_crypt(cdata->async.request,
+ (struct scatterlist *)src, dst,
+ len, cdata->async.iv);
+- ret = crypto_ablkcipher_encrypt(cdata->async.request);
++ ret = cryptodev_crypto_blkcipher_encrypt(cdata->async.request);
+ } else {
+ aead_request_set_crypt(cdata->async.arequest,
+ (struct scatterlist *)src, dst,
+@@ -311,10 +307,10 @@ ssize_t cryptodev_cipher_decrypt(struct
+
+ reinit_completion(&cdata->async.result->completion);
+ if (cdata->aead == 0) {
+- ablkcipher_request_set_crypt(cdata->async.request,
++ cryptodev_blkcipher_request_set_crypt(cdata->async.request,
+ (struct scatterlist *)src, dst,
+ len, cdata->async.iv);
+- ret = crypto_ablkcipher_decrypt(cdata->async.request);
++ ret = cryptodev_crypto_blkcipher_decrypt(cdata->async.request);
+ } else {
+ aead_request_set_crypt(cdata->async.arequest,
+ (struct scatterlist *)src, dst,
+Index: cryptodev-linux-1.8/cryptlib.h
+===================================================================
+--- cryptodev-linux-1.8.orig/cryptlib.h
++++ cryptodev-linux-1.8/cryptlib.h
+@@ -3,6 +3,8 @@
+
+ #include <linux/version.h>
+
++#include "cipherapi.h"
++
+ struct cipher_data {
+ int init; /* 0 uninitialized */
+ int blocksize;
+@@ -12,8 +14,8 @@ struct cipher_data {
+ int alignmask;
+ struct {
+ /* block ciphers */
+- struct crypto_ablkcipher *s;
+- struct ablkcipher_request *request;
++ cryptodev_crypto_blkcipher_t *s;
++ cryptodev_blkcipher_request_t *request;
+
+ /* AEAD ciphers */
+ struct crypto_aead *as;
+Index: cryptodev-linux-1.8/ioctl.c
+===================================================================
+--- cryptodev-linux-1.8.orig/ioctl.c
++++ cryptodev-linux-1.8/ioctl.c
+@@ -34,7 +34,6 @@
+ */
+
+ #include <crypto/hash.h>
+-#include <linux/crypto.h>
+ #include <linux/mm.h>
+ #include <linux/highmem.h>
+ #include <linux/ioctl.h>
+@@ -53,6 +52,7 @@
+ #include "cryptodev_int.h"
+ #include "zc.h"
+ #include "version.h"
++#include "cipherapi.h"
+
+ MODULE_AUTHOR("Nikos Mavrogiannopoulos <nmav@gnutls.org>");
+ MODULE_DESCRIPTION("CryptoDev driver");
+@@ -765,7 +765,7 @@ static int get_session_info(struct fcryp
+
+ if (ses_ptr->cdata.init) {
+ if (ses_ptr->cdata.aead == 0)
+- tfm = crypto_ablkcipher_tfm(ses_ptr->cdata.async.s);
++ tfm = cryptodev_crypto_blkcipher_tfm(ses_ptr->cdata.async.s);
+ else
+ tfm = crypto_aead_tfm(ses_ptr->cdata.async.as);
+ tfm_info_to_alg_info(&siop->cipher_info, tfm);
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 445d03a87..d8041ddd3 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -1,10 +1,10 @@
SUMMARY = "Tools for managing Yocto Project style branched kernels"
LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=d8d1d729a70cd5f52972f8884b80743d"
+LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1bda400e2828845ba0d06c"
DEPENDS = "git-native"
-SRCREV = "17d89d1861b532bbf1a81c1f024953e440db8de7"
+SRCREV = "9a3995ee8daabf37e92e1b51b133cf8582d85809"
PR = "r12"
PV = "0.2+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
index 758a3a78b..bdfe024a7 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
@@ -22,6 +22,10 @@ COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|powerpc.*|mips.*)-(linux|fre
INSANE_SKIP_${PN} = "arch"
do_compile_prepend() {
+ # Remove the prepackaged config.h from the source tree as it overrides
+ # the same file generated by configure and placed in the build tree
+ rm -f ${S}/include/config.h
+
# Remove the '*.d' file to make sure the recompile is OK
for dep in `find ${B} -type f -name '*.d'`; do
dep_no_d="`echo $dep | sed 's#.d$##'`"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump
index 3fb133fb3..2347205ed 100755
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump
@@ -8,23 +8,7 @@
#
#default
-KDUMP_KVER="`uname -r`"
-KDUMP_KIMAGE="/boot/bzImage-${KDUMP_KVER}"
-KDUMP_CMDLINE="`cat /proc/cmdline`"
-KDUMP_CMDLINE_APPEND="kdump_needed maxcpus=1 irqpoll reset_devices"
-KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`"
-
-#get right kernel image
-march="`uname -m`"
-case ${march} in
- x86*|i?86)
- ;;
- *)
- KDUMP_KIMAGE="/boot/uImage-${KDUMP_KVER}"
- ;;
-esac
-
-KEXEC=usr/sbin/kexec
+KEXEC=/usr/sbin/kexec
KEXEC_ARGS="-p"
MAKEDUMPFILE=/usr/bin/makedumpfile
@@ -34,6 +18,9 @@ LOGGER="logger -p info -t kdump"
if [ -f /etc/sysconfig/kdump.conf ]; then
. /etc/sysconfig/kdump.conf
+else
+ echo "no /etc/sysconfig/kdump.conf"
+ exit 1;
fi
do_check()
@@ -41,24 +28,33 @@ do_check()
#check makedumpfile
if [ ! -e ${MAKEDUMPFILE} -o ! -x ${MAKEDUMPFILE} ] ;then
echo "No makedumpfile found."
- return 1;
+ exit 0
fi
#check kexec
if [ ! -e ${KEXEC} -o ! -x ${KEXEC} ] ;then
echo "No kexec found."
- return 1;
+ exit 0
fi
#check whether kdump kernel image exists on the system
- if [ ! -f ${KDUMP_KIMAGE} ]; then
+ if [ -z "${KDUMP_KIMAGE}" -o ! -f "${KDUMP_KIMAGE}" ]; then
echo "No kdump kernel image found."
- return 1
+ exit 0
+ fi
+
+ if [ "${KDUMP_CMDLINE}"x = "x" ] ; then
+ echo "KDUMP_CMDLINE is not configured"
+ exit 0
fi
}
do_save_vmcore()
{
+ if [ ${KDUMP_VMCORE_PATH}x = x ]; then
+ KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`"
+ fi
+
mkdir -p ${KDUMP_VMCORE_PATH}
echo "Saving a vmcore to ${KDUMP_VMCORE_PATH}."
@@ -101,20 +97,6 @@ do_start()
return 1
fi
- #handle kdump cmdline parameters, remove some useless options
- kcmdline=""
- for x in `cat /proc/cmdline`; do
- case $x in
- crashkernel*)
- ;;
- *)
- kcmdline="${kcmdline} $x"
- ;;
- esac
- done
-
- KDUMP_CMDLINE="${kcmdline} ${KDUMP_CMDLINE_APPEND}"
-
#Load the kdump kernel image
${KEXEC} ${KEXEC_ARGS} "${KDUMP_KIMAGE}" --append="${KDUMP_CMDLINE}"
if [ $? != 0 ]; then
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump.conf b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump.conf
index 42a2435b9..38190d207 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump.conf
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump.conf
@@ -1,13 +1,9 @@
#the kdump kernel version string.
#KDUMP_KVER="`uname -r`"
-#this will be passed to the kdump kernel as kdump kernel command line, it
-#usually comes from /proc/cmdline
+#this will be passed to the kdump kernel as kdump kernel command line
#KDUMP_CMDLINE="`cat /proc/cmdline`"
-# append arguments to the kdump commandline
-#KDUMP_CMDLINE_APPEND="kdump_needed maxcpus=1 irqpoll reset_devices"
-
#the kernel image for kdump
#KDUMP_KIMAGE="/boot/bzImage-${KDUMP_KVER}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch
deleted file mode 100644
index e198eb6e9..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kexec-tools-Refine-kdump-device_tree-sort.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-kexec-tools: Refine kdump device_tree sort
-
-The commit b02d735bf was to rearrange the device-tree entries, and
-assumed that these entries are sorted in the ascending order. but
-acctually when I was validating kexec and kdump, the order of
-serial node still is changed. So the patch is to sort these entries
-by the directory name in ascending order.
-
-Upstream-Status: Pending
-
-Signed-off-by: Yang Wei <Wei.Yang@windriver.com>
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- kexec/arch/ppc/fs2dt.c | 13 ++++++++++---
- kexec/fs2dt.c | 13 ++++++++++---
- 2 files changed, 20 insertions(+), 6 deletions(-)
-
-Index: kexec-tools-2.0.10/kexec/arch/ppc/fs2dt.c
-===================================================================
---- kexec-tools-2.0.10.orig/kexec/arch/ppc/fs2dt.c
-+++ kexec-tools-2.0.10/kexec/arch/ppc/fs2dt.c
-@@ -296,6 +296,9 @@ static int comparefunc(const void *dentr
- {
- char *str1 = (*(struct dirent **)dentry1)->d_name;
- char *str2 = (*(struct dirent **)dentry2)->d_name;
-+ char* ptr1 = strchr(str1, '@');
-+ char* ptr2 = strchr(str2, '@');
-+ int len1, len2;
-
- /*
- * strcmp scans from left to right and fails to idetify for some
-@@ -303,9 +306,13 @@ static int comparefunc(const void *dentr
- * Therefore, we get the wrong sorted order like memory@10000000 and
- * memory@f000000.
- */
-- if (strchr(str1, '@') && strchr(str2, '@') &&
-- (strlen(str1) > strlen(str2)))
-- return 1;
-+ if (ptr1 && ptr2) {
-+ len1 = ptr1 - str1;
-+ len2 = ptr2 - str2;
-+ if (!strncmp(str1, str2, len1 >len2 ? len1: len2) &&
-+ (strlen(str1) > strlen(str2)))
-+ return 1;
-+ }
-
- return strcmp(str1, str2);
- }
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb
deleted file mode 100644
index c1c97af9e..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-require kexec-tools.inc
-export LDFLAGS = "-L${STAGING_LIBDIR}"
-EXTRA_OECONF = " --with-zlib=yes"
-
-SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch \
- file://kexec-aarch64.patch \
- file://kexec-x32.patch \
- file://0002-powerpc-change-the-memory-size-limit.patch \
- file://0001-purgatory-Pass-r-directly-to-linker.patch \
- file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
- "
-
-SRC_URI[md5sum] = "86de066859f289048f1b286af6f03f78"
-SRC_URI[sha256sum] = "84f652ebf1de3f7b9de757a50cdbf6d5639d88c1d5b5ef9f525edde5ef9590c2"
-
-PACKAGES =+ "kexec kdump vmcore-dmesg"
-
-ALLOW_EMPTY_${PN} = "1"
-RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
-
-FILES_kexec = "${sbindir}/kexec"
-FILES_kdump = "${sbindir}/kdump ${sysconfdir}/init.d/kdump \
- ${sysconfdir}/sysconfig/kdump.conf"
-FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
-
-inherit update-rc.d
-
-INITSCRIPT_PACKAGES = "kdump"
-INITSCRIPT_NAME_kdump = "kdump"
-INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
-
-do_install_append () {
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
- install -d ${D}${sysconfdir}/sysconfig
- install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
new file mode 100644
index 000000000..59376c804
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.12.bb
@@ -0,0 +1,37 @@
+require kexec-tools.inc
+export LDFLAGS = "-L${STAGING_LIBDIR}"
+EXTRA_OECONF = " --with-zlib=yes"
+
+SRC_URI += " \
+ file://kexec-aarch64.patch \
+ file://kexec-x32.patch \
+ file://0002-powerpc-change-the-memory-size-limit.patch \
+ file://0001-purgatory-Pass-r-directly-to-linker.patch \
+ file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
+ "
+
+SRC_URI[md5sum] = "10ddaae0e86af54407b164a1f5a39cc3"
+SRC_URI[sha256sum] = "cc7b60dad0da202004048a6179d8a53606943062dd627a2edba45a8ea3a85135"
+
+PACKAGES =+ "kexec kdump vmcore-dmesg"
+
+ALLOW_EMPTY_${PN} = "1"
+RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
+
+FILES_kexec = "${sbindir}/kexec"
+FILES_kdump = "${sbindir}/kdump ${sysconfdir}/init.d/kdump \
+ ${sysconfdir}/sysconfig/kdump.conf"
+FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
+
+inherit update-rc.d
+
+INITSCRIPT_PACKAGES = "kdump"
+INITSCRIPT_NAME_kdump = "kdump"
+INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
+
+do_install_append () {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
+ install -d ${D}${sysconfdir}/sysconfig
+ install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
+}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index c2c258910..5c7dd52f5 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -41,10 +41,6 @@ EOF
chmod +x ${D}${bindir_crossscripts}/depmodwrapper
}
-SYSROOT_PREPROCESS_FUNCS += "depmodwrapper_sysroot_preprocess"
-
-depmodwrapper_sysroot_preprocess () {
- sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
-}
+SYSROOT_DIRS += "${bindir_crossscripts}"
inherit nopackages
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
index 0bcdcf673..166b3f02f 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
@@ -9,16 +9,14 @@ LICENSE = "GPL-2.0+ & LGPL-2.1+"
LICENSE_libkmod = "LGPL-2.1+"
SECTION = "base"
-DEPENDS += "pkgconfig-native"
-
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
"
-inherit autotools gtk-doc
+inherit autotools gtk-doc pkgconfig
-SRCREV = "42f32b8ae45ad8e3a1da29c9b20af9b5e2e9e676"
+SRCREV = "65a885df5f6f15222b44fd695c5eaca17e837a14"
# Lookout for PV bump too when SRCREV is changed
-PV = "22+git${SRCPV}"
+PV = "23+git${SRCPV}"
SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
file://depmod-search.conf \
@@ -35,7 +33,7 @@ PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
PACKAGECONFIG[logging] = " --enable-logging,--disable-logging"
do_configure_prepend () {
- gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make
+ gtkdocize --docdir ${S}/libkmod/docs --srcdir ${S}
}
do_configure_append () {
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
new file mode 100644
index 000000000..25d47ef12
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
@@ -0,0 +1,38 @@
+Upstream-Status: Pending
+
+Fix compile error:
+
+| syst_count.c:346:3: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
+| for(c=cmin ; c < cmax; c++)
+| ^~~
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/perf_examples/syst_count.c b/perf_examples/syst_count.c
+index 0d53078..2dfb9b9 100644
+--- a/perf_examples/syst_count.c
++++ b/perf_examples/syst_count.c
+@@ -343,8 +343,9 @@ measure(void)
+
+ for (delay = 1 ; delay <= options.delay; delay++) {
+
+- for(c=cmin ; c < cmax; c++)
+- start_cpu(c);
++ for(c=cmin ; c < cmax; c++) {
++ start_cpu(c);
++ }
+
+ if (0) {
+ tv.tv_sec = 0;
+@@ -353,8 +354,9 @@ measure(void)
+ } else
+ sleep(1);
+
+- for(c=cmin ; c < cmax; c++)
+- stop_cpu(c);
++ for(c=cmin ; c < cmax; c++) {
++ stop_cpu(c);
++ }
+
+ for(c = cmin; c < cmax; c++) {
+ printf("# %'ds -----\n", delay);
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
index 0b024ad61..4136eac81 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
@@ -14,6 +14,7 @@ COMPATIBLE_HOST = "powerpc64"
SRC_URI = "http://downloads.sourceforge.net/project/perfmon2/${BPN}/libpfm-${PV}.tar.gz \
file://0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch \
+ file://fix-misleading-indentation-error.patch \
"
SRC_URI[md5sum] = "5077b9022440e4951d96f2d0e73bd487"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index a4e64d549..8e68ae823 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -55,13 +55,14 @@ LICENSE = "\
& Firmware-xc4000 \
& Firmware-xc5000 \
& Firmware-xc5000c \
+ & WHENCE \
"
LIC_FILES_CHKSUM = "\
file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \
file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
- file://LICENSE.amdgpu;md5=a8592c24c2672062e03c7392fc7fe3bc \
+ file://LICENSE.amdgpu;md5=3fe8a3430700a518990c3b3d75297209 \
file://LICENSE.amd-ucode;md5=3a0de451253cc1edbf30a3c621effee3 \
file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
file://LICENSE.atmel;md5=aa74ac0c60595dee4d4e239107ea77a3 \
@@ -97,7 +98,7 @@ LIC_FILES_CHKSUM = "\
file://LICENSE.QualcommAtheros_ar3k;md5=b5fe244fb2b532311de1472a3bc06da5 \
file://LICENSE.QualcommAtheros_ath10k;md5=b5fe244fb2b532311de1472a3bc06da5 \
file://LICENCE.r8a779x_usb3;md5=4c1671656153025d7076105a5da7e498 \
- file://LICENSE.radeon;md5=6c7f97c6c62bdd9596d0238bb205118c \
+ file://LICENSE.radeon;md5=69612f4f7b141a97659cb1d609a1bde2 \
file://LICENCE.ralink_a_mediatek_company_firmware;md5=728f1a85fd53fd67fa8d7afb080bc435 \
file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \
file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \
@@ -111,6 +112,7 @@ LIC_FILES_CHKSUM = "\
file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
+ file://WHENCE;md5=f514a0c53c5d73c2fe98d5861103f0c6 \
"
# These are not common licenses, set NO_GENERIC_LICENSE for them
@@ -168,13 +170,20 @@ NO_GENERIC_LICENSE[Firmware-wl1251] = "LICENCE.wl1251"
NO_GENERIC_LICENSE[Firmware-xc4000] = "LICENCE.xc4000"
NO_GENERIC_LICENSE[Firmware-xc5000] = "LICENCE.xc5000"
NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c"
+NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
-SRCREV = "5f8ca0c1db6106a2d6d7e85eee778917ff03c3de"
+SRCREV = "42ad5367dd38371b2a1bb263b6efa85f9b92fc93"
PE = "1"
PV = "0.0+git${SRCPV}"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
+# Some devices need a specific version, not the latest
+SRC_URI += "https://git.kernel.org/cgit/linux/kernel/git/iwlwifi/linux-firmware.git/plain/iwlwifi-8000C-19.ucode;name=iwlwifi-19"
+
+SRC_URI[iwlwifi-19.md5sum] = "132fbaee36beec5e98714f0bd66f7a1d"
+SRC_URI[iwlwifi-19.sha256sum] = "2034470df64d323b827c4f2d4d0d55be2846b7360179b5574aa28ff77b6c9471"
+
S = "${WORKDIR}/git"
inherit allarch update-alternatives
@@ -204,6 +213,9 @@ do_install() {
# fixup wl12xx location, after 2.6.37 the kernel searches a different location for it
( cd ${D}/lib/firmware ; ln -sf ti-connectivity/* . )
+
+ # Copy the iwlwifi ucode
+ cp ${WORKDIR}/iwlwifi-8000C-19.ucode ${D}/lib/firmware/
}
@@ -213,11 +225,12 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
${PN}-ti-connectivity-license ${PN}-wl12xx ${PN}-wl18xx \
${PN}-vt6656-license ${PN}-vt6656 \
${PN}-rtl-license ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su \
- ${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 ${PN}-bcm43340 ${PN}-bcm4339 ${PN}-bcm4354 \
- ${PN}-atheros-license ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k \
+ ${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 ${PN}-bcm43340 ${PN}-bcm4339 ${PN}-bcm43430 ${PN}-bcm4354 \
+ ${PN}-atheros-license ${PN}-ar9170 ${PN}-carl9170 ${PN}-ath6k ${PN}-ath9k \
${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k \
\
- ${PN}-iwlwifi-license ${PN}-iwlwifi-135-6 \
+ ${PN}-iwlwifi-license ${PN}-iwlwifi \
+ ${PN}-iwlwifi-135-6 \
${PN}-iwlwifi-3160-7 ${PN}-iwlwifi-3160-8 ${PN}-iwlwifi-3160-9 \
${PN}-iwlwifi-6000-4 ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2a-6 \
${PN}-iwlwifi-6000g2b-5 ${PN}-iwlwifi-6000g2b-6 \
@@ -225,8 +238,11 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
${PN}-iwlwifi-7260 \
${PN}-iwlwifi-7265 \
${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \
+ ${PN}-iwlwifi-misc \
${PN}-i915-license ${PN}-i915 \
${PN}-adsp-sst-license ${PN}-adsp-sst \
+ ${PN}-bnx2-mips \
+ ${PN}-whence-license \
${PN}-license \
"
@@ -234,11 +250,15 @@ PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
LICENSE_${PN}-ar9170 = "Firmware-atheros_firmware"
LICENSE_${PN}-ath6k = "Firmware-atheros_firmware"
LICENSE_${PN}-ath9k = "Firmware-atheros_firmware"
+LICENSE_${PN}-atheros-license = "Firmware-atheros_firmware"
FILES_${PN}-atheros-license = "/lib/firmware/LICENCE.atheros_firmware"
FILES_${PN}-ar9170 = " \
/lib/firmware/ar9170*.fw \
"
+FILES_${PN}-carl9170 = " \
+ /lib/firmware/carl9170*.fw \
+"
FILES_${PN}-ath6k = " \
/lib/firmware/ath6k \
"
@@ -250,12 +270,15 @@ FILES_${PN}-ath9k = " \
"
RDEPENDS_${PN}-ar9170 += "${PN}-atheros-license"
+RDEPENDS_${PN}-carl9170 += "${PN}-atheros-license"
RDEPENDS_${PN}-ath6k += "${PN}-atheros-license"
RDEPENDS_${PN}-ath9k += "${PN}-atheros-license"
# For QualCommAthos
LICENSE_${PN}-ar3k = "Firmware-qualcommAthos_ar3k"
+LICENSE_${PN}-ar3k-license = "Firmware-qualcommAthos_ar3k"
LICENSE_${PN}-ath10k = "Firmware-qualcommAthos_ath10k"
+LICENSE_${PN}-ath10k-license = "Firmware-qualcommAthos_ath10k"
FILES_${PN}-ar3k-license = "/lib/firmware/LICENSE.QualcommAtheros_ar3k"
FILES_${PN}-ar3k = " \
@@ -272,6 +295,7 @@ RDEPENDS_${PN}-ath10k += "${PN}-ath10k-license"
# For ralink
LICENSE_${PN}-ralink = "Firmware-ralink-firmware"
+LICENSE_${PN}-ralink-license = "Firmware-ralink-firmware"
FILES_${PN}-ralink-license = "/lib/firmware/LICENCE.ralink-firmware.txt"
FILES_${PN}-ralink = " \
@@ -282,6 +306,7 @@ RDEPENDS_${PN}-ralink += "${PN}-ralink-license"
# For radeon
LICENSE_${PN}-radeon = "Firmware-radeon"
+LICENSE_${PN}-radeon-license = "Firmware-radeon"
FILES_${PN}-radeon-license = "/lib/firmware/LICENSE.radeon"
FILES_${PN}-radeon = " \
@@ -295,6 +320,7 @@ LICENSE_${PN}-sd8686 = "Firmware-Marvell"
LICENSE_${PN}-sd8688 = "Firmware-Marvell"
LICENSE_${PN}-sd8787 = "Firmware-Marvell"
LICENSE_${PN}-sd8797 = "Firmware-Marvell"
+LICENSE_${PN}-marvell-license = "Firmware-Marvell"
FILES_${PN}-marvell-license = "/lib/firmware/LICENCE.Marvell"
FILES_${PN}-sd8686 = " \
@@ -321,6 +347,7 @@ RDEPENDS_${PN}-sd8797 += "${PN}-marvell-license"
LICENSE_${PN}-rtl8192cu = "Firmware-rtlwifi_firmware"
LICENSE_${PN}-rtl8192ce = "Firmware-rtlwifi_firmware"
LICENSE_${PN}-rtl8192su = "Firmware-rtlwifi_firmware"
+LICENSE_${PN}-rtl-license = "Firmware-rtlwifi_firmware"
FILES_${PN}-rtl-license = " \
/lib/firmware/LICENCE.rtlwifi_firmware.txt \
@@ -342,6 +369,7 @@ RDEPENDS_${PN}-rtl8192su = "${PN}-rtl-license"
# For ti-connectivity
LICENSE_${PN}-wl12xx = "Firmware-ti-connectivity"
LICENSE_${PN}-wl18xx = "Firmware-ti-connectivity"
+LICENSE_${PN}-ti-connectivity-license = "Firmware-ti-connectivity"
FILES_${PN}-ti-connectivity-license = "/lib/firmware/LICENCE.ti-connectivity"
FILES_${PN}-wl12xx = " \
@@ -360,6 +388,7 @@ RDEPENDS_${PN}-wl18xx = "${PN}-ti-connectivity-license"
# For vt6656
LICENSE_${PN}-vt6656 = "Firmware-via_vt6656"
+LICENSE_${PN}-vt6656-license = "Firmware-via_vt6656"
FILES_${PN}-vt6656-license = "/lib/firmware/LICENCE.via_vt6656"
FILES_${PN}-vt6656 = " \
@@ -379,7 +408,9 @@ LICENSE_${PN}-bcm4330 = "Firmware-broadcom_bcm43xx"
LICENSE_${PN}-bcm4334 = "Firmware-broadcom_bcm43xx"
LICENSE_${PN}-bcm43340 = "Firmware-broadcom_bcm43xx"
LICENSE_${PN}-bcm4339 = "Firmware-broadcom_bcm43xx"
+LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx"
LICENSE_${PN}-bcm4354 = "Firmware-broadcom_bcm43xx"
+LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx"
FILES_${PN}-broadcom-license = " \
/lib/firmware/LICENCE.broadcom_bcm43xx \
@@ -399,6 +430,9 @@ FILES_${PN}-bcm43340 = " \
FILES_${PN}-bcm4339 = " \
/lib/firmware/brcm/brcmfmac4339-sdio.bin \
"
+FILES_${PN}-bcm43430 = " \
+ /lib/firmware/brcm/brcmfmac43430-sdio.bin \
+"
FILES_${PN}-bcm4354 = " \
/lib/firmware/brcm/brcmfmac4354-sdio.bin \
"
@@ -417,15 +451,33 @@ ALTERNATIVE_linux-firmware-bcm4330 = "brcmfmac-sdio.bin"
ALTERNATIVE_TARGET_linux-firmware-bcm4330[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4330-sdio.bin"
ALTERNATIVE_linux-firmware-bcm4339 = "brcmfmac-sdio.bin"
ALTERNATIVE_TARGET_linux-firmware-bcm4339[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4339-sdio.bin"
+ALTERNATIVE_PRIORITY_linux-firmware-bcm4339[brcmfmac-sdio.bin] = "20"
+ALTERNATIVE_linux-firmware-bcm43430 = "brcmfmac-sdio.bin"
+ALTERNATIVE_TARGET_linux-firmware-bcm43430[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac43430-sdio.bin"
RDEPENDS_${PN}-bcm4329 += "${PN}-broadcom-license"
RDEPENDS_${PN}-bcm4330 += "${PN}-broadcom-license"
RDEPENDS_${PN}-bcm4334 += "${PN}-broadcom-license"
RDEPENDS_${PN}-bcm43340 += "${PN}-broadcom-license"
RDEPENDS_${PN}-bcm4339 += "${PN}-broadcom-license"
+RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license"
RDEPENDS_${PN}-bcm4354 += "${PN}-broadcom-license"
+# For Broadcom bnx2-mips
+#
+# which is a separate case to the other Broadcom firmwares since its
+# license is contained in the shared WHENCE file.
+
+LICENSE_${PN}-bnx2-mips = "WHENCE"
+LICENSE_${PN}-whence-license = "WHENCE"
+
+FILES_${PN}-bnx2-mips = "/lib/firmware/bnx2/bnx2-mips-09-6.2.1b.fw"
+FILES_${PN}-whence-license = "/lib/firmware/WHENCE"
+
+RDEPENDS_${PN}-bnx2-mips += "${PN}-whence-license"
+
# For iwlwifi
+LICENSE_${PN}-iwlwifi = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-135-6 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-3160-7 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-3160-8 = "Firmware-iwlwifi_firmware"
@@ -433,7 +485,7 @@ LICENSE_${PN}-iwlwifi-3160-9 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-6000-4 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-6000g2a-5 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-6000g2a-6 = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-6000g2a-5 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-6000g2b-5 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-6000g2b-6 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-6050-4 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-6050-5 = "Firmware-iwlwifi_firmware"
@@ -442,6 +494,8 @@ LICENSE_${PN}-iwlwifi-7265 = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-7265d = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-8000c = "Firmware-iwlwifi_firmware"
LICENSE_${PN}-iwlwifi-8265 = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-misc = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-license = "Firmware-iwlwifi_firmware"
FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware"
@@ -461,6 +515,7 @@ FILES_${PN}-iwlwifi-7265 = "/lib/firmware/iwlwifi-7265-*.ucode"
FILES_${PN}-iwlwifi-7265d = "/lib/firmware/iwlwifi-7265D-*.ucode"
FILES_${PN}-iwlwifi-8000c = "/lib/firmware/iwlwifi-8000C-*.ucode"
FILES_${PN}-iwlwifi-8265 = "/lib/firmware/iwlwifi-8265-*.ucode"
+FILES_${PN}-iwlwifi-misc = "/lib/firmware/iwlwifi-*.ucode"
RDEPENDS_${PN}-iwlwifi-135-6 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-3160-7 = "${PN}-iwlwifi-license"
@@ -469,7 +524,7 @@ RDEPENDS_${PN}-iwlwifi-3160-9 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000-4 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2a-6 = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-6000g2a-5 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-6000g2b-5 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6050-4 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-6050-5 = "${PN}-iwlwifi-license"
@@ -478,6 +533,15 @@ RDEPENDS_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-7265d = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-8000c = "${PN}-iwlwifi-license"
RDEPENDS_${PN}-iwlwifi-8265 = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-misc = "${PN}-iwlwifi-license"
+
+# -iwlwifi-misc is a "catch all" package that includes all the iwlwifi
+# firmwares that are not already included in other -iwlwifi- packages.
+# -iwlwifi is a virtual package that depends upon all iwlwifi packages.
+# These are distinct in order to allow the -misc firmwares to be installed
+# without pulling in every other iwlwifi package.
+ALLOW_EMPTY_${PN}-iwlwifi = "1"
+ALLOW_EMPTY_${PN}-iwlwifi-misc = "1"
# Handle package updating for the newly merged iwlwifi groupings
RPROVIDES_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
@@ -489,12 +553,14 @@ RREPLACES_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-
RCONFLICTS_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
LICENSE_${PN}-i915 = "Firmware-i915"
+LICENSE_${PN}-i915-license = "Firmware-i915"
FILES_${PN}-i915-license = "/lib/firmware/LICENSE.i915"
FILES_${PN}-i915 = "/lib/firmware/i915"
RDEPENDS_${PN}-i915 = "${PN}-i915-license"
FILES_${PN}-adsp-sst-license = "/lib/firmware/LICENCE.adsp_sst"
LICENSE_${PN}-adsp-sst = "Firmware-adsp_sst"
+LICENSE_${PN}-adsp-sst-license = "Firmware-adsp_sst"
FILES_${PN}-adsp-sst = "/lib/firmware/intel/dsp_fw*"
RDEPENDS_${PN}-adsp-sst = "${PN}-adsp-sst-license"
@@ -534,6 +600,7 @@ LICENSE_${PN} = "\
& Firmware-r8a779x_usb3 \
& Firmware-radeon \
& Firmware-ralink_a_mediatek_company_firmware \
+ & Firmware-ralink-firmware \
& Firmware-siano \
& Firmware-tda7706-firmware \
& Firmware-ti-connectivity \
@@ -543,14 +610,20 @@ LICENSE_${PN} = "\
& Firmware-xc4000 \
& Firmware-xc5000 \
& Firmware-xc5000c \
+ & WHENCE \
"
FILES_${PN}-license += "/lib/firmware/LICEN*"
FILES_${PN} += "/lib/firmware/*"
RDEPENDS_${PN} += "${PN}-license"
+RDEPENDS_${PN} += "${PN}-whence-license"
# Make linux-firmware depend on all of the split-out packages.
+# Make linux-firmware-iwlwifi depend on all of the split-out iwlwifi packages.
python populate_packages_prepend () {
firmware_pkgs = oe.utils.packages_filter_out_system(d)
d.appendVar('RDEPENDS_linux-firmware', ' ' + ' '.join(firmware_pkgs))
+
+ iwlwifi_pkgs = filter(lambda x: x.find('-iwlwifi-') != -1, firmware_pkgs)
+ d.appendVar('RDEPENDS_linux-firmware-iwlwifi', ' ' + ' '.join(iwlwifi_pkgs))
}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 2ba6ed51d..078d752ca 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -18,9 +18,10 @@ LICENSE = "GPLv2"
# But you have some kernel headers you need for some driver? That is fine
# but get them from STAGING_KERNEL_DIR where the kernel installs itself.
# This will make the package using them machine specific but this is much
-# better than having a machine specific C library. This does mean your
-# recipe needs a DEPENDS += "virtual/kernel" but again, that is fine and
-# makes total sense.
+# better than having a machine specific C library. This does mean your
+# recipe needs a
+# do_configure[depends] += "virtual/kernel:do_shared_workdir"
+# but again, that is fine and makes total sense.
#
# There can also be a case where your kernel extremely old and you want
# an older libc ABI for that old kernel. The headers installed by this
@@ -49,8 +50,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar
S = "${WORKDIR}/linux-${PV}"
-# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE.
-EXTRA_OEMAKE = ""
+EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}""
do_configure() {
oe_runmake allnoconfig
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
index 6ad479863..8bb775ccf 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
@@ -11,10 +11,10 @@ Upstream-Status: Submitted
include/uapi/linux/libc-compat.h | 25 ++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)
-Index: linux-4.4/include/uapi/linux/libc-compat.h
+Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
===================================================================
---- linux-4.4.orig/include/uapi/linux/libc-compat.h
-+++ linux-4.4/include/uapi/linux/libc-compat.h
+--- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h
++++ linux-4.8-rc4/include/uapi/linux/libc-compat.h
@@ -48,13 +48,12 @@
#ifndef _UAPI_LIBC_COMPAT_H
#define _UAPI_LIBC_COMPAT_H
@@ -23,16 +23,17 @@ Index: linux-4.4/include/uapi/linux/libc-compat.h
-#if defined(__GLIBC__)
+#ifndef __KERNEL__ /* we're used from userspace */
--/* Coordinate with glibc netinet/in.h header. */
-+/* Coordinate with libc netinet/in.h header. */
- #if defined(_NETINET_IN_H)
+-/* Coordinate with glibc net/if.h header. */
+-#if defined(_NET_IF_H) && defined(__USE_MISC)
++/* Coordinate with libc net/if.h header. */
++#if defined(_NET_IF_H)
-/* GLIBC headers included first so don't define anything
+/* LIBC headers included first so don't define anything
* that would already be defined. */
- #define __UAPI_DEF_IN_ADDR 0
- #define __UAPI_DEF_IN_IPPROTO 0
-@@ -64,15 +63,7 @@
+
+ #define __UAPI_DEF_IF_IFCONF 0
+@@ -98,15 +97,7 @@
#define __UAPI_DEF_IN_CLASS 0
#define __UAPI_DEF_IN6_ADDR 0
@@ -48,7 +49,7 @@ Index: linux-4.4/include/uapi/linux/libc-compat.h
#define __UAPI_DEF_SOCKADDR_IN6 0
#define __UAPI_DEF_IPV6_MREQ 0
#define __UAPI_DEF_IPPROTO_V6 0
-@@ -80,10 +71,10 @@
+@@ -114,10 +105,10 @@
#define __UAPI_DEF_IN6_PKTINFO 0
#define __UAPI_DEF_IP6_MTUINFO 0
@@ -61,7 +62,7 @@ Index: linux-4.4/include/uapi/linux/libc-compat.h
* __UAPI_DEF_* defines and adjust appropriately. */
#define __UAPI_DEF_IN_ADDR 1
#define __UAPI_DEF_IN_IPPROTO 1
-@@ -93,7 +84,7 @@
+@@ -127,7 +118,7 @@
#define __UAPI_DEF_IN_CLASS 1
#define __UAPI_DEF_IN6_ADDR 1
@@ -70,16 +71,16 @@ Index: linux-4.4/include/uapi/linux/libc-compat.h
* coordinate. */
#define __UAPI_DEF_IN6_ADDR_ALT 1
#define __UAPI_DEF_SOCKADDR_IN6 1
-@@ -115,7 +106,7 @@
+@@ -149,7 +140,7 @@
/* If we did not see any headers from any supported C libraries,
* or we are being included in the kernel, then define everything
* that we need. */
-#else /* !defined(__GLIBC__) */
+#else /* __KERNEL__ */
- /* Definitions for in.h */
- #define __UAPI_DEF_IN_ADDR 1
-@@ -138,6 +129,6 @@
+ /* Definitions for if.h */
+ #define __UAPI_DEF_IF_IFCONF 1
+@@ -182,6 +173,6 @@
/* Definitions for xattr.h */
#define __UAPI_DEF_XATTR 1
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
index c61709374..8dc1edc33 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
@@ -11,10 +11,10 @@ Upstream-Status: Submitted
include/uapi/linux/libc-compat.h | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
-diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
-index aa63ed0..e94da57 100644
---- a/include/uapi/linux/if_ether.h
-+++ b/include/uapi/linux/if_ether.h
+Index: linux-4.8-rc4/include/uapi/linux/if_ether.h
+===================================================================
+--- linux-4.8-rc4.orig/include/uapi/linux/if_ether.h
++++ linux-4.8-rc4/include/uapi/linux/if_ether.h
@@ -22,6 +22,7 @@
#define _UAPI_LINUX_IF_ETHER_H
@@ -23,7 +23,7 @@ index aa63ed0..e94da57 100644
/*
* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
-@@ -134,11 +135,12 @@
+@@ -138,11 +139,12 @@
* This is an Ethernet frame header.
*/
@@ -37,10 +37,10 @@ index aa63ed0..e94da57 100644
+#endif
#endif /* _UAPI_LINUX_IF_ETHER_H */
-diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
-index afe15c2..7d0c78a 100644
---- a/include/uapi/linux/libc-compat.h
-+++ b/include/uapi/linux/libc-compat.h
+Index: linux-4.8-rc4/include/uapi/linux/libc-compat.h
+===================================================================
+--- linux-4.8-rc4.orig/include/uapi/linux/libc-compat.h
++++ linux-4.8-rc4/include/uapi/linux/libc-compat.h
@@ -50,6 +50,12 @@
#ifndef __KERNEL__ /* we're used from userspace */
@@ -51,9 +51,6 @@ index afe15c2..7d0c78a 100644
+#define __UAPI_DEF_ETHHDR 1
+#endif
+
- /* Coordinate with libc netinet/in.h header. */
- #if defined(_NETINET_IN_H)
+ /* Coordinate with libc net/if.h header. */
+ #if defined(_NET_IF_H) && defined(__USE_MISC)
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
index 6d9e8d864..b5c4e1750 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
@@ -13,10 +13,10 @@ Upstream-Status: Submitted
include/uapi/linux/kernel.h | 2 ++
1 file changed, 2 insertions(+)
-diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
-index 321e399..e8ff821 100644
---- a/include/uapi/linux/kernel.h
-+++ b/include/uapi/linux/kernel.h
+Index: linux-4.8-rc4/include/uapi/linux/kernel.h
+===================================================================
+--- linux-4.8-rc4.orig/include/uapi/linux/kernel.h
++++ linux-4.8-rc4/include/uapi/linux/kernel.h
@@ -1,7 +1,9 @@
#ifndef _UAPI_LINUX_KERNEL_H
#define _UAPI_LINUX_KERNEL_H
@@ -27,6 +27,3 @@ index 321e399..e8ff821 100644
/*
* 'kernel.h' contains some often-used function prototypes etc
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
new file mode 100644
index 000000000..77e0870d3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
@@ -0,0 +1,12 @@
+require linux-libc-headers.inc
+
+PV = "4.8"
+
+SRC_URI_append_libc-musl = "\
+ file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
+ file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
+ file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
+ "
+
+SRC_URI[md5sum] = "c1af0afbd3df35c1ccdc7a5118cd2d07"
+SRC_URI[sha256sum] = "3e9150065f193d3d94bcf46a1fe9f033c7ef7122ab71d75a7fb5a2f0c9a7e11a"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb
index 196c8c7a2..0fdd0ad5f 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -28,9 +28,6 @@ do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_populate_sysroot[noexec] = "1"
-# Define where the kernel headers are installed on the target as well as where
-# they are staged.
-KERNEL_SRC_PATH = "/usr/src/kernel"
S = "${STAGING_KERNEL_DIR}"
B = "${STAGING_KERNEL_BUILDDIR}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc
index 74f5ef8ca..8528d646d 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc
@@ -33,12 +33,13 @@ do_compile_append() {
do_install_append() {
for DTB in ${KERNEL_DEVICETREE}; do
DTB=`normalize_dtb "${DTB}"`
- DTB_BASE_NAME=`basename ${DTB} .dtb`
+ DTB_EXT=${DTB##*.}
+ DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
- install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
+ install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}
done
done
}
@@ -46,7 +47,8 @@ do_install_append() {
do_deploy_append() {
for DTB in ${KERNEL_DEVICETREE}; do
DTB=`normalize_dtb "${DTB}"`
- DTB_BASE_NAME=`basename ${DTB} .dtb`
+ DTB_EXT=${DTB##*.}
+ DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
base_name=${type}"-"${KERNEL_IMAGE_BASE_NAME}
symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
@@ -54,8 +56,8 @@ do_deploy_append() {
DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
install -d ${DEPLOYDIR}
- install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
- ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb
+ install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.${DTB_EXT}
+ ln -sf ${DTB_NAME}.${DTB_EXT} ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.${DTB_EXT}
done
done
}
@@ -65,9 +67,10 @@ pkg_postinst_kernel-devicetree () {
for DTB in ${KERNEL_DEVICETREE}; do
for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
+ DTB_EXT=${DTB##*.}
DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+ update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
done
done
}
@@ -77,9 +80,10 @@ pkg_postrm_kernel-devicetree () {
for DTB in ${KERNEL_DEVICETREE}; do
for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
+ DTB_EXT=${DTB##*.}
DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
- update-alternatives --remove ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+ update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
done
done
}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dummy.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dummy.bb
index cc0e4e64a..994ac7459 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-dummy.bb
@@ -18,6 +18,8 @@ FILES_kernel-modules = ""
ALLOW_EMPTY_kernel-modules = "1"
DESCRIPTION_kernel-modules = "Kernel modules meta package"
+INHIBIT_DEFAULT_DEPS = "1"
+
#COMPATIBLE_MACHINE = "your_machine"
PR = "r1"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 308526345..9154bb7c3 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -14,14 +14,6 @@ require recipes-kernel/linux/linux-yocto.inc
# provide this .inc to set specific revisions
include recipes-kernel/linux/linux-yocto-dev-revisions.inc
-# Skip processing of this recipe if it is not explicitly specified as the
-# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
-# by the use of AUTOREV SRCREVs, which are the default for this recipe.
-python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-dev":
- raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-dev to enable it")
-}
-
KBRANCH = "standard/base"
KMETA = "kernel-meta"
@@ -36,12 +28,14 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name
SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
-LINUX_VERSION ?= "4.6-rc+"
+LINUX_VERSION ?= "4.8-rc+"
LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
PV = "${LINUX_VERSION}+git${SRCPV}"
COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64)"
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
index a13895727..b95fb5857 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
@@ -2,13 +2,22 @@ KBRANCH ?= "standard/preempt-rt/base"
require recipes-kernel/linux/linux-yocto.inc
-SRCREV_machine ?= "28d8cfdbcb18a6eef202099cca66430fd3b6eae0"
-SRCREV_meta ?= "a4f88c3fad887e1c559d03ae1b531ca267137b69"
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+ if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
+ raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "966ddde490030166010c5770f8f86cdd0e961c76"
+SRCREV_meta ?= "3c3197e65b6f2f5514853c1fe78ae8ffc131b02c"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}"
-LINUX_VERSION ?= "4.1.18"
+LINUX_VERSION ?= "4.1.33"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
index d81ca1387..6c1138277 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
@@ -1,14 +1,23 @@
-KBRANCH ?= "standard/preempt-rt"
+KBRANCH ?= "standard/preempt-rt/base"
require recipes-kernel/linux/linux-yocto.inc
-SRCREV_machine ?= "2bc112a6ccd16800a4c45e47ccb3018a1042abdf"
-SRCREV_meta ?= "bcc65090840f51a6ac937297be5c22fe268d01ab"
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+ if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
+ raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "652b564985db555b549ef73405aea6c38919eefc"
+SRCREV_meta ?= "3030330b066a33ce21164a8b30d0503cf9f68e5b"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-LINUX_VERSION ?= "4.4.3"
+LINUX_VERSION ?= "4.4.26"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb
new file mode 100644
index 000000000..e51c9cdcc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb
@@ -0,0 +1,38 @@
+KBRANCH ?= "standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+ if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
+ raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "4057556c041f6aac0d29aa3425587d414c9a0090"
+SRCREV_meta ?= "83110d94edeb856a3667b62903ed4ae91c24117d"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.8.3"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
index 28c72132a..ba01702cb 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
@@ -4,13 +4,13 @@ KCONFIG_MODE = "--allnoconfig"
require recipes-kernel/linux/linux-yocto.inc
-LINUX_VERSION ?= "4.1.18"
+LINUX_VERSION ?= "4.1.33"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
-SRCREV_meta ?= "a4f88c3fad887e1c559d03ae1b531ca267137b69"
+SRCREV_machine ?= "f4d0900b2851e829e990e0f64b09ed3b8e355fae"
+SRCREV_meta ?= "3c3197e65b6f2f5514853c1fe78ae8ffc131b02c"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
index 684e88098..76c41639c 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
@@ -4,13 +4,13 @@ KCONFIG_MODE = "--allnoconfig"
require recipes-kernel/linux/linux-yocto.inc
-LINUX_VERSION ?= "4.4.3"
+LINUX_VERSION ?= "4.4.26"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
-SRCREV_machine ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
-SRCREV_meta ?= "bcc65090840f51a6ac937297be5c22fe268d01ab"
+SRCREV_machine ?= "ca6a08bd7f86ebef11f763d26f787f7d65270473"
+SRCREV_meta ?= "3030330b066a33ce21164a8b30d0503cf9f68e5b"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb
new file mode 100644
index 000000000..c8ddbd93d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb
@@ -0,0 +1,25 @@
+KBRANCH ?= "standard/tiny/common-pc"
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "4.8.3"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine ?= "1adf9d36338dc3c63cdbf6f98bcbdc7bba42a794"
+SRCREV_meta ?= "83110d94edeb856a3667b62903ed4ae91c24117d"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "(qemux86$)"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
index 6b161fc06..09cd1f178 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
@@ -8,6 +8,15 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
INC_PR = "r4"
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
+# by the use of AUTOREV SRCREVs, which are the default for this recipe.
+python () {
+ if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != d.getVar("PN", True):
+ d.delVar("BB_DONT_CACHE")
+ raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN", True)))
+}
+
DEPENDS += "xz-native bc-native"
DEPENDS_append_aarch64 = " libgcc"
KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
@@ -17,6 +26,8 @@ DEPENDS_append_nios2 = " libgcc"
KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
+KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc"
+
# A KMACHINE is the mapping of a yocto $MACHINE to what is built
# by the kernel. This is typically the branch that should be built,
# and it can be specific to the machine or shared
@@ -35,6 +46,7 @@ SRCREV_FORMAT ?= "meta_machine"
# 2: report options that are not hardware related, but set by a BSP
KCONF_AUDIT_LEVEL ?= "1"
KCONF_BSP_AUDIT_LEVEL ?= "0"
+KMETA_AUDIT ?= "yes"
LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
@@ -52,6 +64,7 @@ do_install_append(){
}
# extra tasks
-addtask kernel_link_vmlinux after do_compile before do_install
+addtask kernel_version_sanity_check after do_kernel_metadata do_kernel_checkout before do_compile
+addtask kernel_link_images after do_compile before do_strip
addtask validate_branches before do_patch after do_kernel_checkout
addtask kernel_configcheck after do_configure before do_compile
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.1.bb
index aecb517ed..788a8eaaa 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.1.bb
@@ -11,20 +11,20 @@ KBRANCH_qemux86 ?= "standard/base"
KBRANCH_qemux86-64 ?= "standard/base"
KBRANCH_qemumips64 ?= "standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "232e2d88841c7e20857350275d80f5585ed93734"
-SRCREV_machine_qemuarm64 ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
-SRCREV_machine_qemumips ?= "7d3690c0762f11e038f14310a50ca1cdc813cc22"
-SRCREV_machine_qemuppc ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
-SRCREV_machine_qemux86 ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
-SRCREV_machine_qemux86-64 ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
-SRCREV_machine_qemumips64 ?= "b71e4cd7d45f03048ad31e2a36dfe5a43f021b51"
-SRCREV_machine ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
-SRCREV_meta ?= "a4f88c3fad887e1c559d03ae1b531ca267137b69"
+SRCREV_machine_qemuarm ?= "d67ef485ce1420df11bda2d9f6fb78ef50c1adff"
+SRCREV_machine_qemuarm64 ?= "f4d0900b2851e829e990e0f64b09ed3b8e355fae"
+SRCREV_machine_qemumips ?= "65116339cfd210990c9c4710cdfec3ebd59abb0e"
+SRCREV_machine_qemuppc ?= "30816907653b57f1f3d5f9a7a2f6339bab14a680"
+SRCREV_machine_qemux86 ?= "f4d0900b2851e829e990e0f64b09ed3b8e355fae"
+SRCREV_machine_qemux86-64 ?= "f4d0900b2851e829e990e0f64b09ed3b8e355fae"
+SRCREV_machine_qemumips64 ?= "f7a0b532b6ac81757d85b0c9a928f45a87c9e364"
+SRCREV_machine ?= "f4d0900b2851e829e990e0f64b09ed3b8e355fae"
+SRCREV_meta ?= "3c3197e65b6f2f5514853c1fe78ae8ffc131b02c"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;name=machine;branch=${KBRANCH}; \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}"
-LINUX_VERSION ?= "4.1.18"
+LINUX_VERSION ?= "4.1.33"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb
index 3c5ee1bd4..e3a3d901d 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb
@@ -11,20 +11,20 @@ KBRANCH_qemux86 ?= "standard/base"
KBRANCH_qemux86-64 ?= "standard/base"
KBRANCH_qemumips64 ?= "standard/mti-malta64"
-SRCREV_machine_qemuarm ?= "ec9167bcb0ccd4897177c5e235af68b5890aa326"
-SRCREV_machine_qemuarm64 ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
-SRCREV_machine_qemumips ?= "900f98d3ab6498bc7f4ff6b7a489db3bca4e6417"
-SRCREV_machine_qemuppc ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
-SRCREV_machine_qemux86 ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
-SRCREV_machine_qemux86-64 ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
-SRCREV_machine_qemumips64 ?= "4b08dfb1fb3bc7659e8f3e13665597d9a9f0816d"
-SRCREV_machine ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
-SRCREV_meta ?= "bcc65090840f51a6ac937297be5c22fe268d01ab"
+SRCREV_machine_qemuarm ?= "187bcc13f3023c3ae0a3ba5c69ae85c4e5e693ac"
+SRCREV_machine_qemuarm64 ?= "ca6a08bd7f86ebef11f763d26f787f7d65270473"
+SRCREV_machine_qemumips ?= "2f273556495dd2871f08c73fc3f40d1ad546c638"
+SRCREV_machine_qemuppc ?= "ca6a08bd7f86ebef11f763d26f787f7d65270473"
+SRCREV_machine_qemux86 ?= "ca6a08bd7f86ebef11f763d26f787f7d65270473"
+SRCREV_machine_qemux86-64 ?= "ca6a08bd7f86ebef11f763d26f787f7d65270473"
+SRCREV_machine_qemumips64 ?= "0a19cacf5738876666a4b530a9fa14f05b355299"
+SRCREV_machine ?= "ca6a08bd7f86ebef11f763d26f787f7d65270473"
+SRCREV_meta ?= "3030330b066a33ce21164a8b30d0503cf9f68e5b"
SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
-LINUX_VERSION ?= "4.4.3"
+LINUX_VERSION ?= "4.4.26"
PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.8.bb b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.8.bb
new file mode 100644
index 000000000..13778b9c4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.8.bb
@@ -0,0 +1,44 @@
+KBRANCH ?= "standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "standard/qemuarm64"
+KBRANCH_qemumips ?= "standard/mti-malta32"
+KBRANCH_qemuppc ?= "standard/qemuppc"
+KBRANCH_qemux86 ?= "standard/base"
+KBRANCH_qemux86-64 ?= "standard/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "4cc544ad09ad704322cb66fe4ba197a6a05dc71f"
+SRCREV_machine_qemuarm64 ?= "1adf9d36338dc3c63cdbf6f98bcbdc7bba42a794"
+SRCREV_machine_qemumips ?= "c285969d4f9376a671167ecf397578c8ad3e6a75"
+SRCREV_machine_qemuppc ?= "1adf9d36338dc3c63cdbf6f98bcbdc7bba42a794"
+SRCREV_machine_qemux86 ?= "1adf9d36338dc3c63cdbf6f98bcbdc7bba42a794"
+SRCREV_machine_qemux86-64 ?= "1adf9d36338dc3c63cdbf6f98bcbdc7bba42a794"
+SRCREV_machine_qemumips64 ?= "64f96ba530e58456070f26b0f3fcce3f64988b72"
+SRCREV_machine ?= "1adf9d36338dc3c63cdbf6f98bcbdc7bba42a794"
+SRCREV_meta ?= "83110d94edeb856a3667b62903ed4ae91c24117d"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.8.git;name=machine;branch=${KBRANCH}; \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.8;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.8.3"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch
deleted file mode 100644
index 3e2c4e1e6..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-Fix-invalid-pointer-free-with-trace-collection.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e4cad900994cf286d971796a947fea782dfc6651 Mon Sep 17 00:00:00 2001
-From: Francis Giraldeau <francis.giraldeau@gmail.com>
-Date: Mon, 15 Jun 2015 11:43:02 -0400
-Subject: [PATCH] Fix invalid pointer free with trace collection
-
-Upstream-Status: Submitted
-
-Patch proposed by Li RongQing related to bug# 790
-
-Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com>
-Signed-off-by: Francis Giraldeau <francis.giraldeau@gmail.com>
----
- lib/context.c | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/lib/context.c b/lib/context.c
-index 45aab34..8d3770f 100644
---- a/lib/context.c
-+++ b/lib/context.c
-@@ -79,7 +79,7 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path,
- struct bt_trace_descriptor *td;
- struct bt_format *fmt;
- struct bt_trace_handle *handle;
-- int ret, closeret;
-+ int ret;
-
- if (!ctx || !format_name || (!path && !stream_list))
- return -EINVAL;
-@@ -159,10 +159,8 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path,
- return handle->id;
-
- error:
-- closeret = fmt->close_trace(td);
-- if (closeret) {
-- fprintf(stderr, "Error in close_trace callback\n");
-- }
-+ if (handle)
-+ bt_context_remove_trace(ctx, handle->id);
- end:
- return ret;
- }
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch
deleted file mode 100644
index eb16cd1d2..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8331b87845cafdda40e59a682f2ca8120ed0c472 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 08:17:40 +0000
-Subject: [PATCH] lttng-live: Include sys/param.h for MAXNAMLEN defintion
-
-exposed on musl based systems
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: pending
-
- formats/lttng-live/lttng-live.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/formats/lttng-live/lttng-live.h b/formats/lttng-live/lttng-live.h
-index 4ab641d..808ed2b 100644
---- a/formats/lttng-live/lttng-live.h
-+++ b/formats/lttng-live/lttng-live.h
-@@ -25,6 +25,7 @@
- */
-
- #include <stdint.h>
-+#include <sys/param.h>
- #include "lttng-viewer-abi.h"
-
- #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT 5344
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb
deleted file mode 100644
index 176602632..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Babeltrace - Trace Format Babel Tower"
-DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
-HOMEPAGE = "http://www.efficios.com/babeltrace/"
-BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
-
-LICENSE = "MIT & GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
-
-DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-
-inherit autotools pkgconfig
-
-SRCREV = "6e2b9096c77138593097335b9b27202d98918089"
-
-SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.3 \
- file://0001-Fix-invalid-pointer-free-with-trace-collection.patch \
- file://0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch \
-"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
- ( cd ${S}; ${S}/bootstrap )
-}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.4.0.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.4.0.bb
new file mode 100644
index 000000000..0fadeb0d7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.4.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Babeltrace - Trace Format Babel Tower"
+DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
+HOMEPAGE = "http://www.efficios.com/babeltrace/"
+BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
+
+LICENSE = "MIT & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
+
+DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
+
+inherit autotools pkgconfig
+
+SRC_URI = "http://www.efficios.com/files/babeltrace/babeltrace-${PV}.tar.bz2 \
+"
+
+EXTRA_OECONF = "--disable-debug-info"
+
+SRC_URI[md5sum] = "fa99064048af5c9c6ff00e489ac809c2"
+SRC_URI[sha256sum] = "9469eeb22617cd12668683b04c27003e5337e9ac66ade914988df3642fc0d0e4"
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
new file mode 100644
index 000000000..6a91f3258
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
@@ -0,0 +1,49 @@
+From 1b0e574d680101105a6c1e8931c78824f5a97a42 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Mon, 5 Sep 2016 17:08:56 +0000
+Subject: [PATCH] Makefile: Do not fail if CONFIG_TRACEPOINTS is not enabled
+Organization: O.S. Systems Software LTDA.
+
+The lttng-modules are being pulled by the tools-profile image feature,
+however, not every kernel has the CONFIG_TRACEPOINTS feature enabled.
+
+This change makes the build do not fail when CONFIG_TRACEPOINTS is not
+available, allowing it to be kept being pulled by default.
+
+Upstream-Status: Inapropriate [embedded specific]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Makefile | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8602649..75550cc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,10 +8,7 @@ ifneq ($(KERNELRELEASE),)
+ # and defines the modules to be built.
+
+ ifdef CONFIG_LOCALVERSION # Check if dot-config is included.
+- ifeq ($(CONFIG_TRACEPOINTS),)
+- $(error The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
+- endif # CONFIG_TRACEPOINTS
+- endif # ifdef CONFIG_LOCALVERSION
++ ifneq ($(CONFIG_TRACEPOINTS),)
+
+ TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))
+
+@@ -94,6 +91,10 @@ ifneq ($(KERNELRELEASE),)
+ obj-$(CONFIG_LTTNG) += lib/
+ obj-$(CONFIG_LTTNG) += tests/
+
++ else
++ $(warning The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
++ endif # CONFIG_TRACEPOINTS
++ endif # ifdef CONFIG_LOCALVERSION
+ else # KERNELRELEASE
+
+ # This part of the Makefile is used when the 'make' command is runned in the
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb
index 2eb1a51bc..70145413a 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb
@@ -8,12 +8,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=362844633a08753bd96ab322a6c7f9f6 \
inherit module
-SRCREV = "45e0ebd91f995cc73c2b0d5c60cf9d12e8c838bf"
-PV = "2.7.1+git${SRCPV}"
+SRCREV = "6e4fc6f36d68fb3c8d40113f8670eb6e9c8ffd76"
+PV = "2.8.0+git${SRCPV}"
COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux'
-SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.7"
+SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.8 \
+ file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch"
export INSTALL_MOD_DIR="kernel/lttng-modules"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-error.h-common-error.h.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-error.h-common-error.h.patch
new file mode 100644
index 000000000..6c8a9b211
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-error.h-common-error.h.patch
@@ -0,0 +1,33 @@
+From 6712db617fe9155ea236f6840c2bd18dbec4c871 Mon Sep 17 00:00:00 2001
+From: Michael Jeanson <mjeanson@efficios.com>
+Date: Wed, 15 Jun 2016 17:18:03 -0400
+Subject: [PATCH] Fix: error.h -> common/error.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
+Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+Signed-off-by: Peter Liu <peter.x.liu@external.atlascopco.com>
+---
+ src/bin/lttng-sessiond/agent.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/bin/lttng-sessiond/agent.c b/src/bin/lttng-sessiond/agent.c
+index 7cbbbde..310a7e8 100644
+--- a/src/bin/lttng-sessiond/agent.c
++++ b/src/bin/lttng-sessiond/agent.c
+@@ -29,7 +29,7 @@
+ #include "agent.h"
+ #include "ust-app.h"
+ #include "utils.h"
+-#include "error.h"
++#include "common/error.h"
+
+ #define AGENT_RET_CODE_INDEX(code) (code - AGENT_RET_CODE_SUCCESS)
+
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch
deleted file mode 100644
index d05c04c66..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Fri, 4 Dec 2015 16:11:41 +0000
-Subject: [PATCH] Revert "Build: look for python >= 3.0 when building python bindings"
-Organization: O.S. Systems Software LTDA.
-
-This reverts commit 227703a2ceada3c104edd56756d48455ca4c271a.
-
-Upstream-Status: Pending
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4dee4b4..6608bcd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -339,7 +339,7 @@ AM_CONDITIONAL([PYTHON_BINDING], [test "x${enable_python_binding:-yes}" = xyes])
-
- if test "x${enable_python_binding:-yes}" = xyes; then
- AX_PKG_SWIG($swig_version, [], [ AC_MSG_ERROR([SWIG $swig_version or newer is needed]) ])
-- AM_PATH_PYTHON([3.0])
-+ AM_PATH_PYTHON
-
- AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config])
- AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest
index e758815c7..623006344 100755
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/run-ptest
@@ -1,4 +1,5 @@
#!/bin/sh
-
-make -C tests installcheck
-
+# Without --ignore-exit, the tap harness causes any FAILs within a
+# test plan to raise ERRORs; this is just noise.
+makeargs="LOG_DRIVER_FLAGS=--ignore-exit"
+make -t all >/dev/null 2>&1 && exec make -s $makeargs check 2>/dev/null
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch
deleted file mode 100644
index 958bce48e..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 584f59b..c2bcabd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \
- dist_noinst_DATA = CodingStyle
-
- EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt
-+
-+install-ptest:
-+ cp -r $(srcdir)/tests $(DESTDIR)
-+ for m in $$(find $(DESTDIR)/tests -name Makefile); do \
-+ sed -i -e 's|^Makefile:|_Makefile:|' $$m; \
-+ done
-diff --git a/tests/run.sh b/tests/run.sh
-index c6c50fd..6455359 100755
---- a/tests/run.sh
-+++ b/tests/run.sh
-@@ -19,4 +19,7 @@
-
- [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1
-
--prove --merge --exec '' - < $1
-+prove --merge -v --exec '' - < $1 | sed \
-+ -e 's|^ok \(.*\)|PASS: \1|' \
-+ -e 's|^not ok \(.*\)|FAIL: \1|' \
-+ | egrep -h 'PASS|FAIL'
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch
deleted file mode 100644
index bd4f7d1d1..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 1f54181c2df1fb92c3323a6dbf8273fb66b883b6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
- <jeremie.galarneau@efficios.com>
-Date: Sat, 17 Oct 2015 19:41:47 -0400
-Subject: [PATCH] Port: Don't use SIGUNUSED which is not defined on Solaris
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-Organization: O.S. Systems Software LTDA.
-
-Upstream-Status: Backport [2.8.0]
-
-Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
----
- src/common/runas.c | 18 +++++-------------
- 1 file changed, 5 insertions(+), 13 deletions(-)
-
-diff --git a/src/common/runas.c b/src/common/runas.c
-index 57f7382..0825470 100644
---- a/src/common/runas.c
-+++ b/src/common/runas.c
-@@ -530,21 +530,13 @@ int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid)
- static
- int reset_sighandler(void)
- {
-- int sig, ret = 0;
-+ int sig;
-
-- for (sig = SIGHUP; sig <= SIGUNUSED; sig++) {
-- /* Skip unblockable signals. */
-- if (sig == SIGKILL || sig == SIGSTOP) {
-- continue;
-- }
-- if (signal(sig, SIG_DFL) == SIG_ERR) {
-- PERROR("reset signal %d", sig);
-- ret = -1;
-- goto end;
-- }
-+ DBG("Resetting run_as worker signal handlers to default");
-+ for (sig = 1; sig <= 31; sig++) {
-+ (void) signal(sig, SIG_DFL);
- }
--end:
-- return ret;
-+ return 0;
- }
-
- static
---
-2.6.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb
index 8bd09892c..bfc657b3a 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb
@@ -9,40 +9,41 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
-DEPENDS = "liburcu popt libxml2"
+DEPENDS = "liburcu popt libxml2 util-linux"
RDEPENDS_${PN} = "libgcc"
-RDEPENDS_${PN}-ptest += "make perl bash"
+RDEPENDS_${PN}-ptest += "make perl bash gawk ${PN} babeltrace procps"
+# babelstats.pl wants getopt-long
+RDEPENDS_${PN}-ptest += "perl-module-getopt-long"
-SRCREV = "a90f2c1e10b759782653a81815625e9d1bbb75ca"
-PV = "2.7.1+git${SRCPV}"
+SRCREV = "d11e0dba0df9024b8613c51e167a379b91e8b20b"
+PV = "2.8.1+git${SRCPV}"
-PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
- am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
- PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \
+PYTHON_OPTION = "am_cv_python_pyexecdir='${PYTHON_SITEPACKAGES_DIR}' \
+ am_cv_python_pythondir='${PYTHON_SITEPACKAGES_DIR}' \
+ PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
"
PACKAGECONFIG ??= "lttng-ust"
-PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native"
-PACKAGECONFIG[lttng-ust] = "--enable-lttng-ust, --disable-lttng-ust, lttng-ust"
+PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
+PACKAGECONFIG[lttng-ust] = "--with-lttng-ust, --without-lttng-ust, lttng-ust"
PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
+PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages, asciidoc-native"
PACKAGECONFIG_remove_libc-musl = "lttng-ust"
-SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.7 \
- file://Revert-Build-look-for-python-3.0-when-building-pytho.patch \
- file://stop-using-SIGUNUSED.patch \
- file://runtest-2.4.0.patch \
+SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.8 \
+ file://0001-Fix-error.h-common-error.h.patch \
file://run-ptest"
S = "${WORKDIR}/git"
-inherit autotools-brokensep ptest pkgconfig useradd
+inherit autotools-brokensep ptest pkgconfig useradd python3-dir
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "tracing"
FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
- ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
-FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a"
-FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la"
+ ${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
# Since files are installed into ${libdir}/lttng/libexec we match
# the libexec insane test so skip it.
@@ -52,31 +53,64 @@ INSANE_SKIP_${PN}-dbg = "libexec"
do_configure_prepend () {
# Delete a shipped m4 file that overrides our patched one
- rm -f ${S}/config/libxml.m4
+ rm -f ${S}/m4/libxml.m4
}
do_install_ptest () {
- chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh
- for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do
- sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
- -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
- -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
- -i $i
+ mkdir -p ${D}${PTEST_PATH}
+
+ cp -a -T ${B} ${D}${PTEST_PATH}
+
+ # Prevent attempts to update Makefiles during test runs, and
+ # silence "Making check in $SUBDIR" messages.
+ find ${D}${PTEST_PATH} -name Makefile -type f -exec \
+ sed -i -e 's!^Makefile:!_Makefile:!' \
+ -e '/echo "Making $$target in $$subdir"; \\/d' {} +
+
+ # Prevent attempts to update version.h during test runs.
+ sed -i -e '/^\.PHONY: version\.h$/d' ${D}${PTEST_PATH}/include/Makefile
+
+ # Silence "Making check in $SUBDIR" messages.
+ find ${D}${PTEST_PATH} -name Makefile -type f -exec \
+ sed -i -e '/echo "Making $$target in $$subdir"; \\/d' {} +
+
+ # Substitute links to installed binaries.
+ for prog in lttng lttng-relayd lttng-sessiond lttng-consumerd ; do
+ orig="${D}${PTEST_PATH}/src/bin/${prog}/${prog}"
+ rm "$orig"
+ case "$prog" in
+ lttng-consumerd)
+ ln -s "${libdir}/lttng/libexec/$prog" "$orig"
+ ;;
+ *)
+ ln -s "${bindir}/$prog" "$orig"
+ ;;
+ esac
done
- # Update libdir references in copied .la files
- for i in `find ${D}${PTEST_PATH} -type f -name *.la`; do
- sed -i -e 's#${S}/tests/#${STAGING_DIR}${PTEST_PATH}#g' $i
+ # Remove libtool artifacts.
+ find ${D}${PTEST_PATH} \( -name '*.l[ao]' -o -name '*.lai' \) -delete
+
+ # Remove object files and archives.
+ find ${D}${PTEST_PATH} -name '*.[oa]' -type f -delete
+
+ # Remove Makefile.am and Makefile.in.
+ find ${D}${PTEST_PATH} -name 'Makefile.*' -type f -delete
+
+ # Remove autom4te.cache.
+ rm -rf ${D}${PTEST_PATH}/autom4te.cache
+
+ # Replace libtool wrapper scripts (which won't work on the
+ # target) with their corresponding binaries.
+ for prog in unit/ini_config/ini_config \
+ regression/tools/live/live_test \
+ regression/tools/health/health_check ; do
+ basename=${prog##*/}
+ ldir=${D}${PTEST_PATH}/tests/${prog%/*}
+ mv -f ${ldir}/.libs/${basename} ${ldir}
done
- sed -e "s:src/bin:bin:g" -e "s:lt-::g" \
- -i ${D}${PTEST_PATH}/tests/utils/utils.sh
- sed -e "s:ini_config:\.libs\/ini_config:" \
- -i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config
+ # checkpatch.pl is unneeded on target and causes file-rdeps QA
+ # warnings.
+ rm -f ${D}${PTEST_PATH}/extras/checkpatch.pl
}
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch
deleted file mode 100644
index 9b37a4a33..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-lttng-ust: add support for aarch64_be
-
-Upstream-Status: Pending
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-
-diff --ruN a/configure.ac b/configure.ac
---- a/configure.ac 2016-02-18 14:54:54.651713647 +0100
-+++ b/configure.ac 2016-02-18 14:56:11.057865297 +0100
-@@ -240,6 +240,7 @@
- s390x) NO_UNALIGNED_ACCESS=1 ;;
- arm*) NO_UNALIGNED_ACCESS=1 ;;
- aarch64) NO_UNALIGNED_ACCESS=1 ;;
-+ aarch64_be) NO_UNALIGNED_ACCESS=1 ;;
- mips*) NO_UNALIGNED_ACCESS=1 ;;
- tile*) NO_UNALIGNED_ACCESS=1 ;;
- *)
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
index b68a9899c..caf0b8bcf 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-doc-examples-disable.patch
@@ -11,7 +11,7 @@ Index: doc/Makefile.am
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,4 +1,4 @@
--SUBDIRS = . examples
+-SUBDIRS = . man examples
+SUBDIRS = .
dist_man_MANS = man/lttng-gen-tp.1 \
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb
index 15d925d29..baff71f58 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb
@@ -11,22 +11,30 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
inherit autotools lib_package
DEPENDS = "liburcu util-linux"
-RDEPENDS_${PN}-bin = "python-core"
+RDEPENDS_${PN}-bin = "python3-core"
# For backwards compatibility after rename
RPROVIDES_${PN} = "lttng2-ust"
RREPLACES_${PN} = "lttng2-ust"
RCONFLICTS_${PN} = "lttng2-ust"
-SRCREV = "f89c1a3cf2b06a4970b9154c00ff6409870aefb5"
+SRCREV = "514a87f3b64181e384399935a5708a8f85b0cc83"
PE = "2"
-PV = "2.7.1+git${SRCPV}"
+PV = "2.8.1+git${SRCPV}"
-SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.7 \
+SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.8 \
file://lttng-ust-doc-examples-disable.patch \
- file://lttng-ust-add-support-for-aarch64_be.patch \
"
+EXTRA_OECONF += "--disable-man-pages"
+
+do_install_append() {
+ # Patch python tools to use Python 3; they should be source compatible, but
+ # still refer to Python 2 in the shebang
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/lttng-gen-tp
+}
+
+
S = "${WORKDIR}/git"
do_configure_prepend () {
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
index cf3ad435c..96ef43dc3 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
@@ -24,7 +24,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
file://oprofile-cross-compile-tests.patch \
file://run-ptest \
file://root-home-dir.patch \
- file://0001-Add-rmb-definition-for-NIOS2-architecture.patch"
+ file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \
+ file://0001-Fix-FTBFS-problem-with-GCC-6.patch \
+"
SRC_URI_append_libc-musl = " file://musl.patch"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
new file mode 100644
index 000000000..d372fd527
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
@@ -0,0 +1,51 @@
+From 39d4d46a0bd504ac708ffe72df87bf74cd12ad30 Mon Sep 17 00:00:00 2001
+From: William Cohen <wcohen@redhat.com>
+Date: Fri, 5 Feb 2016 17:30:19 -0500
+Subject: [PATCH] Fix FTBFS problem with GCC-6
+
+GCC-6 is pickier about some of the type conversions causing the Fedora
+24 mass rebuild the build of oprofile failed with:
+
+make[3]: Entering directory '/builddir/build/BUILD/oprofile-1.1.0/libutil++'
+g++ -DHAVE_CONFIG_H -I. -I.. -I ../libutil -I ../libop -I ../libpp -W -Wall -fno-common -ftemplate-depth-50 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c -o op_bfd.o op_bfd.cpp
+op_bfd.cpp: In member function 'void op_bfd::get_symbol_range(symbol_index_t, long long unsigned int&, long long unsigned int&) const':
+op_bfd.cpp:538:47: error: cannot convert 'std::ostream {aka std::basic_ostream<char>}' to 'const bool' in initialization
+ bool const verbose = cverb << (vbfd & vlevel1);
+ ^
+op_bfd.cpp:546:7: error: in argument to unary !
+ if (!verbose)
+ ^~~~~~~
+
+Avoid the intermediate bool type to make GCC-6 happy.
+
+Signed-off-by: William Cohen <wcohen@redhat.com>
+---
+Upstream-Status: Backport
+
+ libutil++/op_bfd.cpp | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/libutil++/op_bfd.cpp b/libutil++/op_bfd.cpp
+index 389c920..f2eb42b 100644
+--- a/libutil++/op_bfd.cpp
++++ b/libutil++/op_bfd.cpp
+@@ -535,15 +535,13 @@ void op_bfd::get_symbol_range(symbol_index_t sym_idx,
+ {
+ op_bfd_symbol const & sym = syms[sym_idx];
+
+- bool const verbose = cverb << (vbfd & vlevel1);
+-
+ if (anon_obj)
+ start = sym.vma();
+ else
+ start = sym.filepos();
+ end = start + sym.size();
+
+- if (!verbose)
++ if (!(cverb << (vbfd & vlevel1)))
+ return;
+
+ io_state state(cverb << (vbfd & vlevel1));
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server/init b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server/init
deleted file mode 100755
index 2544ea4ac..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server/init
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: oprofile-server
-# Required-Start: $network
-# Required-Stop: $network
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: OProfileUI server
-# Description:
-### END INIT INFO
-
-. /etc/init.d/functions
-
-case "$1" in
- start)
- echo "Starting OProfileUI server"
- . /etc/profile
- /usr/bin/oprofile-server &
- ;;
-
- stop)
- echo "Stopping OProfileUI server"
- killproc oprofile-server
- ;;
-
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
-
- *)
- echo "usage: $0 { start | stop | restart }"
- ;;
-esac
-
-exit 0
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server/oprofileui-server.service b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server/oprofileui-server.service
deleted file mode 100644
index 1a2cbe62e..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server/oprofileui-server.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=OProfileUI Server
-After=network.target
-
-[Service]
-ExecStart=/bin/sh -c ". @SYSCONFDIR@/profile; @BINDIR@/oprofile-server"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server_git.bb
deleted file mode 100644
index cc3477bc7..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui-server_git.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-require oprofileui.inc
-
-SRCREV = "389e1875af4721d52c7e65cf9cfffb69b0ed6a59"
-PV = "0.0+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-SRC_URI = "git://git.yoctoproject.org/oprofileui \
- file://init \
- file://oprofileui-server.service "
-
-DEPENDS += "intltool-native gettext-native"
-
-EXTRA_OECONF += "--disable-client --enable-server"
-
-RDEPENDS_${PN} = "oprofile avahi-daemon"
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/oprofileui-server
-
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/oprofileui-server.service ${D}${systemd_unitdir}/system/
- sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
- -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/oprofileui-server.service
-}
-
-inherit update-rc.d systemd
-
-INITSCRIPT_NAME = "oprofileui-server"
-INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
-
-SYSTEMD_SERVICE_${PN} = "oprofileui-server.service"
-SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui.inc b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui.inc
deleted file mode 100644
index 8fcf014a9..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "User Interface for the System-Wide Profiler"
-DESCRIPTION = "User interface for the OProfile tool"
-HOMEPAGE = "http://labs.o-hand.com/oprofileui/"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-SECTION = "x11"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "glib-2.0 avahi intltool-native"
-
-inherit autotools pkgconfig gettext
-
-EXTRA_OECONF = "--with-avahi"
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui_git.bb
deleted file mode 100644
index 86f3d8e50..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/oprofile/oprofileui_git.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require oprofileui.inc
-
-DEPENDS += "gtk+ libglade libxml2 avahi-ui gconf gettext-native"
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-SRCREV = "389e1875af4721d52c7e65cf9cfffb69b0ed6a59"
-PV = "0.0+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-SRC_URI = "git://git.yoctoproject.org/oprofileui"
-
-EXTRA_OECONF += "--enable-client --disable-server"
-
-PACKAGES =+ "oprofileui-viewer"
-
-FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/ ${datadir}/icons"
-RDEPENDS_oprofileui-viewer = "oprofile"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb b/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb
index 3d6ffb30f..471023d07 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/perf/perf.bb
@@ -30,6 +30,8 @@ DEPENDS = " \
${SCRIPTING_DEPENDS} \
${LIBUNWIND_DEPENDS} \
bison flex xz \
+ xmlto-native \
+ asciidoc-native \
"
do_configure[depends] += "virtual/kernel:do_shared_workdir"
@@ -40,10 +42,6 @@ inherit linux-kernel-base kernel-arch pythonnative
# needed for building the tools/perf Python bindings
inherit python-dir
-export STAGING_INCDIR
-export STAGING_LIBDIR
-export BUILD_SYS
-export HOST_SYS
export PYTHON_SITEPACKAGES_DIR
#kernel 3.1+ supports WERROR to disable warnings as errors
@@ -81,6 +79,7 @@ EXTRA_OEMAKE = '\
ARCH=${ARCH} \
CC="${CC}" \
AR="${AR}" \
+ LD="${LD}" \
EXTRA_CFLAGS="-ldw" \
perfexecdir=${libexecdir} \
NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${LIBUNWIND_DEFINES} \
@@ -94,14 +93,12 @@ EXTRA_OEMAKE += "\
'sharedir=${datadir}' \
'sysconfdir=${sysconfdir}' \
'perfexecdir=${libexecdir}/perf-core' \
- \
'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \
'sharedir=${@os.path.relpath(datadir, prefix)}' \
'mandir=${@os.path.relpath(mandir, prefix)}' \
'infodir=${@os.path.relpath(infodir, prefix)}' \
"
-
do_compile() {
# Linux kernel build system is expected to do the right thing
unset CFLAGS
@@ -136,11 +133,24 @@ do_configure_prepend () {
# with each other if its in the shared source directory
#
if [ -e "${S}/tools/perf/config/Makefile" ]; then
+ perfconfig="${S}/tools/perf/config/Makefile"
+ fi
+ if [ -e "${S}/tools/perf/Makefile.config" ]; then
+ perfconfig="${S}/tools/perf/Makefile.config"
+ fi
+ if [ -n "${perfconfig}" ]; then
# Match $(prefix)/$(lib) and $(prefix)/lib
sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
-e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \
-e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
- ${S}/tools/perf/config/Makefile
+ ${perfconfig}
+ fi
+ # The man pages installation is "$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)"
+ # in ${S}/tools/perf/Documentation/Makefile, if the mandir set to '?=', it
+ # will use the relative path 'share/man', in the way it will resulting in
+ # incorrect installation for man pages.
+ if [ -e "${S}/tools/perf/Documentation/Makefile" ]; then
+ sed -i 's,^mandir?=,mandir:=,' ${S}/tools/perf/Documentation/Makefile
fi
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
@@ -160,10 +170,12 @@ do_configure_prepend () {
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf
+ sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf
fi
if [ -e "${S}/tools/lib/api/Makefile" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile
+ sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/lib/api/Makefile
fi
if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then
sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile
@@ -201,6 +213,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python"
RDEPENDS_${PN} += "elfutils bash"
+RDEPENDS_${PN}-doc += "man"
RDEPENDS_${PN}-archive =+ "bash"
RDEPENDS_${PN}-python =+ "bash python python-modules"
RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
@@ -209,10 +222,11 @@ RDEPENDS_${PN}-tests =+ "python"
RSUGGESTS_SCRIPTING = "${@perf_feature_enabled('perf-scripting', '${PN}-perl ${PN}-python', '',d)}"
RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
+#FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core /usr/lib64/traceevent ${libdir}/traceevent"
FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent"
FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
-FILES_${PN}-python = "${libdir}/python*/site-packages ${libdir}/perf/perf-core/scripts/python"
+FILES_${PN}-python = "${libdir}/perf/perf-core/scripts/python ${PYTHON_SITEPACKAGES_DIR}"
FILES_${PN}-python += "${libexecdir}/perf-core/scripts/python/*"
FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
new file mode 100644
index 000000000..202f354d2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
@@ -0,0 +1,42 @@
+From 27df521c68e7c8b5b050dab15f40aa15fd03623a Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 4 May 2016 14:58:24 +0300
+Subject: [PATCH] Avoid building docs
+
+Upstream-Status: Inappropriate
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ Makefile.am | 2 +-
+ m4/yelp.m4 | 6 ------
+ 2 files changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b919a3f..3a3851d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = daemon data help lib po src tools tests
++SUBDIRS = daemon data lib po src tools tests
+
+ EXTRA_DIST = AUTHORS tap-test COPYING.gpl-2
+
+diff --git a/m4/yelp.m4 b/m4/yelp.m4
+index 5db847f..1b6ede4 100644
+--- a/m4/yelp.m4
++++ b/m4/yelp.m4
+@@ -27,12 +27,6 @@ AC_ARG_WITH([help-dir],
+ HELP_DIR="$with_help_dir"
+ AC_SUBST(HELP_DIR)
+
+-AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
+-AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
+-if test x"$ITSTOOL" = x; then
+- AC_MSG_ERROR([itstool not found])
+-fi
+-
+ AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
+ AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
+ if test x"$XMLLINT" = x; then
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
new file mode 100644
index 000000000..608523272
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
@@ -0,0 +1,32 @@
+From 765d578145e31ddc9495adfab8037ade33c6a9cc Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 4 May 2016 10:59:36 +0300
+Subject: [PATCH] Disable check for polkit for UI
+
+The check is not technically required: sysprof just needs
+to be able to access system perf counters at runtime.
+
+Upstream-Status: Pending
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8559597..ecf93ad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -131,8 +131,8 @@ AS_IF([test "$enable_gtk" = auto],[
+ AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[enable_gtk=yes],[enable_gtk=no])
+ ])
+ AS_IF([test "$enable_gtk" = "yes"],[
+- AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[],[
+- AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version and polkit-gobject-1])
++ AS_IF([test "$have_gtk" = "yes"],[],[
++ AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version])
+ ])
+ ])
+ AM_CONDITIONAL(ENABLE_GTK, test "$enable_gtk" = "yes")
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
new file mode 100644
index 000000000..92e804f98
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
@@ -0,0 +1,38 @@
+From a2d385e504323641b1127821833c61e77301c90b Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sat, 11 Jun 2016 22:45:37 +0300
+Subject: [PATCH] Forward port mips & arm memory barrier patches
+
+Upstream-Status: Pending
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ lib/util/util.h | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/lib/util/util.h b/lib/util/util.h
+index 591722d..0768056 100644
+--- a/lib/util/util.h
++++ b/lib/util/util.h
+@@ -29,4 +29,19 @@
+ #define read_barrier() asm volatile("" ::: "memory")
+ #endif
+
++#ifdef __arm__
++/*
++ * Use the __kuser_memory_barrier helper in the CPU helper page. See
++ * arch/arm/kernel/entry-armv.S in the kernel source for details.
++ */
++#define read_barrier() ((void(*)(void))0xffff0fa0)()
++#endif
++
++#ifdef __mips__
++#define read_barrier() asm volatile(".set mips2\n\t" \
++ "sync\n\t" \
++ ".set mips0" ::: "memory")
++#endif
++
++
+ #endif /* SP_UTIL_H */
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch
new file mode 100644
index 000000000..ac1384c9b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch
@@ -0,0 +1,29 @@
+From 05816e6f9cd65b2624bb04de65fdf61031c7017f Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 10 Jun 2016 14:01:54 +0300
+Subject: [PATCH] callgraph: Use U64_TO_POINTER
+
+This fixes a "cast to pointer from integer of different size" on i586.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Pending
+---
+ lib/sp-callgraph-view.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/sp-callgraph-view.c b/lib/sp-callgraph-view.c
+index 02cc17b..58315b0 100644
+--- a/lib/sp-callgraph-view.c
++++ b/lib/sp-callgraph-view.c
+@@ -135,7 +135,7 @@ build_functions_store (StackNode *node,
+
+ gtk_list_store_append (state->store, &iter);
+ gtk_list_store_set (state->store, &iter,
+- COLUMN_NAME, (const gchar *)node->data,
++ COLUMN_NAME, U64_TO_POINTER(node->data),
+ COLUMN_SELF, 100.0 * size / state->profile_size,
+ COLUMN_TOTAL, 100.0 * total / state->profile_size,
+ COLUMN_POINTER, node,
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
new file mode 100644
index 000000000..158d9975f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
@@ -0,0 +1,41 @@
+From 2b4005d72d3393933a7914be102ea65505c536cc Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Thu, 21 Jul 2016 11:53:31 +0300
+Subject: [PATCH] configure: Add option to enable/disable polkit
+
+Changes the configure behaviour from autodetecting the polkit by default
+to having an option to disable it explicitly
+
+Upstream-Status: Pending
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure.ac | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 2246d5a..3d3fe0f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -104,10 +104,18 @@ PKG_CHECK_MODULES(GTK,
+ [gtk+-3.0 >= gtk_required_version],
+ [have_gtk=yes],
+ [have_gtk=no])
++AC_ARG_ENABLE([polkit],
++ AS_HELP_STRING([--disable-polkit], [Do not use Polkit]),
++ [enable_polkit="$enableval"], [enable_polkit="yes"])
++
++AS_IF([test "x$enable_polkit" = "xyes"], [
+ PKG_CHECK_MODULES(POLKIT,
+ [polkit-gobject-1],
+ [have_polkit=yes],
+ [have_polkit=no])
++ ])
++AM_CONDITIONAL([HAVE_POLKIT], [test "x$enable_polkit" = "xyes"])
++
+ PKG_CHECK_MODULES(SYSTEMD,
+ [libsystemd >= systemd_required_version],
+ [have_systemd=yes],
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch
index dcc2cbe67..f75ddad43 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch
@@ -7,8 +7,8 @@ Upstream-Status: Pending
Index: git/elfparser.h
===================================================================
---- git.orig/elfparser.h 2011-07-16 18:57:41.000000000 -0700
-+++ git/elfparser.h 2011-07-16 20:28:54.733829895 -0700
+--- git.orig/lib/util/elfparser.h 2011-07-16 18:57:41.000000000 -0700
++++ git/lib/util/elfparser.h 2011-07-16 20:28:54.733829895 -0700
@@ -17,6 +17,10 @@
*/
#include <glib.h>
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/gui-argument.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/gui-argument.patch
deleted file mode 100644
index d2c053e68..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/gui-argument.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Add the ability to explicitly enable/disable GUI support
-
-Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-Upstream-Status: Pending
-
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -62,12 +62,24 @@ KMICRO=`uname -r | cut -d"." -f 3 | cut
- # Pkgconfig dependencies
-
- core_dep="glib-2.0 >= 2.6.0"
--gui_dep="gtk+-2.0 > 2.6.0 gdk-pixbuf-2.0 pangoft2 libglade-2.0"
-
- PKG_CHECK_MODULES(CORE_DEP, $core_dep, [], AC_MSG_ERROR([sysprof dependencies not satisfied]))
-
--build_gui=yes
--PKG_CHECK_MODULES(GUI_DEP, $gui_dep, [], build_gui=no)
-+gui_dep="gtk+-2.0 > 2.6.0 gdk-pixbuf-2.0 pangoft2 libglade-2.0"
-+
-+AC_ARG_ENABLE([gui],
-+ [AS_HELP_STRING([--disable-gui],
-+ [Disable GUI functionality (requires gtk+, gdk-pixbuf, pangoft2, libglade) @<:@default=auto@:>@])],
-+ [],
-+ [enable_gui=auto])
-+
-+build_gui=no
-+AS_IF([test "x$enable_gui" != xno],
-+ [PKG_CHECK_MODULES(GUI_DEP, $gui_dep, build_gui=yes,
-+ [if test "x$enable_gui" != xauto; then
-+ AC_MSG_FAILURE(
-+ [--enable-gui was given, but gui dependencies were not satisfied])
-+ fi])])
-
- AM_CONDITIONAL([BUILD_GUI], [test "$build_gui" = yes])
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/rmb-arm.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/rmb-arm.patch
deleted file mode 100644
index c53ac6427..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/rmb-arm.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Upstream-Status: Pending
-
-Index: git/util.h
-===================================================================
---- git.orig/util.h 2010-12-07 22:41:57.156243001 -0600
-+++ git/util.h 2010-12-07 22:43:47.616243002 -0600
-@@ -37,4 +37,13 @@
- #define cpu_relax() asm volatile("" ::: "memory");
- #endif
-
-+#ifdef __arm__
-+/*
-+ * Use the __kuser_memory_barrier helper in the CPU helper page. See
-+ * arch/arm/kernel/entry-armv.S in the kernel source for details.
-+ */
-+#define rmb() ((void(*)(void))0xffff0fa0)()
-+#define cpu_relax() asm volatile("":::"memory")
-+#endif
-+
- #endif
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/rmb-mips.patch b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/rmb-mips.patch
deleted file mode 100644
index e055b8ad8..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/files/rmb-mips.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Pending
-
-Index: git/util.h
-===================================================================
---- git.orig/util.h 2010-12-08 01:22:44.486243001 -0600
-+++ git/util.h 2010-12-08 01:23:27.836243001 -0600
-@@ -37,4 +37,15 @@
- #define cpu_relax() asm volatile("" ::: "memory");
- #endif
-
-+#ifdef __mips__
-+#define rmb() asm volatile( \
-+ ".set mips2\n\t" \
-+ "sync\n\t" \
-+ ".set mips0" \
-+ : /* no output */ \
-+ : /* no input */ \
-+ : "memory")
-+#define cpu_relax() asm volatile("" ::: "memory")
-+#endif
-+
- #endif
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_git.bb
index 84c6aad39..8d8b62639 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/sysprof/sysprof_git.bb
@@ -1,31 +1,40 @@
SUMMARY = "System-wide Performance Profiler for Linux"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875"
+
+inherit gnomebase gettext systemd
DEPENDS = "glib-2.0"
-SRCREV = "cd44ee6644c3641507fb53b8a2a69137f2971219"
-PV = "1.2.0+git${SRCPV}"
+S = "${WORKDIR}/git"
+SRCREV = "9c6cec9b49766bf77c1713bc5a7c6d651e628068"
+PV = "3.20.0+git${SRCPV}"
SRC_URI = "git://git.gnome.org/sysprof \
file://define-NT_GNU_BUILD_ID.patch \
- file://gui-argument.patch \
+ file://0001-configure-Add-option-to-enable-disable-polkit.patch \
+ file://0001-Disable-check-for-polkit-for-UI.patch \
+ file://0001-Avoid-building-docs.patch \
+ file://0001-callgraph-Use-U64_TO_POINTER.patch \
+ file://0001-Forward-port-mips-arm-memory-barrier-patches.patch \
"
+SRC_URI[archive.md5sum] = "d56e8492033b60e247634731e7f760b9"
+SRC_URI[archive.sha256sum] = "4a338ad41bfffae87ef281f6e75c9660b3e0c6671bf5233be0c3f55a5e5b1ce5"
-SRC_URI_append_arm = " file://rmb-arm.patch"
-SRC_URI_append_armeb = " file://rmb-arm.patch"
-SRC_URI_append_mips = " file://rmb-mips.patch"
-SRC_URI_append_mips64 = " file://rmb-mips.patch"
-SRC_URI_append_mips64n32 = " file://rmb-mips.patch"
+AUTOTOOLS_AUXDIR = "${S}/build-aux"
-S = "${WORKDIR}/git"
+EXTRA_OECONF = "--enable-compile-warnings"
-inherit autotools pkgconfig
+PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
+PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit dbus"
-PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK2DISTROFEATURES}', 'gui', '', d)}"
-PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,gtk+ gdk-pixbuf pango libglade"
+SOLIBS = ".so"
+FILES_SOLIBSDEV = ""
+FILES_${PN} += "${datadir}/icons/"
+
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'sysprof2.service', '', d)}"
# We do not yet work for aarch64.
-#
COMPATIBLE_HOST = "^(?!aarch64).*"
-
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
index 3686c2f76..46820ef48 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
@@ -13,8 +13,6 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemtap:"
FILES_${PN} += "${datadir}/systemtap/runtime/uprobes"
-EXTRA_OEMAKE = ""
-
# Compile and install the uprobes kernel module on machines with utrace
# support. Note that staprun expects it in the systemtap/runtime directory,
# not in /lib/modules.
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch
deleted file mode 100644
index 33a89940a..000000000
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
-
-Index: git/doc/SystemTap_Tapset_Reference/Makefile.am
-===================================================================
---- git.orig/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 08:43:46.263339003 -0500
-+++ git/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 09:31:22.470083915 -0500
-@@ -27,6 +27,10 @@
- noinst_PROGRAMS = docproc
- SRCTREE=$(abs_top_srcdir)/
- DOCPROC=$(abs_builddir)/docproc
-+docproc_LINK = $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@
-+
-+docproc.o: $(srcdir)/docproc.c
-+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/docproc.c
-
- all: $(PDFDOCS) stamp-htmldocs stamp-mandocs
- tapsets.xml: docproc $(shell find $(SRCTREE)/tapset -name '*.stp')
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch
new file mode 100644
index 000000000..7d43a79e2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap/monitor-option.patch
@@ -0,0 +1,28 @@
+Add an option to explicitly disable the monitor (and therefore the dependency on
+json-c and ncurses).
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index cd781a2..e56079a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -570,13 +574,16 @@ dnl See if we have enough libraries and tools to build the virt server
+ fi
+ AM_CONDITIONAL([BUILD_VIRT], [test "${have_libvirt}" == "yes" -a "${have_libxml2}" == "yes" -a "$enable_virt" != "no"])
+
++AC_ARG_ENABLE([monitor], AS_HELP_STRING([--disable-monitor],[Disable monitor]))
++if test "$enable_monitor" != "no"; then
+ dnl Check for presence of json-c and ncurses for use in monitor mode
+ PKG_CHECK_MODULES([jsonc], [json-c], [have_jsonc=yes], [have_jsonc=no])
+ PKG_CHECK_MODULES([ncurses], [ncurses], [have_ncurses=yes], [have_ncurses=no])
+-AM_CONDITIONAL([HAVE_MONITOR_LIBS], [test "${have_jsonc}" == "yes" -a "${have_ncurses}" == "yes"])
+ if test "${have_jsonc}" == "yes" -a "${have_ncurses}" == yes; then
+ AC_DEFINE([HAVE_MONITOR_LIBS],[1],[Define to 1 if json-c and ncurses libraries are installed])
+ fi
++fi
++AM_CONDITIONAL([HAVE_MONITOR_LIBS], [test "${have_jsonc}" == "yes" -a "${have_ncurses}" == "yes" -a "$enable_monitor" != "no"])
+
+ AC_CACHE_CHECK([for assembler .section "?" flags support], stap_cv_sectionq, [
+ old_CFLAGS="$CFLAGS"
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
index 97064b838..43bf69e87 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -2,17 +2,14 @@ SUMMARY = "Script-directed dynamic tracing and performance analysis tool for Lin
require systemtap_git.inc
-DEPENDS = "elfutils sqlite3 systemtap-native"
-DEPENDS_class-native = "elfutils-native sqlite3-native gettext-native"
-DEPENDS_class-nativesdk = "nativesdk-elfutils nativesdk-sqlite3 nativesdk-gettext"
+DEPENDS = "boost elfutils"
-RDEPENDS_${PN} += "python bash"
-RDEPENDS_${PN}_class-native += "python-native"
-RDEPENDS_${PN}_class-nativesdk += "python-native"
+RDEPENDS_${PN} += "python3-core bash"
EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
--without-nss --without-avahi --without-dyninst \
--disable-server --disable-grapher --enable-prologues \
+ --with-python3 \
ac_cv_prog_have_javac=no \
ac_cv_prog_have_jar=no "
@@ -20,8 +17,10 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs"
EXTRA_OECONF += "${STAP_DOCS} "
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "sqlite monitor"
PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt"
+PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3"
+PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c"
inherit autotools gettext pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
index 656f15f80..304eb9975 100644
--- a/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/import-layers/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,14 +1,14 @@
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "7009f2f782e52d6105fe68d6ea2a9820a1099c06"
-PV = "2.9"
+SRCREV = "616ec7a0b916df7785d911b824c3df6eb022b213"
+PV = "3.0"
SRC_URI = "git://sourceware.org/git/systemtap.git \
- file://docproc-build-fix.patch \
file://obsolete_automake_macros.patch \
file://system_map_location.patch \
file://configure-allow-to-disable-libvirt.patch \
file://x32_abi_time.patch \
+ file://monitor-option.patch \
"
# systemtap doesn't support mips
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch
deleted file mode 100644
index 0ead0cdaf..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 3f1dba9a821b53b42001605f9a126a958804884f Mon Sep 17 00:00:00 2001
-From: Takashi Iwai <tiwai@suse.de>
-Date: Mon, 9 Nov 2015 13:37:26 +0100
-Subject: [PATCH] topology: Add missing include sys/stat.h
-
-Necessary for proper definitions of S_IRUSR & co. Otherwise it
-results in compile errors with old glibc and uclibc:
- parser.c: In function 'snd_tplg_build_file':
- parser.c:262: error: 'S_IRUSR' undeclared (first use in this function)
- parser.c:262: error: (Each undeclared identifier is reported only once
- parser.c:262: error: for each function it appears in.)
-
-Upstream-Status: Backport
-
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- src/topology/parser.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/topology/parser.c b/src/topology/parser.c
-index 80a0ae0..18bb9c7 100644
---- a/src/topology/parser.c
-+++ b/src/topology/parser.c
-@@ -16,6 +16,7 @@
- Liam Girdwood <liam.r.girdwood@linux.intel.com>
- */
-
-+#include <sys/stat.h>
- #include "list.h"
- #include "tplg_local.h"
-
---
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
index 161619b27..3d4458593 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
@@ -1,4 +1,4 @@
-From 7dcf46969e85c881c901df4b49309e9091cad16a Mon Sep 17 00:00:00 2001
+From c2c13cf0c469862cd39b2a69862002331ab7c8cb Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 9 Feb 2016 14:01:18 -0800
Subject: [PATCH] avoid including <sys/poll.h> directly
@@ -24,7 +24,7 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/aserver/aserver.c b/aserver/aserver.c
-index 1579da7..ef64248 100644
+index ac20706..46f731a 100644
--- a/aserver/aserver.c
+++ b/aserver/aserver.c
@@ -20,7 +20,7 @@
@@ -62,7 +62,7 @@ index 3c2766e..a546194 100644
#include <stdarg.h>
#include <endian.h>
diff --git a/include/local.h b/include/local.h
-index b429f5d..e05898f 100644
+index 317f2e3..6a43a47 100644
--- a/include/local.h
+++ b/include/local.h
@@ -47,7 +47,7 @@
@@ -73,20 +73,20 @@ index b429f5d..e05898f 100644
+#include <poll.h>
#include <sys/types.h>
#include <errno.h>
- #include <linux/types.h>
+ #if defined(__linux__)
diff --git a/src/control/control.c b/src/control/control.c
-index 4a28cf6..071c5db 100644
+index 6c00b8e..fd0c303 100644
--- a/src/control/control.c
+++ b/src/control/control.c
-@@ -48,7 +48,7 @@ and IEC958 structure.
+@@ -90,7 +90,7 @@ I/O operations.
#include <string.h>
#include <fcntl.h>
#include <signal.h>
-#include <sys/poll.h>
+#include <poll.h>
+ #include <stdbool.h>
#include "control_local.h"
- /**
diff --git a/src/control/control_shm.c b/src/control/control_shm.c
index bd07d4a..9a2e268 100644
--- a/src/control/control_shm.c
@@ -101,7 +101,7 @@ index bd07d4a..9a2e268 100644
#include <sys/uio.h>
#include <sys/mman.h>
diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
-index fd3877c..52ac093 100644
+index c3925cc..18f1dd5 100644
--- a/src/pcm/pcm_direct.c
+++ b/src/pcm/pcm_direct.c
@@ -30,7 +30,7 @@
@@ -114,7 +114,7 @@ index fd3877c..52ac093 100644
#include <sys/sem.h>
#include <sys/wait.h>
diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c
-index 5c4fbe1..2cfa7db 100644
+index 1948289..4cf220a 100644
--- a/src/pcm/pcm_mmap.c
+++ b/src/pcm/pcm_mmap.c
@@ -22,7 +22,7 @@
@@ -153,7 +153,7 @@ index a815ac6..4ee958c 100644
#include <sys/mman.h>
#include <netinet/in.h>
diff --git a/src/seq/seq.c b/src/seq/seq.c
-index 620ca3f..681cef1 100644
+index 9279830..d2027cb 100644
--- a/src/seq/seq.c
+++ b/src/seq/seq.c
@@ -777,7 +777,7 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev)
@@ -179,5 +179,5 @@ index 9843aa8..eaa71f0 100644
#include <sys/shm.h>
#include "list.h"
--
-1.9.1
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb
deleted file mode 100644
index a73da2882..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "ALSA sound library"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
-SECTION = "libs/multimedia"
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
- file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
-
-BBCLASSEXTEND = "native nativesdk"
-
-# configure.in sets -D__arm__ on the command line for any arm system
-# (not just those with the ARM instruction set), this should be removed,
-# (or replaced by a permitted #define).
-#FIXME: remove the following
-ARM_INSTRUCTION_SET = "arm"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
- file://Check-if-wordexp-function-is-supported.patch \
- file://avoid-including-sys-poll.h-directly.patch \
- file://0001-topology-Add-missing-include-sys-stat.h.patch \
-"
-SRC_URI[md5sum] = "69515ca73c3c4a212ef45160dea846c1"
-SRC_URI[sha256sum] = "dfde65d11e82b68f82e562ab6228c1fb7c78854345d3c57e2c68a9dd3dae1f15"
-
-inherit autotools pkgconfig
-
-require alsa-fpu.inc
-EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
-
-EXTRA_OECONF = "--disable-python"
-
-EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
-
-PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc"
-FILES_${PN} += "${libdir}/${BPN}/smixer/*.so"
-FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la"
-FILES_libasound = "${libdir}/libasound.so.*"
-FILES_alsa-server = "${bindir}/*"
-FILES_alsa-conf = "${datadir}/alsa/"
-FILES_alsa-conf-base = "\
-${datadir}/alsa/alsa.conf \
-${datadir}/alsa/cards/aliases.conf \
-${datadir}/alsa/pcm/default.conf \
-${datadir}/alsa/pcm/dmix.conf \
-${datadir}/alsa/pcm/dsnoop.conf"
-
-RDEPENDS_libasound = "alsa-conf-base alsa-conf"
-# upgrade path
-RPROVIDES_${PN}-dev = "alsa-dev"
-RREPLACES_${PN}-dev = "alsa-dev"
-RCONFLICTS_${PN}-dev = "alsa-dev"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb
new file mode 100644
index 000000000..e313da78e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.2.bb
@@ -0,0 +1,44 @@
+SUMMARY = "ALSA sound library"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+ file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
+ file://Check-if-wordexp-function-is-supported.patch \
+ file://avoid-including-sys-poll.h-directly.patch \
+"
+SRC_URI[md5sum] = "1946e6438b8262a7b8fdadacd0e06ba7"
+SRC_URI[sha256sum] = "d38dacd9892b06b8bff04923c380b38fb2e379ee5538935ff37e45b395d861d6"
+
+inherit autotools pkgconfig
+
+require alsa-fpu.inc
+EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
+
+EXTRA_OECONF = "--disable-python"
+
+EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
+
+PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc"
+FILES_${PN} += "${libdir}/${BPN}/smixer/*.so"
+FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la"
+FILES_libasound = "${libdir}/libasound.so.*"
+FILES_alsa-server = "${bindir}/*"
+FILES_alsa-conf = "${datadir}/alsa/"
+FILES_alsa-conf-base = "\
+${datadir}/alsa/alsa.conf \
+${datadir}/alsa/cards/aliases.conf \
+${datadir}/alsa/pcm/default.conf \
+${datadir}/alsa/pcm/dmix.conf \
+${datadir}/alsa/pcm/dsnoop.conf"
+
+RDEPENDS_libasound = "alsa-conf-base alsa-conf"
+# upgrade path
+RPROVIDES_${PN}-dev = "alsa-dev"
+RREPLACES_${PN}-dev = "alsa-dev"
+RCONFLICTS_${PN}-dev = "alsa-dev"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch
deleted file mode 100644
index 8e5b6a2a2..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 4350314c941489833a8baa930e16512e55f72a13 Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Wed, 27 Jan 2016 13:22:38 +0200
-Subject: [PATCH] pph: include config.h from rate_speexrate.c
-
-Fixes compilation against libspeexdsp 1.2rc3.
-
-rate_speexrate.c includes speex_resampler.h, which depends on config.h
-by referencing the HAVE_SPEEX_SPEEXDSP_TYPES_H macro. AFAIK it's not
-a good idea to include config.h from headers (I don't know/remember
-why, though), which is why I include config.h from rate_speexrate.c
-instead of speex_resampler.h.
-
-Upstream-Status: Accepted [expected in 1.1.1]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- pph/rate_speexrate.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/pph/rate_speexrate.c b/pph/rate_speexrate.c
-index 0a1325c..8fc4cef 100644
---- a/pph/rate_speexrate.c
-+++ b/pph/rate_speexrate.c
-@@ -28,6 +28,7 @@
- POSSIBILITY OF SUCH DAMAGE.
- */
-
-+#include "config.h"
- #include <stdio.h>
- #include <alsa/asoundlib.h>
- #include <alsa/pcm_rate.h>
---
-2.7.0.rc3
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb
deleted file mode 100644
index fec657530..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb
+++ /dev/null
@@ -1,105 +0,0 @@
-SUMMARY = "ALSA Plugins"
-HOMEPAGE = "http://alsa-project.org"
-SECTION = "multimedia"
-
-# The primary license of alsa-plugins is LGPLv2.1.
-#
-# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
-# build system, and doesn't affect the licensing of the build result.
-#
-# The samplerate plugin source code is licensed under GPLv2+ to be consistent
-# with the libsamplerate license. However, if the licensee has a commercial
-# license for libsamplerate, the samplerate plugin may be used under the terms
-# of LGPLv2.1 like the rest of the plugins.
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "\
- file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
- file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
- file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
-"
-
-SRC_URI = "\
- ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2 \
- file://0001-pph-include-config.h-from-rate_speexrate.c.patch \
-"
-SRC_URI[md5sum] = "b123e42ed881b9adbc99e4040f257c39"
-SRC_URI[sha256sum] = "3b83c329953bef99f5fe25ae04ec4a455fe6514939f3b45a5321966652b2c9ee"
-
-DEPENDS += "alsa-lib"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "\
- samplerate \
- speexdsp \
- ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
-"
-PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
-PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
-PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
-PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
-PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
-
-PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
-
-PACKAGES_DYNAMIC = "^libasound-module-.*"
-
-# The alsa-plugins package doesn't itself contain anything, it just depends on
-# all built plugins.
-ALLOW_EMPTY_${PN} = "1"
-
-do_install_append() {
- rm ${D}${libdir}/alsa-lib/*.la
-
- # We use the example as is, so just drop the .example suffix.
- if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
- mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
- fi
-}
-
-python populate_packages_prepend() {
- plugindir = bb.data.expand('${libdir}/alsa-lib/', d)
- packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
- d.setVar("RDEPENDS_alsa-plugins", packages)
-}
-
-# The rate plugins create some symlinks. For example, the samplerate plugin
-# creates these links to the main plugin file:
-#
-# libasound_module_rate_samplerate_best.so
-# libasound_module_rate_samplerate_linear.so
-# libasound_module_rate_samplerate_medium.so
-# libasound_module_rate_samplerate_order.so
-#
-# The other rate plugins create similar links. We have to add the links to
-# FILES manually, because do_split_packages() skips the links (which is good,
-# because we wouldn't want do_split_packages() to create separate packages for
-# the symlinks).
-#
-# The symlinks cause QA errors, because usually it's a bug if a non
-# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
-# the errors are false positives, so we disable the QA checks.
-FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
-
-# 50-pulseaudio.conf defines a device named "pulse" that applications can use
-# if they explicitly want to use the PulseAudio plugin.
-# 99-pulseaudio-default.conf configures the "default" device to use the
-# PulseAudio plugin.
-FILES_${PN}-pulseaudio-conf += "\
- ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
- ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
-"
-
-RDEPENDS_${PN}-pulseaudio-conf += "\
- libasound-module-conf-pulse \
- libasound-module-ctl-pulse \
- libasound-module-pcm-pulse \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb
new file mode 100644
index 000000000..c95ea5416
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.1.bb
@@ -0,0 +1,103 @@
+SUMMARY = "ALSA Plugins"
+HOMEPAGE = "http://alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "multimedia"
+
+# The primary license of alsa-plugins is LGPLv2.1.
+#
+# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
+# build system, and doesn't affect the licensing of the build result.
+#
+# The samplerate plugin source code is licensed under GPLv2+ to be consistent
+# with the libsamplerate license. However, if the licensee has a commercial
+# license for libsamplerate, the samplerate plugin may be used under the terms
+# of LGPLv2.1 like the rest of the plugins.
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+ file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
+ file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
+"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2"
+SRC_URI[md5sum] = "69f9f3e2de3c97fc71d496e91e271fe5"
+SRC_URI[sha256sum] = "8ea4d1e082c36528a896a2581e5eb62d4dc2683238e353050d0d624e65f901f1"
+
+DEPENDS += "alsa-lib"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "\
+ samplerate \
+ speexdsp \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
+"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
+PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
+PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
+PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
+
+PACKAGES_DYNAMIC = "^libasound-module-.*"
+
+# The alsa-plugins package doesn't itself contain anything, it just depends on
+# all built plugins.
+ALLOW_EMPTY_${PN} = "1"
+
+do_install_append() {
+ rm ${D}${libdir}/alsa-lib/*.la
+
+ # We use the example as is, so just drop the .example suffix.
+ if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
+ mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
+ fi
+}
+
+python populate_packages_prepend() {
+ plugindir = bb.data.expand('${libdir}/alsa-lib/', d)
+ packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
+ d.setVar("RDEPENDS_alsa-plugins", packages)
+}
+
+# The rate plugins create some symlinks. For example, the samplerate plugin
+# creates these links to the main plugin file:
+#
+# libasound_module_rate_samplerate_best.so
+# libasound_module_rate_samplerate_linear.so
+# libasound_module_rate_samplerate_medium.so
+# libasound_module_rate_samplerate_order.so
+#
+# The other rate plugins create similar links. We have to add the links to
+# FILES manually, because do_split_packages() skips the links (which is good,
+# because we wouldn't want do_split_packages() to create separate packages for
+# the symlinks).
+#
+# The symlinks cause QA errors, because usually it's a bug if a non
+# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
+# the errors are false positives, so we disable the QA checks.
+FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
+
+# 50-pulseaudio.conf defines a device named "pulse" that applications can use
+# if they explicitly want to use the PulseAudio plugin.
+# 99-pulseaudio-default.conf configures the "default" device to use the
+# PulseAudio plugin.
+FILES_${PN}-pulseaudio-conf += "\
+ ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
+ ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
+"
+
+RDEPENDS_${PN}-pulseaudio-conf += "\
+ libasound-module-conf-pulse \
+ libasound-module-ctl-pulse \
+ libasound-module-pcm-pulse \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch
new file mode 100644
index 000000000..bf95cac44
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch
@@ -0,0 +1,75 @@
+From 1cc0aa4dbd3c7f1267809e0e1ca57d46f4803bfd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 17 Apr 2016 23:25:18 +0000
+Subject: [PATCH] Cus428Midi: Explicitly cast constant to char type
+
+This is flagged by gcc6
+Cus428Midi.cc:83:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ us428control/Cus428Midi.cc | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/us428control/Cus428Midi.cc b/us428control/Cus428Midi.cc
+index b9e6783..bef7bb1 100644
+--- a/us428control/Cus428Midi.cc
++++ b/us428control/Cus428Midi.cc
+@@ -32,22 +32,22 @@ char Cus428Midi::KnobParam[] = {
+ 0x2A,
+ 0x29,
+ 0x28,
+- -1,
++ static_cast<char>(-1),
+ 0x10,
+ 0x11,
+ 0x18,
+ 0x19,
+ 0x1A,
+- -1,
+- -1,
+- -1,
+- -1,
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
+ 0x2C,
+ 0x2D,
+ 0x2E,
+ 0x2F,
+- -1,
+- -1,
++ static_cast<char>(-1),
++ static_cast<char>(-1),
+ 0x20,
+ 0x21,
+ 0x22,
+@@ -64,14 +64,14 @@ char Cus428Midi::KnobParam[] = {
+ 5,
+ 6,
+ 7,
+- -1,
+- -1,
+- -1,
+- -1,
+- -1,
+- -1,
+- -1,
+- -1,
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
++ static_cast<char>(-1),
+ 0x30,
+ 0x31,
+ 0x32,
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
index 9e633f1f7..8d4a14658 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
@@ -1,6 +1,6 @@
SUMMARY = "Advanced tools for certain ALSA sound card drivers"
HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "console/utils"
LICENSE = "GPLv2 & LGPLv2+"
DEPENDS = "alsa-lib ncurses glib-2.0"
@@ -10,11 +10,11 @@ LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae1
SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
file://autotools.patch \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
- 'file://makefile_no_gtk.patch', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'file://makefile_no_gtk.patch', d)} \
file://gitcompile_hdajacksensetest \
file://0001-as10k1-Make-output_tram_line-static-inline.patch \
- "
+ file://0001-Cus428Midi-Explicitly-cast-constant-to-char-type.patch \
+ "
SRC_URI[md5sum] = "b476a5afaa3ea3230855553ad59d259d"
SRC_URI[sha256sum] = "7d34558c590a50294b36576d257316a1ac5cd951eb8cd7d330e09f8cc757ab51"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb
deleted file mode 100644
index a98f9b90b..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require alsa-utils_${PV}.bb
-
-SUMMARY = "Shell scripts that show help info and create ALSA configuration files"
-PROVIDES = "alsa-utils-alsaconf"
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/alsa-utils:"
-
-PACKAGES = "${PN}"
-RDEPENDS_${PN} += "bash"
-
-FILES_${PN} = "${sbindir}/alsaconf \
- ${sbindir}/alsa-info.sh \
- "
-
-S = "${WORKDIR}/alsa-utils-${PV}"
-
-do_install() {
- install -d ${D}${sbindir}
- install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/
- install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
new file mode 100644
index 000000000..fef79d9c9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.2.bb
@@ -0,0 +1,25 @@
+require alsa-utils_${PV}.bb
+
+SUMMARY = "Shell scripts that show help info and create ALSA configuration files"
+PROVIDES = "alsa-utils-alsaconf"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/alsa-utils:"
+
+PACKAGES = "${PN}"
+RDEPENDS_${PN} += "bash"
+
+FILES_${PN} = "${sbindir}/alsaconf \
+ ${sbindir}/alsa-info.sh \
+ ${sbindir}/alsabat-test.sh \
+ "
+
+S = "${WORKDIR}/alsa-utils-${PV}"
+
+do_install() {
+ install -d ${D}${sbindir}
+ install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/
+ install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/
+ if ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'true', 'false', d)}; then
+ install -m 0755 ${S}/bat/alsabat-test.sh ${D}${sbindir}/
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch
deleted file mode 100644
index b6d7d4f0d..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From 28c29dece6c434e7d3d01e805555ba7ddf6fba65 Mon Sep 17 00:00:00 2001
-From: "Lu, Han" <han.lu@intel.com>
-Date: Wed, 3 Feb 2016 14:20:33 +0800
-Subject: [PATCH] alsabat: rename to avoid naming conflict
-
-alsa-utils as well as bareos-bat (as well a some Bacula packages)
-all contain a program called /usr/bin/bat, which causes conflicts on
-various distributions ("basic audio tester" vs "bareos administration
-tool"("bacula administration tool")).
-Rename to avoid conflict.
-
-Signed-off-by: Lu, Han <han.lu@intel.com>
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
-Upstream-Status: Accepted [expected in version 1.1.1]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- bat/Makefile.am | 10 +++++-----
- bat/{bat.1 => alsabat.1} | 43 ++++++++++++++++++++++---------------------
- bat/bat.c | 2 +-
- 3 files changed, 28 insertions(+), 27 deletions(-)
- rename bat/{bat.1 => alsabat.1} (72%)
-
-diff --git a/bat/Makefile.am b/bat/Makefile.am
-index 842ae6b..985f00c 100644
---- a/bat/Makefile.am
-+++ b/bat/Makefile.am
-@@ -1,9 +1,9 @@
--bin_PROGRAMS = bat
--man_MANS = bat.1
-+bin_PROGRAMS = alsabat
-+man_MANS = alsabat.1
-
--EXTRA_DIST = bat.1
-+EXTRA_DIST = alsabat.1
-
--bat_SOURCES = \
-+alsabat_SOURCES = \
- bat.c \
- common.c \
- analyze.c \
-@@ -21,4 +21,4 @@ noinst_HEADERS = \
- AM_CPPFLAGS = \
- -Wall -I$(top_srcdir)/include
-
--bat_LDADD = @FFTW_LIB@
-+alsabat_LDADD = @FFTW_LIB@
-diff --git a/bat/bat.1 b/bat/alsabat.1
-similarity index 72%
-rename from bat/bat.1
-rename to bat/alsabat.1
-index e00fc27..8d0b9c0 100644
---- a/bat/bat.1
-+++ b/bat/alsabat.1
-@@ -1,23 +1,23 @@
--.TH BAT 1 "20th October 2015"
-+.TH ALSABAT 1 "20th October 2015"
- .SH NAME
--bat \- command\-line sound tester for ALSA sound card driver
-+alsabat \- command\-line sound tester for ALSA sound card driver
-
- .SH SYNOPSIS
--\fBbat\fP [\fIflags\fP]
-+\fBalsabat\fP [\fIflags\fP]
-
- .SH DESCRIPTION
--\fBBAT(Basic Audio Tester)\fP is a simple command\-line utility intended
--to help automate audio driver and sound server testing with little human
--interaction. BAT can be used to test audio quality, stress test features
--and test audio before and after PM state changes.
-+\fBALSABAT(ALSA Basic Audio Tester)\fP is a simple command\-line utility
-+intended to help automate audio driver and sound server testing with little
-+human interaction. ALSABAT can be used to test audio quality, stress test
-+features and test audio before and after PM state changes.
-
--BAT's design is relatively simple. BAT plays an audio stream and captures
--the same stream in either a digital or analog loop back. It then compares
--the captured stream using a FFT to the original to determine if the test
--case passes or fails.
-+ALSABAT's design is relatively simple. ALSABAT plays an audio stream and
-+captures the same stream in either a digital or analog loop back. It then
-+compares the captured stream using a FFT to the original to determine if
-+the test case passes or fails.
-
--BAT can either run wholly on the target machine being tested (standalone
--mode) or can run as a client/server mode where by bat client runs on the
-+ALSABAT can either run wholly on the target machine being tested (standalone
-+mode) or can run as a client/server mode where by alsabat client runs on the
- target and runs as a server on a separate tester machine. The client/server
- mode still requires some manual interaction for synchronization, but this
- is actively being developed for future releases.
-@@ -93,8 +93,8 @@ Frequencies with amplitude larger than threshold will be recognized as a
- peak, and the frequency with largest peak value will be recognized as a
- detected frequency.
- .br
--BAT then compares the detected frequency to target frequency, to decide
--if the detecting passes or fails.
-+ALSABAT then compares the detected frequency to target frequency, to
-+decide if the detecting passes or fails.
- .br
- The default value is 3.0.
- .TP
-@@ -117,18 +117,19 @@ Target WAV file to save capture test content.
- .TP
- \fI\-\-local\fP
- Internal loopback mode.
--Playback, capture and analysis internal to BAT only. This is intended for
--developers to test new BAT features as no audio is routed outside of BAT.
-+Playback, capture and analysis internal to ALSABAT only. This is intended
-+for developers to test new ALSABAT features as no audio is routed outside
-+of ALSABAT.
-
- .SH EXAMPLES
-
- .TP
--\fBbat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
-+\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
- Generate and play a sine wave of 250 Hertz with 2 channel and S32_LE format,
- and then capture and analyze.
-
- .TP
--\fBbat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
-+\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
- Play the RIFF WAV file "500Hz.wav" which contains 500 Hertz waveform LPCM
- data, and then capture and analyze.
-
-@@ -152,7 +153,7 @@ Currently only support RIFF WAV format with PCM data. Please report any bugs to
- the alsa-devel mailing list.
-
- .SH AUTHOR
--\fBbat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard Gautier
--<bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
-+\fBalsabat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard
-+Gautier <bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
- This document is by Liam Girdwood <liam.r.girdwood@linux.intel.com> and Han Lu
- <han.lu@intel.com>.
-diff --git a/bat/bat.c b/bat/bat.c
-index 086b9fa..ddb60b7 100644
---- a/bat/bat.c
-+++ b/bat/bat.c
-@@ -272,7 +272,7 @@ static void test_capture(struct bat *bat)
- static void usage(struct bat *bat)
- {
- fprintf(bat->log,
--_("Usage: bat [-options]...\n"
-+_("Usage: alsabat [-options]...\n"
- "\n"
- " -h, --help this help\n"
- " -D pcm device for both playback and capture\n"
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb
deleted file mode 100644
index af4048818..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb
+++ /dev/null
@@ -1,102 +0,0 @@
-SUMMARY = "ALSA sound utilities"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
-SECTION = "console/utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
-DEPENDS = "alsa-lib ncurses libsamplerate0"
-
-PACKAGECONFIG ??= "udev"
-PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftw"
-PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
-PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
- file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
- file://0001-alsabat-rename-to-avoid-naming-conflict.patch \
- "
-
-SRC_URI[md5sum] = "b9d6102fbbd0b68040bb77023ed30c0c"
-SRC_URI[sha256sum] = "3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1"
-
-# lazy hack. needs proper fixing in gettext.m4, see
-# http://bugs.openembedded.org/show_bug.cgi?id=2348
-# please close bug and remove this comment when properly fixed
-#
-EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
-
-inherit autotools gettext pkgconfig
-
-# This are all packages that we need to make. Also, the now empty alsa-utils
-# ipk depends on them.
-
-ALSA_UTILS_PKGS = "\
- ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
- alsa-utils-alsamixer \
- alsa-utils-alsatplg \
- alsa-utils-midi \
- alsa-utils-aplay \
- alsa-utils-amixer \
- alsa-utils-aconnect \
- alsa-utils-iecset \
- alsa-utils-speakertest \
- alsa-utils-aseqnet \
- alsa-utils-aseqdump \
- alsa-utils-alsactl \
- alsa-utils-alsaloop \
- alsa-utils-alsaucm \
- "
-
-PACKAGES += "${ALSA_UTILS_PKGS}"
-RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
-
-FILES_${PN} = ""
-FILES_alsa-utils-alsabat = "${bindir}/alsabat"
-FILES_alsa-utils-alsatplg = "${bindir}/alsatplg"
-FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord"
-FILES_alsa-utils-amixer = "${bindir}/amixer"
-FILES_alsa-utils-alsamixer = "${bindir}/alsamixer"
-FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
-FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
-FILES_alsa-utils-aconnect = "${bindir}/aconnect"
-FILES_alsa-utils-aseqnet = "${bindir}/aseqnet"
-FILES_alsa-utils-iecset = "${bindir}/iecset"
-FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
-FILES_alsa-utils-aseqdump = "${bindir}/aseqdump"
-FILES_alsa-utils-alsaloop = "${bindir}/alsaloop"
-FILES_alsa-utils-alsaucm = "${bindir}/alsaucm"
-
-SUMMARY_alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
-SUMMARY_alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
-SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA"
-SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
-SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
-SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility"
-SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
-SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager"
-SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
-SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
-SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
-SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
-SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility"
-SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager"
-
-RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
-
-ALLOW_EMPTY_alsa-utils = "1"
-
-do_install() {
- autotools_do_install
-
- # We don't ship this here because it requires a dependency on bash.
- # See alsa-utils-scripts_${PV}.bb
- rm ${D}${sbindir}/alsaconf
- rm ${D}${sbindir}/alsa-info.sh
-
- if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
- # This is where alsa-utils will install its rules if we don't tell it anything else.
- rm -rf ${D}/lib/udev
- rmdir --ignore-fail-on-non-empty ${D}/lib
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb
new file mode 100644
index 000000000..a22d999fb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.2.bb
@@ -0,0 +1,109 @@
+SUMMARY = "ALSA sound utilities"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
+SECTION = "console/utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
+DEPENDS = "alsa-lib ncurses libsamplerate0"
+
+PACKAGECONFIG ??= "udev"
+
+# alsabat can be built also without fftw support (with reduced functionality).
+# It would be better to always enable alsabat, but provide an option for
+# enabling/disabling fftw. The configure script doesn't support that, however
+# (at least in any obvious way), so for now we only support alsabat with fftw
+# or no alsabat at all.
+PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
+
+PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
+PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
+ file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
+ "
+
+SRC_URI[md5sum] = "38ac7c781f80c41c02b4664d8cbafa87"
+SRC_URI[sha256sum] = "7af603c0877d1251599d65b4fbc372e63a54371b888f5c26c6a86ac1d0519071"
+
+# lazy hack. needs proper fixing in gettext.m4, see
+# http://bugs.openembedded.org/show_bug.cgi?id=2348
+# please close bug and remove this comment when properly fixed
+#
+EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
+
+inherit autotools gettext pkgconfig
+
+# This are all packages that we need to make. Also, the now empty alsa-utils
+# ipk depends on them.
+
+ALSA_UTILS_PKGS = "\
+ ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
+ alsa-utils-alsamixer \
+ alsa-utils-alsatplg \
+ alsa-utils-midi \
+ alsa-utils-aplay \
+ alsa-utils-amixer \
+ alsa-utils-aconnect \
+ alsa-utils-iecset \
+ alsa-utils-speakertest \
+ alsa-utils-aseqnet \
+ alsa-utils-aseqdump \
+ alsa-utils-alsactl \
+ alsa-utils-alsaloop \
+ alsa-utils-alsaucm \
+ "
+
+PACKAGES += "${ALSA_UTILS_PKGS}"
+RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
+
+FILES_${PN} = ""
+FILES_alsa-utils-alsabat = "${bindir}/alsabat"
+FILES_alsa-utils-alsatplg = "${bindir}/alsatplg"
+FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord"
+FILES_alsa-utils-amixer = "${bindir}/amixer"
+FILES_alsa-utils-alsamixer = "${bindir}/alsamixer"
+FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
+FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
+FILES_alsa-utils-aconnect = "${bindir}/aconnect"
+FILES_alsa-utils-aseqnet = "${bindir}/aseqnet"
+FILES_alsa-utils-iecset = "${bindir}/iecset"
+FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
+FILES_alsa-utils-aseqdump = "${bindir}/aseqdump"
+FILES_alsa-utils-alsaloop = "${bindir}/alsaloop"
+FILES_alsa-utils-alsaucm = "${bindir}/alsaucm"
+
+SUMMARY_alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
+SUMMARY_alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
+SUMMARY_alsa-utils-aplay = "Play (and record) sound files using ALSA"
+SUMMARY_alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
+SUMMARY_alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
+SUMMARY_alsa-utils-speakertest = "ALSA surround speaker test utility"
+SUMMARY_alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
+SUMMARY_alsa-utils-aconnect = "ALSA sequencer connection manager"
+SUMMARY_alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
+SUMMARY_alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
+SUMMARY_alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
+SUMMARY_alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
+SUMMARY_alsa-utils-alsaloop = "ALSA PCM loopback utility"
+SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager"
+
+RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
+
+ALLOW_EMPTY_alsa-utils = "1"
+
+do_install() {
+ autotools_do_install
+
+ # We don't ship this here because it requires a dependency on bash.
+ # See alsa-utils-scripts_${PV}.bb
+ rm ${D}${sbindir}/alsaconf
+ rm ${D}${sbindir}/alsa-info.sh
+ rm -f ${D}${sbindir}/alsabat-test.sh
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
+ # This is where alsa-utils will install its rules if we don't tell it anything else.
+ rm -rf ${D}/lib/udev
+ rmdir --ignore-fail-on-non-empty ${D}/lib
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch
new file mode 100644
index 000000000..69429af8f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch
@@ -0,0 +1,32 @@
+It will add -mips64r6 and -mips64r2 to cmdline which will
+cause conflicts
+
+in OE we user mips32r2 and mips64r2 for mips arch versions
+so there is no benefit of detecting it automatically by
+poking at tools especially in cross env
+
+Fixes errors like
+
+linking -mnan=2008 module with previous -mnan=legacy modules
+failed to merge target specific data of file
+
+-Khem
+Upstream-Status: Inappropriate [OE-Specific]
+
+Index: ffmpeg-3.1.1/configure
+===================================================================
+--- ffmpeg-3.1.1.orig/configure
++++ ffmpeg-3.1.1/configure
+@@ -5220,12 +5220,9 @@ elif enabled mips; then
+
+ # Enable minimum ISA based on selected options
+ if enabled mips64; then
+- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6'
+ enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2'
+ disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64'
+ else
+- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6'
+- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5'
+ enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2'
+ disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32'
+ fi
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb
deleted file mode 100644
index 1dfbb9b04..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb
+++ /dev/null
@@ -1,139 +0,0 @@
-SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
-DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
- mux, demux, stream, filter and play pretty much anything that humans and machines \
- have created. It supports the most obscure ancient formats up to the cutting edge."
-HOMEPAGE = "https://www.ffmpeg.org/"
-SECTION = "libs"
-
-LICENSE = "GPLv2+"
-LICENSE_FLAGS = "commercial"
-
-LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
- file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "ef9b6634bb7c920efc940b4d55adf7b2"
-SRC_URI[sha256sum] = "12f32cee41c74435f608c30793fd616bdf53467bb513278e273e135a4c58e470"
-
-# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
-ARM_INSTRUCTION_SET = "arm"
-
-# Should be API compatible with libav (which was a fork of ffmpeg)
-# libpostproc was previously packaged from a separate recipe
-PROVIDES = "libav libpostproc"
-
-DEPENDS = "alsa-lib zlib libogg yasm-native"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
- bzlib gpl lzma theora x264 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xv', '', d)}"
-
-# libraries to build in addition to avutil
-PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
-PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
-PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
-PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
-PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
-PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
-PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
-PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
-
-# features to support
-PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
-PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
-PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
-PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
-PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
-PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
-PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
-PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
-PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
-PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
-PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
-PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
-PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
-PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
-PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
-
-# Check codecs that require --enable-nonfree
-USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
-
-EXTRA_OECONF = " \
- --disable-stripping \
- --enable-pic \
- --enable-shared \
- --enable-pthreads \
- ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
- \
- --cross-prefix=${TARGET_PREFIX} \
- \
- --ld="${CCLD}" \
- --arch=${TARGET_ARCH} \
- --target-os="linux" \
- --enable-cross-compile \
- --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
- --extra-ldflags="${TARGET_LDFLAGS}" \
- --sysroot="${STAGING_DIR_TARGET}" \
- --enable-hardcoded-tables \
- ${EXTRA_FFCONF} \
- --libdir=${libdir} \
- --shlibdir=${libdir} \
- --datadir=${datadir}/ffmpeg \
-"
-
-do_configure() {
- ${S}/configure ${EXTRA_OECONF}
-}
-
-PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util|resample)|swscale|swresample|postproc).*"
-
-# ffmpeg disables PIC on some platforms (e.g. x86-32)
-INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
-INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
-INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
-INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
-INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
-INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
-INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
-INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
-INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
-
-python populate_packages_prepend() {
- av_libdir = d.expand('${libdir}')
- av_pkgconfig = d.expand('${libdir}/pkgconfig')
-
- # Runtime package
- do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
- output_pattern='lib%s',
- description='libav %s library',
- extra_depends='',
- prepend=True,
- allow_links=True)
-
- # Development packages (-dev, -staticdev)
- do_split_packages(d, av_libdir, '^lib(.*)\.so$',
- output_pattern='lib%s-dev',
- description='libav %s development package',
- extra_depends='${PN}-dev',
- prepend=True,
- allow_links=True)
- do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
- output_pattern='lib%s-dev',
- description='libav %s development package',
- extra_depends='${PN}-dev',
- prepend=True)
- do_split_packages(d, av_libdir, '^lib(.*)\.a$',
- output_pattern='lib%s-staticdev',
- description='libav %s development package - static library',
- extra_depends='${PN}-dev',
- prepend=True,
- allow_links=True)
-
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb
new file mode 100644
index 000000000..050f1eefa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.1.3.bb
@@ -0,0 +1,142 @@
+SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
+DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
+ mux, demux, stream, filter and play pretty much anything that humans and machines \
+ have created. It supports the most obscure ancient formats up to the cutting edge."
+HOMEPAGE = "https://www.ffmpeg.org/"
+SECTION = "libs"
+
+LICENSE = "GPLv2+"
+LICENSE_FLAGS = "commercial"
+
+LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+ file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
+ file://mips64_cpu_detection.patch \
+ "
+SRC_URI[md5sum] = "72769316a4b2b8809c7f6d5a8b6766f4"
+SRC_URI[sha256sum] = "f8575c071e2a64437aeb70c8c030b385cddbe0b5cde20c9b18a6def840128822"
+
+# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
+ARM_INSTRUCTION_SET = "arm"
+
+# Should be API compatible with libav (which was a fork of ffmpeg)
+# libpostproc was previously packaged from a separate recipe
+PROVIDES = "libav libpostproc"
+
+DEPENDS = "alsa-lib zlib libogg yasm-native"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
+ bzlib gpl lzma theora x264 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xv', '', d)}"
+
+# libraries to build in addition to avutil
+PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
+PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
+PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
+PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
+PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
+PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
+PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
+
+# features to support
+PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
+PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
+PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
+PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
+PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
+PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
+PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
+PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
+PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
+PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
+PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
+
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
+
+EXTRA_OECONF = " \
+ --disable-stripping \
+ --enable-pic \
+ --enable-shared \
+ --enable-pthreads \
+ ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+ \
+ --cross-prefix=${TARGET_PREFIX} \
+ \
+ --ld="${CCLD}" \
+ --cc="${CC}" \
+ --cxx="${CXX}" \
+ --arch=${TARGET_ARCH} \
+ --target-os="linux" \
+ --enable-cross-compile \
+ --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
+ --extra-ldflags="${TARGET_LDFLAGS}" \
+ --sysroot="${STAGING_DIR_TARGET}" \
+ --enable-hardcoded-tables \
+ ${EXTRA_FFCONF} \
+ --libdir=${libdir} \
+ --shlibdir=${libdir} \
+ --datadir=${datadir}/ffmpeg \
+"
+
+do_configure() {
+ ${S}/configure ${EXTRA_OECONF}
+}
+
+PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util|resample)|swscale|swresample|postproc).*"
+
+# ffmpeg disables PIC on some platforms (e.g. x86-32)
+INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
+INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
+INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
+INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
+INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
+INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
+INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
+
+python populate_packages_prepend() {
+ av_libdir = d.expand('${libdir}')
+ av_pkgconfig = d.expand('${libdir}/pkgconfig')
+
+ # Runtime package
+ do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
+ output_pattern='lib%s',
+ description='libav %s library',
+ extra_depends='',
+ prepend=True,
+ allow_links=True)
+
+ # Development packages (-dev, -staticdev)
+ do_split_packages(d, av_libdir, '^lib(.*)\.so$',
+ output_pattern='lib%s-dev',
+ description='libav %s development package',
+ extra_depends='${PN}-dev',
+ prepend=True,
+ allow_links=True)
+ do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
+ output_pattern='lib%s-dev',
+ description='libav %s development package',
+ extra_depends='${PN}-dev',
+ prepend=True)
+ do_split_packages(d, av_libdir, '^lib(.*)\.a$',
+ output_pattern='lib%s-staticdev',
+ description='libav %s development package - static library',
+ extra_depends='${PN}-dev',
+ prepend=True,
+ allow_links=True)
+
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch
new file mode 100644
index 000000000..e3f1c4f74
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch
@@ -0,0 +1,32 @@
+From 220c2659a45dd354270a465c45197970dae5f548 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Fri, 5 Aug 2016 17:52:18 +0300
+Subject: [PATCH] gtk-play: provide similar behaviour for quit and close
+
+In x86 targets, gtk-play just pause rather than quitting the application
+when we click the close button (delete-event). Change the callback function
+to get similar behaviour when we click on "Quit" menu option.
+
+Upstream-Status: Accepted
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ gtk/gtk-play.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
+index a520bef..16afc6b 100644
+--- a/gtk/gtk-play.c
++++ b/gtk/gtk-play.c
+@@ -177,7 +177,7 @@ load_from_builder (const gchar * filename, gboolean register_sig_handler,
+ static void
+ delete_event_cb (GtkWidget * widget, GdkEvent * event, GtkPlay * play)
+ {
+- gst_player_stop (play->player);
++ gtk_widget_destroy (GTK_WIDGET (play));
+ }
+
+ static void
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
index 9fd207b38..7ddd456a1 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Media Player
Comment=Basic media player
-Icon=audio-player
+Icon=multimedia-player
TryExec=gtk-play
Exec=gtk-play
StartupNotify=true
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch
deleted file mode 100644
index 2cd18bbc9..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/gtk2.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-As the rest of Sato is GTK+ 2, patch gtk-play to use GTK+ 2. When the rest of
-Sato has been ported to GTK+ 3 this patch can be dropped.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-
-diff --git a/configure.ac b/configure.ac
-index b8af13b..90ab74c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -60,7 +60,7 @@ AC_SUBST(GLIB_PREFIX)
- GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-1.0`"
- AC_SUBST(GST_PREFIX)
-
--PKG_CHECK_MODULES(GTK, [gtk+-3.0], [have_gtk="yes"], [have_gtk="no"])
-+PKG_CHECK_MODULES(GTK, [gtk+-2.0], [have_gtk="yes"], [have_gtk="no"])
- AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" != "xno")
-
- GOBJECT_INTROSPECTION_CHECK([1.31.1])
-diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c
-index f015077..954d6fb 100644
---- a/gtk/gtk-play.c
-+++ b/gtk/gtk-play.c
-@@ -34,6 +34,46 @@ typedef struct
- gulong seekbar_value_changed_signal_id;
- } GtkPlay;
-
-+/* Compat stubs */
-+GtkWidget *
-+gtk_box_new (GtkOrientation orientation,
-+ gint spacing)
-+{
-+ switch (orientation) {
-+ case GTK_ORIENTATION_HORIZONTAL:
-+ return gtk_hbox_new (FALSE, spacing);
-+ case GTK_ORIENTATION_VERTICAL:
-+ return gtk_vbox_new (FALSE, spacing);
-+ }
-+}
-+
-+GtkWidget*
-+gtk_button_new_from_icon_name (const gchar *icon_name,
-+ GtkIconSize size)
-+{
-+ GtkWidget *button;
-+ GtkWidget *image;
-+
-+ image = gtk_image_new_from_icon_name (icon_name, size);
-+ button = g_object_new (GTK_TYPE_BUTTON,
-+ "image", image,
-+ NULL);
-+ return button;
-+}
-+
-+GtkWidget *
-+gtk_scale_new_with_range (GtkOrientation orientation,
-+ gdouble min,
-+ gdouble max,
-+ gdouble step)
-+{
-+ switch (orientation) {
-+ case GTK_ORIENTATION_HORIZONTAL:
-+ return gtk_hscale_new_with_range (min, max, step);
-+ case GTK_ORIENTATION_VERTICAL:
-+ return gtk_vscale_new_with_range (min, max, step);
-+ }
-+}
-
- static void
- set_title (GtkPlay * play, const gchar * title)
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
index 8129169c5..2a4c9dcfb 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
@@ -1,39 +1,37 @@
SUMMARY = "GStreamer playback helper library and examples"
LICENSE = "LGPL-2.0+"
-LIC_FILES_CHKSUM = "file://lib/gst/player/gstplayer.c;beginline=1;endline=19;md5=03aeca9d8295f811817909075a15ff65"
+LIC_FILES_CHKSUM = "file://gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
-DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gtk+"
+DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3"
SRC_URI = "git://github.com/sdroege/gst-player.git \
- file://filechooser.patch \
- file://gtk2.patch \
- file://Fix-pause-play.patch \
- file://Add-error-signal-emission-for-missing-plugins.patch \
+ file://filechooser.patch;apply=0 \
+ file://Fix-pause-play.patch;apply=0 \
+ file://Add-error-signal-emission-for-missing-plugins.patch;apply=0 \
+ file://0001-gtk-play-provide-similar-behaviour-for-quit-and-clos.patch \
file://gst-player.desktop"
-SRCREV = "5386c5b984d40ef5434673ed62204e69aaf52645"
+SRCREV = "ea90e63c1064503f9ba5d59aa4ca604f13ca5def"
+PV = "0.0.1+git${SRCPV}"
S = "${WORKDIR}/git"
-inherit autotools gtk-doc lib_package pkgconfig distro_features_check gobject-introspection
+inherit autotools pkgconfig distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
do_configure_prepend() {
touch ${S}/ChangeLog
}
-EXTRA_OECONF += "ac_cv_path_VALGRIND=no ac_cv_path_GDB=no"
-
do_install_append() {
install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
}
-FILES_${PN}-bin += "${datadir}/applications/*.desktop"
-
-RDEPENDS_${PN}-bin = "gstreamer1.0-plugins-base-playback"
-RRECOMMENDS_${PN}-bin = "gstreamer1.0-plugins-base-meta \
- gstreamer1.0-plugins-good-meta \
- gstreamer1.0-plugins-bad-meta \
- ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
- ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
+RDEPENDS_${PN} = "gstreamer1.0-plugins-base-playback"
+RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
+ gstreamer1.0-plugins-good-meta \
+ gstreamer1.0-plugins-bad-meta \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
+RPROVIDES_${PN} += "${PN}-bin"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
index 363101e1a..ea011637c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
@@ -7,7 +7,7 @@ LICENSE_FLAGS = "commercial"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz"
-inherit autotools pkgconfig upstream-version-is-even
+inherit autotools pkgconfig upstream-version-is-even gtk-doc
# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time,
# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the
@@ -18,6 +18,7 @@ PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl,"
PACKAGECONFIG[libav] = "--with-system-libav,,libav"
PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,yasm-native"
+PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
GSTREAMER_1_0_DEBUG ?= "--disable-debug"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb
deleted file mode 100644
index 687230a8f..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-include gstreamer1.0-libav.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
- file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
- file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
- file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
- file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
- file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
- file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
-"
-
-SRC_URI[md5sum] = "cfe9a06913d4fd4067e9e47f6e05fac2"
-SRC_URI[sha256sum] = "857b9c060a0337de38c6d26238c47352433c02eabf26c2f860c854dbc35bd4ab"
-
-S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
new file mode 100644
index 000000000..3d86221d2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
@@ -0,0 +1,20 @@
+include gstreamer1.0-libav.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+ file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
+ file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+ file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+ file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
+ file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
+ file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
+"
+
+SRC_URI[md5sum] = "b51a736147bacb40f85827a4e0ae0d2c"
+SRC_URI[sha256sum] = "9006a05990089f7155ee0e848042f6bb24e52ab1d0a59ff8d1b5d7e33001a495"
+
+S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
index ebc8a5ef2..f4604a34c 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
@@ -15,20 +15,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
# and remove the ffmpeg sources from SRC_URI below. However, first note the
# warnings in gstreamer1.0-libav.inc
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-libav;name=base \
+ git://anongit.freedesktop.org/gstreamer/gst-libav;branch=1.8;name=base \
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
git://source.ffmpeg.org/ffmpeg;destsuffix=git/gst-libs/ext/libav;name=ffmpeg;branch=release/3.0 \
file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
"
-PV = "1.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "6c4878b6abc916b7f6f25b8926c4859119acf1ec"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
-SRCREV_ffmpeg = "c40983a6f631d22fede713d535bb9c31d5c9740c"
+SRCREV_base = "f285cf0fd799cc3b46b5cecaaa439d5a2a38a9b7"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
+SRCREV_ffmpeg = "c66f4d1ae64dffaf456d05cbdade02054446f499"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
index 0fff612ee..07e5b7db5 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
@@ -7,11 +7,10 @@ LICENSE_FLAGS = "commercial"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
-inherit autotools pkgconfig gettext
+inherit autotools pkgconfig gettext gtk-doc upstream-version-is-even
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
-PR = "r1"
GSTREAMER_1_0_OMX_TARGET ?= "bellagio"
GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index 9e2b94ede..0fe5564b5 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -21,7 +21,7 @@ PACKAGECONFIG ??= " \
${PACKAGECONFIG_GL} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \
"
@@ -32,13 +32,16 @@ PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2"
PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb"
PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl"
+PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac"
PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2"
PACKAGECONFIG[flite] = "--enable-flite,--disable-flite,flite-alsa"
PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
-PACKAGECONFIG[hls] = "--enable-hls,--disable-hls,nettle"
+# ensure OpenSSL is used for HLS AES description instead of nettle
+# (OpenSSL is a shared dependency with dtls)
+PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl"
PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms"
PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug"
@@ -46,7 +49,9 @@ PACKAGECONFIG[neon] = "--enable-neon,--disable-neon,neon"
PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft"
PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv"
PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
-PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus"
+# the opus encoder/decoder elements are now in the -base package,
+# but the opus parser remains in -bad
+PACKAGECONFIG[opusparse] = "--enable-opus,--disable-opus,libopus"
PACKAGECONFIG[resindvd] = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav"
PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg"
PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump"
@@ -58,19 +63,19 @@ PACKAGECONFIG[srtp] = "--enable-srtp,--disable-srtp,libsrtp"
PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
PACKAGECONFIG[voaacenc] = "--enable-voaacenc,--disable-voaacenc,vo-aacenc"
PACKAGECONFIG[voamrwbenc] = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
-PACKAGECONFIG[wayland] = "--enable-wayland --enable-egl,--disable-wayland --disable-egl,wayland virtual/egl"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
# these plugins have not been ported to 1.0 (yet):
-# apexsink dc1394 lv2 linsys musepack nas timidity teletextdec sdl xvid wininet
-# acm gsettings sndio cdxaparse dccp faceoverlay hdvparse tta mve nuvdemux
-# patchdetect real sdi videomeasure gsettings
+# apexsink dc1394 lv2 linsys musepack nas timidity sdl xvid wininet
+# sndio cdxaparse dccp faceoverlay hdvparse tta mve nuvdemux
+# patchdetect sdi videomeasure
# these plugins have no corresponding library in OE-core or meta-openembedded:
-# openni2 winks direct3d directsound winscreencap
+# openni2 winks direct3d directsound winscreencap acm
# apple_media android_media avc bs2b chromaprint daala dts gme gsm kate ladspa
-# libde265 mimic mpeg2enc mplex ofa openh264 opensles pvr soundtouch spandsp
-# spc vdpau wasapi x265 zbar
+# libde265 mimic mpeg2enc mplex nvenc ofa openh264 opensles pvr soundtouch spandsp
+# spc teletextdec tinyalsa vdpau vulkan wasapi x265 zbar
# qt5 support is disabled, because it is not present in OE core, and requires more work than
# just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths).
@@ -81,6 +86,7 @@ EXTRA_OECONF += " \
--enable-decklink \
--enable-dvb \
--enable-fbdev \
+ --enable-netsim \
--enable-shm \
--enable-vcd \
--disable-acm \
@@ -109,6 +115,7 @@ EXTRA_OECONF += " \
--disable-mplex \
--disable-musepack \
--disable-nas \
+ --disable-nvenc \
--disable-ofa \
--disable-openexr \
--disable-openh264 \
@@ -125,7 +132,9 @@ EXTRA_OECONF += " \
--disable-spc \
--disable-teletextdec \
--disable-timidity \
+ --disable-tinyalsa \
--disable-vdpau \
+ --disable-vulkan \
--disable-wasapi \
--disable-wildmidi \
--disable-wininet \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
index 154d340e4..33efc503e 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
@@ -17,7 +17,7 @@ diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
index f968357..7cc2c7a 100644
--- a/gst-libs/gst/gl/Makefile.am
+++ b/gst-libs/gst/gl/Makefile.am
-@@ -149,7 +149,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
+@@ -167,7 +167,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
--library=libgstgl-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
@@ -30,7 +30,7 @@ diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefil
index 09eb97c..b746885 100644
--- a/gst-libs/gst/insertbin/Makefile.am
+++ b/gst-libs/gst/insertbin/Makefile.am
-@@ -43,7 +43,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS
+@@ -44,7 +44,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS
--library=libgstinsertbin-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch
deleted file mode 100644
index 1085e95e8..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c6b37a80806f9128de47f1ccc3f2354f8d436bb6 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 24 Sep 2015 19:47:32 +0300
-Subject: [PATCH] glimagesink: Downrank to marginal
-
-On desktop, where there is good OpenGL, xvimagesink will come up first,
-on other platforms, OpenGL can't be trusted because it's either software (like
-in a VM) or broken (like on embedded)., so let ximagesink come above.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751684]
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- ext/gl/gstopengl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
-index a4b2540..0ccaacd 100644
---- a/ext/gl/gstopengl.c
-+++ b/ext/gl/gstopengl.c
-@@ -101,7 +101,7 @@ plugin_init (GstPlugin * plugin)
- #endif
-
- if (!gst_element_register (plugin, "glimagesink",
-- GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) {
-+ GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) {
- return FALSE;
- }
-
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
new file mode 100755
index 000000000..51f4eb4b3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
@@ -0,0 +1,634 @@
+From 8a0e97f7e672301cc76e394855e8c7a3448b0249 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared.hu@nxp.com>
+Date: Fri, 8 Apr 2016 16:47:15 +0800
+Subject: [PATCH 4/6] [glplugin] enable gldeinterlace on OpenGL ES
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+1.Porting the exist deinterlace shader and OpenGL callback
+ to be compatible with OpenGL ES.
+2.Add a our blur vertical shader to gldeinterlace.
+3.Add a property named “method” to let user choose which
+ deinterlace function to use. Default to choose blur vertical
+ method for better performance.
+
+Upstream-Status: Backport [1.9.1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=764873
+
+Signed-off-by: Haihua Hu <jared.hu@nxp.com>
+---
+ ext/gl/Makefile.am | 4 +-
+ ext/gl/gstgldeinterlace.c | 344 +++++++++++++++++++++++++++++++++++-----------
+ ext/gl/gstgldeinterlace.h | 6 +-
+ ext/gl/gstopengl.c | 13 +-
+ 4 files changed, 275 insertions(+), 92 deletions(-)
+
+diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
+index 5d55f54..46419a7 100644
+--- a/ext/gl/Makefile.am
++++ b/ext/gl/Makefile.am
+@@ -40,6 +40,7 @@ libgstopengl_la_SOURCES = \
+ gstglfilterapp.c \
+ gstglviewconvert.c \
+ gstglstereosplit.c \
++ gstgldeinterlace.c \
+ gstglstereomix.c
+
+ noinst_HEADERS = \
+@@ -63,20 +64,19 @@ noinst_HEADERS = \
+ gstglfilterapp.h \
+ gstglstereosplit.h \
+ gstglstereomix.h \
++ gstgldeinterlace.h \
+ gstglviewconvert.h
+
+ # full opengl required
+ if USE_OPENGL
+ libgstopengl_la_SOURCES += \
+ gstglfilterglass.c \
+- gstgldeinterlace.c \
+ gltestsrc.c \
+ gstgltestsrc.c \
+ gstglmosaic.c
+
+ noinst_HEADERS += \
+ gstglfilterglass.h \
+- gstgldeinterlace.h \
+ gltestsrc.h \
+ gstgltestsrc.h \
+ gstglmosaic.h \
+diff --git a/ext/gl/gstgldeinterlace.c b/ext/gl/gstgldeinterlace.c
+index bd0eff0..c1250dc 100644
+--- a/ext/gl/gstgldeinterlace.c
++++ b/ext/gl/gstgldeinterlace.c
+@@ -43,7 +43,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+
+ enum
+ {
+- PROP_0
++ PROP_0,
++ PROP_METHOD
+ };
+
+ #define DEBUG_INIT \
+@@ -57,17 +58,23 @@ static void gst_gl_deinterlace_set_property (GObject * object,
+ static void gst_gl_deinterlace_get_property (GObject * object,
+ guint prop_id, GValue * value, GParamSpec * pspec);
+
++static gboolean gst_gl_deinterlace_start (GstBaseTransform * trans);
+ static gboolean gst_gl_deinterlace_reset (GstBaseTransform * trans);
+-static gboolean gst_gl_deinterlace_init_shader (GstGLFilter * filter);
++static gboolean gst_gl_deinterlace_init_fbo (GstGLFilter * filter);
+ static gboolean gst_gl_deinterlace_filter (GstGLFilter * filter,
+ GstBuffer * inbuf, GstBuffer * outbuf);
+ static gboolean gst_gl_deinterlace_filter_texture (GstGLFilter * filter,
+ guint in_tex, guint out_tex);
+-static void gst_gl_deinterlace_callback (gint width, gint height,
++static void gst_gl_deinterlace_vfir_callback (gint width, gint height,
++ guint texture, gpointer stuff);
++static void gst_gl_deinterlace_greedyh_callback (gint width, gint height,
+ guint texture, gpointer stuff);
+
+ /* *INDENT-OFF* */
+ static const gchar *greedyh_fragment_source =
++ "#ifdef GL_ES\n"
++ "precision mediump float;\n"
++ "#endif\n"
+ "uniform sampler2D tex;\n"
+ "uniform sampler2D tex_prev;\n"
+ "uniform float max_comb;\n"
+@@ -75,35 +82,35 @@ static const gchar *greedyh_fragment_source =
+ "uniform float motion_sense;\n"
+ "uniform float width;\n"
+ "uniform float height;\n"
++ "varying vec2 v_texcoord;\n"
+
+ "void main () {\n"
+- " vec2 texcoord = gl_TexCoord[0].xy;\n"
+- " if (int(mod(texcoord.y * height, 2.0)) == 0) {\n"
+- " gl_FragColor = vec4(texture2D(tex_prev, texcoord).rgb, 1.0);\n"
++ " if (int(mod(v_texcoord.y * height, 2.0)) == 0) {\n"
++ " gl_FragColor = vec4(texture2D(tex_prev, v_texcoord).rgb, 1.0);\n"
+ " } else {\n"
+ " vec2 texcoord_L1_a1, texcoord_L3_a1, texcoord_L1, texcoord_L3, texcoord_L1_1, texcoord_L3_1;\n"
+ " vec3 L1_a1, L3_a1, L1, L3, L1_1, L3_1;\n"
+
+- " texcoord_L1 = vec2(texcoord.x, texcoord.y - 1.0 / height);\n"
+- " texcoord_L3 = vec2(texcoord.x, texcoord.y + 1.0 / height);\n"
++ " texcoord_L1 = vec2(v_texcoord.x, v_texcoord.y - 1.0 / height);\n"
++ " texcoord_L3 = vec2(v_texcoord.x, v_texcoord.y + 1.0 / height);\n"
+ " L1 = texture2D(tex_prev, texcoord_L1).rgb;\n"
+ " L3 = texture2D(tex_prev, texcoord_L3).rgb;\n"
+- " if (texcoord.x == 1.0 && texcoord.y == 1.0) {\n"
++ " if (v_texcoord.x == 1.0 && v_texcoord.y == 1.0) {\n"
+ " L1_1 = L1;\n"
+ " L3_1 = L3;\n"
+ " } else {\n"
+- " texcoord_L1_1 = vec2(texcoord.x + 1.0 / width, texcoord.y - 1.0 / height);\n"
+- " texcoord_L3_1 = vec2(texcoord.x + 1.0 / width, texcoord.y + 1.0 / height);\n"
++ " texcoord_L1_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y - 1.0 / height);\n"
++ " texcoord_L3_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y + 1.0 / height);\n"
+ " L1_1 = texture2D(tex_prev, texcoord_L1_1).rgb;\n"
+ " L3_1 = texture2D(tex_prev, texcoord_L3_1).rgb;\n"
+ " }\n"
+
+- " if (int(ceil(texcoord.x + texcoord.y)) == 0) {\n"
++ " if (int(ceil(v_texcoord.x + v_texcoord.y)) == 0) {\n"
+ " L1_a1 = L1;\n"
+ " L3_a1 = L3;\n"
+ " } else {\n"
+- " texcoord_L1_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y - 1.0 / height);\n"
+- " texcoord_L3_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y + 1.0 / height);\n"
++ " texcoord_L1_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y - 1.0 / height);\n"
++ " texcoord_L3_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y + 1.0 / height);\n"
+ " L1_a1 = texture2D(tex_prev, texcoord_L1_a1).rgb;\n"
+ " L3_a1 = texture2D(tex_prev, texcoord_L3_a1).rgb;\n"
+ " }\n"
+@@ -113,8 +120,8 @@ static const gchar *greedyh_fragment_source =
+ " vec3 avg_1 = (L1_1 + L3_1) / 2.0;\n"
+ " vec3 avg_s = (avg_a1 + avg_1) / 2.0;\n"
+ " vec3 avg_sc = (avg_s + avg) / 2.0;\n"
+- " vec3 L2 = texture2D(tex, texcoord).rgb;\n"
+- " vec3 LP2 = texture2D(tex_prev, texcoord).rgb;\n"
++ " vec3 L2 = texture2D(tex, v_texcoord).rgb;\n"
++ " vec3 LP2 = texture2D(tex_prev, v_texcoord).rgb;\n"
+ " vec3 best;\n"
+ " if (abs(L2.r - avg_sc.r) < abs(LP2.r - avg_sc.r)) {\n"
+ " best.r = L2.r;\n" " } else {\n"
+@@ -144,8 +151,87 @@ static const gchar *greedyh_fragment_source =
+ " gl_FragColor = vec4(last, 1.0);\n"
+ " }\n"
+ "}\n";
++
++const gchar *vfir_fragment_source =
++ "#ifdef GL_ES\n"
++ "precision mediump float;\n"
++ "#endif\n"
++ "uniform sampler2D tex;\n"
++ "uniform float width;\n"
++ "uniform float height;\n"
++ "varying vec2 v_texcoord;\n"
++ "void main()\n"
++ "{\n"
++ " vec2 topcoord, botcoord;\n"
++ " vec4 cur_color, top_color, bot_color;\n"
++ " topcoord.x = v_texcoord.x;\n"
++ " botcoord.x = v_texcoord.x;\n"
++ " if (v_texcoord.y == 0.0 || v_texcoord.y == 1.0) {\n"
++ " topcoord.y = v_texcoord.y ;\n"
++ " botcoord.y = v_texcoord.y ;\n"
++ " }\n"
++ " else {\n"
++ " topcoord.y = v_texcoord.y - 1.0/height;\n"
++ " botcoord.y = v_texcoord.y + 1.0/height;\n"
++ " }\n"
++ " cur_color = texture2D(tex, v_texcoord);\n"
++ " top_color = texture2D(tex, topcoord);\n"
++ " bot_color = texture2D(tex, botcoord);\n"
++ " gl_FragColor = 0.5*cur_color + 0.25*top_color + 0.25*bot_color;\n"
++ "}";
+ /* *INDENT-ON* */
+
++/* dont' forget to edit the following when a new method is added */
++typedef enum
++{
++ GST_GL_DEINTERLACE_VFIR,
++ GST_GL_DEINTERLACE_GREEDYH
++} GstGLDeinterlaceMethod;
++
++static const GEnumValue *
++gst_gl_deinterlace_get_methods (void)
++{
++ static const GEnumValue method_types[] = {
++ {GST_GL_DEINTERLACE_VFIR, "Blur Vertical", "vfir"},
++ {GST_GL_DEINTERLACE_GREEDYH, "Motion Adaptive: Advanced Detection",
++ "greedhy"},
++ {0, NULL, NULL}
++ };
++ return method_types;
++}
++
++#define GST_TYPE_GL_DEINTERLACE_METHODS (gst_gl_deinterlace_method_get_type ())
++static GType
++gst_gl_deinterlace_method_get_type (void)
++{
++ static GType gl_deinterlace_method_type = 0;
++ if (!gl_deinterlace_method_type) {
++ gl_deinterlace_method_type =
++ g_enum_register_static ("GstGLDeinterlaceMethod",
++ gst_gl_deinterlace_get_methods ());
++ }
++ return gl_deinterlace_method_type;
++}
++
++static void
++gst_gl_deinterlace_set_method (GstGLDeinterlace * deinterlace,
++ guint method_types)
++{
++ switch (method_types) {
++ case GST_GL_DEINTERLACE_VFIR:
++ deinterlace->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
++ deinterlace->current_method = method_types;
++ break;
++ case GST_GL_DEINTERLACE_GREEDYH:
++ deinterlace->deinterlacefunc = gst_gl_deinterlace_greedyh_callback;
++ deinterlace->current_method = method_types;
++ break;
++ default:
++ g_assert_not_reached ();
++ break;
++ }
++}
++
+ static void
+ gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
+ {
+@@ -163,25 +249,60 @@ gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
+ "Deinterlacing based on fragment shaders",
+ "Julien Isorce <julien.isorce@mail.com>");
+
++ g_object_class_install_property (gobject_class,
++ PROP_METHOD,
++ g_param_spec_enum ("method",
++ "Deinterlace Method",
++ "Select which deinterlace method apply to GL video texture",
++ GST_TYPE_GL_DEINTERLACE_METHODS,
++ GST_GL_DEINTERLACE_VFIR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
++ GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_deinterlace_start;
+ GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_deinterlace_reset;
+
+ GST_GL_FILTER_CLASS (klass)->filter = gst_gl_deinterlace_filter;
+ GST_GL_FILTER_CLASS (klass)->filter_texture =
+ gst_gl_deinterlace_filter_texture;
+- GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_shader;
++ GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_fbo;
+
+- GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api = GST_GL_API_OPENGL;
++ GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
++ GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
+ }
+
+ static void
+ gst_gl_deinterlace_init (GstGLDeinterlace * filter)
+ {
+- filter->shader = NULL;
++ filter->shaderstable = NULL;
++ filter->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
++ filter->current_method = GST_GL_DEINTERLACE_VFIR;
+ filter->prev_buffer = NULL;
+ filter->prev_tex = 0;
+ }
+
+ static gboolean
++gst_gl_deinterlace_start (GstBaseTransform * trans)
++{
++ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
++
++ deinterlace_filter->shaderstable = g_hash_table_new (g_str_hash, g_str_equal);
++
++ return GST_BASE_TRANSFORM_CLASS (parent_class)->start (trans);
++}
++
++static void
++gst_gl_deinterlace_ghash_func_clean (gpointer key, gpointer value,
++ gpointer data)
++{
++ GstGLShader *shader = (GstGLShader *) value;
++ GstGLFilter *filter = (GstGLFilter *) data;
++
++ //blocking call, wait the opengl thread has destroyed the shader
++ gst_gl_context_del_shader (GST_GL_BASE_FILTER (filter)->context, shader);
++
++ value = NULL;
++}
++
++static gboolean
+ gst_gl_deinterlace_reset (GstBaseTransform * trans)
+ {
+ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
+@@ -189,10 +310,17 @@ gst_gl_deinterlace_reset (GstBaseTransform * trans)
+ gst_buffer_replace (&deinterlace_filter->prev_buffer, NULL);
+
+ //blocking call, wait the opengl thread has destroyed the shader
+- if (deinterlace_filter->shader)
+- gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
+- deinterlace_filter->shader);
+- deinterlace_filter->shader = NULL;
++ if (deinterlace_filter->shaderstable) {
++ /* release shaders in the gl thread */
++ g_hash_table_foreach (deinterlace_filter->shaderstable,
++ gst_gl_deinterlace_ghash_func_clean, deinterlace_filter);
++
++ /* clean the htable without calling values destructors
++ * because shaders have been released in the glthread
++ * through the foreach func */
++ g_hash_table_unref (deinterlace_filter->shaderstable);
++ deinterlace_filter->shaderstable = NULL;
++ }
+
+ return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
+ }
+@@ -201,9 +329,12 @@ static void
+ gst_gl_deinterlace_set_property (GObject * object, guint prop_id,
+ const GValue * value, GParamSpec * pspec)
+ {
+- //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
++ GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
+
+ switch (prop_id) {
++ case PROP_METHOD:
++ gst_gl_deinterlace_set_method (filter, g_value_get_enum (value));
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+@@ -214,9 +345,12 @@ static void
+ gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
+ GValue * value, GParamSpec * pspec)
+ {
+- //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
++ GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
+
+ switch (prop_id) {
++ case PROP_METHOD:
++ g_value_set_enum (value, filter->current_method);
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+@@ -224,13 +358,9 @@ gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
+ }
+
+ static gboolean
+-gst_gl_deinterlace_init_shader (GstGLFilter * filter)
++gst_gl_deinterlace_init_fbo (GstGLFilter * filter)
+ {
+- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
+-
+- //blocking call, wait the opengl thread has compiled the shader
+- return gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context, 0,
+- greedyh_fragment_source, &deinterlace_filter->shader);
++ return TRUE;
+ }
+
+ static gboolean
+@@ -241,7 +371,7 @@ gst_gl_deinterlace_filter_texture (GstGLFilter * filter, guint in_tex,
+
+ //blocking call, use a FBO
+ gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
+- gst_gl_deinterlace_callback, deinterlace_filter);
++ deinterlace_filter->deinterlacefunc, deinterlace_filter);
+
+ return TRUE;
+ }
+@@ -259,36 +389,104 @@ gst_gl_deinterlace_filter (GstGLFilter * filter, GstBuffer * inbuf,
+ return TRUE;
+ }
+
+-//opengl scene, params: input texture (not the output filter->texture)
++static GstGLShader *
++gst_gl_deinterlace_get_fragment_shader (GstGLFilter * filter,
++ const gchar * shader_name, const gchar * shader_source)
++{
++ GstGLShader *shader = NULL;
++ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
++ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
++
++ shader = g_hash_table_lookup (deinterlace_filter->shaderstable, shader_name);
++
++ if (!shader) {
++ GError *error = NULL;
++
++ if (!(shader = gst_gl_shader_new_link_with_stages (context, &error,
++ gst_glsl_stage_new_default_vertex (context),
++ gst_glsl_stage_new_with_string (context, GL_FRAGMENT_SHADER,
++ GST_GLSL_VERSION_NONE,
++ GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY,
++ shader_source), NULL))) {
++ GST_ELEMENT_ERROR (deinterlace_filter, RESOURCE, NOT_FOUND,
++ ("Failed to initialize %s shader", shader_name), (NULL));
++ }
++
++ filter->draw_attr_position_loc =
++ gst_gl_shader_get_attribute_location (shader, "a_position");
++ filter->draw_attr_texture_loc =
++ gst_gl_shader_get_attribute_location (shader, "a_texcoord");
++ }
++
++ g_hash_table_insert (deinterlace_filter->shaderstable, (gchar *) shader_name,
++ shader);
++
++ return shader;
++}
++
+ static void
+-gst_gl_deinterlace_callback (gint width, gint height, guint texture,
++gst_gl_deinterlace_vfir_callback (gint width, gint height, guint texture,
+ gpointer stuff)
+ {
+- GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (stuff);
++ GstGLShader *shader;
+ GstGLFilter *filter = GST_GL_FILTER (stuff);
+- GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
++ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
++ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
++ GstGLFuncs *gl = context->gl_vtable;
++
++ shader = gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "vfir",
++ vfir_fragment_source);
++
++ if (!shader)
++ return;
++
++#if GST_GL_HAVE_OPENGL
++ if (USING_OPENGL (context)) {
++ gl->MatrixMode (GL_PROJECTION);
++ gl->LoadIdentity ();
++ }
++#endif
++
++ gst_gl_shader_use (shader);
++
++ gl->ActiveTexture (GL_TEXTURE0);
++ gl->BindTexture (GL_TEXTURE_2D, texture);
++
++ gst_gl_shader_set_uniform_1i (shader, "tex", 0);
++ gst_gl_shader_set_uniform_1f (shader, "width",
++ GST_VIDEO_INFO_WIDTH (&filter->out_info));
++ gst_gl_shader_set_uniform_1f (shader, "height",
++ GST_VIDEO_INFO_HEIGHT (&filter->out_info));
++
++ gst_gl_filter_draw_texture (filter, texture, width, height);
++}
++
++static void
++gst_gl_deinterlace_greedyh_callback (gint width, gint height, guint texture,
++ gpointer stuff)
++{
++ GstGLShader *shader;
++ GstGLFilter *filter = GST_GL_FILTER (stuff);
++ GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
++ GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
++ GstGLFuncs *gl = context->gl_vtable;
+ guint temp;
+
+- GLfloat verts[] = { -1.0, -1.0,
+- 1.0, -1.0,
+- 1.0, 1.0,
+- -1.0, 1.0
+- };
+- GLfloat texcoords0[] = { 0.0f, 0.0f,
+- 1.0f, 0.0f,
+- 1.0f, 1.0f,
+- 0.0f, 1.0f
+- };
+- GLfloat texcoords1[] = { 0.0f, 0.0f,
+- 1.0f, 0.0f,
+- 1.0f, 1.0f,
+- 0.0f, 1.0f
+- };
++ shader =
++ gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "greedhy",
++ greedyh_fragment_source);
+
+- gl->MatrixMode (GL_PROJECTION);
+- gl->LoadIdentity ();
++ if (!shader)
++ return;
+
+- gst_gl_shader_use (deinterlace_filter->shader);
++#if GST_GL_HAVE_OPENGL
++ if (USING_OPENGL (context)) {
++ gl->MatrixMode (GL_PROJECTION);
++ gl->LoadIdentity ();
++ }
++#endif
++
++ gst_gl_shader_use (shader);
+
+ if (G_UNLIKELY (deinterlace_filter->prev_tex == 0)) {
+ gst_gl_context_gen_texture (GST_GL_BASE_FILTER (filter)->context,
+@@ -298,44 +496,24 @@ gst_gl_deinterlace_callback (gint width, gint height, guint texture,
+ GST_VIDEO_INFO_HEIGHT (&filter->out_info));
+ } else {
+ gl->ActiveTexture (GL_TEXTURE1);
+- gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex_prev", 1);
++ gst_gl_shader_set_uniform_1i (shader, "tex_prev", 1);
+ gl->BindTexture (GL_TEXTURE_2D, deinterlace_filter->prev_tex);
+ }
+
+ gl->ActiveTexture (GL_TEXTURE0);
+- gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex", 0);
++ gl->BindTexture (GL_TEXTURE_2D, texture);
+
+- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "max_comb",
+- 5.0f / 255.0f);
+- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_threshold",
+- 25.0f / 255.0f);
+- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_sense",
+- 30.0f / 255.0f);
++ gst_gl_shader_set_uniform_1i (shader, "tex", 0);
++ gst_gl_shader_set_uniform_1f (shader, "max_comb", 5.0f / 255.0f);
++ gst_gl_shader_set_uniform_1f (shader, "motion_threshold", 25.0f / 255.0f);
++ gst_gl_shader_set_uniform_1f (shader, "motion_sense", 30.0f / 255.0f);
+
+- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "width",
++ gst_gl_shader_set_uniform_1f (shader, "width",
+ GST_VIDEO_INFO_WIDTH (&filter->out_info));
+- gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "height",
++ gst_gl_shader_set_uniform_1f (shader, "height",
+ GST_VIDEO_INFO_HEIGHT (&filter->out_info));
+
+- gl->ClientActiveTexture (GL_TEXTURE0);
+-
+- gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
+- gl->EnableClientState (GL_VERTEX_ARRAY);
+-
+- gl->VertexPointer (2, GL_FLOAT, 0, &verts);
+- gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords0);
+-
+- gl->ClientActiveTexture (GL_TEXTURE1);
+- gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
+- gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords1);
+-
+- gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
+-
+- gl->DisableClientState (GL_VERTEX_ARRAY);
+- gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
+-
+- gl->ClientActiveTexture (GL_TEXTURE0);
+- gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
++ gst_gl_filter_draw_texture (filter, texture, width, height);
+
+ if (texture == filter->in_tex_id) {
+ temp = filter->in_tex_id;
+diff --git a/ext/gl/gstgldeinterlace.h b/ext/gl/gstgldeinterlace.h
+index a81a2e7..58a9c0c 100644
+--- a/ext/gl/gstgldeinterlace.h
++++ b/ext/gl/gstgldeinterlace.h
+@@ -38,9 +38,13 @@ typedef struct _GstGLDeinterlaceClass GstGLDeinterlaceClass;
+ struct _GstGLDeinterlace
+ {
+ GstGLFilter filter;
+- GstGLShader *shader;
++
++ GLCB deinterlacefunc;
++ GHashTable *shaderstable;
+ GstBuffer *prev_buffer;
+ guint prev_tex;
++
++ gint current_method;
+ };
+
+ struct _GstGLDeinterlaceClass
+diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
+index 50676c4..135862a 100644
+--- a/ext/gl/gstopengl.c
++++ b/ext/gl/gstopengl.c
+@@ -62,6 +62,7 @@
+ #include "gstglstereosplit.h"
+ #include "gstglstereomix.h"
+ #include "gstglviewconvert.h"
++#include "gstgldeinterlace.h"
+
+ #if HAVE_GRAPHENE
+ #include "gstgltransformation.h"
+@@ -77,7 +78,6 @@
+ #include "gstgltestsrc.h"
+ #include "gstglfilterglass.h"
+ /* #include "gstglfilterreflectedscreen.h" */
+-#include "gstgldeinterlace.h"
+ #include "gstglmosaic.h"
+ #if HAVE_PNG
+ #include "gstgldifferencematte.h"
+@@ -226,6 +226,12 @@ plugin_init (GstPlugin * plugin)
+ GST_RANK_NONE, GST_TYPE_GL_STEREO_MIX)) {
+ return FALSE;
+ }
++
++ if (!gst_element_register (plugin, "gldeinterlace",
++ GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
++ return FALSE;
++ }
++
+ #if HAVE_JPEG
+ #if HAVE_PNG
+ if (!gst_element_register (plugin, "gloverlay",
+@@ -250,11 +256,6 @@ plugin_init (GstPlugin * plugin)
+ return FALSE;
+ }
+ #endif
+- if (!gst_element_register (plugin, "gldeinterlace",
+- GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
+- return FALSE;
+- }
+-
+ if (!gst_element_register (plugin, "glmosaic",
+ GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
+ return FALSE;
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
deleted file mode 100755
index 3491a15e6..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 95cda7fbcf1a81289d9315c801c8e2b3d896f4cb Mon Sep 17 00:00:00 2001
-From: Haihua Hu <b55597@freescale.com>
-Date: Mon, 30 Nov 2015 09:36:09 +0800
-Subject: [PATCH 2/5] [glplugin] glwindow: fix memory leak of navigation
- thread
-
-When exit navigation thread, call g_thread_join() to release
-the resource hold by it.
-
-Upstream-Status: Backport [1.7.1]
-
-bugzilla URL: https://bugzilla.gnome.org/show_bug.cgi?id=758820
-
-Signed-off-by: Haihua Hu <b55597@freescale.com>
----
- gst-libs/gst/gl/gstglwindow.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
-index 44b74ca..42ef296 100644
---- a/gst-libs/gst/gl/gstglwindow.c
-+++ b/gst-libs/gst/gl/gstglwindow.c
-@@ -343,6 +343,9 @@ gst_gl_window_finalize (GObject * object)
- while (window->nav_alive) {
- g_cond_wait (&window->nav_destroy_cond, &window->nav_lock);
- }
-+ /* release resource hold by navigation thread */
-+ g_thread_join(window->priv->navigation_thread);
-+ window->priv->navigation_thread = NULL;
- g_mutex_unlock (&window->nav_lock);
- }
-
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
new file mode 100755
index 000000000..31d8e052f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
@@ -0,0 +1,244 @@
+From 127e517568490fc147211d8b2fb4da01cecbbeb5 Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matthew@centricular.com>
+Date: Thu, 31 Mar 2016 19:50:28 +1100
+Subject: [PATCH 5/6] glcolorconvert: implement multiple render targets for
+ GLES3
+
+There are numerous slight differences required between Desktop GL and GLES3 for
+multiple render targets.
+
+1. gl_FragData doesn't exist at all and one is required to use
+ 'layout (location = ?) out ...' instead.
+2. gl_FragColor doesn't exist, same as 1
+3. texture2D() has been deprecated
+
+Fortunately most of these have been taken care of with GL3 and the shader
+mangling already exists so just expand the conditions they are used in. The
+gl_FragData issue requires a new mangle pass though. We also use this new
+pass on desktop GL for consistency.
+
+Upstream-Status: Backport [1.9.1]
+
+---
+ gst-libs/gst/gl/gstglcolorconvert.c | 125 ++++++++++++++++++++++++++++--------
+ 1 file changed, 99 insertions(+), 26 deletions(-)
+
+diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
+index 490ec54..f478faa 100644
+--- a/gst-libs/gst/gl/gstglcolorconvert.c
++++ b/gst-libs/gst/gl/gstglcolorconvert.c
+@@ -1802,10 +1802,11 @@ _mangle_sampler_type (const gchar * str, GstGLTextureTarget from,
+
+ static gchar *
+ _mangle_varying_attribute (const gchar * str, guint shader_type,
+- GstGLAPI gl_api)
++ GstGLAPI gl_api, guint gl_major, guint gl_minor)
+ {
+- if (gl_api & GST_GL_API_OPENGL3) {
+- if (shader_type == GL_VERTEX_SHADER) {
++ if (shader_type == GL_VERTEX_SHADER) {
++ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
++ && gl_major >= 3)) {
+ gchar *tmp, *tmp2;
+ GRegex *regex;
+
+@@ -1821,7 +1822,10 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
+
+ g_free (tmp);
+ return tmp2;
+- } else if (shader_type == GL_FRAGMENT_SHADER) {
++ }
++ } else if (shader_type == GL_FRAGMENT_SHADER) {
++ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
++ && gl_major > 3)) {
+ gchar *tmp;
+ GRegex *regex;
+
+@@ -1837,28 +1841,48 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
+ }
+
+ static gchar *
+-_mangle_frag_color (const gchar * str)
++_mangle_frag_color_data (const gchar * str)
+ {
+ GRegex *regex;
+- gchar *ret;
++ gchar *ret, *tmp;
+
+ regex = g_regex_new ("gl_FragColor", 0, 0, NULL);
+ ret = g_regex_replace_literal (regex, str, -1, 0, "fragColor", 0, NULL);
+ g_regex_unref (regex);
+
++ tmp = ret;
++ /* search and replace 'gl_FragData[NUM]' into fragColor_NUM */
++ regex = g_regex_new ("gl_FragData\\[(\\d+)\\]", 0, 0, NULL);
++ ret = g_regex_replace (regex, tmp, -1, 0, "fragColor_\\1", 0, NULL);
++ g_regex_unref (regex);
++ g_free (tmp);
++
+ return ret;
+ }
+
+ static void
+-_mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
+- GstGLSLProfile * profile)
++_mangle_version_profile_from_gl_api (GstGLAPI gl_api, gint gl_major,
++ gint gl_minor, GstGLSLVersion * version, GstGLSLProfile * profile)
+ {
++ *version = GST_GLSL_VERSION_NONE;
++ *profile = GST_GLSL_PROFILE_NONE;
++
+ if (gl_api & GST_GL_API_OPENGL3) {
+- *version = GST_GLSL_VERSION_150;
+- *profile = GST_GLSL_PROFILE_NONE;
++ if (gl_major > 3 || gl_minor >= 3) {
++ *version = GST_GLSL_VERSION_330;
++ *profile = GST_GLSL_PROFILE_CORE;
++ } else {
++ *version = GST_GLSL_VERSION_150;
++ *profile = GST_GLSL_PROFILE_NONE;
++ }
+ } else if (gl_api & GST_GL_API_GLES2) {
+- *version = GST_GLSL_VERSION_100;
+- *profile = GST_GLSL_PROFILE_ES;
++ if (gl_major >= 3) {
++ *version = GST_GLSL_VERSION_300;
++ *profile = GST_GLSL_PROFILE_ES;
++ } else if (gl_major >= 2) {
++ *version = GST_GLSL_VERSION_100;
++ *profile = GST_GLSL_PROFILE_ES;
++ }
+ } else if (gl_api & GST_GL_API_OPENGL) {
+ *version = GST_GLSL_VERSION_110;
+ *profile = GST_GLSL_PROFILE_COMPATIBILITY;
+@@ -1867,22 +1891,28 @@ _mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
+
+ static gchar *
+ _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
+- GstGLTextureTarget to, GstGLAPI gl_api, GstGLSLVersion * version,
+- GstGLSLProfile * profile)
++ GstGLTextureTarget to, GstGLAPI gl_api, gint gl_major, gint gl_minor,
++ GstGLSLVersion * version, GstGLSLProfile * profile)
+ {
+ gchar *tmp, *tmp2;
+
++ _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
++ profile);
+ tmp = _mangle_texture_access (str, from, to, gl_api);
+ tmp2 = _mangle_sampler_type (tmp, from, to);
+ g_free (tmp);
+- tmp = _mangle_varying_attribute (tmp2, shader_type, gl_api);
++ tmp =
++ _mangle_varying_attribute (tmp2, shader_type, gl_api, gl_major, gl_minor);
+ g_free (tmp2);
+- if (shader_type == GL_FRAGMENT_SHADER && gl_api & GST_GL_API_OPENGL3) {
+- tmp2 = _mangle_frag_color (tmp);
+- g_free (tmp);
+- tmp = tmp2;
++ if (shader_type == GL_FRAGMENT_SHADER) {
++ if ((*profile == GST_GLSL_PROFILE_ES && *version >= GST_GLSL_VERSION_300)
++ || (*profile == GST_GLSL_PROFILE_CORE
++ && *version >= GST_GLSL_VERSION_150)) {
++ tmp2 = _mangle_frag_color_data (tmp);
++ g_free (tmp);
++ tmp = tmp2;
++ }
+ }
+- _mangle_version_profile_from_gl_api (gl_api, version, profile);
+ return tmp;
+ }
+
+@@ -1899,15 +1929,18 @@ _create_shader (GstGLColorConvert * convert)
+ const gchar *strings[2];
+ GError *error = NULL;
+ GstGLAPI gl_api;
++ gint gl_major, gl_minor;
+ int i;
+
+ gl_api = gst_gl_context_get_gl_api (convert->context);
++ gst_gl_context_get_gl_version (convert->context, &gl_major, &gl_minor);
+
+ ret = gst_gl_shader_new (convert->context);
+
+ tmp =
+ _mangle_shader (text_vertex_shader, GL_VERTEX_SHADER, info->templ->target,
+- convert->priv->from_texture_target, gl_api, &version, &profile);
++ convert->priv->from_texture_target, gl_api, gl_major, gl_minor, &version,
++ &profile);
+
+ tmp1 = gst_glsl_version_profile_to_string (version, profile);
+ version_str = g_strdup_printf ("#version %s\n", tmp1);
+@@ -1945,9 +1978,37 @@ _create_shader (GstGLColorConvert * convert)
+ if (info->templ->uniforms)
+ g_string_append (str, info->templ->uniforms);
+
+- if (gl_api & GST_GL_API_OPENGL3) {
+- g_string_append_c (str, '\n');
+- g_string_append (str, "out vec4 fragColor;\n");
++ g_string_append_c (str, '\n');
++
++ /* GL 3.3+ and GL ES 3.x */
++ if ((profile == GST_GLSL_PROFILE_CORE && version >= GST_GLSL_VERSION_330)
++ || (profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)) {
++ if (info->out_n_textures > 1) {
++ gint i;
++
++ for (i = 0; i < info->out_n_textures; i++) {
++ g_string_append_printf (str,
++ "layout(location = %d) out vec4 fragColor_%d;\n", i, i);
++ }
++ } else {
++ g_string_append (str, "layout (location = 0) out vec4 fragColor;\n");
++ }
++ } else if (profile == GST_GLSL_PROFILE_CORE
++ && version >= GST_GLSL_VERSION_150) {
++ /* no layout specifiers, use glBindFragDataLocation instead */
++ if (info->out_n_textures > 1) {
++ gint i;
++
++ for (i = 0; i < info->out_n_textures; i++) {
++ gchar *var_name = g_strdup_printf ("fragColor_%d", i);
++ g_string_append_printf (str, "out vec4 %s;\n", var_name);
++ gst_gl_shader_bind_frag_data_location (ret, i, var_name);
++ g_free (var_name);
++ }
++ } else {
++ g_string_append (str, "out vec4 fragColor;\n");
++ gst_gl_shader_bind_frag_data_location (ret, 0, "fragColor");
++ }
+ }
+
+ for (i = 0; i < MAX_FUNCTIONS; i++) {
+@@ -1959,7 +2020,19 @@ _create_shader (GstGLColorConvert * convert)
+ g_string_append_c (str, '\n');
+ }
+
+- g_string_append (str, "\nvarying vec2 v_texcoord;\nvoid main (void) {\n");
++ {
++ const gchar *varying = NULL;
++
++ if ((profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)
++ || (profile == GST_GLSL_PROFILE_CORE
++ && version >= GST_GLSL_VERSION_150)) {
++ varying = "in";
++ } else {
++ varying = "varying";
++ }
++ g_string_append_printf (str, "\n%s vec2 v_texcoord;\nvoid main (void) {\n",
++ varying);
++ }
+ if (info->frag_body) {
+ g_string_append (str, "vec2 texcoord;\n");
+ if (convert->priv->from_texture_target == GST_GL_TEXTURE_TARGET_RECTANGLE
+@@ -1975,7 +2048,7 @@ _create_shader (GstGLColorConvert * convert)
+ tmp = g_string_free (str, FALSE);
+ info->frag_prog = _mangle_shader (tmp, GL_FRAGMENT_SHADER,
+ info->templ->target, convert->priv->from_texture_target, gl_api,
+- &version, &profile);
++ gl_major, gl_minor, &version, &profile);
+ g_free (tmp);
+
+ strings[1] = info->frag_prog;
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
new file mode 100755
index 000000000..b75f402d8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
@@ -0,0 +1,32 @@
+From b069672ace2b762f400ca6d318571cbedf5141f2 Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matthew@centricular.com>
+Date: Thu, 31 Mar 2016 20:00:37 +1100
+Subject: [PATCH 1/3] glcolorconvert: don't use the predefined variable name
+ sample
+
+Using 'sample' as a variable name is an error in GLES3
+
+Upstream-Status: Backport [1.9.1]
+---
+ gst-libs/gst/gl/gstglcolorconvert.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
+index f478faa..c23624f 100644
+--- a/gst-libs/gst/gl/gstglcolorconvert.c
++++ b/gst-libs/gst/gl/gstglcolorconvert.c
+@@ -261,9 +261,9 @@ static const struct shader_templ templ_RGB_to_PLANAR_YUV =
+ " for (int j = 0; j < int(chroma_sampling.y); j++) {\n"
+ " int n = (i+1)*(j+1);\n"
+ " delta.y = float(j);\n"
+- " vec4 sample = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
++ " vec4 s = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
+ /* rolling average */
+- " uv_texel = (float(n-1) * uv_texel + sample) / float(n);\n"
++ " uv_texel = (float(n-1) * uv_texel + s) / float(n);\n"
+ " }\n"
+ " }\n"
+ "}\n"
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
new file mode 100755
index 000000000..57e9d1a46
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
@@ -0,0 +1,77 @@
+From 38221080181229d520522a20bcb1663ca19f7aff Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matthew@centricular.com>
+Date: Thu, 31 Mar 2016 19:25:32 +1100
+Subject: [PATCH 2/3] glshader: add glBindFragDataLocation
+
+There are some cases where it's needed for binding in/out variables in shaders.
+e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
+the shader source so we have to bind them ourselves.
+
+Upstream-Status: Backport [1.9.1]
+---
+ gst-libs/gst/gl/glprototypes/shaders.h | 10 ++++++++++
+ gst-libs/gst/gl/gstglshader.c | 20 ++++++++++++++++++++
+ gst-libs/gst/gl/gstglshader.h | 1 +
+ 3 files changed, 31 insertions(+)
+
+diff --git a/gst-libs/gst/gl/glprototypes/shaders.h b/gst-libs/gst/gl/glprototypes/shaders.h
+index 817e479..6d828db 100644
+--- a/gst-libs/gst/gl/glprototypes/shaders.h
++++ b/gst-libs/gst/gl/glprototypes/shaders.h
+@@ -362,3 +362,13 @@ GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
+ GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
+ (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
+ GST_GL_EXT_END ()
++
++GST_GL_EXT_BEGIN (bind_frag_data,
++ GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
++ 3, 0,
++ 255, 255,
++ "\0",
++ "\0")
++GST_GL_EXT_FUNCTION (void, BindFragDataLocation,
++ (GLuint program, GLuint index, const GLchar * name))
++GST_GL_EXT_END ()
+diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
+index 9d96784..9f09236 100644
+--- a/gst-libs/gst/gl/gstglshader.c
++++ b/gst-libs/gst/gl/gstglshader.c
+@@ -1306,3 +1306,23 @@ gst_gl_shader_bind_attribute_location (GstGLShader * shader, GLuint index,
+
+ gl->BindAttribLocation (priv->program_handle, index, name);
+ }
++
++void
++gst_gl_shader_bind_frag_data_location (GstGLShader * shader,
++ guint index, const gchar * name)
++{
++ GstGLShaderPrivate *priv;
++ GstGLFuncs *gl;
++
++ g_return_if_fail (shader != NULL);
++ if (!_ensure_program (shader))
++ g_return_if_fail (shader->priv->program_handle);
++ priv = shader->priv;
++ gl = shader->context->gl_vtable;
++ g_return_if_fail (gl->BindFragDataLocation);
++
++ GST_TRACE_OBJECT (shader, "binding program %i frag data \'%s\' location %i",
++ (int) priv->program_handle, name, index);
++
++ gl->BindFragDataLocation (priv->program_handle, index, name);
++}
+diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
+index 21410e2..2200b89 100644
+--- a/gst-libs/gst/gl/gstglshader.h
++++ b/gst-libs/gst/gl/gstglshader.h
+@@ -104,6 +104,7 @@ void gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader *shader, const gchar *n
+
+ gint gst_gl_shader_get_attribute_location (GstGLShader *shader, const gchar *name);
+ void gst_gl_shader_bind_attribute_location (GstGLShader * shader, guint index, const gchar * name);
++void gst_gl_shader_bind_frag_data_location (GstGLShader * shader, guint index, const gchar * name);
+
+ G_END_DECLS
+
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
new file mode 100755
index 000000000..79ef4c81a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
@@ -0,0 +1,51 @@
+From 764fd69f8482eca9f925cefe72ebae090ae59d43 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
+Date: Tue, 19 Apr 2016 19:27:33 +0300
+Subject: [PATCH 3/3] glcolorconvert: GLES3 deprecates texture2D() and it does
+ not work at all in newer versions than 3.3
+
+Use the newer texture() function instead. This fixes glimagesink and other
+things on various Android devices.
+
+Upstream-Status: Backport [1.9.1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=765266
+---
+ gst-libs/gst/gl/gstglcolorconvert.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
+index c23624f..f472d5d 100644
+--- a/gst-libs/gst/gl/gstglcolorconvert.c
++++ b/gst-libs/gst/gl/gstglcolorconvert.c
+@@ -1716,7 +1716,7 @@ _unbind_buffer (GstGLColorConvert * convert)
+
+ static gchar *
+ _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
+- GstGLTextureTarget to, GstGLAPI gl_api)
++ GstGLTextureTarget to, GstGLAPI gl_api, guint gl_major, guint gl_minor)
+ {
+ const gchar *from_str = NULL, *to_str = NULL;
+ gchar *ret, *tmp;
+@@ -1730,7 +1730,8 @@ _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
+ if (from == GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
+ from_str = "texture2D";
+
+- if (gl_api & GST_GL_API_OPENGL3) {
++ if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
++ && gl_major >= 3)) {
+ to_str = "texture";
+ } else {
+ if (to == GST_GL_TEXTURE_TARGET_2D)
+@@ -1898,7 +1899,7 @@ _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
+
+ _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
+ profile);
+- tmp = _mangle_texture_access (str, from, to, gl_api);
++ tmp = _mangle_texture_access (str, from, to, gl_api, gl_major, gl_minor);
+ tmp2 = _mangle_sampler_type (tmp, from, to);
+ g_free (tmp);
+ tmp =
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
new file mode 100644
index 000000000..a67381cfe
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
@@ -0,0 +1,495 @@
+From 806bbe75b0b6947f589bce3960c28fee51b5c6c2 Mon Sep 17 00:00:00 2001
+From: Gwang Yoon Hwang <yoon@igalia.com>
+Date: Thu, 21 Jan 2016 22:18:17 +0900
+Subject: [PATCH] gl: implement GstGLMemoryEGL
+
+Because current GstEGLImageMemory does not inherit GstGLMemory, GLUpload
+allocates additional GLMemory and upload the decoded contents from the decoder
+which uses EGLImage (e.g. gst-omx in RPi).
+
+This work adds GstGLMemoryEGL to avoid this overhead. Decoders allocate
+GstGLMemoryEGL and decode its contents to the EGLImage of GstGLMemoryEGL. And
+GLUpload uses this memory without allocation of additional textures and blit
+operations.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=760916
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ gst-libs/gst/gl/egl/Makefile.am | 2 +
+ gst-libs/gst/gl/egl/gstgldisplay_egl.c | 2 +
+ gst-libs/gst/gl/egl/gstglmemoryegl.c | 241 +++++++++++++++++++++++++++++++++
+ gst-libs/gst/gl/egl/gstglmemoryegl.h | 108 +++++++++++++++
+ gst-libs/gst/gl/gstgl_fwd.h | 4 +
+ gst-libs/gst/gl/gstgldisplay.c | 2 +
+ gst-libs/gst/gl/gstglupload.c | 8 ++
+ 7 files changed, 367 insertions(+)
+ create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.c
+ create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.h
+
+diff --git a/gst-libs/gst/gl/egl/Makefile.am b/gst-libs/gst/gl/egl/Makefile.am
+index b808178..878f16c 100644
+--- a/gst-libs/gst/gl/egl/Makefile.am
++++ b/gst-libs/gst/gl/egl/Makefile.am
+@@ -5,6 +5,7 @@ noinst_LTLIBRARIES = libgstgl-egl.la
+ libgstgl_egl_la_SOURCES = \
+ gstgldisplay_egl.c \
+ gstglcontext_egl.c \
++ gstglmemoryegl.c \
+ gsteglimagememory.c
+
+ noinst_HEADERS =
+@@ -13,6 +14,7 @@ libgstgl_eglincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/egl
+ libgstgl_eglinclude_HEADERS = \
+ gstgldisplay_egl.h \
+ gstglcontext_egl.h \
++ gstglmemoryegl.h \
+ gsteglimagememory.h \
+ gstegl.h
+
+diff --git a/gst-libs/gst/gl/egl/gstgldisplay_egl.c b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
+index 9acf4f0..20816c2 100644
+--- a/gst-libs/gst/gl/egl/gstgldisplay_egl.c
++++ b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
+@@ -24,6 +24,7 @@
+
+ #include <gst/gl/egl/gstgldisplay_egl.h>
+ #include <gst/gl/egl/gsteglimagememory.h>
++#include <gst/gl/egl/gstglmemoryegl.h>
+
+ GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug);
+ #define GST_CAT_DEFAULT gst_gl_display_debug
+@@ -51,6 +52,7 @@ gst_gl_display_egl_init (GstGLDisplayEGL * display_egl)
+ display_egl->foreign_display = FALSE;
+
+ gst_egl_image_memory_init ();
++ gst_gl_memory_egl_init_once ();
+ }
+
+ static void
+diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.c b/gst-libs/gst/gl/egl/gstglmemoryegl.c
+new file mode 100644
+index 0000000..03cf432
+--- /dev/null
++++ b/gst-libs/gst/gl/egl/gstglmemoryegl.c
+@@ -0,0 +1,241 @@
++/*
++ * GStreamer
++ * Copyright (C) 2012 Collabora Ltd.
++ * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
++ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com>
++ * Copyright (C) 2015 Igalia
++ * Author: Gwang Yoon Hwang <yoon@igalia.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#include <string.h>
++
++#include <gst/gl/egl/gstglmemoryegl.h>
++
++static GstAllocator *_gl_memory_egl_allocator;
++
++GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY);
++#define GST_CAT_DEFAULT GST_CAT_GL_MEMORY
++
++#define parent_class gst_gl_memory_egl_allocator_parent_class
++G_DEFINE_TYPE (GstGLMemoryEGLAllocator, gst_gl_memory_egl_allocator,
++ GST_TYPE_GL_MEMORY_ALLOCATOR);
++
++gboolean
++gst_is_gl_memory_egl (GstMemory * mem)
++{
++ return mem != NULL && mem->allocator != NULL
++ && g_type_is_a (G_OBJECT_TYPE (mem->allocator),
++ GST_TYPE_GL_MEMORY_EGL_ALLOCATOR);
++}
++
++static GstGLMemoryEGL *
++_gl_mem_get_parent (GstGLMemoryEGL * gl_mem)
++{
++ GstGLMemoryEGL *parent = (GstGLMemoryEGL *)gl_mem->mem.mem.mem.parent;
++ return parent ? parent : gl_mem;
++}
++
++EGLImageKHR
++gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem)
++{
++ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
++ EGL_NO_IMAGE_KHR);
++ return _gl_mem_get_parent(mem)->image;
++}
++
++EGLDisplay
++gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem)
++{
++ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)), NULL);
++ return GST_GL_CONTEXT_EGL(_gl_mem_get_parent(mem))->egl_display;
++}
++
++GstVideoGLTextureOrientation
++gst_gl_memory_egl_get_orientation (GstGLMemoryEGL * mem)
++{
++ g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
++ GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL);
++
++ return _gl_mem_get_parent(mem)->orientation;
++}
++
++void
++gst_gl_memory_egl_set_orientation (GstGLMemoryEGL * mem,
++ GstVideoGLTextureOrientation orientation)
++{
++ g_return_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)));
++
++ _gl_mem_get_parent(mem)->orientation = orientation;
++}
++
++static GstMemory *
++_gl_mem_alloc (GstAllocator * allocator, gsize size,
++ GstAllocationParams * params)
++{
++ g_warning ("Use gst_gl_base_memory_allocator_alloc() to allocate from this "
++ "GstGLMemoryEGL allocator");
++
++ return NULL;
++}
++
++static void
++_gl_mem_destroy (GstGLMemoryEGL * mem)
++{
++ /* Shared memory should not destroy all the data */
++ if (!mem->mem.mem.mem.parent) {
++ GstGLContextEGL *context = GST_GL_CONTEXT_EGL(mem->mem.mem.context);
++ context->eglDestroyImage (context->egl_display, mem->image);
++ }
++
++ GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class)->destroy ((GstGLBaseMemory
++ *) mem);
++}
++
++static void
++_gl_mem_init (GstGLMemoryEGL * mem, GstAllocator * allocator,
++ GstMemory * parent, GstGLContext * context, GstGLTextureTarget target,
++ GstAllocationParams * params, GstVideoInfo * info,
++ guint plane, GstVideoAlignment * valign, gpointer user_data,
++ GDestroyNotify notify)
++{
++ gst_gl_memory_init ((GstGLMemory *) mem, allocator, parent,
++ context, target, params, info, plane, valign, user_data, notify);
++}
++
++static GstGLMemoryEGL *
++_gl_mem_egl_alloc (GstGLBaseMemoryAllocator * allocator,
++ GstGLVideoAllocationParams * params)
++{
++ guint alloc_flags = params->parent.alloc_flags;
++ GstGLMemoryEGL *mem;
++
++ g_return_val_if_fail (alloc_flags & GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO,
++ NULL);
++ g_return_val_if_fail ((alloc_flags &
++ GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE) == 0, NULL);
++ g_return_val_if_fail ((alloc_flags &
++ GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM) == 0, NULL);
++
++ mem = g_new0 (GstGLMemoryEGL, 1);
++ mem->image = EGL_NO_IMAGE_KHR;
++
++ _gl_mem_init (mem, GST_ALLOCATOR_CAST (allocator), NULL,
++ params->parent.context, params->target, params->parent.alloc_params,
++ params->v_info, params->plane, params->valign, params->parent.user_data,
++ params->parent.notify);
++
++ return mem;
++}
++
++static gboolean
++_gl_mem_create (GstGLMemoryEGL * gl_mem, GError ** error)
++{
++ GstGLContextEGL *context = GST_GL_CONTEXT_EGL (gl_mem->mem.mem.context);
++ GstGLBaseMemoryAllocatorClass *alloc_class;
++
++ if (!gst_gl_context_check_feature (GST_GL_CONTEXT (context),
++ "EGL_KHR_image_base")) {
++ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_WRONG_API,
++ "EGL_KHR_image_base is not supported");
++ return FALSE;
++ }
++
++ alloc_class = GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class);
++ if (!alloc_class->create ((GstGLBaseMemory *) gl_mem, error))
++ return FALSE;
++
++ gl_mem->image = context->eglCreateImage (context->egl_display,
++ context->egl_context, EGL_GL_TEXTURE_2D_KHR,
++ (EGLClientBuffer) GSIZE_TO_POINTER (gl_mem->mem.tex_id), NULL);
++
++ GST_TRACE ("Generating EGLImage handle:%p from a texture:%u",
++ gl_mem->image, gl_mem->mem.tex_id);
++
++ if (eglGetError () != EGL_SUCCESS) {
++ g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
++ "Failed to create EGLImage");
++ return FALSE;
++ }
++
++ return TRUE;
++}
++
++static GstMemory *
++_gl_mem_copy (GstGLMemoryEGL * src, gssize offset, gssize size)
++{
++ GST_CAT_ERROR (GST_CAT_GL_MEMORY, "GstGLMemoryEGL does not support copy");
++ return NULL;
++}
++
++static void
++gst_gl_memory_egl_allocator_class_init (GstGLMemoryEGLAllocatorClass * klass)
++{
++ GstGLBaseMemoryAllocatorClass *gl_base;
++ GstGLMemoryAllocatorClass *gl_tex;
++ GstAllocatorClass *allocator_class;
++
++ gl_tex = (GstGLMemoryAllocatorClass *) klass;
++ gl_base = (GstGLBaseMemoryAllocatorClass *) klass;
++ allocator_class = (GstAllocatorClass *) klass;
++
++ gl_base->alloc = (GstGLBaseMemoryAllocatorAllocFunction) _gl_mem_egl_alloc;
++ gl_base->create = (GstGLBaseMemoryAllocatorCreateFunction) _gl_mem_create;
++ gl_base->destroy = (GstGLBaseMemoryAllocatorDestroyFunction) _gl_mem_destroy;
++ gl_tex->copy = (GstGLBaseMemoryAllocatorCopyFunction) _gl_mem_copy;
++
++ allocator_class->alloc = _gl_mem_alloc;
++}
++
++static void
++gst_gl_memory_egl_allocator_init (GstGLMemoryEGLAllocator * allocator)
++{
++ GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
++
++ alloc->mem_type = GST_GL_MEMORY_EGL_ALLOCATOR_NAME;
++
++ GST_OBJECT_FLAG_SET (allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
++}
++
++/**
++ * gst_gl_memory_egl_init_once:
++ *
++ * Initializes the GL Memory allocator. It is safe to call this function
++ * multiple times. This must be called before any other GstGLMemoryEGL operation.
++ */
++void
++gst_gl_memory_egl_init_once (void)
++{
++ static volatile gsize _init = 0;
++
++ if (g_once_init_enter (&_init)) {
++ gst_gl_memory_init_once ();
++
++ GST_DEBUG_CATEGORY_INIT (GST_CAT_GL_MEMORY, "glmemory", 0,
++ "OpenGL Texture with EGLImage memory");
++
++ _gl_memory_egl_allocator = g_object_new (GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, NULL);
++
++ gst_allocator_register (GST_GL_MEMORY_EGL_ALLOCATOR_NAME,
++ gst_object_ref (_gl_memory_egl_allocator));
++ g_once_init_leave (&_init, 1);
++ }
++}
+diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.h b/gst-libs/gst/gl/egl/gstglmemoryegl.h
+new file mode 100644
+index 0000000..7256d33
+--- /dev/null
++++ b/gst-libs/gst/gl/egl/gstglmemoryegl.h
+@@ -0,0 +1,108 @@
++/*
++ * GStreamer
++ * Copyright (C) 2012 Collabora Ltd.
++ * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
++ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the
++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
++ * Boston, MA 02110-1301, USA.
++ */
++
++#ifndef _GST_GL_MEMORY_EGL_H_
++#define _GST_GL_MEMORY_EGL_H_
++
++#include <gst/gst.h>
++#include <gst/gstallocator.h>
++#include <gst/gstmemory.h>
++#include <gst/video/video.h>
++
++#include <gst/gl/gl.h>
++#include "gstglcontext_egl.h"
++
++#include <gst/gl/gstglmemory.h>
++
++G_BEGIN_DECLS
++
++#define GST_TYPE_GL_MEMORY_EGL_ALLOCATOR (gst_gl_memory_egl_allocator_get_type())
++GType gst_gl_memory_egl_allocator_get_type(void);
++
++#define GST_IS_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
++#define GST_IS_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
++#define GST_GL_MEMORY_EGL_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocatorClass))
++#define GST_GL_MEMORY_EGL_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocator))
++#define GST_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLAllocatorClass))
++#define GST_GL_MEMORY_EGL_ALLOCATOR_CAST(obj) ((GstGLMemoryEGLAllocator *)(obj))
++
++typedef void (*GstEGLImageDestroyNotify) (GstGLContextEGL * context,
++ gpointer data);
++
++typedef struct _GstEGLImageMemory GstEGLImageMemory;
++
++
++/**
++ * GstGLMemoryEGL:
++ *
++ * Private instance
++ */
++struct _GstGLMemoryEGL
++{
++ GstGLMemory mem;
++
++ EGLImageKHR image;
++ GstVideoGLTextureOrientation orientation;
++};
++
++/**
++ * GST_GL_MEMORY_EGL_ALLOCATOR:
++ *
++ * The name of the GL Memory EGL allocator
++ */
++#define GST_GL_MEMORY_EGL_ALLOCATOR_NAME "GLMemoryEGL"
++
++void gst_gl_memory_egl_init_once (void);
++gboolean gst_is_gl_memory_egl (GstMemory * mem);
++
++EGLImageKHR gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem);
++EGLDisplay gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem);
++
++GstVideoGLTextureOrientation gst_gl_memory_egl_get_orientation
++ (GstGLMemoryEGL * mem);
++
++void gst_gl_memory_egl_set_orientation (GstGLMemoryEGL * mem,
++ GstVideoGLTextureOrientation orientation);
++
++/**
++ * GstGLAllocator
++ *
++ * Opaque #GstGLAllocator struct
++ */
++struct _GstGLMemoryEGLAllocator
++{
++ GstGLMemoryAllocator parent;
++};
++
++/**
++ * GstGLAllocatorClass:
++ *
++ * The #GstGLAllocatorClass only contains private data
++ */
++struct _GstGLMemoryEGLAllocatorClass
++{
++ GstGLMemoryAllocatorClass parent_class;
++};
++
++G_END_DECLS
++
++#endif /* _GST_GL_MEMORY_EGL_H_ */
+diff --git a/gst-libs/gst/gl/gstgl_fwd.h b/gst-libs/gst/gl/gstgl_fwd.h
+index fb64ff6..73e17bd 100644
+--- a/gst-libs/gst/gl/gstgl_fwd.h
++++ b/gst-libs/gst/gl/gstgl_fwd.h
+@@ -55,6 +55,10 @@ typedef struct _GstGLMemoryPBO GstGLMemoryPBO;
+ typedef struct _GstGLMemoryPBOAllocator GstGLMemoryPBOAllocator;
+ typedef struct _GstGLMemoryPBOAllocatorClass GstGLMemoryPBOAllocatorClass;
+
++typedef struct _GstGLMemoryEGL GstGLMemoryEGL;
++typedef struct _GstGLMemoryEGLAllocator GstGLMemoryEGLAllocator;
++typedef struct _GstGLMemoryEGLAllocatorClass GstGLMemoryEGLAllocatorClass;
++
+ typedef struct _GstGLSLStage GstGLSLStage;
+ typedef struct _GstGLSLStagePrivate GstGLSLStagePrivate;
+ typedef struct _GstGLSLStageClass GstGLSLStageClass;
+diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
+index 60dec6a..34770d0 100644
+--- a/gst-libs/gst/gl/gstgldisplay.c
++++ b/gst-libs/gst/gl/gstgldisplay.c
+@@ -68,6 +68,7 @@
+ #if GST_GL_HAVE_PLATFORM_EGL
+ #include <gst/gl/egl/gstgldisplay_egl.h>
+ #include <gst/gl/egl/gsteglimagememory.h>
++#include <gst/gl/egl/gstglmemoryegl.h>
+ #endif
+
+ GST_DEBUG_CATEGORY_STATIC (gst_context);
+@@ -144,6 +145,7 @@ gst_gl_display_init (GstGLDisplay * display)
+
+ #if GST_GL_HAVE_PLATFORM_EGL
+ gst_egl_image_memory_init ();
++ gst_gl_memory_egl_init_once ();
+ #endif
+ }
+
+diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
+index 16ed5ea..73a9029 100644
+--- a/gst-libs/gst/gl/gstglupload.c
++++ b/gst-libs/gst/gl/gstglupload.c
+@@ -29,6 +29,7 @@
+
+ #if GST_GL_HAVE_PLATFORM_EGL
+ #include "egl/gsteglimagememory.h"
++#include "egl/gstglmemoryegl.h"
+ #endif
+
+ #if GST_GL_HAVE_DMABUF
+@@ -301,6 +302,13 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
+ context));
+ gst_query_add_allocation_param (query, allocator, &params);
+ gst_object_unref (allocator);
++
++#if GST_GL_HAVE_PLATFORM_EGL
++ allocator =
++ GST_ALLOCATOR (gst_allocator_find (GST_GL_MEMORY_EGL_ALLOCATOR_NAME));
++ gst_query_add_allocation_param (query, allocator, &params);
++ gst_object_unref (allocator);
++#endif
+ }
+
+ n_pools = gst_query_get_n_allocation_pools (query);
+--
+2.5.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glimagesink-Downrank-to-marginal.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glimagesink-Downrank-to-marginal.patch
new file mode 100644
index 000000000..c81fb0f6a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glimagesink-Downrank-to-marginal.patch
@@ -0,0 +1,32 @@
+From c6b37a80806f9128de47f1ccc3f2354f8d436bb6 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 24 Sep 2015 19:47:32 +0300
+Subject: [PATCH] glimagesink: Downrank to marginal
+
+On desktop, where there is good OpenGL, xvimagesink will come up first,
+on other platforms, OpenGL can't be trusted because it's either software (like
+in a VM) or broken (like on embedded)., so let ximagesink come above.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751684]
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ ext/gl/gstopengl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
+index a4b2540..0ccaacd 100644
+--- a/ext/gl/gstopengl.c
++++ b/ext/gl/gstopengl.c
+@@ -118,7 +118,7 @@ plugin_init (GstPlugin * plugin)
+ #endif
+
+ if (!gst_element_register (plugin, "glimagesink",
+- GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) {
++ GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) {
+ return FALSE;
+ }
+
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
deleted file mode 100644
index 8eb47c265..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-include gstreamer1.0-plugins-bad.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
- file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
- file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \
- file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
-
-# Note: The mpg123 plugin was moved to gst-plugins-ugly prior to the 1.7.2
-# release, so this line should be removed during the update to 1.8.x
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664
-PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
-
-# Note: The gsettings plug-in was dropped prior to the 1.7.2 release,
-# so this line should be removed during the update to 1.8.x
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=914291808ad10621d6a74031f3d46d45eef5a3a3
-EXTRA_OECONF += "--disable-gsettings"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
- file://configure-allow-to-disable-libssh2.patch \
- file://0001-glimagesink-Downrank-to-marginal.patch \
- file://0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch \
-"
-
-SRC_URI[md5sum] = "4857adcafe41e4b9b8805cf88303bd55"
-SRC_URI[sha256sum] = "971b29101d6a9c5e3fe94d99d977a227f58f0b2d29b6ca2c7f292052542b3a61"
-
-S = "${WORKDIR}/gst-plugins-bad-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
new file mode 100644
index 000000000..108f4db10
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
@@ -0,0 +1,26 @@
+include gstreamer1.0-plugins-bad.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
+ file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
+ file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \
+ file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
+ file://configure-allow-to-disable-libssh2.patch \
+ file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
+ file://avoid-including-sys-poll.h-directly.patch \
+ file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
+ file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
+ file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \
+ file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
+ file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
+ file://0005-glshader-add-glBindFragDataLocation.patch \
+ file://0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch \
+ file://0008-gl-implement-GstGLMemoryEGL.patch \
+ file://0009-glimagesink-Downrank-to-marginal.patch \
+"
+SRC_URI[md5sum] = "955281a43e98c5464563fa049e0a0911"
+SRC_URI[sha256sum] = "7899fcb18e6a1af2888b19c90213af018a57d741c6e72ec56b133bc73ec8509b"
+
+S = "${WORKDIR}/gst-plugins-bad-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
index ef6581b2a..1370380b9 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-bad;name=base \
+ git://anongit.freedesktop.org/gstreamer/gst-plugins-bad;branch=1.8;name=base \
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
file://configure-allow-to-disable-libssh2.patch \
file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
@@ -17,36 +17,16 @@ SRC_URI = " \
file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
"
-PV = "1.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "50ae46cc0f8827bf966920d9c221e5cf86e811ba"
-SRCREV_common = "a25397448942079002622be231e9ec49b985745a"
+SRCREV_base = "5e73b5a4843d9675246f4efec158624475ed9586"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
-# over-ride the default hls PACKAGECONFIG in gstreamer1.0-plugins-bad.inc to
-# pass an additional --with-hls-crypto=XXX option (new in 1.7.x) and switch HLS
-# AES decryption from nettle to openssl (ie a shared dependency with dtls).
-# This should move back to the common .inc once the main recipe updates to 1.8.x
-PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl"
-
-# The tinyalsa plugin was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c8bd74fa9a81398f57d976c478d2043f30188684
-PACKAGECONFIG[tinyalsa] = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa"
-
-# The vulkan based video sink plugin was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=5de6dd9f40629562acf90e35e1fa58464d66617d
-PACKAGECONFIG[vulkan] = "--enable-vulkan,--disable-vulkan,libxcb"
-
-# The dependency-less netsim plugin was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=e3f9e854f08e82bfab11182c5a2aa6f9a0c73cd5
-EXTRA_OECONF += " \
- --enable-netsim \
-"
-
do_configure_prepend() {
${S}/autogen.sh --noconfigure
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
index 7381458f4..a04f155dc 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
@@ -31,6 +31,7 @@ PACKAGECONFIG[cdparanoia] = "--enable-cdparanoia,--disable-cdparanoia,cdparano
PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
PACKAGECONFIG[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor"
PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg"
+PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus"
PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango"
PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora"
PACKAGECONFIG[visual] = "--enable-libvisual,--disable-libvisual,libvisual"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
index 781e4d801..094bdac84 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
@@ -24,7 +24,7 @@ diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makef
index 9361bf9..bc7f53a 100644
--- a/gst-libs/gst/allocators/Makefile.am
+++ b/gst-libs/gst/allocators/Makefile.am
-@@ -37,7 +37,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
+@@ -38,7 +38,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--library=libgstallocators-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
@@ -37,7 +37,7 @@ diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
index 6d6de8d..dcc2fe0 100644
--- a/gst-libs/gst/app/Makefile.am
+++ b/gst-libs/gst/app/Makefile.am
-@@ -52,7 +52,7 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
+@@ -53,7 +53,7 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
--library=libgstapp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
@@ -50,7 +50,7 @@ diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
index 275d222..2374196 100644
--- a/gst-libs/gst/audio/Makefile.am
+++ b/gst-libs/gst/audio/Makefile.am
-@@ -106,7 +106,7 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
+@@ -116,7 +116,7 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
--include=GstTag-@GST_API_VERSION@ \
@@ -63,7 +63,7 @@ diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
index 09b3d68..f545354 100644
--- a/gst-libs/gst/fft/Makefile.am
+++ b/gst-libs/gst/fft/Makefile.am
-@@ -64,7 +64,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
+@@ -65,7 +65,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--library=libgstfft-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
@@ -76,7 +76,7 @@ diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
index 64d5eb0..91dc214 100644
--- a/gst-libs/gst/pbutils/Makefile.am
+++ b/gst-libs/gst/pbutils/Makefile.am
-@@ -94,7 +94,7 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
+@@ -99,7 +99,7 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
--include=GstTag-@GST_API_VERSION@ \
--include=GstVideo-@GST_API_VERSION@ \
--include=GstAudio-@GST_API_VERSION@ \
@@ -102,7 +102,7 @@ diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
index fdd01c1..f5445c1 100644
--- a/gst-libs/gst/rtp/Makefile.am
+++ b/gst-libs/gst/rtp/Makefile.am
-@@ -64,7 +64,7 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
+@@ -65,7 +65,7 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
--library=libgstrtp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
@@ -115,7 +115,7 @@ diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
index ede5706..9b0b258 100644
--- a/gst-libs/gst/rtsp/Makefile.am
+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -71,7 +71,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+@@ -72,7 +72,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
--include=Gio-2.0 \
--include=Gst-@GST_API_VERSION@ \
--include=GstSdp-@GST_API_VERSION@ \
@@ -128,7 +128,7 @@ diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
index a90f30b..0e149b8 100644
--- a/gst-libs/gst/sdp/Makefile.am
+++ b/gst-libs/gst/sdp/Makefile.am
-@@ -31,7 +31,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
+@@ -32,7 +32,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
--library=libgstsdp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
@@ -141,7 +141,7 @@ diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
index c534a4d..cafafd3 100644
--- a/gst-libs/gst/tag/Makefile.am
+++ b/gst-libs/gst/tag/Makefile.am
-@@ -44,7 +44,7 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
+@@ -45,7 +45,7 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
--library=libgsttag-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
@@ -154,7 +154,7 @@ diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
index 5d31fa1..ac64eb3 100644
--- a/gst-libs/gst/video/Makefile.am
+++ b/gst-libs/gst/video/Makefile.am
-@@ -113,7 +113,7 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
+@@ -116,7 +116,7 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
--library=libgstvideo-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
index 85fcacb55..0a8bc9b07 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
@@ -24,7 +24,7 @@ diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makef
index bc7f53a..0ef5f86 100644
--- a/gst-libs/gst/allocators/Makefile.am
+++ b/gst-libs/gst/allocators/Makefile.am
-@@ -34,7 +34,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
+@@ -35,7 +35,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
--c-include "gst/allocators/allocators.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -33,7 +33,7 @@ index bc7f53a..0ef5f86 100644
--library=libgstallocators-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--libtool="$(LIBTOOL)" \
-@@ -58,7 +58,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -59,7 +59,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -46,7 +46,7 @@ diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
index dcc2fe0..dc076cb 100644
--- a/gst-libs/gst/app/Makefile.am
+++ b/gst-libs/gst/app/Makefile.am
-@@ -47,8 +47,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
+@@ -48,8 +48,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
--c-include "gst/app/app.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -61,7 +61,7 @@ diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
index 2374196..295eb42 100644
--- a/gst-libs/gst/audio/Makefile.am
+++ b/gst-libs/gst/audio/Makefile.am
-@@ -96,12 +96,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
+@@ -106,12 +106,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
--c-include "gst/audio/audio.h" \
@@ -78,7 +78,7 @@ index 2374196..295eb42 100644
--library-path="$(top_builddir)/gst-libs/gst/tag/" \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -130,8 +130,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -140,8 +140,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
--includedir=$(srcdir) \
--includedir=$(builddir) \
--includedir="$(top_builddir)/gst-libs/gst/tag/" \
@@ -93,7 +93,7 @@ diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
index f545354..1bb6243 100644
--- a/gst-libs/gst/fft/Makefile.am
+++ b/gst-libs/gst/fft/Makefile.am
-@@ -61,7 +61,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
+@@ -62,7 +62,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
--c-include "gst/fft/fft.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -102,7 +102,7 @@ index f545354..1bb6243 100644
--library=libgstfft-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--libtool="$(LIBTOOL)" \
-@@ -85,7 +85,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -86,7 +86,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -115,7 +115,7 @@ diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
index 91dc214..dc8e1d3 100644
--- a/gst-libs/gst/pbutils/Makefile.am
+++ b/gst-libs/gst/pbutils/Makefile.am
-@@ -79,14 +79,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
+@@ -84,14 +84,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
--c-include "gst/pbutils/pbutils.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -134,7 +134,7 @@ index 91dc214..dc8e1d3 100644
--library-path="$(top_builddir)/gst-libs/gst/tag/" \
--library-path="$(top_builddir)/gst-libs/gst/video/" \
--library-path="$(top_builddir)/gst-libs/gst/audio/" \
-@@ -119,8 +119,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -124,8 +124,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -175,7 +175,7 @@ diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
index f5445c1..527c0b4 100644
--- a/gst-libs/gst/rtp/Makefile.am
+++ b/gst-libs/gst/rtp/Makefile.am
-@@ -59,8 +59,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
+@@ -60,8 +60,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
--c-include "gst/rtp/rtp.h" \
-I$(top_builddir)/gst-libs \
-I$(top_srcdir)/gst-libs \
@@ -186,7 +186,7 @@ index f5445c1..527c0b4 100644
--library=libgstrtp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -87,8 +87,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -88,8 +88,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -201,7 +201,7 @@ diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
index 9b0b258..4f6d9f8 100644
--- a/gst-libs/gst/rtsp/Makefile.am
+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -66,7 +66,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+@@ -67,7 +67,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
-I$(top_builddir)/gst-libs \
-I$(top_srcdir)/gst-libs \
--add-include-path=$(builddir)/../sdp \
@@ -210,7 +210,7 @@ index 9b0b258..4f6d9f8 100644
--library=libgstrtsp-@GST_API_VERSION@.la \
--include=Gio-2.0 \
--include=Gst-@GST_API_VERSION@ \
-@@ -96,7 +96,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -97,7 +97,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
--includedir=$(srcdir) \
--includedir=$(builddir) \
--includedir=$(builddir)/../sdp \
@@ -223,7 +223,7 @@ diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
index 0e149b8..9aa0512 100644
--- a/gst-libs/gst/sdp/Makefile.am
+++ b/gst-libs/gst/sdp/Makefile.am
-@@ -28,7 +28,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
+@@ -29,7 +29,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
--warn-all \
--c-include "gst/sdp/sdp.h" \
-I$(top_srcdir)/gst-libs \
@@ -232,7 +232,7 @@ index 0e149b8..9aa0512 100644
--library=libgstsdp-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--libtool="$(LIBTOOL)" \
-@@ -52,7 +52,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -53,7 +53,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -245,7 +245,7 @@ diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
index cafafd3..ba99279 100644
--- a/gst-libs/gst/tag/Makefile.am
+++ b/gst-libs/gst/tag/Makefile.am
-@@ -39,8 +39,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
+@@ -40,8 +40,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
--c-include "gst/tag/tag.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -256,7 +256,7 @@ index cafafd3..ba99279 100644
--library=libgsttag-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -67,8 +67,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -68,8 +68,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
@@ -271,7 +271,7 @@ diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
index ac64eb3..342c8c6 100644
--- a/gst-libs/gst/video/Makefile.am
+++ b/gst-libs/gst/video/Makefile.am
-@@ -108,8 +108,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
+@@ -111,8 +111,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
--c-include "gst/video/video.h" \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
@@ -282,7 +282,7 @@ index ac64eb3..342c8c6 100644
--library=libgstvideo-@GST_API_VERSION@.la \
--include=Gst-@GST_API_VERSION@ \
--include=GstBase-@GST_API_VERSION@ \
-@@ -136,8 +136,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+@@ -139,8 +139,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
$(INTROSPECTION_COMPILER) \
--includedir=$(srcdir) \
--includedir=$(builddir) \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
index 42d99c1db..4adf60546 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
@@ -14,7 +14,7 @@ diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
index 4f6d9f8..0afa370 100644
--- a/gst-libs/gst/rtsp/Makefile.am
+++ b/gst-libs/gst/rtsp/Makefile.am
-@@ -74,7 +74,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+@@ -75,7 +75,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
--libtool="$(LIBTOOL)" \
--pkg gio-2.0 \
--pkg gstreamer-@GST_API_VERSION@ \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
index 7813915d8..b924e3882 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
@@ -51,7 +51,7 @@ index b565e93..7741ccc
GST_WARNING_OBJECT (self, "seek to 0 bytes failed");
}
-@@ -1632,8 +1630,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
+@@ -1641,8 +1639,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
gst_event_parse_segment (event, &s);
if (s->format == GST_FORMAT_TIME)
gst_event_copy_segment (event, &self->segment);
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
deleted file mode 100755
index 096a6f4cb..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 5be6ed00aad028d9cbb4e0c63af0be69d335c71e Mon Sep 17 00:00:00 2001
-From: Song Bing <b06498@freescale.com>
-Date: Fri, 11 Dec 2015 21:42:00 +0800
-Subject: [PATCH] convertframe: Support video crop when convert frame
-
-Get thumbnail will user convertframe to convert video frame to
-desired video format and size. But haven't process crop meta on
-the video buffer. Add support video crop.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=759329
-
-Upstream-Status: Backport [1.7.1]
-
----
- gst-libs/gst/video/convertframe.c | 65 +++++++++++++++++++++++++++++++++------
- 1 file changed, 56 insertions(+), 9 deletions(-)
-
-diff --git a/gst-libs/gst/video/convertframe.c b/gst-libs/gst/video/convertframe.c
-index aa9c3d3..942a51e 100644
---- a/gst-libs/gst/video/convertframe.c
-+++ b/gst-libs/gst/video/convertframe.c
-@@ -110,12 +110,23 @@ fail:
- static GstElement *
- build_convert_frame_pipeline (GstElement ** src_element,
- GstElement ** sink_element, const GstCaps * from_caps,
-- const GstCaps * to_caps, GError ** err)
-+ GstVideoCropMeta * cmeta, const GstCaps * to_caps, GError ** err)
- {
-- GstElement *src = NULL, *csp = NULL, *vscale = NULL;
-- GstElement *sink = NULL, *encoder = NULL, *pipeline;
-+ GstElement *vcrop = NULL, *csp = NULL, *csp2 = NULL, *vscale = NULL;
-+ GstElement *src = NULL, *sink = NULL, *encoder = NULL, *pipeline;
-+ GstVideoInfo info;
- GError *error = NULL;
-
-+ if (cmeta) {
-+ if (!create_element ("videocrop", &vcrop, &error)) {
-+ g_warning
-+ ("build_convert_frame_pipeline: Buffer has crop metadata but videocrop element is not found. Cropping will be disabled");
-+ } else {
-+ if (!create_element ("videoconvert", &csp2, &error))
-+ goto no_elements;
-+ }
-+ }
-+
- /* videoscale is here to correct for the pixel-aspect-ratio for us */
- GST_DEBUG ("creating elements");
- if (!create_element ("appsrc", &src, &error) ||
-@@ -133,15 +144,42 @@ build_convert_frame_pipeline (GstElement ** src_element,
-
- GST_DEBUG ("adding elements");
- gst_bin_add_many (GST_BIN (pipeline), src, csp, vscale, sink, NULL);
-+ if (vcrop)
-+ gst_bin_add_many (GST_BIN (pipeline), vcrop, csp2, NULL);
-
- /* set caps */
- g_object_set (src, "caps", from_caps, NULL);
-+ if (vcrop) {
-+ gst_video_info_from_caps (&info, from_caps);
-+ g_object_set (vcrop, "left", cmeta->x, NULL);
-+ g_object_set (vcrop, "top", cmeta->y, NULL);
-+ g_object_set (vcrop, "right", GST_VIDEO_INFO_WIDTH (&info) - cmeta->width,
-+ NULL);
-+ g_object_set (vcrop, "bottom",
-+ GST_VIDEO_INFO_HEIGHT (&info) - cmeta->height, NULL);
-+ GST_DEBUG ("crop meta [x,y,width,height]: %d %d %d %d", cmeta->x, cmeta->y,
-+ cmeta->width, cmeta->height);
-+ }
- g_object_set (sink, "caps", to_caps, NULL);
-
- /* FIXME: linking is still way too expensive, profile this properly */
-- GST_DEBUG ("linking src->csp");
-- if (!gst_element_link_pads (src, "src", csp, "sink"))
-- goto link_failed;
-+ if (vcrop) {
-+ GST_DEBUG ("linking src->csp2");
-+ if (!gst_element_link_pads (src, "src", csp2, "sink"))
-+ goto link_failed;
-+
-+ GST_DEBUG ("linking csp2->vcrop");
-+ if (!gst_element_link_pads (csp2, "src", vcrop, "sink"))
-+ goto link_failed;
-+
-+ GST_DEBUG ("linking vcrop->csp");
-+ if (!gst_element_link_pads (vcrop, "src", csp, "sink"))
-+ goto link_failed;
-+ } else {
-+ GST_DEBUG ("linking src->csp");
-+ if (!gst_element_link_pads (src, "src", csp, "sink"))
-+ goto link_failed;
-+ }
-
- GST_DEBUG ("linking csp->vscale");
- if (!gst_element_link_pads_full (csp, "src", vscale, "sink",
-@@ -193,8 +231,12 @@ no_elements:
- {
- if (src)
- gst_object_unref (src);
-+ if (vcrop)
-+ gst_object_unref (vcrop);
- if (csp)
- gst_object_unref (csp);
-+ if (csp2)
-+ gst_object_unref (csp2);
- if (vscale)
- gst_object_unref (vscale);
- if (sink)
-@@ -209,7 +251,11 @@ no_elements:
- no_pipeline:
- {
- gst_object_unref (src);
-+ if (vcrop)
-+ gst_object_unref (vcrop);
- gst_object_unref (csp);
-+ if (csp2)
-+ gst_object_unref (csp2);
- gst_object_unref (vscale);
- gst_object_unref (sink);
-
-@@ -282,7 +328,8 @@ gst_video_convert_sample (GstSample * sample, const GstCaps * to_caps,
- }
-
- pipeline =
-- build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy, &err);
-+ build_convert_frame_pipeline (&src, &sink, from_caps,
-+ gst_buffer_get_video_crop_meta (buf), to_caps_copy, &err);
- if (!pipeline)
- goto no_pipeline;
-
-@@ -646,8 +693,8 @@ gst_video_convert_sample_async (GstSample * sample,
- }
-
- pipeline =
-- build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy,
-- &error);
-+ build_convert_frame_pipeline (&src, &sink, from_caps,
-+ gst_buffer_get_video_crop_meta (buf), to_caps_copy, &error);
- if (!pipeline)
- goto no_pipeline;
-
---
-2.5.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
index 325671721..5341e3cfc 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
@@ -17,7 +17,7 @@ diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
index 6728e58..32daae4 100644
--- a/gst/encoding/gstencodebin.c
+++ b/gst/encoding/gstencodebin.c
-@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
+@@ -1228,8 +1228,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
* We only use a 1buffer long queue here, the actual queueing will be done
* in the input queue */
last = sgroup->outqueue = gst_element_factory_make ("queue", NULL);
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
index 284abbe94..c8e6287a5 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/get-caps-from-src-pad-when-query-caps.patch
@@ -19,7 +19,7 @@ new mode 100755
index 9b6c478..ae2294a
--- a/gst-libs/gst/tag/gsttagdemux.c
+++ b/gst-libs/gst/tag/gsttagdemux.c
-@@ -1708,6 +1708,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
+@@ -1769,6 +1769,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
}
break;
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
index 01e944ddd..413eff069 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
@@ -25,8 +25,8 @@ diff --git a/configure.ac b/configure.ac
index 9c52aeb..26cacd6 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -747,9 +747,16 @@ AC_SUBST(FT2_CFLAGS)
- AC_SUBST(FT2_LIBS)
+@@ -752,9 +752,16 @@ AC_SUBST(FT2_CFLAGS)
+ fi dnl of EXT plugins
dnl *** gio-unix-2.0 for tests/check/pipelines/tcp.c ***
+AC_ARG_ENABLE([gio_unix_2_0],
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb
deleted file mode 100644
index 429dc9338..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-include gstreamer1.0-plugins-base.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
- file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
-
-# Note: The dependency on freetype was dropped shortly after the 1.7.1 release
-# so these lines should be removed during the update to 1.8.x
-# http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=183610c035dd6955c9b3540b940aec50474af031
-DEPENDS += "freetype"
-EXTRA_OECONF += "--disable-freetypetest"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
- file://get-caps-from-src-pad-when-query-caps.patch \
- file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
- file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
- file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
- file://0005-convertframe-Support-video-crop-when-convert-frame.patch \
-"
-
-SRC_URI[md5sum] = "3ddde0ad598ef69f58d6a2e87f8b460f"
-SRC_URI[sha256sum] = "b6154f8fdba4877e95efd94610ef0ada4f0171cd12eb829a3c3c97345d9c7a75"
-
-S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
new file mode 100644
index 000000000..986b5ac60
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
@@ -0,0 +1,19 @@
+include gstreamer1.0-plugins-base.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
+ file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
+ file://get-caps-from-src-pad-when-query-caps.patch \
+ file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+ file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
+ file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
+ file://make-gio_unix_2_0-dependency-configurable.patch \
+"
+
+SRC_URI[md5sum] = "4d03dd81828ea6b98a44c8f1ab7f4976"
+SRC_URI[sha256sum] = "114871d4d63606b4af424a8433cd923e4ff66896b244bb7ac97b9da47f71e79e"
+
+S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
index 38a9fcc29..3c2b50400 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
@@ -7,17 +7,21 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-base;name=base \
+ git://anongit.freedesktop.org/gstreamer/gst-plugins-base;branch=1.8;name=base \
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+ file://get-caps-from-src-pad-when-query-caps.patch \
+ file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+ file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
+ file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
file://make-gio_unix_2_0-dependency-configurable.patch \
"
-PV = "1.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "97e108bebaa58821f4566a74cbf0135e93407c01"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_base = "70f3750773bf5dba4098f6d72d63aa6c84f1f539"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
index 4621bf894..f1e30aba5 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
@@ -23,12 +23,12 @@ PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,libgudev"
PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng"
-PACKAGECONFIG[libv4l2] = "--with-libv4l2,--without-libv4l2,libv4l2"
+PACKAGECONFIG[libv4l2] = "--with-libv4l2,--without-libv4l2,v4l-utils"
PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4"
PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex"
PACKAGECONFIG[taglib] = "--enable-taglib,--disable-taglib,taglib"
-PACKAGECONFIG[v4l2] = "--enable-gst_v4l2,--disable-gst_v4l2"
+PACKAGECONFIG[v4l2] = "--enable-gst_v4l2 --enable-v4l2-probe,--disable-gst_v4l2"
PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx,libvpx"
PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack"
PACKAGECONFIG[x11] = "--enable-x,--disable-x,${X11DEPENDS}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
index d1973d439..a2cbb70fe 100755..100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch
@@ -17,7 +17,7 @@ diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c
index 7913d9a..1749d39 100644
--- a/gst/rtp/gstrtpmp4gpay.c
+++ b/gst/rtp/gstrtpmp4gpay.c
-@@ -390,6 +390,7 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
+@@ -391,6 +391,7 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
const GValue *codec_data;
const gchar *media_type = NULL;
gboolean res;
@@ -25,7 +25,7 @@ index 7913d9a..1749d39 100644
rtpmp4gpay = GST_RTP_MP4G_PAY (payload);
-@@ -400,7 +401,6 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
+@@ -401,7 +402,6 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
GST_LOG_OBJECT (rtpmp4gpay, "got codec_data");
if (G_VALUE_TYPE (codec_data) == GST_TYPE_BUFFER) {
GstBuffer *buffer;
@@ -33,7 +33,7 @@ index 7913d9a..1749d39 100644
buffer = gst_value_get_buffer (codec_data);
GST_LOG_OBJECT (rtpmp4gpay, "configuring codec_data");
-@@ -426,6 +426,23 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
+@@ -427,6 +427,23 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
rtpmp4gpay->config = gst_buffer_copy (buffer);
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb
deleted file mode 100644
index 0b4f43690..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-include gstreamer1.0-plugins-good.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
- file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
- file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
-"
-
-SRC_URI[md5sum] = "a1958df7aa498b42793e2f2048673815"
-SRC_URI[sha256sum] = "24b19db70b2a83461ebddfe20033db432dadfdb5d4b54ffb1dfa0d830134a177"
-
-S = "${WORKDIR}/gst-plugins-good-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
new file mode 100644
index 000000000..5cc6578b7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
@@ -0,0 +1,17 @@
+include gstreamer1.0-plugins-good.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
+ file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
+ file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
+ file://avoid-including-sys-poll.h-directly.patch \
+ file://ensure-valid-sentinel-for-gst_structure_get.patch \
+"
+
+SRC_URI[md5sum] = "473ebb1f15c67de99ddb6e4d027c0876"
+SRC_URI[sha256sum] = "a1d6579ba203a7734927c24b90bf6590d846c5a5fcec01a48201018c8ad2827a"
+
+S = "${WORKDIR}/gst-plugins-good-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
index 9cadc9afc..9b79af2a9 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
@@ -7,18 +7,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-good;name=base \
+ git://anongit.freedesktop.org/gstreamer/gst-plugins-good;branch=1.8;name=base \
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
file://avoid-including-sys-poll.h-directly.patch \
file://ensure-valid-sentinel-for-gst_structure_get.patch \
+ file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
"
-PV = "1.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "1b6fdce67c15d59957e395b1957aa625322092d4"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_base = "9f73b5818f98cd045e7049bb313da1c943635109"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
index aff223072..708ad7a15 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
@@ -9,7 +9,7 @@ inherit gettext
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
- a52dec lame mad mpeg2dec \
+ a52dec lame mpg123 mpeg2dec \
"
PACKAGECONFIG[a52dec] = "--enable-a52dec,--disable-a52dec,liba52"
@@ -20,6 +20,7 @@ PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread,libdvdread"
PACKAGECONFIG[lame] = "--enable-lame,--disable-lame,lame"
PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
PACKAGECONFIG[mpeg2dec] = "--enable-mpeg2dec,--disable-mpeg2dec,mpeg2dec"
+PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264"
EXTRA_OECONF += " \
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb
deleted file mode 100644
index 7edfb81d2..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-include gstreamer1.0-plugins-ugly.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
- file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
-"
-
-SRC_URI[md5sum] = "dbd92afb3816cbfa90ab1f197144a2e2"
-SRC_URI[sha256sum] = "2fecf7b7c7882f8f62f1900048f4013f98c214fb3d3303d8d812245bb41fd064"
-
-S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
new file mode 100644
index 000000000..274593796
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
@@ -0,0 +1,13 @@
+include gstreamer1.0-plugins-ugly.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+ file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "4fc66c77253b0ad5ce224bda654b2e7d"
+SRC_URI[sha256sum] = "6fa2599fdd072d31fbaf50c34af406e2be944a010b1f4eab67a5fe32a0310693"
+
+S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
index 69afe4cfb..22cca3a8d 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
@@ -6,24 +6,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly;name=base \
+ git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly;branch=1.8;name=base \
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
"
-PV = "1.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "8bdb68edbc605e21314b608e7a39bdbaab7302b8"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_base = "79fe43c00925455a37fab6fc428e7f08655a9bbd"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
-# The mpg123 plugin was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1
-PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
-
do_configure_prepend() {
${S}/autogen.sh --noconfigure
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
index 2dcec509d..9cfcec3ca 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
@@ -5,7 +5,7 @@ SECTION = "multimedia"
DEPENDS = "gstreamer1.0 glib-2.0-native"
-inherit autotools pkgconfig upstream-version-is-even gobject-introspection
+inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
@@ -33,8 +33,21 @@ SRC_URI_append = " file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_
delete_pkg_m4_file() {
# This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
rm "${S}/common/m4/pkg.m4" || true
+ rm -f "${S}/common/m4/gtk-doc.m4"
}
-do_configure[prefuncs] += " delete_pkg_m4_file"
+# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
+# but its own custom ones, which we have to patch here
+patch_gtk_doc_makefiles() {
+ # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+ # instead of libtool wrapper or running them directly
+ # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
+ sed -i \
+ -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+ -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
+ ${S}/common/gtk-doc*mak
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
PACKAGES_DYNAMIC = "^${PN}-.*"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
index ae6d36477..13ba40d3d 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
@@ -13,12 +13,26 @@ SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz
S = "${WORKDIR}/${PNREAL}-${PV}"
-inherit autotools pkgconfig upstream-version-is-even gobject-introspection
+inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+
+# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
+LIBV = "1.0"
+require gst-plugins-package.inc
delete_pkg_m4_file() {
# This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
rm "${S}/common/m4/pkg.m4" || true
}
-do_configure[prefuncs] += " delete_pkg_m4_file"
+# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
+# but its own custom ones, which we have to patch here
+patch_gtk_doc_makefiles() {
+ # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+ # instead of libtool wrapper or running them directly
+ sed -i \
+ -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+ ${S}/common/gtk-doc*mak
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb
deleted file mode 100644
index 5bdae6cf9..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-include gstreamer1.0-rtsp-server.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
-
-SRC_URI[md5sum] = "a1cafefb5fc14ac5d7e7d8cdbdfa9694"
-SRC_URI[sha256sum] = "0f51f9879556c0950203c766b09a1b62f1f25b17f9a7d516e01b13ecf93c8858"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
new file mode 100644
index 000000000..17059d070
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
@@ -0,0 +1,6 @@
+include gstreamer1.0-rtsp-server.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
+
+SRC_URI[md5sum] = "e4b07b10dd65b6c26c9ca5f72e59297b"
+SRC_URI[sha256sum] = "010f06800c1c957851d1352e5ec7a8ba3ce6a857fec1b8afc7d1a9e5f53288bf"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index 10b4668e5..cb0bd82f2 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -8,7 +8,7 @@ LICENSE = "LGPLv2+"
DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
-inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection
+inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
# This way common/m4/introspection.m4 will come first
# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
@@ -20,16 +20,16 @@ SRC_URI_append = " \
PACKAGECONFIG ??= ""
-PACKAGECONFIG[check] = "--enable-check,--disable-check"
PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
+PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
+PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace,"
EXTRA_OECONF = " \
--disable-dependency-tracking \
--disable-docbook \
--disable-examples \
- --disable-gtk-doc \
"
CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no"
@@ -49,9 +49,22 @@ RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-raw
delete_pkg_m4_file() {
# This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
rm "${S}/common/m4/pkg.m4" || true
+ rm -f "${S}/common/m4/gtk-doc.m4"
}
-do_configure[prefuncs] += " delete_pkg_m4_file"
+# gstreamer is not using system-wide makefiles (which we patch in gtkdoc recipe,
+# but its own custom ones, which we have to patch here
+patch_gtk_doc_makefiles() {
+ # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries
+ # instead of libtool wrapper or running them directly
+ # Also substitute a bogus plugin scanner, as trying to run the real one is causing issues during build on x86_64.
+ sed -i \
+ -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \
+ -e "s|\$(GTKDOC_EXTRA_ENVIRONMENT)|\$(GTKDOC_EXTRA_ENVIRONMENT) GST_PLUGIN_SCANNER_1_0=\$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy|" \
+ ${S}/common/gtk-doc*mak
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles"
do_compile_prepend() {
export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch
deleted file mode 100644
index 94f5cc56e..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-Fix-crash-with-gst-inspect.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6b26f3dbf9bf577d71534ab7410de66d06e46ba2 Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Sat, 6 Apr 2013 23:52:11 +0200
-Subject: [PATCH] Fix crash with gst-inspect Chris Lord <chris@openedhand.com>
-
-Upstream-Status: Pending
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- tools/gst-inspect.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c
-index 23b7c44..b79b02e 100644
---- a/tools/gst-inspect.c
-+++ b/tools/gst-inspect.c
-@@ -1556,7 +1556,7 @@ main (int argc, char *argv[])
- g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
- g_option_context_add_group (ctx, gst_init_get_option_group ());
- if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
-- g_printerr ("Error initializing: %s\n", err->message);
-+ g_printerr ("Error initializing: %s\n", err ? err->message : "(null)");
- return -1;
- }
- g_option_context_free (ctx);
---
-1.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb
deleted file mode 100644
index ba1b83b08..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-include gstreamer1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
- file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
-
-SRC_URI = " \
- http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
- file://0001-Fix-crash-with-gst-inspect.patch \
-"
-
-SRC_URI[md5sum] = "b4cdeb2b9cb20dd6ac022a4f417eae0d"
-SRC_URI[sha256sum] = "22f9568d67b87cf700a111f381144bd37cb93790a77e4e331db01fe854a37f24"
-
-S = "${WORKDIR}/gstreamer-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
new file mode 100644
index 000000000..d3561ebbd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
@@ -0,0 +1,13 @@
+include gstreamer1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
+ file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
+
+SRC_URI = " \
+ http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "e88dad542df9d986822e982105d2b530"
+SRC_URI[sha256sum] = "66b37762d4fdcd63bce5a2bec57e055f92420e95037361609900278c0db7c53f"
+
+S = "${WORKDIR}/gstreamer-${PV}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
index 7715bb202..6112f2a89 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
@@ -6,25 +6,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
SRC_URI = " \
- git://anongit.freedesktop.org/gstreamer/gstreamer;name=base \
+ git://anongit.freedesktop.org/gstreamer/gstreamer;branch=1.8;name=base \
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
"
-PV = "1.7.2+git${SRCPV}"
+PV = "1.8.2+git${SRCPV}"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
-SRCREV_base = "9e33bfa2c7a5f43da2c49b0a8235fd43cba9feaf"
-SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_base = "3de8a4f728a7194a12b784ec4085f6a8e7d9b5bd"
+SRCREV_common = "f363b3205658a38e84fa77f19dee218cd4445275"
SRCREV_FORMAT = "base"
S = "${WORKDIR}/git"
-# The option to configure tracer hooks was added prior to the 1.7.2 release
-# https://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=e5ca47236e4df4683707f0bcf99181a937d358d5
-PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
-PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace,"
-
do_configure_prepend() {
${S}/autogen.sh --noconfigure
}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
index 571a1d07a..51baef26f 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/lame/lame/lame-3.99.5_fix_for_automake-1.12.x.patch
@@ -4,7 +4,7 @@ Fix this kind of errors with automake 1.12.x:
| doc/man/Makefile.am:3: error: automatic de-ANSI-fication support has been removed
| autoreconf: automake failed with exit status: 1
-Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/07/13
Index: lame-3.99.5/configure.in
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch
deleted file mode 100644
index b49dc8c98..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/add-pkgconfig.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Here is a patch for adding pkg-config support to libmad.
-It would make life a bit easier for distro maintainers if this was applied.
-In case you didn't know, pkg-config is a tool for providing LDFLAGS and
-CFLAGS for packages using shared libraries. It's on freedesktop.org.
-Debian has already been distributing the pkg-config file mad.pc with
-libmad for some time, and people developing on debian (notably xmms2
-developers) have started relying on this support being present, causing
-some confusion for people installing from source and on some BSDs which
-do not provide mad.pc (google: pkgconfig libmad).
-
-EMH
-
-Upstream-Status: Inappropriate [configuration]
-
---h31gzZEtNLTqOjlF
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: attachment; filename=&quot;libmad-0.15.1b-pkgconfig.patch&quot;
-
-diff -Naur libmad-0.15.1b.old/configure.ac libmad-0.15.1b/configure.ac
---- libmad-0.15.1b.old/configure.ac 2004-01-23 10:41:32.000000000 +0100
-+++ libmad-0.15.1b/configure.ac 2004-08-07 02:25:24.633462168 +0200
-@@ -429,5 +429,5 @@
- dnl AC_SUBST(LTLIBOBJS)
-
- AC_CONFIG_FILES([Makefile msvc++/Makefile \
-- libmad.list])
-+ libmad.list mad.pc])
- AC_OUTPUT
-diff -Naur libmad-0.15.1b.old/mad.pc.in libmad-0.15.1b/mad.pc.in
---- libmad-0.15.1b.old/mad.pc.in 1970-01-01 01:00:00.000000000 +0100
-+++ libmad-0.15.1b/mad.pc.in 2004-08-07 02:04:59.617692872 +0200
-@@ -0,0 +1,14 @@
-+# libmad pkg-config source file
-+
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+Name: mad
-+Description: MPEG Audio Decoder
-+Version: @VERSION@
-+Requires:
-+Conflicts:
-+Libs: -L${libdir} -lmad -lm
-+Cflags: -I${includedir}
-diff -Naur libmad-0.15.1b.old/Makefile.am libmad-0.15.1b/Makefile.am
---- libmad-0.15.1b.old/Makefile.am 2004-02-17 03:02:03.000000000 +0100
-+++ libmad-0.15.1b/Makefile.am 2004-08-07 02:03:19.859858368 +0200
-@@ -24,6 +24,9 @@
- SUBDIRS =
- DIST_SUBDIRS = msvc++
-
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = mad.pc
-+
- lib_LTLIBRARIES = libmad.la
- include_HEADERS = mad.h
-
-@@ -34,7 +37,8 @@
- minimad_LDADD = libmad.la
-
- EXTRA_DIST = mad.h.sed \
-- CHANGES COPYRIGHT CREDITS README TODO VERSION
-+ CHANGES COPYRIGHT CREDITS README TODO VERSION \
-+ mad.pc.in
-
- exported_headers = version.h fixed.h bit.h timer.h stream.h frame.h \
- synth.h decoder.h
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch
deleted file mode 100644
index 3e544248d..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/automake-foreign.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Pass foreign to AM_INIT_AUTOMAKE so it doesn't enforce GNU strictness.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index e602fd3..e075b86 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -29 +29 @@ AC_CONFIG_SRCDIR([decoder.h])
--AM_INIT_AUTOMAKE
-+AM_INIT_AUTOMAKE([foreign])
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch
deleted file mode 100644
index 01c7aa3c8..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/fix_for_mips_with_gcc-4.5.0.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-gcc 4.4 did this: The MIPS port no longer recognizes the h asm constraint. It was necessary to remove this constraint in order to avoid generating unpredictable code sequences.
-
-so the libmad build with gcc-4.5.0 was failing.
-
-Found a solution here:
-
-http://us.generation-nt.com/answer/bug-568418-libmad0-dev-mpg321-compilation-errors-mips-mipsel-architectures-help-169033451.html
-
-Upstream-Status: Pending
-
-2010/07/29
-Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Index: libmad-0.15.1b/fixed.h
-===================================================================
---- libmad-0.15.1b.orig/fixed.h
-+++ libmad-0.15.1b/fixed.h
-@@ -297,6 +297,15 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t
-
- /* --- MIPS ---------------------------------------------------------------- */
-
-+# elif defined(FPM_MIPS) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
-+ typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
-+# define MAD_F_MLX(hi, lo, x, y) \
-+ do { \
-+ u64_di_t __ll = (u64_di_t) (x) * (y); \
-+ hi = __ll >> 32; \
-+ lo = __ll; \
-+ } while (0)
-+
- # elif defined(FPM_MIPS)
-
- /*
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch
deleted file mode 100644
index d5e6d206e..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/no-force-mem.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This option no longer exists in gcc 3.4.1
-
-RP - 18/07/2008
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: libmad-0.15.1b/configure.ac
-===================================================================
---- libmad-0.15.1b.orig/configure.ac 2008-07-18 15:45:30.000000000 +0100
-+++ libmad-0.15.1b/configure.ac 2008-07-18 15:45:37.000000000 +0100
-@@ -140,7 +140,6 @@
- case "$optimize" in
- -O|"-O "*)
- optimize="-O"
-- optimize="$optimize -fforce-mem"
- optimize="$optimize -fforce-addr"
- : #x optimize="$optimize -finline-functions"
- : #- optimize="$optimize -fstrength-reduce"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch
deleted file mode 100644
index cc87d299e..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Submitted [https://sourceforge.net/tracker/?group_id=12349&atid=112349]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd libmad-0.15.1b/configure.ac libmad-0.15.1b/configure.ac
---- libmad-0.15.1b/configure.ac 2004-01-23 11:41:32.000000000 +0200
-+++ libmad-0.15.1b/configure.ac 2013-01-03 08:28:23.718693697 +0200
-@@ -28,7 +28,7 @@
-
- AM_INIT_AUTOMAKE
-
--AM_CONFIG_HEADER([config.h])
-+AC_CONFIG_HEADERS([config.h])
-
- dnl System type.
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
deleted file mode 100644
index d431abdaa..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "MPEG Audio Decoder library"
-HOMEPAGE = "http://sourceforge.net/projects/mad/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=12349&atid=112349"
-LICENSE = "GPLv2+"
-LICENSE_FLAGS = "commercial"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYRIGHT;md5=8e55eb14894e782b84488d5a239bc23d \
- file://version.h;beginline=1;endline=8;md5=aa07311dd39288d4349f28e1de516454"
-SECTION = "libs"
-DEPENDS = "libid3tag"
-PR = "r3"
-
-SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libmad-${PV}.tar.gz \
- file://no-force-mem.patch \
- file://add-pkgconfig.patch \
- file://fix_for_mips_with_gcc-4.5.0.patch \
- file://obsolete_automake_macros.patch \
- file://automake-foreign.patch \
-"
-
-SRC_URI[md5sum] = "1be543bc30c56fb6bea1d7bf6a64e66c"
-SRC_URI[sha256sum] = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690"
-
-S = "${WORKDIR}/libmad-${PV}"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "-enable-speed --enable-shared"
-EXTRA_OECONF_append_arm = " --enable-fpm=arm"
-
-do_configure_prepend () {
-# damn picky automake...
- touch NEWS AUTHORS ChangeLog
-}
-
-ARM_INSTRUCTION_SET = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb
deleted file mode 100644
index 58cef1ff3..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "PNG image format decoding library"
-HOMEPAGE = "http://www.libpng.org/"
-SECTION = "libs"
-LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=06a1b6fde6d93170bb72201c8000bf3d \
- file://png.h;endline=112;md5=9a8b5f83e1e8046df672deab87f235be"
-DEPENDS = "zlib"
-
-SRC_URI = "${GENTOO_MIRROR}/libpng-${PV}.tar.xz \
- "
-SRC_URI[md5sum] = "3bacb4728f6694a64ad9052769d6a4ce"
-SRC_URI[sha256sum] = "6c8f1849eb9264219bf5d703601e5abe92a58651ecae927a03d1a1aa15ee2083"
-
-BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
-
-inherit autotools binconfig-disabled pkgconfig
-
-# Work around missing symbols
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
-
-PACKAGES =+ "${PN}-tools"
-
-FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.24.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.24.bb
new file mode 100644
index 000000000..f91ab7ffc
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.24.bb
@@ -0,0 +1,25 @@
+SUMMARY = "PNG image format decoding library"
+HOMEPAGE = "http://www.libpng.org/"
+SECTION = "libs"
+LICENSE = "Libpng"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5089214833586ba444048fd1dbbc76a4 \
+ file://png.h;endline=149;md5=376d8ff7f69b7c4ad3a09f4672cec696"
+DEPENDS = "zlib"
+
+SRC_URI = "${GENTOO_MIRROR}/libpng-${PV}.tar.xz \
+ "
+SRC_URI[md5sum] = "ffcdbd549814787fa8010c372e35ff25"
+SRC_URI[sha256sum] = "7932dc9e5e45d55ece9d204e90196bbb5f2c82741ccb0f7e10d07d364a6fd6dd"
+
+BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
+
+inherit autotools binconfig-disabled pkgconfig
+
+# Work around missing symbols
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
+
+PACKAGES =+ "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb
deleted file mode 100644
index 80435d4b5..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "Audio format Conversion library"
-HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
-AUTHOR = "Erik de Castro Lopo"
-DEPENDS = "flac libogg libvorbis sqlite3"
-SECTION = "libs/multimedia"
-LICENSE = "LGPLv2.1"
-
-SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "ec810a0c60c08772a8a5552704b63393"
-SRC_URI[sha256sum] = "cd6520ec763d1a45573885ecb1f8e4e42505ac12180268482a44b28484a25092"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
-
-S = "${WORKDIR}/libsndfile-${PV}"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
-PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
-
-inherit autotools lib_package pkgconfig
-
-do_configure_prepend_arm() {
- export ac_cv_sys_largefile_source=1
- export ac_cv_sys_file_offset_bits=64
-}
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
new file mode 100644
index 000000000..ec4171943
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Audio format Conversion library"
+HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
+AUTHOR = "Erik de Castro Lopo"
+DEPENDS = "flac libogg libvorbis sqlite3"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1"
+
+SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "fd1d97c6077f03b5d984d7956ffedb7a"
+SRC_URI[sha256sum] = "a391952f27f4a92ceb2b4c06493ac107896ed6c76be9a613a4731f076d30fac0"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
+
+S = "${WORKDIR}/libsndfile-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+
+inherit autotools lib_package pkgconfig
+
+do_configure_prepend_arm() {
+ export ac_cv_sys_largefile_source=1
+ export ac_cv_sys_file_offset_bits=64
+}
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch
new file mode 100644
index 000000000..39c5059c7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch
@@ -0,0 +1,137 @@
+From f94a29a822f5528d2334592760fbb7938f15eb55 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sat, 26 Dec 2015 17:32:03 +0000
+Subject: [PATCH] * libtiff/tif_getimage.c: fix out-of-bound reads in
+ TIFFRGBAImage interface in case of unsupported values of
+ SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit call to
+ TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by
+ limingxing and CVE-2015-8683 reported by zzf of Alibaba.
+
+Upstream-Status: Backport
+CVE: CVE-2015-8665
+CVE: CVE-2015-8683
+https://github.com/vadz/libtiff/commit/f94a29a822f5528d2334592760fbb7938f15eb55
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ ChangeLog | 8 ++++++++
+ libtiff/tif_getimage.c | 35 ++++++++++++++++++++++-------------
+ 2 files changed, 30 insertions(+), 13 deletions(-)
+
+Index: tiff-4.0.6/libtiff/tif_getimage.c
+===================================================================
+--- tiff-4.0.6.orig/libtiff/tif_getimage.c
++++ tiff-4.0.6/libtiff/tif_getimage.c
+@@ -182,20 +182,22 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[102
+ "Planarconfiguration", td->td_planarconfig);
+ return (0);
+ }
+- if( td->td_samplesperpixel != 3 )
++ if( td->td_samplesperpixel != 3 || colorchannels != 3 )
+ {
+ sprintf(emsg,
+- "Sorry, can not handle image with %s=%d",
+- "Samples/pixel", td->td_samplesperpixel);
++ "Sorry, can not handle image with %s=%d, %s=%d",
++ "Samples/pixel", td->td_samplesperpixel,
++ "colorchannels", colorchannels);
+ return 0;
+ }
+ break;
+ case PHOTOMETRIC_CIELAB:
+- if( td->td_samplesperpixel != 3 || td->td_bitspersample != 8 )
++ if( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 )
+ {
+ sprintf(emsg,
+- "Sorry, can not handle image with %s=%d and %s=%d",
++ "Sorry, can not handle image with %s=%d, %s=%d and %s=%d",
+ "Samples/pixel", td->td_samplesperpixel,
++ "colorchannels", colorchannels,
+ "Bits/sample", td->td_bitspersample);
+ return 0;
+ }
+@@ -255,6 +257,9 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, T
+ int colorchannels;
+ uint16 *red_orig, *green_orig, *blue_orig;
+ int n_color;
++
++ if( !TIFFRGBAImageOK(tif, emsg) )
++ return 0;
+
+ /* Initialize to normal values */
+ img->row_offset = 0;
+@@ -2508,29 +2513,33 @@ PickContigCase(TIFFRGBAImage* img)
+ case PHOTOMETRIC_RGB:
+ switch (img->bitspersample) {
+ case 8:
+- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
++ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
++ img->samplesperpixel >= 4)
+ img->put.contig = putRGBAAcontig8bittile;
+- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
++ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
++ img->samplesperpixel >= 4)
+ {
+ if (BuildMapUaToAa(img))
+ img->put.contig = putRGBUAcontig8bittile;
+ }
+- else
++ else if( img->samplesperpixel >= 3 )
+ img->put.contig = putRGBcontig8bittile;
+ break;
+ case 16:
+- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
++ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
++ img->samplesperpixel >=4 )
+ {
+ if (BuildMapBitdepth16To8(img))
+ img->put.contig = putRGBAAcontig16bittile;
+ }
+- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
++ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
++ img->samplesperpixel >=4 )
+ {
+ if (BuildMapBitdepth16To8(img) &&
+ BuildMapUaToAa(img))
+ img->put.contig = putRGBUAcontig16bittile;
+ }
+- else
++ else if( img->samplesperpixel >=3 )
+ {
+ if (BuildMapBitdepth16To8(img))
+ img->put.contig = putRGBcontig16bittile;
+@@ -2539,7 +2548,7 @@ PickContigCase(TIFFRGBAImage* img)
+ }
+ break;
+ case PHOTOMETRIC_SEPARATED:
+- if (buildMap(img)) {
++ if (img->samplesperpixel >=4 && buildMap(img)) {
+ if (img->bitspersample == 8) {
+ if (!img->Map)
+ img->put.contig = putRGBcontig8bitCMYKtile;
+@@ -2635,7 +2644,7 @@ PickContigCase(TIFFRGBAImage* img)
+ }
+ break;
+ case PHOTOMETRIC_CIELAB:
+- if (buildMap(img)) {
++ if (img->samplesperpixel == 3 && buildMap(img)) {
+ if (img->bitspersample == 8)
+ img->put.contig = initCIELabConversion(img);
+ break;
+Index: tiff-4.0.6/ChangeLog
+===================================================================
+--- tiff-4.0.6.orig/ChangeLog
++++ tiff-4.0.6/ChangeLog
+@@ -1,3 +1,11 @@
++2015-12-26 Even Rouault <even.rouault at spatialys.com>
++
++ * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
++ interface in case of unsupported values of SamplesPerPixel/ExtraSamples
++ for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in
++ TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and
++ CVE-2015-8683 reported by zzf of Alibaba.
++
+ 2015-09-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff 4.0.6 released.
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch
new file mode 100644
index 000000000..0846f0f68
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch
@@ -0,0 +1,195 @@
+From aaab5c3c9d2a2c6984f23ccbc79702610439bc65 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sun, 27 Dec 2015 16:25:11 +0000
+Subject: [PATCH] * libtiff/tif_luv.c: fix potential out-of-bound writes in
+ decode functions in non debug builds by replacing assert()s by regular if
+ checks (bugzilla #2522). Fix potential out-of-bound reads in case of short
+ input data.
+
+Upstream-Status: Backport
+
+https://github.com/vadz/libtiff/commit/aaab5c3c9d2a2c6984f23ccbc79702610439bc65
+hand applied Changelog changes
+
+CVE: CVE-2015-8781
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+---
+ ChangeLog | 7 +++++++
+ libtiff/tif_luv.c | 55 ++++++++++++++++++++++++++++++++++++++++++++-----------
+ 2 files changed, 51 insertions(+), 11 deletions(-)
+
+Index: tiff-4.0.4/ChangeLog
+===================================================================
+--- tiff-4.0.4.orig/ChangeLog
++++ tiff-4.0.4/ChangeLog
+@@ -1,3 +1,10 @@
++2015-12-27 Even Rouault <even.rouault at spatialys.com>
++
++ * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
++ functions in non debug builds by replacing assert()s by regular if
++ checks (bugzilla #2522).
++ Fix potential out-of-bound reads in case of short input data.
++
+ 2015-12-26 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
+Index: tiff-4.0.4/libtiff/tif_luv.c
+===================================================================
+--- tiff-4.0.4.orig/libtiff/tif_luv.c
++++ tiff-4.0.4/libtiff/tif_luv.c
+@@ -202,7 +202,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
+ if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
+ tp = (int16*) op;
+ else {
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ tp = (int16*) sp->tbuf;
+ }
+ _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
+@@ -211,9 +215,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
+ cc = tif->tif_rawcc;
+ /* get each byte string */
+ for (shft = 2*8; (shft -= 8) >= 0; ) {
+- for (i = 0; i < npixels && cc > 0; )
++ for (i = 0; i < npixels && cc > 0; ) {
+ if (*bp >= 128) { /* run */
+- rc = *bp++ + (2-128); /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
++ if( cc < 2 )
++ break;
++ rc = *bp++ + (2-128);
+ b = (int16)(*bp++ << shft);
+ cc -= 2;
+ while (rc-- && i < npixels)
+@@ -223,6 +229,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
+ while (--cc && rc-- && i < npixels)
+ tp[i++] |= (int16)*bp++ << shft;
+ }
++ }
+ if (i != npixels) {
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ TIFFErrorExt(tif->tif_clientdata, module,
+@@ -268,13 +275,17 @@ LogLuvDecode24(TIFF* tif, uint8* op, tms
+ if (sp->user_datafmt == SGILOGDATAFMT_RAW)
+ tp = (uint32 *)op;
+ else {
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ tp = (uint32 *) sp->tbuf;
+ }
+ /* copy to array of uint32 */
+ bp = (unsigned char*) tif->tif_rawcp;
+ cc = tif->tif_rawcc;
+- for (i = 0; i < npixels && cc > 0; i++) {
++ for (i = 0; i < npixels && cc >= 3; i++) {
+ tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2];
+ bp += 3;
+ cc -= 3;
+@@ -325,7 +336,11 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
+ if (sp->user_datafmt == SGILOGDATAFMT_RAW)
+ tp = (uint32*) op;
+ else {
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ tp = (uint32*) sp->tbuf;
+ }
+ _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
+@@ -334,11 +349,13 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
+ cc = tif->tif_rawcc;
+ /* get each byte string */
+ for (shft = 4*8; (shft -= 8) >= 0; ) {
+- for (i = 0; i < npixels && cc > 0; )
++ for (i = 0; i < npixels && cc > 0; ) {
+ if (*bp >= 128) { /* run */
++ if( cc < 2 )
++ break;
+ rc = *bp++ + (2-128);
+ b = (uint32)*bp++ << shft;
+- cc -= 2; /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
++ cc -= 2;
+ while (rc-- && i < npixels)
+ tp[i++] |= b;
+ } else { /* non-run */
+@@ -346,6 +363,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
+ while (--cc && rc-- && i < npixels)
+ tp[i++] |= (uint32)*bp++ << shft;
+ }
++ }
+ if (i != npixels) {
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ TIFFErrorExt(tif->tif_clientdata, module,
+@@ -413,6 +431,7 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, t
+ static int
+ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++ static const char module[] = "LogL16Encode";
+ LogLuvState* sp = EncoderState(tif);
+ int shft;
+ tmsize_t i;
+@@ -433,7 +452,11 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsiz
+ tp = (int16*) bp;
+ else {
+ tp = (int16*) sp->tbuf;
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ (*sp->tfunc)(sp, bp, npixels);
+ }
+ /* compress each byte string */
+@@ -506,6 +529,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsiz
+ static int
+ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++ static const char module[] = "LogLuvEncode24";
+ LogLuvState* sp = EncoderState(tif);
+ tmsize_t i;
+ tmsize_t npixels;
+@@ -521,7 +545,11 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tms
+ tp = (uint32*) bp;
+ else {
+ tp = (uint32*) sp->tbuf;
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ (*sp->tfunc)(sp, bp, npixels);
+ }
+ /* write out encoded pixels */
+@@ -553,6 +581,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tms
+ static int
+ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++ static const char module[] = "LogLuvEncode32";
+ LogLuvState* sp = EncoderState(tif);
+ int shft;
+ tmsize_t i;
+@@ -574,7 +603,11 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tms
+ tp = (uint32*) bp;
+ else {
+ tp = (uint32*) sp->tbuf;
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ (*sp->tfunc)(sp, bp, npixels);
+ }
+ /* compress each byte string */
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch
new file mode 100644
index 000000000..0caf800e2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch
@@ -0,0 +1,73 @@
+From b18012dae552f85dcc5c57d3bf4e997a15b1cc1c Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sun, 27 Dec 2015 16:55:20 +0000
+Subject: [PATCH] * libtiff/tif_next.c: fix potential out-of-bound write in
+ NeXTDecode() triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
+ (bugzilla #2508)
+
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/b18012dae552f85dcc5c57d3bf4e997a15b1cc1c
+hand applied Changelog changes
+
+CVE: CVE-2015-8784
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ ChangeLog | 6 ++++++
+ libtiff/tif_next.c | 10 ++++++++--
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+Index: tiff-4.0.4/ChangeLog
+===================================================================
+--- tiff-4.0.4.orig/ChangeLog
++++ tiff-4.0.4/ChangeLog
+@@ -1,5 +1,11 @@
+ 2015-12-27 Even Rouault <even.rouault at spatialys.com>
+
++ * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
++ triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
++ (bugzilla #2508)
++
++2015-12-27 Even Rouault <even.rouault at spatialys.com>
++
+ * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
+ functions in non debug builds by replacing assert()s by regular if
+ checks (bugzilla #2522).
+Index: tiff-4.0.4/libtiff/tif_next.c
+===================================================================
+--- tiff-4.0.4.orig/libtiff/tif_next.c
++++ tiff-4.0.4/libtiff/tif_next.c
+@@ -37,7 +37,7 @@
+ case 0: op[0] = (unsigned char) ((v) << 6); break; \
+ case 1: op[0] |= (v) << 4; break; \
+ case 2: op[0] |= (v) << 2; break; \
+- case 3: *op++ |= (v); break; \
++ case 3: *op++ |= (v); op_offset++; break; \
+ } \
+ }
+
+@@ -106,6 +106,7 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize
+ uint32 imagewidth = tif->tif_dir.td_imagewidth;
+ if( isTiled(tif) )
+ imagewidth = tif->tif_dir.td_tilewidth;
++ tmsize_t op_offset = 0;
+
+ /*
+ * The scanline is composed of a sequence of constant
+@@ -122,10 +123,15 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize
+ * bounds, potentially resulting in a security
+ * issue.
+ */
+- while (n-- > 0 && npixels < imagewidth)
++ while (n-- > 0 && npixels < imagewidth && op_offset < scanline)
+ SETPIXEL(op, grey);
+ if (npixels >= imagewidth)
+ break;
++ if (op_offset >= scanline ) {
++ TIFFErrorExt(tif->tif_clientdata, module, "Invalid data for scanline %ld",
++ (long) tif->tif_row);
++ return (0);
++ }
+ if (cc == 0)
+ goto bad;
+ n = *bp++, cc--;
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch
new file mode 100644
index 000000000..4a08aba21
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch
@@ -0,0 +1,24 @@
+Buffer overflow in the readextension function in gif2tiff.c
+allows remote attackers to cause a denial of service via a crafted GIF file.
+
+External References:
+https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-3186
+https://bugzilla.redhat.com/show_bug.cgi?id=1319503
+
+CVE: CVE-2016-3186
+Upstream-Status: Backport (RedHat)
+https://bugzilla.redhat.com/attachment.cgi?id=1144235&action=diff
+
+Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
+
+--- tiff-4.0.6/tools/gif2tiff.c 2016-04-06 15:43:01.586048341 +0200
++++ tiff-4.0.6/tools/gif2tiff.c 2016-04-06 15:48:05.523207710 +0200
+@@ -349,7 +349,7 @@
+ int status = 1;
+
+ (void) getc(infile);
+- while ((count = getc(infile)) && count <= 255)
++ while ((count = getc(infile)) && count >= 0 && count <= 255)
+ if (fread(buf, 1, count, infile) != (size_t) count) {
+ fprintf(stderr, "short read from file %s (%s)\n",
+ filename, strerror(errno));
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
new file mode 100644
index 000000000..63c665024
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
@@ -0,0 +1,49 @@
+From d9783e4a1476b6787a51c5ae9e9b3156527589f0 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Mon, 11 Jul 2016 21:26:03 +0000
+Subject: [PATCH 1/2] * tools/tiffcrop.c: Avoid access outside of stack
+ allocated array on a tiled separate TIFF with more than 8 samples per pixel.
+ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
+ (CVE-2016-5321, bugzilla #2558)
+
+CVE: CVE-2016-5321
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/d9783e4a1476b6787a51c5ae9e9b3156527589f0
+
+Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
+---
+ ChangeLog | 7 +++++++
+ tools/tiffcrop.c | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index e98d54d..4e0302f 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,10 @@
++2016-07-11 Even Rouault <even.rouault at spatialys.com>
++
++ * tools/tiffcrop.c: Avoid access outside of stack allocated array
++ on a tiled separate TIFF with more than 8 samples per pixel.
++ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
++ (CVE-2016-5321, bugzilla #2558)
++
+ 2015-12-27 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index d959ae3..6fc8fc1 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -989,7 +989,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8 *obuf,
+ nrow = (row + tl > imagelength) ? imagelength - row : tl;
+ for (col = 0; col < imagewidth; col += tw)
+ {
+- for (s = 0; s < spp; s++)
++ for (s = 0; s < spp && s < MAX_SAMPLES; s++)
+ { /* Read each plane of a tile set into srcbuffs[s] */
+ tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s);
+ if (tbytes < 0 && !ignore)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch
new file mode 100644
index 000000000..41eab91ab
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch
@@ -0,0 +1,107 @@
+From 2f79856097f423eb33796a15fcf700d2ea41bf31 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Mon, 11 Jul 2016 21:38:31 +0000
+Subject: [PATCH 2/2] (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559)
+
+CVE: CVE-2016-5323
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/2f79856097f423eb33796a15fcf700d2ea41bf31
+
+Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
+---
+ ChangeLog | 2 +-
+ tools/tiffcrop.c | 16 ++++++++--------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 4e0302f..62dc1b5 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -3,7 +3,7 @@
+ * tools/tiffcrop.c: Avoid access outside of stack allocated array
+ on a tiled separate TIFF with more than 8 samples per pixel.
+ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
+- (CVE-2016-5321, bugzilla #2558)
++ (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559)
+
+ 2016-07-10 Even Rouault <even.rouault at spatialys.com>
+
+diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
+index 6fc8fc1..27abc0b 100644
+--- a/tools/tiffcrop.c
++++ b/tools/tiffcrop.c
+@@ -3738,7 +3738,7 @@ combineSeparateSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
+
+ matchbits = maskbits << (8 - src_bit - bps);
+ /* load up next sample from each plane */
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ buff1 = ((*src) & matchbits) << (src_bit);
+@@ -3837,7 +3837,7 @@ combineSeparateSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (16 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -3947,7 +3947,7 @@ combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (32 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -4073,7 +4073,7 @@ combineSeparateSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (64 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -4263,7 +4263,7 @@ combineSeparateTileSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
+
+ matchbits = maskbits << (8 - src_bit - bps);
+ /* load up next sample from each plane */
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ buff1 = ((*src) & matchbits) << (src_bit);
+@@ -4362,7 +4362,7 @@ combineSeparateTileSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (16 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -4471,7 +4471,7 @@ combineSeparateTileSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (32 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+@@ -4597,7 +4597,7 @@ combineSeparateTileSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
+ src_bit = bit_offset % 8;
+
+ matchbits = maskbits << (64 - src_bit - bps);
+- for (s = 0; s < spp; s++)
++ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
+ {
+ src = in[s] + src_offset + src_byte;
+ if (little_endian)
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
index e2e24e0fb..8147bc4fb 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
@@ -1,10 +1,15 @@
SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
-HOMEPAGE = "http://www.remotesensing.org/libtiff/"
-SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \
+SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
file://libtool2.patch \
+ file://CVE-2015-8665_8683.patch \
+ file://CVE-2015-8781.patch \
+ file://CVE-2015-8784.patch \
+ file://CVE-2016-3186.patch \
+ file://CVE-2016-5321.patch \
+ file://CVE-2016-5323.patch \
"
SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb
new file mode 100644
index 000000000..6ee457d04
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/mpg123/mpg123_1.23.6.bb
@@ -0,0 +1,63 @@
+SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
+DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
+mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
+and also can write the decoded audio to WAV."
+HOMEPAGE = "http://mpg123.de/"
+BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
+SECTION = "multimedia"
+
+LICENSE = "LGPLv2.1"
+LICENSE_FLAGS = "commercial"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3"
+
+SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "ed22a3e664f076fa05131a3454ef8166"
+SRC_URI[sha256sum] = "4073d9c60a43872f6f5a3a322f5ea21ab7f0869d2ed25e79c3eb8521fa3c32d4"
+
+inherit autotools pkgconfig
+
+# The options should be mutually exclusive for configuration script.
+# If both alsa and pulseaudio are specified (as in the default distro features)
+# pulseaudio takes precedence.
+PACKAGECONFIG_ALSA = "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
+
+PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
+PACKAGECONFIG[esd] = ",,esound"
+PACKAGECONFIG[jack] = ",,jack"
+PACKAGECONFIG[openal] = ",,openal-soft"
+PACKAGECONFIG[portaudio] = ",,portaudio-v19"
+PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
+PACKAGECONFIG[sdl] = ",,libsdl"
+
+# Following are possible sound output modules:
+# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', 'alsa', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'esd', 'esd', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'jack', 'jack', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'openal', 'openal', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'portaudio', 'portaudio', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
+AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'sdl', 'sdl', '', d)}"
+
+EXTRA_OECONF = " \
+ --enable-shared \
+ --with-audio='${AUDIOMODS}' \
+ --with-module-suffix=.so \
+ ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
+ ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
+"
+
+# The x86 assembler optimisations contains text relocations and there are no
+# upstream plans to fix them: http://sourceforge.net/p/mpg123/bugs/168/
+INSANE_SKIP_${PN}_append_x86 = " textrel"
+
+# Fails to build with thumb-1 (qemuarm)
+#| {standard input}: Assembler messages:
+#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
+#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
+#...
+#| make[3]: *** [equalizer.lo] Error 1
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 0b05ce4ca..7e54ad4b5 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -3,11 +3,12 @@ HOMEPAGE = "http://www.pulseaudio.org"
AUTHOR = "Lennart Poettering"
SECTION = "libs/multimedia"
LICENSE = "GPLv2+ & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d9ae089c8dc5339f8ac9d8563038a29f \
+ file://GPL;md5=4325afd396febcb659c36b49533135d4 \
file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84"
-DEPENDS = "libatomic-ops libsndfile1 libtool"
+DEPENDS = "libatomic-ops libsndfile1 libtool intltool-native"
# optional
DEPENDS += "udev alsa-lib glib-2.0 gconf"
DEPENDS += "json-c gdbm speexdsp libxml-parser-perl-native libcap"
@@ -30,6 +31,7 @@ EXTRA_OECONF = "\
--without-zsh-completion-dir \
--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \
ac_cv_header_valgrind_memcheck_h=no \
+ --disable-tests \
"
# soxr (the SoX Resampler library) doesn't seem to be currently packaged in
@@ -41,6 +43,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
dbus \
"
@@ -57,6 +60,8 @@ PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
# able to use pulseaudio autospawn for root as well.
PACKAGECONFIG[autospawn-for-root] = ",,,"
PACKAGECONFIG[lirc] = "--enable-lirc,--disable-lirc,lirc"
+PACKAGECONFIG[webrtc] = "--enable-webrtc-aec,--disable-webrtc-aec,webrtc-audio-processing"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch
deleted file mode 100644
index 1c1e2fbdb..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch
+++ /dev/null
@@ -1,268 +0,0 @@
-From b8b9b3da94a0c27090ceba243fdf54fb518c5489 Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Mon, 1 Feb 2016 15:34:59 +0200
-Subject: [PATCH] Revert "module-switch-on-port-available: Route to preferred
- profile"
-
-This reverts commit e87100d41ef6d14f8dc7f803582191d9f8d8f183.
-
-The reverted commit had some unwanted consequences:
-https://bugs.freedesktop.org/show_bug.cgi?id=93903
-https://bugs.freedesktop.org/show_bug.cgi?id=93946
-
-The first regression has a fix here:
-https://patchwork.freedesktop.org/patch/72053/
-
-The second regression, however, doesn't have a fix yet. Therefore,
-it's best to revert the offending patch for now.
-
-Upstream-Status: Inappropriate [Upstream plans to fix the issues
-properly.]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/modules/module-switch-on-port-available.c | 172 ++++++++++----------------
- 1 file changed, 67 insertions(+), 105 deletions(-)
-
-diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
-index 5dd9786..8de68a3 100644
---- a/src/modules/module-switch-on-port-available.c
-+++ b/src/modules/module-switch-on-port-available.c
-@@ -74,25 +74,22 @@ static bool profile_good_for_input(pa_card_profile *profile) {
- static int try_to_switch_profile(pa_device_port *port) {
- pa_card_profile *best_profile = NULL, *profile;
- void *state;
-- unsigned best_prio = 0;
-
-- pa_log_debug("Finding best profile for port %s, preferred = %s",
-- port->name, pa_strnull(port->preferred_profile));
-+ pa_log_debug("Finding best profile");
-
- PA_HASHMAP_FOREACH(profile, port->profiles, state) {
- bool good = false;
-- const char *name;
-- unsigned prio = profile->priority;
-+
-+ if (best_profile && best_profile->priority >= profile->priority)
-+ continue;
-
- /* We make a best effort to keep other direction unchanged */
- switch (port->direction) {
- case PA_DIRECTION_OUTPUT:
-- name = profile->output_name;
- good = profile_good_for_output(profile);
- break;
-
- case PA_DIRECTION_INPUT:
-- name = profile->input_name;
- good = profile_good_for_input(profile);
- break;
- }
-@@ -100,15 +97,7 @@ static int try_to_switch_profile(pa_device_port *port) {
- if (!good)
- continue;
-
-- /* Give a high bonus in case this is the preferred profile */
-- if (port->preferred_profile && pa_streq(name ? name : profile->name, port->preferred_profile))
-- prio += 1000000;
--
-- if (best_profile && best_prio >= prio)
-- continue;
--
- best_profile = profile;
-- best_prio = prio;
- }
-
- if (!best_profile) {
-@@ -124,125 +113,98 @@ static int try_to_switch_profile(pa_device_port *port) {
- return 0;
- }
-
--struct port_pointers {
-- pa_device_port *port;
-- pa_sink *sink;
-- pa_source *source;
-- bool is_possible_profile_active;
-- bool is_preferred_profile_active;
-- bool is_port_active;
--};
--
--static const char* profile_name_for_dir(pa_card_profile *cp, pa_direction_t dir) {
-- if (dir == PA_DIRECTION_OUTPUT && cp->output_name)
-- return cp->output_name;
-- if (dir == PA_DIRECTION_INPUT && cp->input_name)
-- return cp->input_name;
-- return cp->name;
--}
--
--static struct port_pointers find_port_pointers(pa_device_port *port) {
-- struct port_pointers pp = { .port = port };
-+static void find_sink_and_source(pa_card *card, pa_device_port *port, pa_sink **si, pa_source **so) {
-+ pa_sink *sink = NULL;
-+ pa_source *source = NULL;
- uint32_t state;
-- pa_card *card;
--
-- pa_assert(port);
-- pa_assert_se(card = port->card);
-
- switch (port->direction) {
- case PA_DIRECTION_OUTPUT:
-- PA_IDXSET_FOREACH(pp.sink, card->sinks, state)
-- if (port == pa_hashmap_get(pp.sink->ports, port->name))
-+ PA_IDXSET_FOREACH(sink, card->sinks, state)
-+ if (port == pa_hashmap_get(sink->ports, port->name))
- break;
- break;
-
- case PA_DIRECTION_INPUT:
-- PA_IDXSET_FOREACH(pp.source, card->sources, state)
-- if (port == pa_hashmap_get(pp.source->ports, port->name))
-+ PA_IDXSET_FOREACH(source, card->sources, state)
-+ if (port == pa_hashmap_get(source->ports, port->name))
- break;
- break;
- }
-
-- pp.is_possible_profile_active =
-- card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
-- pp.is_preferred_profile_active = pp.is_possible_profile_active && (!port->preferred_profile ||
-- pa_safe_streq(port->preferred_profile, profile_name_for_dir(card->active_profile, port->direction)));
-- pp.is_port_active = (pp.sink && pp.sink->active_port == port) || (pp.source && pp.source->active_port == port);
--
-- return pp;
-+ *si = sink;
-+ *so = source;
- }
-
--/* Switches to a port, switching profiles if necessary or preferred */
--static bool switch_to_port(pa_device_port *port) {
-- struct port_pointers pp = find_port_pointers(port);
-+static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port *port, void* userdata) {
-+ pa_card* card;
-+ pa_sink *sink;
-+ pa_source *source;
-+ bool is_active_profile, is_active_port;
-
-- if (pp.is_port_active)
-- return true; /* Already selected */
-+ if (port->available == PA_AVAILABLE_UNKNOWN)
-+ return PA_HOOK_OK;
-
-- pa_log_debug("Trying to switch to port %s", port->name);
-- if (!pp.is_preferred_profile_active) {
-- if (try_to_switch_profile(port) < 0) {
-- if (pp.is_possible_profile_active)
-- return false;
-- }
-- else
-- /* Now that profile has changed, our sink and source pointers must be updated */
-- pp = find_port_pointers(port);
-- }
-+ card = port->card;
-
-- if (pp.source)
-- pa_source_set_port(pp.source, port->name, false);
-- if (pp.sink)
-- pa_sink_set_port(pp.sink, port->name, false);
-- return true;
--}
-+ if (!card) {
-+ pa_log_warn("Port %s does not have a card", port->name);
-+ return PA_HOOK_OK;
-+ }
-
--/* Switches away from a port, switching profiles if necessary or preferred */
--static bool switch_from_port(pa_device_port *port) {
-- struct port_pointers pp = find_port_pointers(port);
-- pa_device_port *p, *best_port = NULL;
-- void *state;
-+ if (pa_idxset_size(card->sinks) == 0 && pa_idxset_size(card->sources) == 0)
-+ /* This card is not initialized yet. We'll handle it in
-+ sink_new / source_new callbacks later. */
-+ return PA_HOOK_OK;
-
-- if (!pp.is_port_active)
-- return true; /* Already deselected */
-+ find_sink_and_source(card, port, &sink, &source);
-
-- /* Try to find a good enough port to switch to */
-- PA_HASHMAP_FOREACH(p, port->card->ports, state)
-- if (p->direction == port->direction && p != port && p->available != PA_AVAILABLE_NO &&
-- (!best_port || best_port->priority < p->priority))
-- best_port = p;
-+ is_active_profile = card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
-+ is_active_port = (sink && sink->active_port == port) || (source && source->active_port == port);
-
-- pa_log_debug("Trying to switch away from port %s, found %s", port->name, best_port ? best_port->name : "no better option");
-+ if (port->available == PA_AVAILABLE_NO && !is_active_port)
-+ return PA_HOOK_OK;
-
-- if (best_port)
-- return switch_to_port(best_port);
-+ if (port->available == PA_AVAILABLE_YES) {
-+ if (is_active_port)
-+ return PA_HOOK_OK;
-
-- return false;
--}
-+ if (!is_active_profile) {
-+ if (try_to_switch_profile(port) < 0)
-+ return PA_HOOK_OK;
-
-+ pa_assert(card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name));
-
--static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port *port, void* userdata) {
-- pa_assert(port);
-+ /* Now that profile has changed, our sink and source pointers must be updated */
-+ find_sink_and_source(card, port, &sink, &source);
-+ }
-
-- if (!port->card) {
-- pa_log_warn("Port %s does not have a card", port->name);
-- return PA_HOOK_OK;
-+ if (source)
-+ pa_source_set_port(source, port->name, false);
-+ if (sink)
-+ pa_sink_set_port(sink, port->name, false);
- }
-
-- if (pa_idxset_size(port->card->sinks) == 0 && pa_idxset_size(port->card->sources) == 0)
-- /* This card is not initialized yet. We'll handle it in
-- sink_new / source_new callbacks later. */
-- return PA_HOOK_OK;
-+ if (port->available == PA_AVAILABLE_NO) {
-+ if (sink) {
-+ pa_device_port *p2 = pa_device_port_find_best(sink->ports);
-+
-+ if (p2 && p2->available != PA_AVAILABLE_NO)
-+ pa_sink_set_port(sink, p2->name, false);
-+ else {
-+ /* Maybe try to switch to another profile? */
-+ }
-+ }
-
-- switch (port->available) {
-- case PA_AVAILABLE_YES:
-- switch_to_port(port);
-- break;
-- case PA_AVAILABLE_NO:
-- switch_from_port(port);
-- break;
-- default:
-- break;
-+ if (source) {
-+ pa_device_port *p2 = pa_device_port_find_best(source->ports);
-+
-+ if (p2 && p2->available != PA_AVAILABLE_NO)
-+ pa_source_set_port(source, p2->name, false);
-+ else {
-+ /* Maybe try to switch to another profile? */
-+ }
-+ }
- }
-
- return PA_HOOK_OK;
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
new file mode 100644
index 000000000..2f72ceb33
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
@@ -0,0 +1,61 @@
+From 9c3cdfcd198ef9727ea542f284ac6d8c1bcd7a3a Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Fri, 23 Oct 2015 12:36:34 +0300
+Subject: [PATCH 1/5] alsa, bluetooth: fail if user-requested profile doesn't
+ exist
+
+If we can't fulfill the user request fully, I think we shouldn't
+fulfill it at all, to make it clear that the requested operation
+didn't succeed.
+
+Upstream-Status: Accepted [expected in 10.0]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ src/modules/alsa/module-alsa-card.c | 11 +++++++++--
+ src/modules/bluetooth/module-bluez4-device.c | 7 +++++--
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
+index e5cc4ae..d761683 100644
+--- a/src/modules/alsa/module-alsa-card.c
++++ b/src/modules/alsa/module-alsa-card.c
+@@ -799,8 +799,15 @@ int pa__init(pa_module *m) {
+ goto fail;
+ }
+
+- if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL)))
+- pa_card_new_data_set_profile(&data, profile);
++ if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
++ if (pa_hashmap_get(data.profiles, profile))
++ pa_card_new_data_set_profile(&data, profile);
++ else {
++ pa_log("No such profile: %s", profile);
++ pa_card_new_data_done(&data);
++ goto fail;
++ }
++ }
+
+ u->card = pa_card_new(m->core, &data);
+ pa_card_new_data_done(&data);
+diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
+index 9a921a5..a2de525 100644
+--- a/src/modules/bluetooth/module-bluez4-device.c
++++ b/src/modules/bluetooth/module-bluez4-device.c
+@@ -2301,8 +2301,11 @@ static int add_card(struct userdata *u) {
+ if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
+ if (pa_hashmap_get(data.profiles, default_profile))
+ pa_card_new_data_set_profile(&data, default_profile);
+- else
+- pa_log_warn("Profile '%s' not valid or not supported by device.", default_profile);
++ else {
++ pa_log("Profile '%s' not valid or not supported by device.", default_profile);
++ pa_card_new_data_done(&data);
++ return -1;
++ }
+ }
+
+ u->card = pa_card_new(u->core, &data);
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
deleted file mode 100644
index 84c951940..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-From d1c02971867bea10afcafc82c965414012c4d6bd Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Fri, 23 Oct 2015 12:23:13 +0300
-Subject: [PATCH 1/4] card: add pa_card_profile.ports
-
-Having ports accessible from pa_card_profile allows checking whether all ports
-of a profile are unavailable, and therefore helps with managing the profile
-availability (implemented in a later patch).
-
-http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-Rebased on 8.0.
-
-Upstream-Status: Denied [The patch set needs some work to be accepted.
-The review thread:
-http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/modules/alsa/alsa-mixer.c | 4 +++-
- src/modules/alsa/alsa-ucm.c | 1 +
- src/modules/bluetooth/module-bluez4-device.c | 6 ++++++
- src/modules/bluetooth/module-bluez5-device.c | 6 ++++++
- src/pulsecore/card.c | 15 +++++++++++++++
- src/pulsecore/card.h | 4 ++++
- src/pulsecore/device-port.c | 7 ++++++-
- 7 files changed, 41 insertions(+), 2 deletions(-)
-
-diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
-index 1fe2a02..5b76b06 100644
---- a/src/modules/alsa/alsa-mixer.c
-+++ b/src/modules/alsa/alsa-mixer.c
-@@ -4783,8 +4783,10 @@ static pa_device_port* device_port_alsa_init(pa_hashmap *ports, /* card ports */
- path->port = p;
- }
-
-- if (cp)
-+ if (cp) {
- pa_hashmap_put(p->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, p);
-+ }
-
- if (extra) {
- pa_hashmap_put(extra, p->name, p);
-diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
-index 42f3242..68fcc26 100644
---- a/src/modules/alsa/alsa-ucm.c
-+++ b/src/modules/alsa/alsa-ucm.c
-@@ -791,6 +791,7 @@ static void ucm_add_port_combination(
- if (cp) {
- pa_log_debug("Adding profile %s to port %s.", cp->name, port->name);
- pa_hashmap_put(port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, port);
- }
-
- if (hash) {
-diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index 9a921a5..adecb32 100644
---- a/src/modules/bluetooth/module-bluez4-device.c
-+++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2180,6 +2180,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- p->max_sink_channels = 2;
- p->max_source_channels = 0;
- pa_hashmap_put(output_port->profiles, p->name, p);
-+ pa_card_profile_add_port(p, output_port);
-
- d = PA_CARD_PROFILE_DATA(p);
- *d = PA_BLUEZ4_PROFILE_A2DP;
-@@ -2191,6 +2192,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- p->max_sink_channels = 0;
- p->max_source_channels = 2;
- pa_hashmap_put(input_port->profiles, p->name, p);
-+ pa_card_profile_add_port(p, input_port);
-
- d = PA_CARD_PROFILE_DATA(p);
- *d = PA_BLUEZ4_PROFILE_A2DP_SOURCE;
-@@ -2203,6 +2205,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- p->max_source_channels = 1;
- pa_hashmap_put(input_port->profiles, p->name, p);
- pa_hashmap_put(output_port->profiles, p->name, p);
-+ pa_card_profile_add_port(p, input_port);
-+ pa_card_profile_add_port(p, output_port);
-
- d = PA_CARD_PROFILE_DATA(p);
- *d = PA_BLUEZ4_PROFILE_HSP;
-@@ -2215,6 +2219,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- p->max_source_channels = 1;
- pa_hashmap_put(input_port->profiles, p->name, p);
- pa_hashmap_put(output_port->profiles, p->name, p);
-+ pa_card_profile_add_port(p, input_port);
-+ pa_card_profile_add_port(p, output_port);
-
- d = PA_CARD_PROFILE_DATA(p);
- *d = PA_BLUEZ4_PROFILE_HFGW;
-diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
-index 84e6d55..b015c67 100644
---- a/src/modules/bluetooth/module-bluez5-device.c
-+++ b/src/modules/bluetooth/module-bluez5-device.c
-@@ -1790,6 +1790,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- cp->max_sink_channels = 2;
- cp->max_source_channels = 0;
- pa_hashmap_put(output_port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, output_port);
-
- p = PA_CARD_PROFILE_DATA(cp);
- *p = PA_BLUETOOTH_PROFILE_A2DP_SINK;
-@@ -1801,6 +1802,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- cp->max_sink_channels = 0;
- cp->max_source_channels = 2;
- pa_hashmap_put(input_port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, input_port);
-
- p = PA_CARD_PROFILE_DATA(cp);
- *p = PA_BLUETOOTH_PROFILE_A2DP_SOURCE;
-@@ -1813,6 +1815,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- cp->max_source_channels = 1;
- pa_hashmap_put(input_port->profiles, cp->name, cp);
- pa_hashmap_put(output_port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, input_port);
-+ pa_card_profile_add_port(cp, output_port);
-
- p = PA_CARD_PROFILE_DATA(cp);
- *p = PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT;
-@@ -1825,6 +1829,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
- cp->max_source_channels = 1;
- pa_hashmap_put(input_port->profiles, cp->name, cp);
- pa_hashmap_put(output_port->profiles, cp->name, cp);
-+ pa_card_profile_add_port(cp, input_port);
-+ pa_card_profile_add_port(cp, output_port);
-
- p = PA_CARD_PROFILE_DATA(cp);
- *p = PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY;
-diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index b6cbbf7..f92ac87 100644
---- a/src/pulsecore/card.c
-+++ b/src/pulsecore/card.c
-@@ -45,6 +45,7 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
- c->name = pa_xstrdup(name);
- c->description = pa_xstrdup(description);
- c->available = PA_AVAILABLE_UNKNOWN;
-+ c->ports = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
-
- return c;
- }
-@@ -52,6 +53,14 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
- void pa_card_profile_free(pa_card_profile *c) {
- pa_assert(c);
-
-+ if (c->ports) {
-+ pa_device_port *port;
-+ void *state;
-+ PA_HASHMAP_FOREACH(port, c->ports, state)
-+ pa_hashmap_remove (port->profiles, c->name);
-+ pa_hashmap_free(c->ports);
-+ }
-+
- pa_xfree(c->input_name);
- pa_xfree(c->output_name);
- pa_xfree(c->name);
-@@ -59,6 +68,12 @@ void pa_card_profile_free(pa_card_profile *c) {
- pa_xfree(c);
- }
-
-+void pa_card_profile_add_port(pa_card_profile *profile, pa_device_port *port) {
-+ pa_assert(profile);
-+
-+ pa_hashmap_put(profile->ports, port->name, port);
-+}
-+
- void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available) {
- pa_core *core;
-
-diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
-index 30bfc0e..fff9057 100644
---- a/src/pulsecore/card.h
-+++ b/src/pulsecore/card.h
-@@ -50,6 +50,8 @@ struct pa_card_profile {
- unsigned priority;
- pa_available_t available; /* PA_AVAILABLE_UNKNOWN, PA_AVAILABLE_NO or PA_AVAILABLE_YES */
-
-+ pa_hashmap *ports; /* port name -> pa_device_port */
-+
- /* We probably want to have different properties later on here */
- unsigned n_sinks;
- unsigned n_sources;
-@@ -107,6 +109,8 @@ typedef struct pa_card_new_data {
- pa_card_profile *pa_card_profile_new(const char *name, const char *description, size_t extra);
- void pa_card_profile_free(pa_card_profile *c);
-
-+void pa_card_profile_add_port(pa_card_profile *profile, pa_device_port *port);
-+
- /* The profile's available status has changed */
- void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available);
-
-diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c
-index 5807d3e..d12dfbc 100644
---- a/src/pulsecore/device-port.c
-+++ b/src/pulsecore/device-port.c
-@@ -107,8 +107,13 @@ static void device_port_free(pa_object *o) {
- if (p->proplist)
- pa_proplist_free(p->proplist);
-
-- if (p->profiles)
-+ if (p->profiles) {
-+ pa_card_profile *profile;
-+ void *state;
-+ PA_HASHMAP_FOREACH(profile, p->profiles, state)
-+ pa_hashmap_remove (profile->ports, p->name);
- pa_hashmap_free(p->profiles);
-+ }
-
- pa_xfree(p->preferred_profile);
- pa_xfree(p->name);
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
index bc3277583..33f7709ae 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
@@ -1,4 +1,4 @@
-From 1cb5647f76dc8cd7bacbce2a64fac9e6c2dc3b16 Mon Sep 17 00:00:00 2001
+From babec3a50dd710d26b72f6c6d43bd79b04e954a6 Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Date: Tue, 28 Apr 2015 14:32:43 +0300
Subject: [PATCH] client-conf: Add allow-autospawn-for-root
@@ -24,10 +24,10 @@ Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
5 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/man/pulse-client.conf.5.xml.in b/man/pulse-client.conf.5.xml.in
-index 1002dbe..0058490 100644
+index b88898c..e737c96 100644
--- a/man/pulse-client.conf.5.xml.in
+++ b/man/pulse-client.conf.5.xml.in
-@@ -71,6 +71,15 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+@@ -82,6 +82,15 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
</option>
<option>
@@ -44,7 +44,7 @@ index 1002dbe..0058490 100644
run when autospawning. Defaults to a path configured at compile
time.</p>
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
-index 83331f8..0474583 100644
+index a3c9486..9f68ee5 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -138,6 +138,7 @@ void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_e
@@ -56,13 +56,13 @@ index 83331f8..0474583 100644
{ "disable-shm", pa_config_parse_bool, &c->disable_shm, NULL },
{ "enable-shm", pa_config_parse_not_bool, &c->disable_shm, NULL },
diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h
-index eac705a..131393a 100644
+index 7691ec7..19db7ed 100644
--- a/src/pulse/client-conf.h
+++ b/src/pulse/client-conf.h
@@ -38,6 +38,7 @@ typedef struct pa_client_conf {
char *cookie_file_from_application;
char *cookie_file_from_client_conf;
- bool autospawn, disable_shm, auto_connect_localhost, auto_connect_display;
+ bool autospawn, disable_shm, disable_memfd, auto_connect_localhost, auto_connect_display;
+ bool allow_autospawn_for_root;
size_t shm_size;
} pa_client_conf;
@@ -80,10 +80,10 @@ index 26b7790..69830ef 100644
; extra-arguments = --log-target=syslog
diff --git a/src/pulse/context.c b/src/pulse/context.c
-index 4bc445f..d6c3f6d 100644
+index 69be5f4..d6e13e8 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
-@@ -976,7 +976,7 @@ int pa_context_connect(
+@@ -1027,7 +1027,7 @@ int pa_context_connect(
if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
#ifdef HAVE_GETUID
@@ -93,5 +93,5 @@ index 4bc445f..d6c3f6d 100644
else {
c->do_autospawn = true;
--
-1.9.3
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
deleted file mode 100644
index be3655b23..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 339eb179baa7810113f6456accc05b3a32c1cdba Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Fri, 23 Oct 2015 12:36:34 +0300
-Subject: [PATCH 2/4] alsa, bluetooth: fail if user-requested profile doesn't
- exist
-
-If we can't fulfill the user request fully, I think we shouldn't
-fulfill it at all, to make it clear that the requested operation
-didn't succeed.
-
-http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-Upstream-Status: Denied [The patch set needs some work to be accepted.
-The review thread:
-http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/modules/alsa/module-alsa-card.c | 10 ++++++++--
- src/modules/bluetooth/module-bluez4-device.c | 6 ++++--
- 2 files changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index a7fec04..32f517e 100644
---- a/src/modules/alsa/module-alsa-card.c
-+++ b/src/modules/alsa/module-alsa-card.c
-@@ -754,8 +754,14 @@ int pa__init(pa_module *m) {
- goto fail;
- }
-
-- if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL)))
-- pa_card_new_data_set_profile(&data, profile);
-+ if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
-+ if (pa_hashmap_get(data.profiles, profile))
-+ pa_card_new_data_set_profile(&data, profile);
-+ else {
-+ pa_log("No such profile: %s", profile);
-+ goto fail;
-+ }
-+ }
-
- u->card = pa_card_new(m->core, &data);
- pa_card_new_data_done(&data);
-diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index b40c6a0..94e6988 100644
---- a/src/modules/bluetooth/module-bluez4-device.c
-+++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2310,8 +2310,10 @@ static int add_card(struct userdata *u) {
- if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
- if (pa_hashmap_get(data.profiles, default_profile))
- pa_card_new_data_set_profile(&data, default_profile);
-- else
-- pa_log_warn("Profile '%s' not valid or not supported by device.", default_profile);
-+ else {
-+ pa_log("Profile '%s' not valid or not supported by device.", default_profile);
-+ return -1;
-+ }
- }
-
- u->card = pa_card_new(u->core, &data);
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch
new file mode 100644
index 000000000..80c291f82
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch
@@ -0,0 +1,37 @@
+From d4e6d07fef28d1bd8bfbceab4cc196ef54c23dd8 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Tue, 7 Jun 2016 16:51:00 +0300
+Subject: [PATCH 2/5] card: don't allow the CARD_NEW hook to fail
+
+There is currently no use for allowing modules to cancel card creation,
+and I don't see need for that in the future either. Let's simplify
+things by removing the failure handling code.
+
+Upstream-Status: Accepted [expected in 10.0]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ src/pulsecore/card.c | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
+index 410746b..0ac70b9 100644
+--- a/src/pulsecore/card.c
++++ b/src/pulsecore/card.c
+@@ -149,12 +149,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
+ }
+
+ pa_card_new_data_set_name(data, name);
+-
+- if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data) < 0) {
+- pa_xfree(c);
+- pa_namereg_unregister(core, name);
+- return NULL;
+- }
++ pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data);
+
+ c->core = core;
+ c->name = pa_xstrdup(data->name);
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
index 0e7780154..e0f424bbc 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
@@ -1,61 +1,62 @@
-From 13e85dd1763e99d21a60323671b9a5df08bdae75 Mon Sep 17 00:00:00 2001
+From 0b98309fdbcd36fa92ab53e33c51b485b905e294 Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanuk@iki.fi>
Date: Fri, 23 Oct 2015 12:59:53 +0300
-Subject: [PATCH 3/4] card: move profile selection after pa_card_new()
+Subject: [PATCH 3/5] card: move profile selection after pa_card_new()
I want module-alsa-card to set the availability of unavailable
profiles before the initial card profile gets selected, so that the
selection logic can use correct availability information.
module-alsa-card initializes the jack state after calling
pa_card_new(), however, and the profile selection happens in
-pa_card_new(). This patch solves that by introducing pa_card_put() and
-moving the profile selection code there.
+pa_card_new(). This patch solves that by moving parts of pa_card_new()
+to pa_card_choose_initial_profile() and pa_card_put().
+
+pa_card_choose_initial_profile() applies the profile selection policy,
+so module-alsa-card can first call pa_card_new(), then initialize the
+jack state, and then call pa_card_choose_initial_profile(). After that
+module-alsa-card can still override the profile selection policy, in
+case module-alsa-card was loaded with the "profile" argument. Finally,
+pa_card_put() finalizes the card creation.
An alternative solution would have been to move the jack
initialization to happen before pa_card_new() and use pa_card_new_data
instead of pa_card in the jack initialization code, but I disliked
that idea (I want to get rid of the "new data" pattern eventually).
-The CARD_NEW hook is used when applying the initial profile policy, so
-that was moved to pa_card_put(). That required changing the hook data
-from pa_card_new_data to pa_card. module-card-restore now uses
-pa_card_set_profile() instead of pa_card_new_data_set_profile(). That
-required adding a state variable to pa_card, because
-pa_card_set_profile() needs to distinguish between setting the initial
-profile and setting the profile in other situations.
-
The order in which the initial profile policy is applied is reversed
in this patch. Previously the first one to set it won, now the last
one to set it wins. I think this is better, because if you have N
parties that want to set the profile, we avoid checking N times
whether someone else has already set the profile.
-http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-Rebased on 8.0.
-
-Upstream-Status: Denied [The patch set needs some work to be accepted.
-The review thread:
-http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
+Upstream-Status: Accepted [expected in 10.0]
Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
---
- src/modules/alsa/module-alsa-card.c | 19 +++----
- src/modules/bluetooth/module-bluez4-device.c | 18 +++----
- src/modules/bluetooth/module-bluez5-device.c | 1 +
- src/modules/macosx/module-coreaudio-device.c | 1 +
- src/modules/module-card-restore.c | 24 +++++----
- src/pulsecore/card.c | 81 +++++++++++++++-------------
- src/pulsecore/card.h | 7 +++
- 7 files changed, 86 insertions(+), 65 deletions(-)
+ src/modules/alsa/module-alsa-card.c | 32 +++++----
+ src/modules/bluetooth/module-bluez4-device.c | 31 +++++----
+ src/modules/bluetooth/module-bluez5-device.c | 2 +
+ src/modules/macosx/module-coreaudio-device.c | 2 +
+ src/modules/module-card-restore.c | 36 +++++++---
+ src/pulsecore/card.c | 99 +++++++++++++++++-----------
+ src/pulsecore/card.h | 9 +++
+ src/pulsecore/core.h | 1 +
+ 8 files changed, 143 insertions(+), 69 deletions(-)
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index 9e8cde2..fe240f0 100644
+index d761683..1976230 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
-@@ -770,15 +770,6 @@ int pa__init(pa_module *m) {
+@@ -671,7 +671,7 @@ int pa__init(pa_module *m) {
+ struct userdata *u;
+ pa_reserve_wrapper *reserve = NULL;
+ const char *description;
+- const char *profile = NULL;
++ const char *profile_str = NULL;
+ char *fn = NULL;
+ bool namereg_fail = false;
+
+@@ -799,16 +799,6 @@ int pa__init(pa_module *m) {
goto fail;
}
@@ -64,6 +65,7 @@ index 9e8cde2..fe240f0 100644
- pa_card_new_data_set_profile(&data, profile);
- else {
- pa_log("No such profile: %s", profile);
+- pa_card_new_data_done(&data);
- goto fail;
- }
- }
@@ -71,28 +73,47 @@ index 9e8cde2..fe240f0 100644
u->card = pa_card_new(m->core, &data);
pa_card_new_data_done(&data);
-@@ -789,6 +780,16 @@ int pa__init(pa_module *m) {
- u->card->set_profile = card_set_profile;
+@@ -822,6 +812,26 @@ int pa__init(pa_module *m) {
+ (pa_hook_cb_t) card_suspend_changed, u);
init_jacks(u);
-+ pa_card_put(u->card);
+
-+ if ((profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
-+ u->card->active_profile = pa_hashmap_get(u->card->profiles, profile);
-+ if (!u->card->active_profile) {
-+ pa_log("No such profile: %s", profile);
++ pa_card_choose_initial_profile(u->card);
++
++ /* If the "profile" modarg is given, we have to override whatever the usual
++ * policy chose in pa_card_choose_initial_profile(). */
++ profile_str = pa_modargs_get_value(u->modargs, "profile", NULL);
++ if (profile_str) {
++ pa_card_profile *profile;
++
++ profile = pa_hashmap_get(u->card->profiles, profile_str);
++ if (!profile) {
++ pa_log("No such profile: %s", profile_str);
+ goto fail;
+ }
++
++ pa_card_set_profile(u->card, profile, false);
+ }
+
++ pa_card_put(u->card);
++
init_profile(u);
init_eld_ctls(u);
diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index dd18217..5d0d3db 100644
+index a2de525..13fb7ab 100644
--- a/src/modules/bluetooth/module-bluez4-device.c
+++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2304,15 +2304,6 @@ static int add_card(struct userdata *u) {
+@@ -2238,7 +2238,7 @@ static int add_card(struct userdata *u) {
+ pa_bluez4_profile_t *d;
+ pa_bluez4_form_factor_t ff;
+ char *n;
+- const char *default_profile;
++ const char *profile_str;
+ const pa_bluez4_device *device;
+ const pa_bluez4_uuid *uuid;
+
+@@ -2298,16 +2298,6 @@ static int add_card(struct userdata *u) {
*d = PA_BLUEZ4_PROFILE_OFF;
pa_hashmap_put(data.profiles, p->name, p);
@@ -101,6 +122,7 @@ index dd18217..5d0d3db 100644
- pa_card_new_data_set_profile(&data, default_profile);
- else {
- pa_log("Profile '%s' not valid or not supported by device.", default_profile);
+- pa_card_new_data_done(&data);
- return -1;
- }
- }
@@ -108,127 +130,126 @@ index dd18217..5d0d3db 100644
u->card = pa_card_new(u->core, &data);
pa_card_new_data_done(&data);
-@@ -2323,6 +2314,15 @@ static int add_card(struct userdata *u) {
-
+@@ -2319,6 +2309,25 @@ static int add_card(struct userdata *u) {
u->card->userdata = u;
u->card->set_profile = card_set_profile;
-+ pa_card_put(u->card);
+
++ pa_card_choose_initial_profile(u->card);
++
++ /* If the "profile" modarg is given, we have to override whatever the usual
++ * policy chose in pa_card_choose_initial_profile(). */
++ profile_str = pa_modargs_get_value(u->modargs, "profile", NULL);
++ if (profile_str) {
++ pa_card_profile *profile;
+
-+ if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
-+ u->card->active_profile = pa_hashmap_get(u->card->profiles, default_profile);
-+ if (!u->card->active_profile) {
-+ pa_log("Profile '%s' not valid or not supported by device.", default_profile);
++ profile = pa_hashmap_get(u->card->profiles, profile_str);
++ if (!profile) {
++ pa_log("No such profile: %s", profile_str);
+ return -1;
+ }
++
++ pa_card_set_profile(u->card, profile, false);
+ }
-
++
++ pa_card_put(u->card);
++
d = PA_CARD_PROFILE_DATA(u->card->active_profile);
+ if (*d != PA_BLUEZ4_PROFILE_OFF && (!device->transports[*d] ||
diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
-index b015c67..7b90a31 100644
+index 84e6d55..498d0e1 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
-@@ -1959,6 +1959,7 @@ static int add_card(struct userdata *u) {
+@@ -1953,6 +1953,8 @@ static int add_card(struct userdata *u) {
u->card->userdata = u;
u->card->set_profile = set_profile_cb;
++ pa_card_choose_initial_profile(u->card);
+ pa_card_put(u->card);
p = PA_CARD_PROFILE_DATA(u->card->active_profile);
u->profile = *p;
diff --git a/src/modules/macosx/module-coreaudio-device.c b/src/modules/macosx/module-coreaudio-device.c
-index 0c92d42..7190ee9 100644
+index 6c9e55d..d91c656 100644
--- a/src/modules/macosx/module-coreaudio-device.c
+++ b/src/modules/macosx/module-coreaudio-device.c
-@@ -807,6 +807,7 @@ int pa__init(pa_module *m) {
+@@ -821,6 +821,8 @@ int pa__init(pa_module *m) {
pa_card_new_data_done(&card_new_data);
u->card->userdata = u;
u->card->set_profile = card_set_profile;
++ pa_card_choose_initial_profile(u->card);
+ pa_card_put(u->card);
u->rtpoll = pa_rtpoll_new();
pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
-index f906843..dce6674 100644
+index 7545aa5..718a0dd 100644
--- a/src/modules/module-card-restore.c
+++ b/src/modules/module-card-restore.c
-@@ -515,34 +515,38 @@ static pa_hook_result_t port_offset_change_callback(pa_core *c, pa_device_port *
- return PA_HOOK_OK;
- }
-
--static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card_new_data *new_data, struct userdata *u) {
-+static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card *card, struct userdata *u) {
- struct entry *e;
- void *state;
- pa_device_port *p;
- struct port_info *p_info;
-
-- pa_assert(new_data);
-+ pa_assert(c);
-+ pa_assert(card);
-+ pa_assert(u);
-
-- if (!(e = entry_read(u, new_data->name)))
-+ if (!(e = entry_read(u, card->name)))
+@@ -551,16 +551,6 @@ static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card_new_data *new
+ if (!(e = entry_read(u, new_data->name)))
return PA_HOOK_OK;
- if (e->profile[0]) {
+- if (e->profile[0]) {
- if (!new_data->active_profile) {
- pa_card_new_data_set_profile(new_data, e->profile);
- pa_log_info("Restored profile '%s' for card %s.", new_data->active_profile, new_data->name);
- new_data->save_profile = true;
-+ pa_card_profile *profile;
+-
+- } else
+- pa_log_debug("Not restoring profile for card %s, because already set.", new_data->name);
+- }
+-
+ /* Always restore the latency offsets because their
+ * initial value is always 0 */
+
+@@ -590,6 +580,30 @@ static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card_new_data *new
+ return PA_HOOK_OK;
+ }
++static pa_hook_result_t card_choose_initial_profile_callback(pa_core *core, pa_card *card, struct userdata *u) {
++ struct entry *e;
++
++ if (!(e = entry_read(u, card->name)))
++ return PA_HOOK_OK;
++
++ if (e->profile[0]) {
++ pa_card_profile *profile;
++
+ profile = pa_hashmap_get(card->profiles, e->profile);
+ if (profile) {
++ pa_log_info("Restoring profile '%s' for card %s.", card->active_profile->name, card->name);
+ pa_card_set_profile(card, profile, true);
-+ pa_log_info("Restored profile '%s' for card %s.", card->active_profile->name, card->name);
- } else
-- pa_log_debug("Not restoring profile for card %s, because already set.", new_data->name);
++ } else {
+ pa_log_debug("Tried to restore profile %s for card %s, but the card doesn't have such profile.",
+ e->profile, card->name);
- }
-
- /* Always restore the latency offsets because their
- * initial value is always 0 */
-
-- pa_log_info("Restoring port latency offsets for card %s.", new_data->name);
-+ pa_log_info("Restoring port latency offsets for card %s.", card->name);
-
- PA_HASHMAP_FOREACH(p_info, e->ports, state)
-- if ((p = pa_hashmap_get(new_data->ports, p_info->name))) {
-+ if ((p = pa_hashmap_get(card->ports, p_info->name))) {
- p->latency_offset = p_info->offset;
- if (!p->preferred_profile && p_info->profile)
- pa_device_port_set_preferred_profile(p, p_info->profile);
++ }
++ }
++
++ entry_free(e);
++
++ return PA_HOOK_OK;
++}
++
+ static pa_hook_result_t card_preferred_port_changed_callback(pa_core *core, pa_card_preferred_port_changed_hook_data *data,
+ struct userdata *u) {
+ struct entry *e;
+@@ -634,6 +648,8 @@ int pa__init(pa_module*m) {
+ u->module = m;
+
+ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_NEW], PA_HOOK_EARLY, (pa_hook_cb_t) card_new_hook_callback, u);
++ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE], PA_HOOK_NORMAL,
++ (pa_hook_cb_t) card_choose_initial_profile_callback, u);
+ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_PUT], PA_HOOK_NORMAL, (pa_hook_cb_t) card_put_hook_callback, u);
+ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_PREFERRED_PORT_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) card_preferred_port_changed_callback, u);
+ pa_module_hook_connect(m, &m->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) card_profile_changed_callback, u);
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index f92ac87..1a6e705 100644
+index 0ac70b9..a0c3d93 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
-@@ -148,6 +148,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
- pa_assert(!pa_hashmap_isempty(data->profiles));
-
- c = pa_xnew0(pa_card, 1);
-+ c->state = PA_CARD_STATE_INIT;
-
- if (!(name = pa_namereg_register(core, data->name, PA_NAMEREG_CARD, c, data->namereg_fail))) {
- pa_xfree(c);
-@@ -156,12 +157,6 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
-
- pa_card_new_data_set_name(data, name);
-
-- if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_NEW], data) < 0) {
-- pa_xfree(c);
-- pa_namereg_unregister(core, name);
-- return NULL;
-- }
--
- c->core = core;
- c->name = pa_xstrdup(data->name);
- c->proplist = pa_proplist_copy(data->proplist);
-@@ -184,38 +179,43 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
- PA_HASHMAP_FOREACH(port, c->ports, state)
- port->card = c;
+@@ -176,38 +176,56 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
+ c->preferred_input_port = data->preferred_input_port;
+ c->preferred_output_port = data->preferred_output_port;
- if (data->active_profile)
- if ((c->active_profile = pa_hashmap_get(c->profiles, data->active_profile)))
@@ -252,50 +273,85 @@ index f92ac87..1a6e705 100644
- PA_HASHMAP_FOREACH(profile, c->profiles, state)
- if (!c->active_profile || profile->priority > c->active_profile->priority)
- c->active_profile = profile;
-- }
-- pa_assert(c->active_profile);
-+void pa_card_put(pa_card *card) {
++void pa_card_choose_initial_profile(pa_card *card) {
+ pa_card_profile *profile;
+ void *state;
++ pa_card_profile *best = NULL;
+
+ pa_assert(card);
+
++ /* By default, pick the highest priority profile that is not unavailable,
++ * or if all profiles are unavailable, pick the profile with the highest
++ * priority regardless of its availability. */
++
+ PA_HASHMAP_FOREACH(profile, card->profiles, state) {
+ if (profile->available == PA_AVAILABLE_NO)
+ continue;
+
-+ if (!card->active_profile || profile->priority > card->active_profile->priority)
-+ card->active_profile = profile;
++ if (!best || profile->priority > best->priority)
++ best = profile;
++ }
++
++ if (!best) {
++ PA_HASHMAP_FOREACH(profile, card->profiles, state) {
++ if (!best || profile->priority > best->priority)
++ best = profile;
+ }
+- pa_assert(c->active_profile);
}
++ pa_assert(best);
- pa_device_init_description(c->proplist, c);
- pa_device_init_icon(c->proplist, true);
- pa_device_init_intended_roles(c->proplist);
-+ /* If all profiles are unavailable, then we still need to pick one */
-+ if (!card->active_profile) {
-+ PA_HASHMAP_FOREACH(profile, card->profiles, state)
-+ if (!card->active_profile || profile->priority > card->active_profile->priority)
-+ card->active_profile = profile;
-+ }
-+ pa_assert(card->active_profile);
++ card->active_profile = best;
++ card->save_profile = false;
- pa_assert_se(pa_idxset_put(core->cards, c, &c->index) >= 0);
-+ pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_NEW], card);
++ /* Let policy modules override the default. */
++ pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE], card);
++}
- pa_log_info("Created %u \"%s\"", c->index, c->name);
- pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_NEW, c->index);
-+ pa_assert_se(pa_idxset_put(card->core->cards, card, &card->index) >= 0);
-+ card->state = PA_CARD_STATE_LINKED;
++void pa_card_put(pa_card *card) {
++ pa_assert(card);
- pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_PUT], c);
- return c;
++ pa_assert_se(pa_idxset_put(card->core->cards, card, &card->index) >= 0);
++ card->linked = true;
++
+ pa_log_info("Created %u \"%s\"", card->index, card->name);
+ pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_PUT], card);
+ pa_subscription_post(card->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_NEW, card->index);
}
void pa_card_free(pa_card *c) {
-@@ -306,20 +306,27 @@ int pa_card_set_profile(pa_card *c, pa_card_profile *profile, bool save) {
+@@ -218,15 +236,15 @@ void pa_card_free(pa_card *c) {
+
+ core = c->core;
+
+- pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_UNLINK], c);
+-
+- pa_namereg_unregister(core, c->name);
+-
+- pa_idxset_remove_by_data(c->core->cards, c, NULL);
++ if (c->linked) {
++ pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_UNLINK], c);
+
+- pa_log_info("Freed %u \"%s\"", c->index, c->name);
++ pa_idxset_remove_by_data(c->core->cards, c, NULL);
++ pa_log_info("Freed %u \"%s\"", c->index, c->name);
++ pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
++ }
+
+- pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
++ pa_namereg_unregister(core, c->name);
+
+ pa_assert(pa_idxset_isempty(c->sinks));
+ pa_idxset_free(c->sinks, NULL);
+@@ -298,20 +316,27 @@ int pa_card_set_profile(pa_card *c, pa_card_profile *profile, bool save) {
return 0;
}
@@ -307,7 +363,7 @@ index f92ac87..1a6e705 100644
+ * be probably good to change this so that also the initial profile can be
+ * set up in set_profile(), but if set_profile() fails, that would need
+ * some better handling than what we do here currently. */
-+ if (c->state != PA_CARD_STATE_INIT && (r = c->set_profile(c, profile)) < 0)
++ if (c->linked && (r = c->set_profile(c, profile)) < 0)
return r;
- pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, c->index);
@@ -321,7 +377,7 @@ index f92ac87..1a6e705 100644
update_port_preferred_profile(c);
- pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], c);
-+ if (c->state != PA_CARD_STATE_INIT) {
++ if (c->linked) {
+ pa_log_info("Changed profile of card %u \"%s\" to %s", c->index, c->name, profile->name);
+ pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], c);
+ pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, c->index);
@@ -330,37 +386,44 @@ index f92ac87..1a6e705 100644
return 0;
}
diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
-index fff9057..a944301 100644
+index d4970e3..fd1fe0a 100644
--- a/src/pulsecore/card.h
+++ b/src/pulsecore/card.h
-@@ -34,6 +34,11 @@ typedef enum pa_available {
- PA_AVAILABLE_YES = 2,
- } pa_available_t;
-
-+typedef enum pa_card_state {
-+ PA_CARD_STATE_INIT,
-+ PA_CARD_STATE_LINKED,
-+} pa_card_state_t;
+@@ -86,6 +86,8 @@ struct pa_card {
+
+ pa_suspend_cause_t suspend_cause;
+
++ bool linked;
+
- struct pa_card_profile {
- pa_card *card;
- char *name;
-@@ -66,6 +71,7 @@ struct pa_card_profile {
-
- struct pa_card {
- uint32_t index;
-+ pa_card_state_t state;
- pa_core *core;
-
- char *name;
-@@ -120,6 +126,7 @@ void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile);
+ void *userdata;
+
+ int (*set_profile)(pa_card *c, pa_card_profile *profile);
+@@ -128,6 +130,13 @@ void pa_card_new_data_set_preferred_port(pa_card_new_data *data, pa_direction_t
void pa_card_new_data_done(pa_card_new_data *data);
pa_card *pa_card_new(pa_core *c, pa_card_new_data *data);
++
++/* Select the initial card profile according to the configured policies. This
++ * must be called between pa_card_new() and pa_card_put(), after the port and
++ * profile availablities have been initialized. */
++void pa_card_choose_initial_profile(pa_card *card);
++
+void pa_card_put(pa_card *c);
void pa_card_free(pa_card *c);
void pa_card_add_profile(pa_card *c, pa_card_profile *profile);
+diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
+index 00d7f2f..802111b 100644
+--- a/src/pulsecore/core.h
++++ b/src/pulsecore/core.h
+@@ -118,6 +118,7 @@ typedef enum pa_core_hook {
+ PA_CORE_HOOK_CLIENT_PROPLIST_CHANGED,
+ PA_CORE_HOOK_CLIENT_SEND_EVENT,
+ PA_CORE_HOOK_CARD_NEW,
++ PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE,
+ PA_CORE_HOOK_CARD_PUT,
+ PA_CORE_HOOK_CARD_UNLINK,
+ PA_CORE_HOOK_CARD_PREFERRED_PORT_CHANGED,
--
-2.7.0
+2.8.1
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch
deleted file mode 100644
index e0efa70f3..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 690d567e298f6687b61c82660b051df5b25482ee Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanuk@iki.fi>
-Date: Fri, 23 Oct 2015 13:37:11 +0300
-Subject: [PATCH 4/4] alsa: set availability for (some) unavailable profiles
-
-The alsa card hasn't so far set any availability for profiles. That
-caused an issue with some HDMI hardware: the sound card has two HDMI
-outputs, but only the second of them is actually usable. The
-unavailable port is marked as unavailable and the available port is
-marked as available, but this information isn't propagated to the
-profile availability. Without profile availability information, the
-initial profile policy picks the unavailable one, since it has a
-higher priority value.
-
-This patch adds simple logic for marking some profiles unavailable:
-if the profile only contains unavailable ports, the profile is
-unavailable too. This can be improved in the future so that if a
-profile contains sinks or sources that only contain unavailable ports,
-the profile should be marked as unavailable. Implementing that
-requires adding more information about the sinks and sources to
-pa_card_profile, however.
-
-BugLink: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-Rebased on 8.0.
-
-Upstream-Status: Denied [The patch set needs some work to be accepted.
-The review thread:
-http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
-
-Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
----
- src/modules/alsa/module-alsa-card.c | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index fe240f0..bdbdc12 100644
---- a/src/modules/alsa/module-alsa-card.c
-+++ b/src/modules/alsa/module-alsa-card.c
-@@ -366,6 +366,8 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
- void *state;
- pa_alsa_jack *jack;
- struct temp_port_avail *tp, *tports;
-+ pa_device_port *port;
-+ pa_card_profile *profile;
-
- pa_assert(u);
-
-@@ -412,6 +414,29 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
- pa_device_port_set_available(tp->port, tp->avail);
-
- pa_xfree(tports);
-+
-+ /* Update profile availabilities. The logic could be improved; for now we
-+ * only set obviously unavailable profiles (those that contain only
-+ * unavailable ports) to PA_AVAILABLE_NO and all others to
-+ * PA_AVAILABLE_UNKNOWN. */
-+ PA_HASHMAP_FOREACH(profile, u->card->profiles, state) {
-+ void *state2;
-+ pa_available_t available = PA_AVAILABLE_NO;
-+
-+ /* Don't touch the "off" profile. */
-+ if (pa_hashmap_size(profile->ports) == 0)
-+ continue;
-+
-+ PA_HASHMAP_FOREACH(port, profile->ports, state2) {
-+ if (port->available != PA_AVAILABLE_NO) {
-+ available = PA_AVAILABLE_UNKNOWN;
-+ break;
-+ }
-+ }
-+
-+ pa_card_profile_set_available(profile, available);
-+ }
-+
- return 0;
- }
-
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch
new file mode 100644
index 000000000..480f2cea4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-card-remove-pa_card_new_data.active_profile.patch
@@ -0,0 +1,72 @@
+From 375bc56fd3d66f40a9650224e5bfea4002494ade Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Fri, 23 Oct 2015 13:50:35 +0300
+Subject: [PATCH 4/5] card: remove pa_card_new_data.active_profile
+
+It's not being used any more.
+
+Upstream-Status: Accepted [expected in 10.0]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ src/pulsecore/card.c | 8 --------
+ src/pulsecore/card.h | 5 -----
+ 2 files changed, 13 deletions(-)
+
+diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
+index a0c3d93..bc5b75b 100644
+--- a/src/pulsecore/card.c
++++ b/src/pulsecore/card.c
+@@ -96,13 +96,6 @@ void pa_card_new_data_set_name(pa_card_new_data *data, const char *name) {
+ data->name = pa_xstrdup(name);
+ }
+
+-void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile) {
+- pa_assert(data);
+-
+- pa_xfree(data->active_profile);
+- data->active_profile = pa_xstrdup(profile);
+-}
+-
+ void pa_card_new_data_set_preferred_port(pa_card_new_data *data, pa_direction_t direction, pa_device_port *port) {
+ pa_assert(data);
+
+@@ -125,7 +118,6 @@ void pa_card_new_data_done(pa_card_new_data *data) {
+ pa_hashmap_free(data->ports);
+
+ pa_xfree(data->name);
+- pa_xfree(data->active_profile);
+ }
+
+ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
+diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
+index fd1fe0a..5699475 100644
+--- a/src/pulsecore/card.h
++++ b/src/pulsecore/card.h
+@@ -101,15 +101,11 @@ typedef struct pa_card_new_data {
+ pa_module *module;
+
+ pa_hashmap *profiles;
+- char *active_profile;
+-
+ pa_hashmap *ports;
+ pa_device_port *preferred_input_port;
+ pa_device_port *preferred_output_port;
+
+ bool namereg_fail:1;
+-
+- bool save_profile:1;
+ } pa_card_new_data;
+
+ typedef struct {
+@@ -125,7 +121,6 @@ void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available)
+
+ pa_card_new_data *pa_card_new_data_init(pa_card_new_data *data);
+ void pa_card_new_data_set_name(pa_card_new_data *data, const char *name);
+-void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile);
+ void pa_card_new_data_set_preferred_port(pa_card_new_data *data, pa_direction_t direction, pa_device_port *port);
+ void pa_card_new_data_done(pa_card_new_data *data);
+
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch
new file mode 100644
index 000000000..5563d2c35
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0005-alsa-set-availability-for-some-unavailable-profiles.patch
@@ -0,0 +1,79 @@
+From ae6a01ba204b480bda6a5b4431be3d22e53a7006 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Fri, 23 Oct 2015 13:37:11 +0300
+Subject: [PATCH 5/5] alsa: set availability for (some) unavailable profiles
+
+The alsa card hasn't so far set any availability for profiles. That
+caused an issue with some HDMI hardware: the sound card has two HDMI
+outputs, but only the second of them is actually usable. The
+unavailable port is marked as unavailable and the available port is
+marked as available, but this information isn't propagated to the
+profile availability. Without profile availability information, the
+initial profile policy picks the unavailable one, since it has a
+higher priority value.
+
+This patch adds simple logic for marking some profiles unavailable:
+if the profile only contains unavailable ports, the profile is
+unavailable too. This can be improved in the future so that if a
+profile contains sinks or sources that only contain unavailable ports,
+the profile should be marked as unavailable. Implementing that
+requires adding more information about the sinks and sources to
+pa_card_profile, however.
+
+BugLink: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
+
+Upstream-Status: Accepted [expected in 10.0]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ src/modules/alsa/module-alsa-card.c | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
+index 1976230..323e08a 100644
+--- a/src/modules/alsa/module-alsa-card.c
++++ b/src/modules/alsa/module-alsa-card.c
+@@ -366,6 +366,7 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
+ void *state;
+ pa_alsa_jack *jack;
+ struct temp_port_avail *tp, *tports;
++ pa_card_profile *profile;
+
+ pa_assert(u);
+
+@@ -426,6 +427,32 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
+ if (tp->avail == PA_AVAILABLE_NO)
+ pa_device_port_set_available(tp->port, tp->avail);
+
++ /* Update profile availabilities. The logic could be improved; for now we
++ * only set obviously unavailable profiles (those that contain only
++ * unavailable ports) to PA_AVAILABLE_NO and all others to
++ * PA_AVAILABLE_UNKNOWN. */
++ PA_HASHMAP_FOREACH(profile, u->card->profiles, state) {
++ pa_device_port *port;
++ void *state2;
++ pa_available_t available = PA_AVAILABLE_NO;
++
++ /* Don't touch the "off" profile. */
++ if (profile->n_sources == 0 && profile->n_sinks == 0)
++ continue;
++
++ PA_HASHMAP_FOREACH(port, u->card->ports, state2) {
++ if (!pa_hashmap_get(port->profiles, profile->name))
++ continue;
++
++ if (port->available != PA_AVAILABLE_NO) {
++ available = PA_AVAILABLE_UNKNOWN;
++ break;
++ }
++ }
++
++ pa_card_profile_set_available(profile, available);
++ }
++
+ pa_xfree(tports);
+ return 0;
+ }
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb
deleted file mode 100644
index b01ba8f68..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require pulseaudio.inc
-
-SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
- file://0001-padsp-Make-it-compile-on-musl.patch \
- file://0001-client-conf-Add-allow-autospawn-for-root.patch \
- file://volatiles.04_pulse \
- file://0001-card-add-pa_card_profile.ports.patch \
- file://0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch \
- file://0003-card-move-profile-selection-after-pa_card_new.patch \
- file://0004-alsa-set-availability-for-some-unavailable-profiles.patch \
- file://0001-Revert-module-switch-on-port-available-Route-to-pref.patch \
-"
-SRC_URI[md5sum] = "8678442ba0bb4b4c33ac6f62542962df"
-SRC_URI[sha256sum] = "690eefe28633466cfd1ab9d85ebfa9376f6b622deec6bfee5091ac9737cd1989"
-
-do_compile_prepend() {
- mkdir -p ${S}/libltdl
- cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
-}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb
new file mode 100644
index 000000000..00f5442b8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_9.0.bb
@@ -0,0 +1,19 @@
+require pulseaudio.inc
+
+SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
+ file://0001-padsp-Make-it-compile-on-musl.patch \
+ file://0001-client-conf-Add-allow-autospawn-for-root.patch \
+ file://0001-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch \
+ file://0002-card-don-t-allow-the-CARD_NEW-hook-to-fail.patch \
+ file://0003-card-move-profile-selection-after-pa_card_new.patch \
+ file://0004-card-remove-pa_card_new_data.active_profile.patch \
+ file://0005-alsa-set-availability-for-some-unavailable-profiles.patch \
+ file://volatiles.04_pulse \
+"
+SRC_URI[md5sum] = "da7162541b3a9bc20576dbd0d7d1489a"
+SRC_URI[sha256sum] = "c3d3d66b827f18fbe903fe3df647013f09fc1e2191c035be1ee2d82a9e404686"
+
+do_compile_prepend() {
+ mkdir -p ${S}/libltdl
+ cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
+}
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb
deleted file mode 100644
index c89adac5d..000000000
--- a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "WebP is an image format designed for the Web"
-DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
- used on a large variety of photographic, translucent and \
- graphical images found on the web. The degree of lossy \
- compression is adjustable so a user can choose the trade-off \
- between file size and image quality. WebP typically achieves \
- an average of 30% more compression than JPEG and JPEG 2000, \
- without loss of image quality."
-HOMEPAGE = "https://developers.google.com/speed/webp/"
-SECTION = "libs"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
- file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
-
-SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
-SRC_URI[md5sum] = "ba81eb9bf23e3c69a2f5cc8dcdb5938f"
-SRC_URI[sha256sum] = "5cd3bb7b623aff1f4e70bd611dc8dbabbf7688fd5eb225b32e02e09e37dfb274"
-
-UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
-
-EXTRA_OECONF = " \
- --disable-experimental \
- --disable-wic \
- --enable-libwebpmux \
- --enable-libwebpdemux \
- --enable-threading \
-"
-
-inherit autotools lib_package
-
-PACKAGECONFIG ??= ""
-
-# libwebpdecoder is a subset of libwebp, don't build it unless requested
-PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
-
-# Apply for examples programs: cwebp and dwebp
-PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
-PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
-PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
-
-# Apply only for example program vwebp
-PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
-
-PACKAGES =+ "${PN}-gif2webp"
-
-DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
-FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.1.bb b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.1.bb
new file mode 100644
index 000000000..b882db75b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.1.bb
@@ -0,0 +1,54 @@
+SUMMARY = "WebP is an image format designed for the Web"
+DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
+ used on a large variety of photographic, translucent and \
+ graphical images found on the web. The degree of lossy \
+ compression is adjustable so a user can choose the trade-off \
+ between file size and image quality. WebP typically achieves \
+ an average of 30% more compression than JPEG and JPEG 2000, \
+ without loss of image quality."
+HOMEPAGE = "https://developers.google.com/speed/webp/"
+SECTION = "libs"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
+ file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
+
+SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
+SRC_URI[md5sum] = "3d7db92ebba5b4f679413d25c6040881"
+SRC_URI[sha256sum] = "6ad66c6fcd60a023de20b6856b03da8c7d347269d76b1fd9c3287e8b5e8813df"
+
+UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
+
+EXTRA_OECONF = " \
+ --disable-experimental \
+ --disable-wic \
+ --enable-libwebpmux \
+ --enable-libwebpdemux \
+ --enable-threading \
+"
+# Do not trust configure to determine if neon is available.
+#
+EXTRA_OECONF_append_arm = " \
+ ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
+"
+
+inherit autotools lib_package
+
+PACKAGECONFIG ??= ""
+
+# libwebpdecoder is a subset of libwebp, don't build it unless requested
+PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
+
+# Apply for examples programs: cwebp and dwebp
+PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
+PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
+
+# Apply only for example program vwebp
+PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
+
+PACKAGES =+ "${PN}-gif2webp"
+
+DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
+FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
index 0a6990980..393310f68 100644
--- a/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-multimedia/x264/x264_git.bb
@@ -42,14 +42,12 @@ do_configure() {
./configure ${EXTRA_OECONF}
}
-# Get rid of -e
-EXTRA_OEMAKE = ""
AS = "${TARGET_PREFIX}gcc"
do_install() {
oe_runmake install DESTDIR=${D}
}
-# PIC can't be enabled for 32-bit x86
-INSANE_SKIP_${PN}_append_x86 = " textrel"
+# PIC can't be enabled for few BSP's
+INSANE_SKIP_${PN}_append = " textrel"
diff --git a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb
index db7d58183..7ddf671bc 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt-sdk.bb
@@ -1,5 +1,13 @@
require recipes-core/images/core-image-minimal.bb
+# Skip processing of this recipe if linux-yocto-rt is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers.
+python () {
+ if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
+ raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
DESCRIPTION = "Small image capable of booting a device with a test suite and \
tools for real-time use. It includes the full meta-toolchain, development \
headers and libraries to form a standalone SDK."
diff --git a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb
index cab6f8b74..9c86f2533 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb
+++ b/import-layers/yocto-poky/meta/recipes-rt/images/core-image-rt.bb
@@ -1,5 +1,13 @@
require recipes-core/images/core-image-minimal.bb
+# Skip processing of this recipe if linux-yocto-rt is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers.
+python () {
+ if d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != "linux-yocto-rt":
+ raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
DESCRIPTION = "A small image just capable of allowing a device to boot plus a \
real-time test suite and tools appropriate for real-time use."
DEPENDS = "linux-yocto-rt"
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch
deleted file mode 100644
index 00fcc7d72..000000000
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9640dde4241e1314b8e8ea35b0c8dab0b30ae51f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 3 Jan 2016 10:50:56 -0800
-Subject: [PATCH] Makefile: Set CC/AR variable only if it doesn't have a value
-
-This helps it compile with clang or any other compilers besides gcc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 1e4b7d1..2c2d396 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,6 @@
- VERSION = 0.96
--CC=$(CROSS_COMPILE)gcc
--AR=$(CROSS_COMPILE)ar
-+CC?=$(CROSS_COMPILE)gcc
-+AR?=$(CROSS_COMPILE)ar
-
- OBJDIR = bld
-
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py
index e2280e43e..080a65589 100755
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: BSD-3-Clause
@@ -106,8 +106,8 @@ def tc_name(sub_name):
def log(*msg):
tmp = "".join(map(str, msg)) # 'map(str, ...' allows numbers
- for line in tmp.split("\n"):
- print "#", line
+ for line in tmp.splitlines():
+ print("#", line)
#-------------------------------------------------------------------------------
# Like log(), but with a timestamp added
@@ -265,7 +265,7 @@ cmd = ("cyclictest",
"-d", str(interval_delta),
"-l", str(loop_count)
)
-rex = re.compile("C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")
+rex = re.compile(b"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)")
def run_cyclictest_once():
res = subprocess.check_output(cmd)
@@ -283,7 +283,7 @@ def run_cyclictest_once():
avg_sum = 0
avg_cnt = 0
- for line in res.split("\n"):
+ for line in res.splitlines():
m = rex.search(line)
if m is not None:
minlist.append(int(m.group(2)))
@@ -324,7 +324,7 @@ def run_cyclictest_suite():
t = time.time()
max_list = []
- for i in xrange(0, suite_size):
+ for i in range(0, suite_size):
tmp_min, tmp_avg, tmp_max = run_cyclictest_once()
msg = "%2d/%2d:" % (i+1, suite_size)
@@ -376,11 +376,11 @@ class cyclictest_runner:
log()
log("PASS")
- print
- print tc_name(name), "[Min/us,Avg/us,Max/us]:",
- print "%d,%.1f,%d" % (bm_min,bm_avg, bm_max)
- print "PASS:", tc_name(name)
- print
+ print()
+ print(tc_name(name), "[Min/us,Avg/us,Max/us]:",)
+ print("%d,%.1f,%d" % (bm_min,bm_avg, bm_max))
+ print("PASS:", tc_name(name))
+ print()
except Exception:
log()
@@ -391,9 +391,9 @@ class cyclictest_runner:
log("WD: ", os.getcwd())
log()
log("FAIL")
- print
- print "FAIL:", tc_name(name)
- print
+ print()
+ print("FAIL:", tc_name(name))
+ print()
#-------------------------------------------------------------------------------
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest
index 8e6d3e358..b7c5e29f2 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/files/run-ptest
@@ -1,3 +1,3 @@
#!/bin/sh
-python ./rt_bmark.py
+python3 ./rt_bmark.py
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb
deleted file mode 100644
index 962069e3d..000000000
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Hardware latency detector"
-DESCRIPTION = "Python utility for controlling the kernel hardware latency detection module (hwlat_detector.ko)."
-HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
-SECTION = "tests"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-require rt-tests.inc
-
-EXTRA_OEMAKE += "PYLIB=${libdir}/python${PYTHON_BASEVERSION}/dist-packages"
-
-do_compile() {
- oe_runmake hwlatdetect
-}
-
-do_install() {
- oe_runmake install_hwlatdetect DESTDIR=${D} SBINDIR=${sbindir} \
- MANDIR=${mandir} INCLUDEDIR=${includedir}
-}
-
-FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
-RDEPENDS_${PN} = "python python-subprocess python-textutils"
-RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb
new file mode 100644
index 000000000..012b2dd0a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_2.0.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Hardware latency detector"
+DESCRIPTION = "Python utility for controlling the kernel hardware latency detection module (hwlat_detector.ko)."
+HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
+SECTION = "tests"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+require rt-tests.inc
+inherit python3-dir
+
+EXTRA_OEMAKE += "PYLIB=${libdir}/python${PYTHON_BASEVERSION}/dist-packages"
+
+do_compile() {
+ oe_runmake hwlatdetect
+}
+
+do_install() {
+ oe_runmake install_hwlatdetect DESTDIR=${D} SBINDIR=${sbindir} \
+ MANDIR=${mandir} INCLUDEDIR=${includedir}
+
+ sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py
+}
+
+FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
+RDEPENDS_${PN} = "python3 python3-subprocess python3-textutils"
+RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc
index 76f9b3a34..d832828e9 100644
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc
+++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc
@@ -1,13 +1,9 @@
# Version v0.96
-PV = "0.96"
-SRCREV = "24f8c0175e04bab78e7555698e34d7002b01c87f"
+SRCREV = "e1b1537a20b35af75a49bf55dcf70296f8a62467"
SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git"
S = "${WORKDIR}/git"
-# need to append rt-tests' default CFLAGS to ours
-CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnull"
-
# calling 'uname -m' is broken on crossbuilds
EXTRA_OEMAKE = "NUMA=0"
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb
deleted file mode 100644
index 2f96fea9b..000000000
--- a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Real-Time preemption testcases"
-HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
-SECTION = "tests"
-DEPENDS = "linux-libc-headers virtual/libc"
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
- file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=e768b8da44555fe63f65e5c497844cb5 \
- file://src/pi_tests/pi_stress.c;beginline=6;endline=19;md5=bd426a634a43ec612e9fbf125dfcc949"
-
-require rt-tests.inc
-inherit ptest
-
-SRC_URI += "file://0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch \
- file://run-ptest \
- file://rt_bmark.py \
- "
-# Do not install hwlatdetect
-EXTRA_OEMAKE += "PYLIB='' CROSS_COMPILE=${TARGET_PREFIX}"
-
-CFLAGS_prepend = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
-
-do_install() {
- oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
- INCLUDEDIR=${includedir}
-}
-
-do_install_ptest() {
- cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
-}
-
-RDEPENDS_${PN}-ptest += " stress python python-subprocess python-multiprocessing python-datetime python-re python-lang"
-
-FILES_${PN} += "${prefix}/src/backfire"
diff --git a/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_2.0.bb b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_2.0.bb
new file mode 100644
index 000000000..4336c50d6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_2.0.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Real-Time preemption testcases"
+HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
+SECTION = "tests"
+DEPENDS = "linux-libc-headers virtual/libc"
+LICENSE = "GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+ file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=e768b8da44555fe63f65e5c497844cb5 \
+ file://src/pi_tests/pi_stress.c;beginline=6;endline=19;md5=bd426a634a43ec612e9fbf125dfcc949"
+
+require rt-tests.inc
+inherit ptest
+
+SRC_URI += " \
+ file://run-ptest \
+ file://rt_bmark.py \
+ "
+# Do not install hwlatdetect
+EXTRA_OEMAKE += "PYLIB=''"
+
+do_install() {
+ oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
+ INCLUDEDIR=${includedir}
+}
+
+do_install_ptest() {
+ cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
+}
+
+RDEPENDS_${PN}-ptest += " stress python3 python3-subprocess python3-multiprocessing python3-datetime python3-re python3-lang python3-misc"
+
+FILES_${PN} += "${prefix}/src/backfire"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine.inc b/import-layers/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine.inc
deleted file mode 100644
index 93538ed01..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine.inc
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Sato theme engine for GTK+"
-HOMEPAGE = "http://www.o-hand.com"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "LGPLv2.1 & LGPLv2+"
-
-SECTION = "x11/base"
-DEPENDS = "gtk+"
-RDEPENDS_gtk-theme-sato = "gtk-sato-engine"
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-PACKAGES += "gtk-theme-sato"
-FILES_${PN} = "${libdir}/gtk-2.0/*/engines/*.so "
-FILES_${PN}-dev = "${libdir}/gtk-2.0/*/engines/*.la"
-FILES_gtk-theme-sato = "${datadir}/icons ${datadir}/themes"
-
-inherit autotools-brokensep pkgconfig
-
-do_configure_prepend() {
- for i in `ls gtk-common`; do
- ln -sf ../gtk-common/$i gtk2-engine/$i
- done
-}
diff --git a/import-layers/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine_git.bb b/import-layers/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine_git.bb
deleted file mode 100644
index da4d98ad4..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine_git.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require gtk-sato-engine.inc
-
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/sato-utils.h;endline=24;md5=708f28cfe7fe028d497aaf4389b80b62 \
- file://src/sato-main.c;endline=24;md5=b5e5dddebca570275becb51b526e4c5a"
-
-SRCREV = "4740ad8d53aba4368ce3e03b06cfdc69eb86dcdc"
-PV = "0.3.3+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN}"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'qvga', '--with-mode=qvga', '',d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/l3afpad/l3afpad_git.bb b/import-layers/yocto-poky/meta/recipes-sato/l3afpad/l3afpad_git.bb
new file mode 100644
index 000000000..ccfda2658
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/l3afpad/l3afpad_git.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Simple GTK+ Text Editor"
+HOMEPAGE = "https://github.com/stevenhoneyman/l3afpad"
+
+# Note that COPYING seems to mistakenly contain LGPLv2.1.
+# The source code is marked GPLv2+ and COPYING used to contain
+# that as well.
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://src/l3afpad.h;endline=20;md5=8848fd645cd45115d8cb47ca5c42a50e \
+ file://src/utils.c;endline=20;md5=ae4792f69d3bb7b7ba91d582ba9b1a05"
+
+DEPENDS = "gtk+3 intltool-native gettext-native"
+
+PV = "0.8.18.1.11+git${SRCPV}"
+SRC_URI = "git://github.com/stevenhoneyman/l3afpad.git"
+SRCREV ="3cdccdc9505643e50f8208171d9eee5de11a42ff"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+EXTRA_OECONF = "--disable-emacs --disable-print"
+FILES_${PN} += "${datadir}/icons"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/leafpad/files/leafpad.desktop b/import-layers/yocto-poky/meta/recipes-sato/leafpad/files/leafpad.desktop
deleted file mode 100644
index c7e2d5bb5..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/leafpad/files/leafpad.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Name=Notes
-Exec=/usr/bin/leafpad
-Comment=Text Editor
-Icon=accessories-text-editor
-Terminal=false
-Type=Application
-Categories=GTK;Utility;TextEditor;
-X-MB-SingleInstance=true
-StartupNotify=true
diff --git a/import-layers/yocto-poky/meta/recipes-sato/leafpad/files/owl-menu.patch b/import-layers/yocto-poky/meta/recipes-sato/leafpad/files/owl-menu.patch
deleted file mode 100644
index 2ebf74a6f..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/leafpad/files/owl-menu.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Upstream-Status: Inappropriate [enable feature]
-
---- tmp/src/menu.c.orig 2007-04-23 12:08:41.000000000 +0100
-+++ tmp/src/menu.c 2007-04-23 12:08:41.000000000 +0100
-@@ -152,7 +152,7 @@
- }
-
- accel_group = gtk_accel_group_new();
-- ifactory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", accel_group);
-+ ifactory = gtk_item_factory_new(GTK_TYPE_MENU, "<main>", accel_group);
- gtk_item_factory_set_translate_func(ifactory, menu_translate, NULL, NULL);
- gtk_item_factory_create_items(ifactory, nmenu_items, menu_items, NULL);
- gtk_window_add_accel_group(GTK_WINDOW(window), accel_group);
-
---- tmp/src/window.c.orig 2007-04-23 12:14:07.000000000 +0100
-+++ tmp/src/window.c 2007-04-23 12:14:07.000000000 +0100
-@@ -18,6 +18,8 @@
- */
-
- #include "leafpad.h"
-+#include <libowl/owlwindowmenu.h>
-+
- /*
- static void cb_scroll_event(GtkAdjustment *adj, GtkWidget *view)
- {
-@@ -52,7 +54,6 @@
- gtk_container_add(GTK_CONTAINER(window), vbox);
-
- menubar = create_menu_bar(window);
-- gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0);
-
- sw = gtk_scrolled_window_new(NULL, NULL);
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
-
---- tmp/src/main.c.orig 2007-04-23 12:15:03.000000000 +0100
-+++ tmp/src/main.c 2007-04-23 12:15:03.000000000 +0100
-@@ -244,6 +244,7 @@
- Conf *conf;
- GtkItemFactory *ifactory;
- gchar *stdin_data = NULL;
-+ GtkWidget *menu;
-
- bindtextdomain(PACKAGE, LOCALEDIR);
- bind_textdomain_codeset(PACKAGE, "UTF-8");
-@@ -293,7 +294,10 @@
- conf->autoindent);
-
- gtk_widget_show_all(pub->mw->window);
-+ owl_set_window_menu (GTK_WINDOW(pub->mw->window),
-+ GTK_MENU(pub->mw->menubar));
-+
- g_free(conf->fontname);
- g_free(conf);
-
-
---- tmp/src/Makefile.am.orig 2007-04-23 12:17:54.000000000 +0100
-+++ tmp/src/Makefile.am 2007-04-23 12:17:54.000000000 +0100
-@@ -27,4 +27,4 @@
- i18n.h
-
- leafpad_CFLAGS = $(GTK_CFLAGS) $(GNOMEPRINT_CFLAGS)
--leafpad_LDADD = $(GTK_LIBS) $(INTLLIBS) $(GNOMEPRINT_LIBS)
-+leafpad_LDADD = $(GTK_LIBS) $(INTLLIBS) $(GNOMEPRINT_LIBS) -lowl
diff --git a/import-layers/yocto-poky/meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb b/import-layers/yocto-poky/meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb
deleted file mode 100644
index 093b89f77..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Simple GTK+ Text Editor"
-HOMEPAGE = "http://tarot.freeshell.org/leafpad/"
-
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://src/leafpad.h;endline=20;md5=d3d6a89f5e61e8b13bdea537511ba1fa \
- file://src/utils.c;endline=20;md5=0d2cc6584ba3202448bb274f62739571"
-
-DEPENDS = "gtk+ intltool-native libowl gettext-native"
-# The libowl requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
- file://leafpad.desktop"
-
-SRC_URI[md5sum] = "254a72fc67505e3aa52884c729cd7b97"
-SRC_URI[sha256sum] = "959d22ae07f22803bc66ff40d373a854532a6e4732680bf8a96a3fbcb9f80a2c"
-PR = "r2"
-
-SRC_URI_append_poky = " file://owl-menu.patch;apply=yes "
-
-inherit autotools pkgconfig distro_features_check
-
-EXTRA_OECONF = " --enable-chooser --disable-emacs --disable-print"
-
-do_install_append () {
- install -d ${D}/${datadir}
- install -d ${D}/${datadir}/applications
- install -m 0644 ${WORKDIR}/leafpad.desktop ${D}/${datadir}/applications
-}
-
-FILES_${PN} += "${datadir}/applications/leafpad.desktop"
-
-PACKAGES += "leafpad-stock-icons"
-FILES_leafpad-stock-icons = "${datadir}/icons/hicolor/"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/libowl/libowl_git.bb b/import-layers/yocto-poky/meta/recipes-sato/libowl/libowl_git.bb
deleted file mode 100644
index 9cc47dbd5..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/libowl/libowl_git.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "OpenedHand Widget Library"
-HOMEPAGE = "http://www.o-hand.com"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2 & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://libowl/owlpaned.h;endline=20;md5=7fef844c4cc01b10541a7ab6ab5971af \
- file://libowl/owltreemodelslice.h;endline=20;md5=a5421f2cdae8debe5e4c48c09a02beb9 \
- file://libowl/owlcolourswatch.h;endline=24;md5=063c415c58719d536990ca8f606b5730"
-
-SECTION = "libs"
-DEPENDS = "gtk+"
-SRCREV = "6ebc8ac8f8575278dd40a535cadefa26374e44b1"
-PV = "0.1+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN}"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-# Requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/files/no-handed.patch b/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/files/no-handed.patch
index 825694962..1cb184fb4 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/files/no-handed.patch
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/files/no-handed.patch
@@ -1,10 +1,13 @@
Upstream-Status: Inappropriate [configuration]
+---
+ appearance/mb-appearance.c | 4 ++++
+ 1 file changed, 4 insertions(+)
-Index: appearance/mb-appearance.c
-===================================================================
---- appearance/mb-appearance.c (revision 1614)
-+++ appearance/mb-appearance.c (working copy)
-@@ -300,11 +300,13 @@
+diff --git a/appearance/mb-appearance.c b/appearance/mb-appearance.c
+index 6af8376..71fd57b 100644
+--- a/appearance/mb-appearance.c
++++ b/appearance/mb-appearance.c
+@@ -317,11 +317,13 @@ on_gconf_value_changed (GConfClient* client, const gchar* key, GConfValue* value
gtk_font_button_set_font_name (GTK_FONT_BUTTON (font_button),
gconf_value_get_string (value));
} else if (strcmp (key, HANDED_KEY) == 0) {
@@ -18,18 +21,19 @@ Index: appearance/mb-appearance.c
}
}
-@@ -395,12 +397,13 @@
- gtk_container_add (GTK_CONTAINER (align), font_button);
+@@ -408,10 +410,12 @@ main (int argc, char **argv) {
/* Left/Right Handed */
--
+
+#if 0
- frame = new_frame (_("Orientation"), &align);
- gtk_box_pack_start (GTK_BOX (box), frame, TRUE, TRUE, 0);
handed_check = gtk_check_button_new_with_mnemonic (_("_Left-handed"));
+ frame = new_frame (_("Orientation"),handed_check);
+ gtk_box_pack_start (GTK_BOX (box), frame, TRUE, TRUE, 0);
g_signal_connect (handed_check, "toggled", G_CALLBACK (on_handed_set), NULL);
- gtk_container_add (GTK_CONTAINER (align), handed_check);
+#endif
gconf_client_add_dir (gconf, INTERFACE_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
g_signal_connect (gconf, "value-changed", G_CALLBACK (on_gconf_value_changed), NULL);
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb
new file mode 100644
index 000000000..b993a9454
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_0.2.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Matchbox GTK+ theme configuration application"
+HOMEPAGE = "http://matchbox-project.org"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://appearance/mb-appearance.c;endline=25;md5=ea92333cf8a6802639d62d874c114a28"
+
+DEPENDS = "gconf gtk+3"
+RDEPENDS_${PN} = "settings-daemon"
+
+# SRCREV tagged 0.2
+SRCREV = "ef2192ce98d9374ffdad5f78544c3f8f353c16aa"
+SRC_URI = "git://git.yoctoproject.org/${BPN} \
+ file://no-handed.patch"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check
+
+# The settings-daemon requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_git.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_git.bb
deleted file mode 100644
index 5f73a4c48..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_git.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Matchbox GTK+ theme configuration application"
-HOMEPAGE = "http://matchbox-project.org"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://appearance/mb-appearance.c;endline=25;md5=ea92333cf8a6802639d62d874c114a28"
-
-DEPENDS = "gconf gtk+"
-RDEPENDS_${PN} = "settings-daemon"
-
-SRCREV = "3ed74dfb7c57be088a5ab36e446c0ccde9fa1028"
-PV = "0.0+git${SRCPV}"
-
-S = "${WORKDIR}/git"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN} \
- file://no-handed.patch;striplevel=0"
-
-inherit autotools pkgconfig distro_features_check
-
-# The settings-daemon requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop-sato/matchbox-desktop-sato_git.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop-sato/matchbox-desktop-sato_git.bb
deleted file mode 100644
index 1979cbb76..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop-sato/matchbox-desktop-sato_git.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Matchbox desktop folders for the Sato environment"
-HOMEPAGE = "http://matchbox-project.org"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-SECTION = "x11"
-DEPENDS = ""
-RCONFLICTS_${PN} = "matchbox-common"
-
-SRCREV = "810b0b08eb79e4685202da2ec347b990bb467e07"
-PV = "0.1+git${SRCPV}"
-PR = "r1"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN}"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig
-
-FILES_${PN} += "${datadir}"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch
deleted file mode 100644
index 46397dc8a..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 5fe37ef38500f858a22ecdf9bf69bf06e213bf68 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 22 Mar 2016 12:41:35 +0200
-Subject: [PATCH] Do nothing on delete-event when not STANDALONE
-
-This prevents an opportunistic alt-F4 from closing the desktop.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-
-Upstream-Status: Backport
----
- src/desktop.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/src/desktop.c b/src/desktop.c
-index d4fc2fb..94b4ddf 100644
---- a/src/desktop.c
-+++ b/src/desktop.c
-@@ -122,6 +122,15 @@ load_items (TakuMenu *menu)
-
- }
-
-+#ifndef STANDALONE
-+static gboolean
-+delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
-+{
-+ /* prevent default handler from destroying the window */
-+ return TRUE;
-+}
-+#endif
-+
- static void
- workarea_changed (int x, int y, int w, int h)
- {
-@@ -144,11 +153,11 @@ create_desktop (void)
- gtk_icon_size_register ("taku-icon", 64, 64);
-
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-- g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), NULL);
- gtk_widget_set_name (window, "TakuWindow");
- gtk_window_set_title (GTK_WINDOW (window), _("Desktop"));
-
- #ifndef STANDALONE
-+ g_signal_connect (window, "delete-event", G_CALLBACK (delete_event_cb), NULL);
- gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DESKTOP);
- gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), TRUE);
-
-@@ -156,6 +165,7 @@ create_desktop (void)
- screen_w = gdk_screen_get_width (screen);
- screen_h = gdk_screen_get_height (screen);
- #else
-+ g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), NULL);
- screen_w = 640;
- screen_h = 480;
- #endif
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/All.directory b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/All.directory
new file mode 100644
index 000000000..dfa41e3d3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/All.directory
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Name=All
+Icon=mbfolder.png
+Type=Directory
+Match=meta-all
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Applications.directory b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Applications.directory
new file mode 100644
index 000000000..a7e350171
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Applications.directory
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=Applications
+Comment=Applications
+Icon=gnome-applications.png
+Type=Directory
+Match=AudioVideo;Audio;Video;Graphics;Network;Office;Utility;System;Development;meta-fallback;
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Games.directory b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Games.directory
new file mode 100644
index 000000000..1b0928c75
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Games.directory
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Games
+Name[de]=Spiele
+Comment=Games of all kind
+Comment[de]=Spiele aller Art
+Icon=mbfolder.png
+Type=Directory
+Match=Game
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Root.order b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Root.order
new file mode 100644
index 000000000..01a86d293
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Root.order
@@ -0,0 +1,4 @@
+Applications
+Games
+Settings
+All
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Settings.directory b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Settings.directory
new file mode 100644
index 000000000..5dde365f0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/files/vfolders/Settings.directory
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Settings
+Name[de]=Einstellungen
+Comment=Settings for your handheld computer
+Comment[de]=Einstellungen fĂĽr Ihren Handheld-Computer
+Icon=mbfolder.png
+Type=Directory
+Match=Settings
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb
new file mode 100644
index 000000000..d9a2f2214
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Matchbox Window Manager Desktop"
+HOMEPAGE = "http://matchbox-project.org/"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://src/desktop.c;endline=20;md5=36c9bf295e6007f3423095f405af5a2d \
+ file://src/main.c;endline=19;md5=2044244f97a195c25b7dc602ac7e9a00"
+
+DEPENDS = "gtk+3 startup-notification dbus"
+SECTION = "x11/wm"
+
+# SRCREV tagged 2.1
+SRCREV = "c8473519a0f37488b8b3e839e275b000cdde0b80"
+SRC_URI = "git://git.yoctoproject.org/${BPN}-2 \
+ file://vfolders/* \
+ "
+
+EXTRA_OECONF = "--enable-startup-notification --with-dbus"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check
+
+# The startup-notification requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+do_install_append() {
+ install -d ${D}${datadir}/matchbox/vfolders/
+ install -m 0644 ${WORKDIR}/vfolders/* ${D}${datadir}/matchbox/vfolders/
+}
+
+FILES_${PN} += "${datadir}/matchbox/vfolders/"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb
deleted file mode 100644
index dbe8c1145..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Matchbox Window Manager Desktop"
-HOMEPAGE = "http://matchbox-project.org/"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://libtaku/eggsequence.h;endline=20;md5=b91f68f7642a1459fa1f4c9df94a8f15 \
- file://src/desktop.c;endline=20;md5=36c9bf295e6007f3423095f405af5a2d \
- file://src/main.c;endline=19;md5=2044244f97a195c25b7dc602ac7e9a00"
-
-DEPENDS = "gtk+ startup-notification dbus"
-SECTION = "x11/wm"
-SRCREV = "71e3e6e04271e9d5a14f1c231ef100c7f320134d"
-PV = "2.0+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN}-2 \
- file://0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch \
- "
-
-EXTRA_OECONF = "--enable-startup-notification --with-dbus"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-# The startup-notification requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb
new file mode 100644
index 000000000..465f1349a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_0.1.1.bb
@@ -0,0 +1,59 @@
+SUMMARY = "Matchbox virtual keyboard for X11"
+HOMEPAGE = "http://matchbox-project.org"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+SECTION = "x11"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://src/matchbox-keyboard.h;endline=17;md5=9d6586c69e4a926f3cb0b4425f24ba3c \
+ file://applet/applet.c;endline=18;md5=4a0f721724746b14d95b51ddd42b95e7"
+
+DEPENDS = "libfakekey expat libxft"
+
+#SRCREV for 0.1.1
+SRCREV = "630d89068dc0a1e9199306d405cb32f892dfa4d3"
+SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 \
+ file://0001-desktop-file-Hide-the-keyboard-from-app-list.patch \
+ file://80matchboxkeyboard.sh"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig gettext gtk-immodules-cache distro_features_check
+
+# The libxft, libfakekey and matchbox-panel-2 requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "--disable-cairo"
+
+PACKAGECONFIG ??= "gtk3-im applet"
+PACKAGECONFIG[applet] = "--enable-applet,--disable-applet,matchbox-panel-2"
+PACKAGECONFIG[gtk2-im] = "--enable-gtk-im,--disable-gtk-im,gtk+"
+PACKAGECONFIG[gtk3-im] = "--enable-gtk3-im,--disable-gtk3-im,gtk+3"
+
+PACKAGES += "${PN}-im ${PN}-applet"
+
+FILES_${PN} = "${bindir}/ \
+ ${sysconfdir} \
+ ${datadir}/applications \
+ ${datadir}/pixmaps \
+ ${datadir}/matchbox-keyboard"
+
+FILES_${PN}-im = "${libdir}/gtk-2.0/*/immodules/*.so \
+ ${libdir}/gtk-3.0/*/immodules/*.so"
+
+FILES_${PN}-applet = "${libdir}/matchbox-panel/*.so"
+
+
+do_install_append () {
+ install -d ${D}/${sysconfdir}/X11/Xsession.d/
+ install -m 755 ${WORKDIR}/80matchboxkeyboard.sh ${D}/${sysconfdir}/X11/Xsession.d/
+
+ rm -f ${D}${libdir}/gtk-2.0/*/immodules/*.la
+ rm -f ${D}${libdir}/gtk-3.0/*/immodules/*.la
+ rm -f ${D}${libdir}/matchbox-panel/*.la
+}
+
+GTKIMMODULES_PACKAGES = "${PN}-im"
+
+RDEPENDS_${PN} = "formfactor dbus-wait"
+RRECOMMENDS_${PN} = "${PN}-applet"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
deleted file mode 100644
index eba1970ee..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "Matchbox virtual keyboard for X11"
-HOMEPAGE = "http://matchbox-project.org"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-SECTION = "x11"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
- file://src/matchbox-keyboard.h;endline=17;md5=9d6586c69e4a926f3cb0b4425f24ba3c \
- file://applet/applet.c;endline=18;md5=4a0f721724746b14d95b51ddd42b95e7"
-
-DEPENDS = "libfakekey expat libxft gtk+ matchbox-panel-2"
-
-SRCREV = "ebc330eac8b9d38e9aef9f01e7241c904bd01073"
-PV = "0.0+git${SRCPV}"
-PR = "r4"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 \
- file://0001-desktop-file-Hide-the-keyboard-from-app-list.patch \
- file://80matchboxkeyboard.sh"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig gettext gtk-immodules-cache distro_features_check
-
-# The libxft, libfakekey and matchbox-panel-2 requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-cairo --enable-gtk-im --enable-applet"
-
-PACKAGES += "${PN}-im ${PN}-applet"
-
-FILES_${PN} = "${bindir}/ \
- ${sysconfdir} \
- ${datadir}/applications \
- ${datadir}/pixmaps \
- ${datadir}/matchbox-keyboard"
-
-FILES_${PN}-im = "${libdir}/gtk-2.0/*/immodules/*.so"
-
-FILES_${PN}-applet = "${libdir}/matchbox-panel/*.so"
-
-
-do_install_append () {
- install -d ${D}/${sysconfdir}/X11/Xsession.d/
- install -m 755 ${WORKDIR}/80matchboxkeyboard.sh ${D}/${sysconfdir}/X11/Xsession.d/
-
- rm -f ${D}${libdir}/gtk-2.0/*/immodules/*.la
- rm -f ${D}${libdir}/matchbox-panel/*.la
-}
-
-GTKIMMODULES_PACKAGES = "${PN}-im"
-
-RDEPENDS_${PN} = "formfactor dbus-wait"
-RRECOMMENDS_${PN} = "${PN}-applet"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-applets-systray-Allow-icons-to-be-smaller.patch b/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-applets-systray-Allow-icons-to-be-smaller.patch
new file mode 100644
index 000000000..d13dd3d5a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-applets-systray-Allow-icons-to-be-smaller.patch
@@ -0,0 +1,34 @@
+From f83a9179696b2d060ee4860733dafbf38bbd4b87 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 28 Sep 2016 15:05:41 +0300
+Subject: [PATCH] applets/systray: Allow icons to be smaller
+
+Don't expand/fill the systray items, align them in the center of the
+systray panel. This makes sure the icons are drawn at the size they
+expect.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Submitted
+---
+ applets/systray/systray.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/applets/systray/systray.c b/applets/systray/systray.c
+index 39698a8..94a5753 100644
+--- a/applets/systray/systray.c
++++ b/applets/systray/systray.c
+@@ -29,8 +29,9 @@ on_realize (GtkWidget *widget, gpointer user_data)
+ tray = (GtkWidget *)na_tray_new_for_screen (screen, orientation);
+
+ gtk_widget_show (tray);
+-
+- gtk_container_add (GTK_CONTAINER (widget), tray);
++ gtk_widget_set_valign (tray, GTK_ALIGN_CENTER);
++ gtk_widget_set_halign (tray, GTK_ALIGN_CENTER);
++ gtk_box_pack_start (GTK_BOX (widget), tray, FALSE, FALSE, 0);
+ }
+
+ G_MODULE_EXPORT GtkWidget *
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-showdesktop-Make-sure-active-state-is-initialized.patch b/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-showdesktop-Make-sure-active-state-is-initialized.patch
deleted file mode 100644
index 3bab6d292..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-showdesktop-Make-sure-active-state-is-initialized.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From a0b5fca04da208990f3c40e65dbb045da4cdb35e Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sun, 20 Mar 2016 13:24:37 +0200
-Subject: [PATCH] showdesktop: Make sure active state is initialized
-
-There are cases (in qemu at least) where set_active()
-is never called on startup. Make sure we initialize the active
-state so the icon gets loaded and the applet is not confused
-about the current state.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-
-Upstream-Status: Backport
----
- applets/showdesktop/showdesktop.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/applets/showdesktop/showdesktop.c b/applets/showdesktop/showdesktop.c
-index 61dd5c2..33c13e1 100644
---- a/applets/showdesktop/showdesktop.c
-+++ b/applets/showdesktop/showdesktop.c
-@@ -181,6 +181,12 @@ button_clicked_cb (GtkButton *button,
- &xev);
- }
-
-+static void
-+realize_cb (GtkWidget *button, ShowDesktopApplet *applet)
-+{
-+ sync_applet (applet);
-+}
-+
- G_MODULE_EXPORT GtkWidget *
- mb_panel_applet_create (const char *id,
- GtkOrientation orientation)
-@@ -216,6 +222,10 @@ mb_panel_applet_create (const char *id,
- "clicked",
- G_CALLBACK (button_clicked_cb),
- applet);
-+ g_signal_connect (button,
-+ "realize",
-+ G_CALLBACK (realize_cb),
-+ applet);
-
- g_object_weak_ref (G_OBJECT (button),
- (GWeakNotify) show_desktop_applet_free,
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/silence-warnings.patch b/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/silence-warnings.patch
deleted file mode 100644
index 45ba9a031..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/silence-warnings.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-Don't warn if the machine doesn't actually have a battery, or if the applets
-string contains consecutive separators.
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/applets/battery/battery-acpi.c b/applets/battery/battery-acpi.c
-index 6515cb0..c44dd12 100644
---- a/applets/battery/battery-acpi.c
-+++ b/applets/battery/battery-acpi.c
-@@ -14,8 +14,6 @@ int batt_state, ac_state;
- int pm_support(void)
- {
- if(check_acpi_support() == NOT_SUPPORTED){
-- g_warning("No ACPI support\n");
--
- return 0;
- }
-
-@@ -32,8 +30,9 @@ const char* pm_battery_icon(void)
- const char *icon;
- battery_t *binfo;
-
-+ /* No battery available (not present, disabled, or something
-+ else. Silently do nothing. */
- if (batt_state != SUCCESS) {
-- g_warning("Couldnt initialize ACPI battery\n");
- return NULL;
- }
-
-diff --git a/applets/battery/battery-apm.c b/applets/battery/battery-apm.c
-index 5467438..2f39cb6 100644
---- a/applets/battery/battery-apm.c
-+++ b/applets/battery/battery-apm.c
-@@ -10,8 +10,6 @@
- int pm_support(void)
- {
- if (1 == apm_exists ()) {
-- g_warning ("No APM support");
--
- return 0;
- }
-
-diff --git a/matchbox-panel/mb-panel.c b/matchbox-panel/mb-panel.c
-index 2d8cafd..828a36d 100644
---- a/matchbox-panel/mb-panel.c
-+++ b/matchbox-panel/mb-panel.c
-@@ -110,10 +110,15 @@ load_applets (const char *applets_desc,
- applets = g_strsplit (applets_desc, ",", -1);
-
- for (i = 0; applets[i]; i++) {
-+ char *s;
- char **bits;
- GtkWidget *applet;
-
-- bits = g_strsplit (applets[i], ":", 2);
-+ s = applets[i];
-+ if (s == NULL || s[0] == '\0')
-+ continue;
-+
-+ bits = g_strsplit (s, ":", 2);
-
- applet = load_applet (bits[0],
- bits[1],
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb
new file mode 100644
index 000000000..d38e7f639
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_2.11.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Simple GTK+ based panel for handheld devices"
+HOMEPAGE = "http://matchbox-project.org"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://matchbox-panel/mb-panel.h;endline=10;md5=0b7db28f4b6863fb853d0467e590019a \
+ file://applets/startup/startup.c;endline=22;md5=7cbcea60b667f609495222faf3e07917"
+
+DEPENDS = "gnome-common gtk+3 startup-notification dbus dbus-glib dbus-glib-native"
+DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "libacpi", "",d)}"
+DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "apm", "apmd", "",d)}"
+
+# The startup-notification requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+# SRCREV tagged 2.11
+SRCREV = "850d5fffde7dbfb32015916524d88014cc2cfb30"
+
+RPROVIDES_${PN} = "matchbox-panel"
+RREPLACES_${PN} = "matchbox-panel"
+RCONFLICTS_${PN} = "matchbox-panel"
+
+SRC_URI = "git://git.yoctoproject.org/${BPN} \
+ file://0001-applets-systray-Allow-icons-to-be-smaller.patch \
+ "
+
+EXTRA_OECONF = "--enable-startup-notification --enable-dbus"
+EXTRA_OECONF += " ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "--with-battery=acpi", "",d)}"
+EXTRA_OECONF += " ${@bb.utils.contains("MACHINE_FEATURES", "apm", "--with-battery=apm", "",d)}"
+
+S = "${WORKDIR}/git"
+
+FILES_${PN} += "${libdir}/matchbox-panel/*.so \
+ ${datadir}/matchbox-panel/brightness/*.png \
+ ${datadir}/matchbox-panel/startup/*.png \
+ ${datadir}/icons/"
+FILES_${PN}-dev += "${libdir}/matchbox-panel/*.la"
+
+inherit autotools pkgconfig distro_features_check
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_git.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_git.bb
deleted file mode 100644
index 98c3ae487..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_git.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Simple GTK+ based panel for handheld devices"
-HOMEPAGE = "http://matchbox-project.org"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://matchbox-panel/mb-panel.h;endline=10;md5=0b7db28f4b6863fb853d0467e590019a \
- file://applets/startup/startup.c;endline=22;md5=b0a64fbef3097d79f8264e6907a98f03"
-
-DEPENDS = "gnome-common gtk+ startup-notification dbus dbus-glib"
-DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "libacpi", "",d)}"
-DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "apm", "apmd", "",d)}"
-
-# The startup-notification requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRCREV = "26a3a67b41c50e0ae163d8fe86ccf7a0f0a671ae"
-PV = "2.0+git${SRCPV}"
-
-RPROVIDES_${PN} = "matchbox-panel"
-RREPLACES_${PN} = "matchbox-panel"
-RCONFLICTS_${PN} = "matchbox-panel"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN} \
- file://0001-showdesktop-Make-sure-active-state-is-initialized.patch \
- file://silence-warnings.patch"
-
-EXTRA_OECONF = "--enable-startup-notification --enable-dbus"
-EXTRA_OECONF += " ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "--with-battery=acpi", "",d)}"
-EXTRA_OECONF += " ${@bb.utils.contains("MACHINE_FEATURES", "apm", "--with-battery=apm", "",d)}"
-
-S = "${WORKDIR}/git"
-
-FILES_${PN} += "${libdir}/matchbox-panel/*.so \
- ${datadir}/matchbox-panel/brightness/*.png \
- ${datadir}/matchbox-panel/startup/*.png "
-FILES_${PN}-dev += "${libdir}/matchbox-panel/*.la"
-
-inherit autotools pkgconfig distro_features_check
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato/index.theme b/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato/index.theme
new file mode 100644
index 000000000..c9260cfd8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato/index.theme
@@ -0,0 +1,7 @@
+[X-GNOME-Metatheme]
+Encoding=UTF-8
+Type=X-GNOME-Metatheme
+Name=Sato
+GtkTheme=Adwaita
+IconTheme=Sato
+MatchboxTheme=Sato
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato/session b/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato/session
index 42ce483d3..f6313bdeb 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato/session
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato/session
@@ -14,11 +14,6 @@ else
KEYBOARD_APPLET="keyboard"
fi
-# Tell GTK+3 we really want server side decorations, even with
-# GtkHeaderBar using applications: Without that mb-panel will render
-# on top of the client side decorations.
-export GTK_CSD=0
-
matchbox-desktop &
# Lines containing feature-[foo] are removed at build time if the machine
@@ -28,6 +23,6 @@ START_APPLETS=showdesktop,windowselector
END_APPLETS=clock,battery,$KEYBOARD_APPLET,systray,startup-notify,notify
END_APPLETS=openmoko-panel-gsm,$END_APPLETS # feature-phone
-matchbox-panel --titlebar --start-applets $START_APPLETS --end-applets $END_APPLETS &
+matchbox-panel --start-applets $START_APPLETS --end-applets $END_APPLETS &
-exec matchbox-window-manager -theme Sato -use_desktop_mode decorated -use_cursor $SHOWCURSOR $@
+exec matchbox-window-manager -theme Sato -use_cursor $SHOWCURSOR $@
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
index 76de18ae9..42c742fca 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://session;endline=3;md5=f8a5c5b9c279e52dc094d10e11c2be6
SECTION = "x11"
DEPENDS = "gconf-native"
-RDEPENDS_${PN} = "formfactor gtk-sato-engine matchbox-theme-sato gtk-theme-sato matchbox-panel-2 matchbox-desktop-sato matchbox-session gconf"
+RDEPENDS_${PN} = "formfactor matchbox-theme-sato matchbox-panel-2 matchbox-desktop matchbox-session gconf"
PR = "r30"
# This package is architecture specific because the session script is modified
@@ -19,9 +19,12 @@ inherit distro_features_check
# The matchbox-theme-sato requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
-SRC_URI = "file://session"
+SRC_URI = "file://session \
+ file://index.theme"
S = "${WORKDIR}"
+FILES_${PN} += "${datadir}/themes/Sato/index.theme"
+
do_install() {
# This is the set of machine features that the script has markers for
FEATURES="phone"
@@ -34,6 +37,7 @@ do_install() {
fi
done
+ install -D ${S}/index.theme ${D}/${datadir}/themes/Sato/index.theme
install -d ${D}/${sysconfdir}/matchbox
sed -f "$SCRIPT" ${S}/session > ${D}/${sysconfdir}/matchbox/session
chmod +x ${D}/${sysconfdir}/matchbox/session
@@ -44,7 +48,8 @@ pkg_postinst_${PN} () {
#type, name, value
gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type $1 --set /desktop/poky/interface/$2 "$3"
}
- set_value string theme Sato
+ set_value string theme Adwaita
+ set_value string matchbox_theme Sato
set_value string icon_theme Sato
set_value bool touchscreen true
set_value string font_name "Sans 9"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.1.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.1.bb
new file mode 100644
index 000000000..4488191b2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_0.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Lightweight GTK+ terminal application"
+HOMEPAGE = "http://www.matchbox-project.org/"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://main.c;endline=20;md5=96e39176d9e355639a0b8b1c7a840820"
+
+DEPENDS = "gtk+3 vte"
+SECTION = "x11/utils"
+
+#SRCREV tagged 0.1
+SRCREV = "3ad357db2302760b8a8817b5f4478dd87479442f"
+SRC_URI = "git://git.yoctoproject.org/${BPN}"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_git.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_git.bb
deleted file mode 100644
index c8cbd57a6..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-terminal/matchbox-terminal_git.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Lightweight GTK+ terminal application"
-HOMEPAGE = "http://www.matchbox-project.org/"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://main.c;endline=20;md5=96e39176d9e355639a0b8b1c7a840820"
-
-DEPENDS = "gtk+ vte"
-SECTION = "x11/utils"
-SRCREV = "452bca253492a97a587f440289b9ab27d217353e"
-PV = "0.0+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN}"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_0.1.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_0.1.bb
deleted file mode 100644
index f6786dda5..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_0.1.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require matchbox-theme-sato.inc
-
-PR = "r1"
-
-SRC_URI = "http://pokylinux.org/releases/sato/matchbox-theme-sato-0.1.tar.gz"
-
-SRC_URI[md5sum] = "72ae272ef7803141a3dcb69e670cff97"
-SRC_URI[sha256sum] = "5b59f9646edbfb907a309332db3bd6fa7080dc1fe24df549480cfae7d974a3fb"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_0.2.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_0.2.bb
new file mode 100644
index 000000000..7a043d344
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_0.2.bb
@@ -0,0 +1,8 @@
+require matchbox-theme-sato.inc
+
+# SRCREV tagged 0.2
+SRCREV = "df085ba9cdaeaf2956890b0e29d7ea1779bf6c78"
+SRC_URI = "git://git.yoctoproject.org/matchbox-sato"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_git.bb b/import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_git.bb
deleted file mode 100644
index 0d3569de9..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_git.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require matchbox-theme-sato.inc
-
-SRCREV = "f72cf4ed7d71ad9e47b0f2d3dbc593bc2f3e76f8"
-PV = "0.2+git${SRCPV}"
-
-DEFAULT_PREFERENCE = "-1"
-
-SRC_URI = "git://git.yoctoproject.org/matchbox-sato"
-
-EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'qvga', '--with-mode=qvga', '',d)}"
-
-S = "${WORKDIR}/git"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
index 8ba49231d..6fb1b678f 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
@@ -3,7 +3,6 @@
#
SUMMARY = "Sato desktop"
-LICENSE = "MIT"
PR = "r33"
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -31,9 +30,8 @@ RDEPENDS_${PN}-base = "\
matchbox-keyboard-im \
matchbox-config-gtk \
xcursor-transparent-theme \
- sato-icon-theme \
+ adwaita-icon-theme \
settings-daemon \
- gtk-sato-engine \
shutdown-desktop \
libsdl \
${NETWORK_MANAGER} \
@@ -48,8 +46,8 @@ WEB ?= ""
SUMMARY_${PN}-apps = "Sato desktop - applications"
RDEPENDS_${PN}-apps = "\
- leafpad \
- gst-player-bin \
+ l3afpad \
+ gst-player \
matchbox-terminal \
sato-screenshot \
${FILEMANAGER} \
@@ -58,5 +56,5 @@ RDEPENDS_${PN}-apps = "\
SUMMARY_${PN}-games = "Sato desktop - games"
RDEPENDS_${PN}-games = "\
- oh-puzzles \
+ puzzles \
"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb b/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb
index a6b0aacd2..a6bf2136e 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb
@@ -7,8 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://src/gseal-gtk-compat.h;endline=21;md5=46922c8691f58d124f9420fe16149ce2"
SECTION = "x11"
-DEPENDS = "gtk+ startup-notification libfm intltool-native gettext-native"
-DEPENDS_append_poky = " libowl"
+DEPENDS = "gtk+3 startup-notification libfm intltool-native gettext-native"
COMPATIBLE_HOST = '(x86_64.*|i.86.*|aarch64.*|arm.*|mips.*|powerpc.*|sh.*)-(linux|freebsd.*)'
@@ -30,6 +29,8 @@ inherit autotools pkgconfig distro_features_check
# The startup-notification requires x11 in DISTRO_FEATURES
REQUIRED_DISTRO_FEATURES = "x11"
+EXTRA_OECONF = "--with-gtk=3"
+
do_install_append () {
install -d ${D}/${datadir}
install -d ${D}/${datadir}/pixmaps/
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch b/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch
deleted file mode 100644
index 7e2c3ab75..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/puzzles/files/oh-puzzles-owl-menu.patch
+++ /dev/null
@@ -1,203 +0,0 @@
-This patch enable owl menu, which is hidden in the title bar to save space on
-small screen. It has not been used for a long time, rebase needed.
-
-Upstream-Status: Inappropriate [enable feature]
-
-Index: src/gtk.c
-===================================================================
---- src/gtk.c (revision 22)
-+++ src/gtk.c (working copy)
-@@ -28,6 +28,8 @@
- #include <gdk/gdkx.h>
- #include <gdk-pixbuf/gdk-pixbuf.h>
-
-+#include <libowl/owlwindowmenu.h>
-+
- #include <librsvg/rsvg.h>
-
- #include <X11/Xlib.h>
-@@ -1237,6 +1239,7 @@
- }
- }
-
-+#if 0
- static void
- add_widget (GtkUIManager *merge,
- GtkWidget *widget,
-@@ -1247,10 +1250,11 @@
- gtk_box_pack_start (box, widget, FALSE, FALSE, 0);
-
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (box));
-- gtk_widget_show_all (toplevel);
- }
-+#endif
-
- static GtkActionEntry toplevel_actions[] = {
-+ { "Top", NULL, "" },
- { "Game", NULL, N_("Game") },
- { "Settings", NULL, N_("Settings") },
- { "Help", NULL, N_("Help") },
-@@ -1303,11 +1307,13 @@
- frontend *fe)
- {
- GString *xml;
-+ GError *error = NULL;
- gboolean presets = FALSE;
- GSList *radio_group = NULL;
- int i;
-
-- xml = g_string_new ("<ui><menubar><placeholder name=\"TypePlaceholder\">"
-+ xml = g_string_new ("<ui><menubar><menu name=\"TopMenu\" action=\"Top\">"
-+ "<placeholder name=\"TypePlaceholder\">"
- "<menu name=\"SettingsMenu\" action=\"Settings\">");
-
- for (i = 0; i < midend_num_presets(fe->me); i++) {
-@@ -1359,8 +1365,14 @@
- "<menuitem name=\"CustomMenu\" action=\"Custom\"/>");
- }
-
-- g_string_append (xml, "</menu></placeholder></menubar></ui>");
-- gtk_ui_manager_add_ui_from_string (merge, xml->str, -1, NULL);
-+ g_string_append (xml, "</menu></placeholder></menu></menubar></ui>");
-+
-+ gtk_ui_manager_add_ui_from_string (merge, xml->str, -1, &error);
-+ if (error != NULL) {
-+ g_warning ("Error adding custom: %s", error->message);
-+ g_error_free (error);
-+ }
-+
- g_string_free (xml, TRUE);
- }
-
-@@ -1434,6 +1446,7 @@
- new_window(char *arg, char **error)
- {
- frontend *fe;
-+ GError *err = NULL;
- GtkBox *vbox;
- GtkUIManager *merge;
- GtkActionGroup *actions;
-@@ -1496,8 +1509,6 @@
- gtk_window_add_accel_group(GTK_WINDOW(fe->window), fe->accelgroup);
-
- merge = gtk_ui_manager_new ();
-- g_signal_connect (G_OBJECT (merge), "add_widget",
-- G_CALLBACK (add_widget), vbox);
-
- actions = gtk_action_group_new ("PuzzleActions");
- gtk_action_group_add_actions (actions, toplevel_actions,
-@@ -1509,22 +1520,39 @@
-
- gtk_ui_manager_insert_action_group (merge, actions, 0);
-
-- gtk_ui_manager_add_ui_from_file (merge, DATADIR "/oh-puzzles/ui/menu.xml", NULL);
-+ gtk_ui_manager_add_ui_from_file (merge, DATADIR "/oh-puzzles/ui/menu.xml",
-+ &err);
-+ if (err != NULL) {
-+ g_warning ("Error making UI: %s", err->message);
-+ g_error_free (err);
-+ err = NULL;
-+ }
-
- if (thegame.can_solve) {
-- char *str = "<ui><menubar><menu name=\"GameMenu\" action=\"Game\">"
-+ char *str = "<ui><menubar><menu name=\"TopMenu\" action=\"Top\">"
-+ "<menu name=\"GameMenu\" action=\"Game\">"
- "<placeholder name=\"SolvePlaceholder\">"
- "<separator name=\"SolveSep\"/>"
- "<menuitem name=\"SolveMenu\" action=\"Solve\"/>"
-- "</placeholder></menu></menubar></ui>";
-+ "</placeholder></menu></menu></menubar></ui>";
-
-- gtk_ui_manager_add_ui_from_string (merge, str, -1, NULL);
-+ gtk_ui_manager_add_ui_from_string (merge, str, -1, &err);
-+ if (err != NULL) {
-+ g_warning ("Error adding solve. %s", err->message);
-+ g_error_free (err);
-+ }
- }
-
- if ((n = midend_num_presets(fe->me)) > 0 || thegame.can_configure) {
- generate_settings_menu (merge, actions, fe);
- }
-
-+ /* Do this so that the menu is packed now instead of in the idle loop */
-+ gtk_ui_manager_ensure_update (merge);
-+
-+ owl_set_window_menu_item (GTK_WINDOW (fe->window),
-+ GTK_MENU_ITEM (gtk_ui_manager_get_widget (merge, "/menubar/TopMenu")));
-+
- setup_colours (fe);
- setup_pixbufs (fe);
-
-@@ -1572,7 +1600,7 @@
- GDK_BUTTON_RELEASE_MASK |
- GDK_BUTTON_MOTION_MASK);
-
-- /* The window is shown once the menubar has been added */
-+ gtk_widget_show_all (fe->window);
- return fe;
- }
-
-Index: src/menu.xml
-===================================================================
---- src/menu.xml (revision 22)
-+++ src/menu.xml (working copy)
-@@ -1,26 +1,25 @@
- <ui>
- <menubar>
--<menu name="GameMenu" action="Game">
-- <menuitem name="NewMenu" action="New"/>
-- <menuitem name="RestartMenu" action="Restart"/>
--<!-- <menuitem name="SpecificMenu" action="Specific"/> -->
-- <menuitem name="RandomMenu" action="Random"/>
-- <separator name="GameSep1"/>
-- <menuitem name="LoadMenu" action="Load"/>
-- <menuitem name="SaveMenu" action="Save"/>
-- <separator name="GameSep2"/>
-- <menuitem name="UndoMenu" action="Undo"/>
-- <menuitem name="RedoMenu" action="Redo"/>
-- <placeholder name="CopyPlaceholder"/>
-- <placeholder name="SolvePlaceholder"/>
-- <separator name="GameSep3"/>
-- <menuitem name="QuitMenu" action="Quit"/>
--</menu>
-+<menu name="TopMenu" action="Top">
-+ <menu name="GameMenu" action="Game">
-+ <menuitem name="NewMenu" action="New"/>
-+ <menuitem name="RestartMenu" action="Restart"/>
-+ <!-- <menuitem name="SpecificMenu" action="Specific"/> -->
-+ <menuitem name="RandomMenu" action="Random"/>
-+ <separator name="GameSep1"/>
-+ <menuitem name="LoadMenu" action="Load"/>
-+ <menuitem name="SaveMenu" action="Save"/>
-+ <separator name="GameSep2"/>
-+ <menuitem name="UndoMenu" action="Undo"/>
-+ <menuitem name="RedoMenu" action="Redo"/>
-+ <placeholder name="CopyPlaceholder"/>
-+ <placeholder name="SolvePlaceholder"/>
-+ </menu>
-
--<placeholder name="TypePlaceholder"/>
--
--<menu name="HelpMenu" action="Help">
-+ <placeholder name="TypePlaceholder"/>
- <menuitem name="AboutMenu" action="About"/>
-+ <menuitem name="QuitMenu" action="Quit"/>
-+
- </menu>
- </menubar>
- </ui>
-Index: src/Makefile.am
-===================================================================
---- src/Makefile.am (revision 22)
-+++ src/Makefile.am (working copy)
-@@ -10,7 +10,7 @@
- lightup loopy map mines net netslide pattern pegs rect samegame \
- sixteen slant solo tents twiddle untangle
-
--libpuzzles_la_LIBADD = $(PUZZLES_LIBS)
-+libpuzzles_la_LIBADD = $(PUZZLES_LIBS) -lowl
- libpuzzles_la_SOURCES = combi.c \
- configuration.c \
- drawing.c \
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb b/import-layers/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb
deleted file mode 100644
index dfa68a659..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb
+++ /dev/null
@@ -1,73 +0,0 @@
-SUMMARY = "Portable Puzzle Collection"
-HOMEPAGE = "http://o-hand.com/"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=f56ec6772dd1c7c367067bbea8ea1675 \
- file://src/tree234.h;endline=28;md5=a188e6d250430ca094a54a82f48472a7 \
- file://src/tree234.c;endline=28;md5=b4feb1976feebf8f1379093ed52f2945"
-
-SECTION = "x11"
-DEPENDS = "gtk+ gconf intltool-native librsvg gettext-native"
-
-# libowl requires x11 in DISTRO_FEATURES
-DEPENDS_append_poky = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libowl', '', d)}"
-
-# Requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRCREV = "92f1a20e4b72eed7a35b00984d9793b51dc2fb3b"
-PV = "0.2+git${SRCPV}"
-PR = "r10"
-
-SRC_URI = "git://git.yoctoproject.org/${BPN}"
-SRC_URI_append_poky = " file://oh-puzzles-owl-menu.patch;striplevel=0 "
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-bindir = "/usr/games"
-
-EXTRA_OEMAKE += "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1"
-
-do_install_append () {
- install -d ${D}/${datadir}/applications/
-
- cd ${D}/${prefix}/games
- for prog in *; do
- if [ -x $prog ]; then
- # Convert prog to Title Case
- title=$(echo $prog | sed 's/\(^\| \)./\U&/g')
- echo "making ${D}/${datadir}/applications/$prog.desktop"
- cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
-[Desktop Entry]
-Name=$title
-Exec=${prefix}/games/$prog
-Icon=applications-games
-Terminal=false
-Type=Application
-Categories=Game;
-StartupNotify=true
-X-MB-SingleInstance=true
-Comment=Play $title.
-STOP
- fi
- done
-}
-
-PACKAGES += "${PN}-extra"
-RDEPENDS_${PN}-extra += "oh-puzzles"
-
-FILES_${PN} = "/usr/share/pixmaps /usr/share/oh-puzzles/"
-FILES_${PN}-extra = "/usr/games/ /usr/share/applications /etc/gconf/schemas"
-
-python __anonymous () {
- var = bb.data.expand("FILES_${PN}", d, 1)
- data = d.getVar(var, True)
- for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"):
- data = data + " /usr/games/%s" % name
- data = data + " /usr/share/applications/%s.desktop" % name
- data = data + " /etc/gconf/schemas/%s.schemas" % name
- d.setVar(var, data)
-}
diff --git a/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb b/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
index 346f43bc9..20b98891b 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -21,45 +21,54 @@ PV = "0.0+git${SRCPV}"
S = "${WORKDIR}/git"
-inherit autotools-brokensep distro_features_check pkgconfig
+inherit autotools distro_features_check pkgconfig
-PACKAGECONFIG ??= "gtk2"
+CFLAGS_append = " -Wno-deprecated-declarations"
+
+PACKAGECONFIG ??= "gtk3"
PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+,"
PACKAGECONFIG[gtk3] = "--with-gtk=3,,gtk+3,"
+PACKAGES += "${PN}-extra"
+FILES_${PN} = ""
+FILES_${PN}-extra = "${prefix}/bin ${datadir}/applications"
+
+python __anonymous () {
+ var = d.expand("FILES_${PN}")
+ data = d.getVar(var, False)
+ for name in ("bridges", "fifteen", "inertia", "map", "samegame", "slant"):
+ data = data + " ${bindir}/%s" % name
+ data = data + " ${datadir}/applications/%s.desktop" % name
+ d.setVar(var, data)
+}
+
do_configure_prepend () {
+ cd ${S}
./mkfiles.pl
+ cd ${B}
}
-FILES_${PN} = "${prefix}/bin/* ${datadir}/applications/*"
-
-do_install () {
- rm -rf ${D}/*
- export prefix=${D}
- export DESTDIR=${D}
- install -d ${D}/${prefix}/bin/
- oe_runmake install
-
-
- install -d ${D}/${datadir}/applications/
+do_install_append () {
+ # net conflicts with Samba, so rename it
+ mv ${D}${bindir}/net ${D}${bindir}/puzzles-net
# Create desktop shortcuts
+ install -d ${D}/${datadir}/applications/
cd ${D}/${prefix}/bin
for prog in *; do
if [ -x $prog ]; then
# Convert prog to Title Case
- title=$(echo $prog | sed 's/\(^\| \)./\U&/g')
+ title=$(echo $prog | sed 's/puzzles-//' | sed 's/\(^\| \)./\U&/g')
echo "making ${D}/${datadir}/applications/$prog.desktop"
cat <<STOP > ${D}/${datadir}/applications/$prog.desktop
[Desktop Entry]
Name=$title
-Exec=${prefix}/bin/$prog
+Exec=${bindir}/$prog
Icon=applications-games
Terminal=false
Type=Application
Categories=Game;
StartupNotify=true
-X-MB-SingleInstance=true
STOP
fi
done
diff --git a/import-layers/yocto-poky/meta/recipes-sato/sato-icon-theme/sato-icon-theme/0001-Inherit-the-GNOME-icon-theme.patch b/import-layers/yocto-poky/meta/recipes-sato/sato-icon-theme/sato-icon-theme/0001-Inherit-the-GNOME-icon-theme.patch
deleted file mode 100644
index 2c176ee90..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/sato-icon-theme/sato-icon-theme/0001-Inherit-the-GNOME-icon-theme.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From b9f02989310a3c920589f1aa646bcbf16b2572a0 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 13 Jun 2012 11:07:33 +0100
-Subject: [PATCH] Inherit the GNOME icon theme
-
-If the GNOME icon theme isn't installed this is a no-op, but if it is then
-you'll get fallback from Sato to GNOME for icons that are not in Sato.
-
-As applications that use the full GNOME icon theme depend on gnome-icon-theme,
-this just works.
-
-Upstream-Status: Backport
----
- index.theme | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/index.theme b/index.theme
-index c4b03a7..688fbbf 100644
---- a/index.theme
-+++ b/index.theme
-@@ -1,6 +1,7 @@
- [Icon Theme]
- Name=Sato
- Comment=Sato icon theme
-+Inherits=Adwaita
-
- Directories=16x16/apps,16x16/status,16x16/stock,16x16/places,16x16/mimetypes,16x16/devices,16x16/actions,22x22/apps,22x22/status,22x22/stock,22x22/places,22x22/mimetypes,22x22/devices,22x22/actions,32x32/apps,32x32/status,32x32/stock,32x32/places,32x32/mimetypes,32x32/devices,32x32/actions,48x48/apps,48x48/status,48x48/stock,48x48/places,48x48/mimetypes,48x48/devices,48x48/actions,64x64/apps,64x64/status,64x64/stock,64x64/places,64x64/mimetypes,64x64/devices,64x64/actions,
-
---
-1.7.10
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb b/import-layers/yocto-poky/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb
deleted file mode 100644
index ced735f00..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/sato-icon-theme/sato-icon-theme_0.4.1.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Sato icon theme"
-HOMEPAGE = "http://www.o-hand.com"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "CC-BY-SA-3.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=56a830bbe6e4697fe6cbbae01bb7c2b2"
-SECTION = "x11"
-
-PR = "r6"
-
-DEPENDS = "icon-naming-utils-native libxml-simple-perl-native"
-
-SRC_URI = "http://pokylinux.org/releases/sato/${BPN}-${PV}.tar.gz \
- file://0001-Inherit-the-GNOME-icon-theme.patch"
-
-SRC_URI[md5sum] = "86a847f3128a43a9cf23b7029a656f50"
-SRC_URI[sha256sum] = "0b0a2807a6a96918ac799a86094ec3e8e2c892be0fd679a4232c2a77f2f61732"
-
-inherit autotools pkgconfig allarch gtk-icon-cache perlnative
-
-# The configure script uses pkg-config to find native binaries to execute, so
-# tell it to use our pkg-config-native wrapper.
-export PKG_CONFIG = "pkg-config-native"
-
-FILES_${PN} += "${datadir}/icons/Sato"
-
-do_install_append() {
- find ${D}${datadir}/icons/Sato/ -maxdepth 1 -type d -exec ln -s preferences-system.png {}/apps/preferences-desktop.png \;
- find ${D}${datadir}/icons/Sato/ -maxdepth 1 -type d -exec ln -s file-manager.png {}/apps/system-file-manager.png \;
- find ${D}${datadir}/icons/Sato/ -maxdepth 1 -type d -exec ln -s ../apps/terminal.png {}/places/computer.png \;
-}
-
-# Explictly setting "Sato" as the default icon theme to avoid flickering from
-# the desktop and settings daemon racing. This shouldn't be done here but in the sato image
-pkg_postinst_${PN} () {
- mkdir -p $D/etc/gtk-2.0
-
- grep -s -q -e ^gtk-icon-theme-name.*\"Sato\" $D/etc/gtk-2.0/gtkrc || \
- echo 'gtk-icon-theme-name = "Sato"' >> $D/etc/gtk-2.0/gtkrc
-}
diff --git a/import-layers/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb b/import-layers/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb
new file mode 100644
index 000000000..f3305aef7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_0.3.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Ultra-simple screen capture utility, aimed at handheld devices"
+HOMEPAGE = "http://www.o-hand.com"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://main.c;endline=9;md5=023e14d6404d0a961eb97cbd011fc141 \
+ file://screenshot-ui.h;endline=9;md5=638d9ffa83e9325a36df224166ed6ad0"
+
+DEPENDS = "matchbox-panel-2 gtk+3"
+
+# SRCREV tagged 0.3
+SRCREV = "9250fa5a012d84ff45984e8c4345ee7635227756"
+SRC_URI = "git://git.yoctoproject.org/screenshot"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig distro_features_check
+
+FILES_${PN} += "${libdir}/matchbox-panel/*.so"
+
+do_install_append () {
+ rm ${D}${libdir}/matchbox-panel/*.la
+}
+
+# The matchbox-panel-2 requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_git.bb b/import-layers/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_git.bb
deleted file mode 100644
index 1b2b65dfc..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_git.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Ultra-simple screen capture utility, aimed at handheld devices"
-HOMEPAGE = "http://www.o-hand.com"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://main.c;endline=9;md5=023e14d6404d0a961eb97cbd011fc141 \
- file://screenshot-ui.h;endline=9;md5=638d9ffa83e9325a36df224166ed6ad0"
-
-DEPENDS = "matchbox-panel-2"
-SRCREV = "3a9688e8a01b63a78f402b4e7c0b8b005fcdfa29"
-PV = "0.1+git${SRCPV}"
-PR = "r2"
-
-SRC_URI = "git://git.yoctoproject.org/screenshot"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-
-FILES_${PN} += "${libdir}/matchbox-panel/*.so"
-
-do_install_append () {
- rm ${D}${libdir}/matchbox-panel/*.la
-}
-
-# The matchbox-panel-2 requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/files/dso_linking_change_build_fix.patch b/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/files/dso_linking_change_build_fix.patch
deleted file mode 100644
index 594374467..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/files/dso_linking_change_build_fix.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-after gcc linking has changed, all the libraries must be explicitely specified to for linking.
-This patch avoids this linking error:
-
-| make all-am^M
-| make[1]: Entering directory `/disk0/pokybuild/build1/tmp/work/i586-poky-linux/settings-daemon-0.0+svnr2059-r3/settings-daemon'^M
-| ccache i586-poky-linux-gcc -march=i586 --sysroot=/disk0/pokybuild/build1/tmp/sysroots/i586-poky-linux -Wall -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o settings-daemon settings_daemon-xsettings-common.o settings_daemon-xsettings-manager.o settings_daemon-settings-daemon.o -pthread -lgconf-2 -ldbus-glib-1 -ldbus-1 -lpthread -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0^M
-| /disk0/pokybuild/build1/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: *^A: invalid DSO for symbol `XCreateSimpleWindow' definition^M
-| /disk0/pokybuild/build1/tmp/sysroots/i586-poky-linux/usr/lib/libX11.so.6: could not read symbols: Bad value^M
-| collect2: ld returned 1 exit status^M
-| make[1]: *** [settings-daemon] Error 1^M
-| make[1]: Leaving directory `/disk0/pokybuild/build1/tmp/work/i586-poky-linux/settings-daemon-0.0+svnr2059-r3/settings-daemon'^M
-| make: *** [all] Error 2^M
-
-Nitin A Kamble <nitin.a.kamble@intel.com>
-Date: 2011/01/11
-
-Index: settings-daemon/configure.ac
-===================================================================
---- settings-daemon.orig/configure.ac
-+++ settings-daemon/configure.ac
-@@ -14,7 +14,7 @@ AC_PROG_CC
-
-
- dnl TODO: make gconf optional
--PKG_CHECK_MODULES(APP, [gconf-2.0 gdk-x11-2.0])
-+PKG_CHECK_MODULES(APP, [gconf-2.0 gdk-x11-2.0 x11])
-
-
- AC_SUBST(APP_CFLAGS)
diff --git a/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb b/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
new file mode 100644
index 000000000..ceaeccaaa
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_0.0.2.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Provides a bridge between gconf and xsettings"
+HOMEPAGE = "http://svn.o-hand.com/view/matchbox/trunk/settings-daemon/"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+LICENSE = "MIT-style"
+LIC_FILES_CHKSUM = "file://xsettings-manager.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b \
+ file://xsettings-common.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b"
+DEPENDS = "gconf glib-2.0 gtk+3"
+SECTION = "x11"
+
+# SRCREV tagged 0.0.2
+SRCREV = "b2e5da502f8c5ff75e9e6da771372ef8e40fd9a2"
+SRC_URI = "git://git.yoctoproject.org/xsettings-daemon \
+ file://addsoundkeys.patch;apply=yes \
+ file://70settings-daemon.sh \
+ "
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig gconf distro_features_check
+
+FILES_${PN} = "${bindir}/* ${sysconfdir}"
+
+# Requires gdk-x11-2.0 which is provided by gtk when x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+do_install_append () {
+ install -d ${D}/${sysconfdir}/X11/Xsession.d
+ install -m 755 ${WORKDIR}/70settings-daemon.sh ${D}/${sysconfdir}/X11/Xsession.d/
+}
diff --git a/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_git.bb b/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_git.bb
deleted file mode 100644
index c0615530a..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/settings-daemon/settings-daemon_git.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Provides a bridge between gconf and xsettings"
-HOMEPAGE = "http://svn.o-hand.com/view/matchbox/trunk/settings-daemon/"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-LICENSE = "MIT-style"
-LIC_FILES_CHKSUM = "file://xsettings-manager.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b \
- file://xsettings-common.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b"
-DEPENDS = "gconf glib-2.0 gtk+"
-SECTION = "x11"
-SRCREV = "9a99528b02255450db81176abd9bbcc1dab9a4c1"
-PV = "0.0+git${SRCPV}"
-
-
-SRC_URI = "git://git.yoctoproject.org/xsettings-daemon \
- file://addsoundkeys.patch;apply=yes \
- file://70settings-daemon.sh \
- file://dso_linking_change_build_fix.patch"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig gconf distro_features_check
-
-FILES_${PN} = "${bindir}/* ${sysconfdir}"
-
-# Requires gdk-x11-2.0 which is provided by gtk when x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-do_install_append () {
- install -d ${D}/${sysconfdir}/X11/Xsession.d
- install -m 755 ${WORKDIR}/70settings-daemon.sh ${D}/${sysconfdir}/X11/Xsession.d/
-}
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch
new file mode 100644
index 000000000..615fe4f40
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch
@@ -0,0 +1,48 @@
+From 5760d346b42807b596f479c81f7a6b42eb36065e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 29 Aug 2016 16:38:11 +0300
+Subject: [PATCH] Fix racy parallel build of WebKit2-4.0.gir
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Source/WebKit2/PlatformGTK.cmake | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
+index adaa010..f18cf8a 100644
+--- a/Source/WebKit2/PlatformGTK.cmake
++++ b/Source/WebKit2/PlatformGTK.cmake
+@@ -906,8 +906,9 @@ endif ()
+ string(REGEX MATCHALL "-L[^ ]*"
+ INTROSPECTION_ADDITIONAL_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+
+-add_custom_command(
+- OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
++# This is a target and not a command because it's used to build another .gir
++# and a .typelib, which would trigger two racy parallel builds when using command
++add_custom_target(WebKit2-${WEBKITGTK_API_VERSION}-gir
+ DEPENDS WebKit2
+ DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
+@@ -950,7 +951,7 @@ add_custom_command(
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
+ DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+- DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
++ DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir
+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS}
+ LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
+ ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+@@ -1004,7 +1005,7 @@ add_custom_command(
+
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
+- DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
++ DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir
+ COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib
+ )
+
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch
index 3d004db29..93a69c029 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch
@@ -13,11 +13,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Source/cmake/OptionsGTK.cmake | 6 ------
1 file changed, 6 deletions(-)
-diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
-index e5f1f5b..4698036 100644
---- a/Source/cmake/OptionsGTK.cmake
-+++ b/Source/cmake/OptionsGTK.cmake
-@@ -443,12 +443,6 @@ if (USE_LIBHYPHEN)
+Index: webkitgtk-2.12.1/Source/cmake/OptionsGTK.cmake
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/cmake/OptionsGTK.cmake
++++ webkitgtk-2.12.1/Source/cmake/OptionsGTK.cmake
+@@ -424,12 +424,6 @@ if (USE_LIBHYPHEN)
endif ()
endif ()
@@ -27,9 +27,6 @@ index e5f1f5b..4698036 100644
- set(ENABLE_INTROSPECTION OFF)
-endif ()
-
- set(DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR ${DERIVED_SOURCES_DIR}/webkitdom)
- set(DERIVED_SOURCES_WEBKITGTK_DIR ${DERIVED_SOURCES_DIR}/webkitgtk)
- set(DERIVED_SOURCES_WEBKITGTK_API_DIR ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkit)
---
-2.7.0
-
+ # Override the cached variable, gtk-doc does not really work when building on Mac.
+ if (APPLE)
+ set(ENABLE_GTKDOC OFF)
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch
new file mode 100644
index 000000000..586dd2375
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch
@@ -0,0 +1,49 @@
+From 4eeeaec775e190cf3f5885d7c6717acebd0201a8 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 11 Aug 2016 17:13:51 +0300
+Subject: [PATCH] Tweak gtkdoc settings so that gtkdoc generation works under
+ OpenEmbedded build system
+
+This requires setting a few environment variables so that the transient
+binary is build and linked correctly, and disabling the tweaks to RUN
+variable from gtkdoc.py script so that our qemu wrapper is taken into use.
+
+Upstream-Status: Inappropriate [oe-specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Source/PlatformGTK.cmake | 2 +-
+ Tools/gtk/gtkdoc.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Source/PlatformGTK.cmake b/Source/PlatformGTK.cmake
+index af4d2e3..b7b93c7 100644
+--- a/Source/PlatformGTK.cmake
++++ b/Source/PlatformGTK.cmake
+@@ -25,7 +25,7 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
+ add_custom_command(
+ OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
+ DEPENDS ${DocumentationDependencies}
+- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
++ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} LD=${CMAKE_C_COMPILER} LDFLAGS=${CMAKE_C_LINK_FLAGS} RUN=${CMAKE_BINARY_DIR}/gtkdoc-qemuwrapper GIR_EXTRA_LIBS_PATH=${CMAKE_BINARY_DIR}/lib ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
+ COMMAND touch ${_stamp_name}
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
+ )
+diff --git a/Tools/gtk/gtkdoc.py b/Tools/gtk/gtkdoc.py
+index 4c8237b..c0205f0 100644
+--- a/Tools/gtk/gtkdoc.py
++++ b/Tools/gtk/gtkdoc.py
+@@ -318,9 +318,9 @@ class GTKDoc(object):
+ additional_ldflags = '%s %s' % (additional_ldflags, arg)
+ ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags
+ current_ld_library_path = env.get('LD_LIBRARY_PATH')
+- if current_ld_library_path:
++ if current_ld_library_path and 'RUN' not in env:
+ env['RUN'] = 'LD_LIBRARY_PATH="%s:%s" ' % (self.library_path, current_ld_library_path)
+- else:
++ elif 'RUN' not in env:
+ env['RUN'] = 'LD_LIBRARY_PATH="%s" ' % self.library_path
+
+ if ldflags:
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
new file mode 100644
index 000000000..25b3c9f24
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch
@@ -0,0 +1,223 @@
+From 53a00058184cd710c6f4375f4daab49d7e885a30 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 17 Apr 2016 12:35:41 -0700
+Subject: [PATCH] WebKitMacros: Append to -I and not to -isystem
+
+gcc-6 has now introduced stdlib.h in libstdc++ for better
+compliance and its including the C library stdlib.h using
+include_next which is sensitive to order of system header
+include paths. Its infact better to not tinker with the
+system header include paths at all. Since adding /usr/include
+to -system is redundant and compiler knows about it moreover
+now with gcc6 it interferes with compiler's functioning
+and ends up with compile errors e.g.
+
+/usr/include/c++/6.0.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ Source/cmake/WebKitMacros.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: webkitgtk-2.12.1/Source/JavaScriptCore/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/JavaScriptCore/CMakeLists.txt
++++ webkitgtk-2.12.1/Source/JavaScriptCore/CMakeLists.txt
+@@ -1311,7 +1311,7 @@ add_subdirectory(shell)
+
+ WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
+ include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
+ add_library(JavaScriptCore ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
+ target_link_libraries(JavaScriptCore ${JavaScriptCore_LIBRARIES})
+ set_target_properties(JavaScriptCore PROPERTIES COMPILE_DEFINITIONS "BUILDING_JavaScriptCore")
+Index: webkitgtk-2.12.1/Source/WTF/wtf/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/WTF/wtf/CMakeLists.txt
++++ webkitgtk-2.12.1/Source/WTF/wtf/CMakeLists.txt
+@@ -286,7 +286,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+
+ WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
+ include_directories(${WTF_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${WTF_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${WTF_SYSTEM_INCLUDE_DIRECTORIES})
+ add_library(WTF ${WTF_LIBRARY_TYPE} ${WTF_HEADERS} ${WTF_SOURCES})
+ target_link_libraries(WTF ${WTF_LIBRARIES})
+ set_target_properties(WTF PROPERTIES COMPILE_DEFINITIONS "BUILDING_WTF")
+Index: webkitgtk-2.12.1/Source/WebCore/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/WebCore/CMakeLists.txt
++++ webkitgtk-2.12.1/Source/WebCore/CMakeLists.txt
+@@ -3748,7 +3748,7 @@ WEBKIT_WRAP_SOURCELIST(${WebCore_IDL_FIL
+ WEBKIT_WRAP_SOURCELIST(${WebCoreTestSupport_IDL_FILES} ${WebCoreTestSupport_SOURCES})
+
+ include_directories(${WebCore_INCLUDE_DIRECTORIES} ${WebCoreTestSupport_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${WebCore_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${WebCore_SYSTEM_INCLUDE_DIRECTORIES})
+
+ if (MSVC)
+ ADD_PRECOMPILED_HEADER("WebCorePrefix.h" "WebCorePrefix.cpp" WebCore_SOURCES)
+Index: webkitgtk-2.12.1/Source/WebKit/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/WebKit/CMakeLists.txt
++++ webkitgtk-2.12.1/Source/WebKit/CMakeLists.txt
+@@ -28,7 +28,7 @@ set(WebKit_LIBRARIES
+ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+
+ include_directories(${WebKit_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
+
+ if (MSVC)
+ ADD_PRECOMPILED_HEADER("WebKitPrefix.h" "win/WebKitPrefix.cpp" WebKit_SOURCES)
+Index: webkitgtk-2.12.1/Source/WebKit2/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/WebKit2/CMakeLists.txt
++++ webkitgtk-2.12.1/Source/WebKit2/CMakeLists.txt
+@@ -756,7 +756,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+ GENERATE_WEBKIT2_MESSAGE_SOURCES(WebKit2_DERIVED_SOURCES "${WebKit2_MESSAGES_IN_FILES}")
+
+ include_directories(${WebKit2_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${WebKit2_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${WebKit2_SYSTEM_INCLUDE_DIRECTORIES})
+ add_library(WebKit2 ${WebKit2_LIBRARY_TYPE} ${WebKit2_SOURCES} ${WebKit2_DERIVED_SOURCES})
+
+ add_dependencies(WebKit2 WebCore ${WEBKIT2_EXTRA_DEPENDENCIES})
+Index: webkitgtk-2.12.1/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
++++ webkitgtk-2.12.1/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
+@@ -42,7 +42,7 @@ set(WebKitTestNetscapePlugin_SYSTEM_INCL
+ )
+
+ include_directories(${WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${WebKitTestNetscapePlugin_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${WebKitTestNetscapePlugin_SYSTEM_INCLUDE_DIRECTORIES})
+
+ set(WebKitTestNetscapePlugin_LIBRARIES
+ ${X11_LIBRARIES}
+Index: webkitgtk-2.12.1/Tools/ImageDiff/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Tools/ImageDiff/CMakeLists.txt
++++ webkitgtk-2.12.1/Tools/ImageDiff/CMakeLists.txt
+@@ -14,7 +14,7 @@ set(IMAGE_DIFF_LIBRARIES
+ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+
+ include_directories(${IMAGE_DIFF_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${IMAGE_DIFF_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${IMAGE_DIFF_SYSTEM_INCLUDE_DIRECTORIES})
+ add_executable(ImageDiff ${IMAGE_DIFF_SOURCES})
+ target_link_libraries(ImageDiff ${IMAGE_DIFF_LIBRARIES})
+ set_target_properties(ImageDiff PROPERTIES FOLDER "Tools")
+Index: webkitgtk-2.12.1/Tools/MiniBrowser/gtk/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Tools/MiniBrowser/gtk/CMakeLists.txt
++++ webkitgtk-2.12.1/Tools/MiniBrowser/gtk/CMakeLists.txt
+@@ -55,7 +55,7 @@ endif ()
+ add_definitions(-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6)
+
+ include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES})
+ add_executable(MiniBrowser ${MiniBrowser_SOURCES})
+ target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
+ set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools")
+Index: webkitgtk-2.12.1/Tools/WebKitTestRunner/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Tools/WebKitTestRunner/CMakeLists.txt
++++ webkitgtk-2.12.1/Tools/WebKitTestRunner/CMakeLists.txt
+@@ -115,7 +115,7 @@ GENERATE_BINDINGS(WebKitTestRunner_SOURC
+ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+
+ include_directories(${WebKitTestRunner_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${WebKitTestRunner_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${WebKitTestRunner_SYSTEM_INCLUDE_DIRECTORIES})
+
+ add_library(TestRunnerInjectedBundle SHARED ${WebKitTestRunnerInjectedBundle_SOURCES})
+ target_link_libraries(TestRunnerInjectedBundle ${WebKitTestRunner_LIBRARIES})
+Index: webkitgtk-2.12.1/Source/WebCore/PlatformGTK.cmake
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/WebCore/PlatformGTK.cmake
++++ webkitgtk-2.12.1/Source/WebCore/PlatformGTK.cmake
+@@ -324,7 +324,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
+ ${GTK2_INCLUDE_DIRS}
+ ${GDK2_INCLUDE_DIRS}
+ )
+- target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
++ target_include_directories(WebCorePlatformGTK2 PRIVATE
+ ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+ )
+ target_link_libraries(WebCorePlatformGTK2
+@@ -366,7 +366,7 @@ WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreP
+ target_include_directories(WebCorePlatformGTK PRIVATE
+ ${WebCore_INCLUDE_DIRECTORIES}
+ )
+-target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
++target_include_directories(WebCorePlatformGTK PRIVATE
+ ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+ ${GTK_INCLUDE_DIRS}
+ ${GDK_INCLUDE_DIRS}
+@@ -384,7 +384,7 @@ include_directories(
+ "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
+ )
+
+-include_directories(SYSTEM
++include_directories(
+ ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
+ )
+
+Index: webkitgtk-2.12.1/Tools/TestWebKitAPI/PlatformGTK.cmake
+===================================================================
+--- webkitgtk-2.12.1.orig/Tools/TestWebKitAPI/PlatformGTK.cmake
++++ webkitgtk-2.12.1/Tools/TestWebKitAPI/PlatformGTK.cmake
+@@ -20,7 +20,7 @@ include_directories(
+ ${WEBKIT2_DIR}/UIProcess/API/gtk
+ )
+
+-include_directories(SYSTEM
++include_directories(
+ ${GDK3_INCLUDE_DIRS}
+ ${GLIB_INCLUDE_DIRS}
+ ${GTK3_INCLUDE_DIRS}
+Index: webkitgtk-2.12.1/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt
++++ webkitgtk-2.12.1/Tools/TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt
+@@ -23,7 +23,7 @@ include_directories(
+ ${TOOLS_DIR}/TestWebKitAPI/gtk/WebKit2Gtk
+ )
+
+-include_directories(SYSTEM
++include_directories(
+ ${ATSPI_INCLUDE_DIRS}
+ ${GLIB_INCLUDE_DIRS}
+ ${GSTREAMER_INCLUDE_DIRS}
+Index: webkitgtk-2.12.1/Source/WebKit2/PlatformGTK.cmake
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/WebKit2/PlatformGTK.cmake
++++ webkitgtk-2.12.1/Source/WebKit2/PlatformGTK.cmake
+@@ -816,7 +816,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
+ target_include_directories(WebKitPluginProcess2 PRIVATE
+ ${WebKit2CommonIncludeDirectories}
+ )
+- target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE
++ target_include_directories(WebKitPluginProcess2 PRIVATE
+ ${WebKit2CommonSystemIncludeDirectories}
+ ${GTK2_INCLUDE_DIRS}
+ ${GDK2_INCLUDE_DIRS}
+Index: webkitgtk-2.12.1/Source/JavaScriptCore/shell/CMakeLists.txt
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/JavaScriptCore/shell/CMakeLists.txt
++++ webkitgtk-2.12.1/Source/JavaScriptCore/shell/CMakeLists.txt
+@@ -20,7 +20,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
+
+ WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES})
+ include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
+-include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
++include_directories(${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
+ add_executable(jsc ${JSC_SOURCES})
+ target_link_libraries(jsc ${JSC_LIBRARIES})
+ set_target_properties(jsc PROPERTIES FOLDER "JavaScriptCore")
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
index 44b43cdbb..3f71297f5 100644
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
@@ -13,28 +13,25 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Source/WebKit2/PlatformGTK.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
-index 706f1e8..14a1c3b 100644
---- a/Source/WebKit2/PlatformGTK.cmake
-+++ b/Source/WebKit2/PlatformGTK.cmake
-@@ -884,7 +884,7 @@ add_custom_command(
+Index: webkitgtk-2.12.1/Source/WebKit2/PlatformGTK.cmake
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/WebKit2/PlatformGTK.cmake
++++ webkitgtk-2.12.1/Source/WebKit2/PlatformGTK.cmake
+@@ -910,7 +910,7 @@ add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
DEPENDS WebKit2
DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
- LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+ ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
${INTROSPECTION_SCANNER}
--quiet
-@@ -930,7 +930,7 @@ add_custom_command(
+@@ -951,7 +951,7 @@ add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS}
LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
- LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+ ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
${INTROSPECTION_SCANNER}
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/files/musl-fixes.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/musl-fixes.patch
new file mode 100644
index 000000000..4fdd56fea
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/musl-fixes.patch
@@ -0,0 +1,48 @@
+Replace __GLIBC__ with __linux__ since musl also supports it
+so checking __linux__ is more accomodating
+
+See http://git.alpinelinux.org/cgit/aports/tree/community/webkit2gtk/musl-fixes.patch?id=219435d86d7e8fac9474344a7431c62bd2525184
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: webkitgtk-2.12.1/Source/JavaScriptCore/heap/MachineStackMarker.cpp
+===================================================================
+--- webkitgtk-2.12.1.orig/Source/JavaScriptCore/heap/MachineStackMarker.cpp
++++ webkitgtk-2.12.1/Source/JavaScriptCore/heap/MachineStackMarker.cpp
+@@ -566,7 +566,7 @@ void* MachineThreads::Thread::Registers:
+ #error Unknown Architecture
+ #endif
+
+-#elif defined(__GLIBC__) && ENABLE(JIT)
++#elif defined(__linux__) && ENABLE(JIT)
+
+ #if CPU(X86)
+ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_ESP]);
+@@ -665,7 +665,7 @@ void* MachineThreads::Thread::Registers:
+ #error Unknown Architecture
+ #endif
+
+-#elif defined(__GLIBC__)
++#elif defined(__linux__) // glibc and musl
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+ #if CPU(X86)
+@@ -747,7 +747,7 @@ void* MachineThreads::Thread::Registers:
+ #error Unknown Architecture
+ #endif
+
+-#elif defined(__GLIBC__)
++#elif defined(__linux__) // glibc and musl
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+ #if CPU(X86)
+@@ -838,7 +838,7 @@ void* MachineThreads::Thread::Registers:
+ #error Unknown Architecture
+ #endif
+
+-#elif defined(__GLIBC__)
++#elif defined(__linux__) // glibc and musl
+
+ // The following sequence depends on glibc's sys/ucontext.h.
+ #if CPU(X86)
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/files/ppc-musl-fix.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/ppc-musl-fix.patch
new file mode 100644
index 000000000..5f58e4953
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/files/ppc-musl-fix.patch
@@ -0,0 +1,26 @@
+ucontext structure is different between musl and glibc for ppc
+therefore its not enough just to check for arch alone, we also
+need to check for libc type.
+
+Fixes errors like
+
+Source/JavaScriptCore/heap/MachineStackMarker.cpp:90:65: error: 'struct mcontext_t' has no member named 'uc_regs'; did you mean 'gregs'?
+ thread->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: webkitgtk-2.12.3/Source/JavaScriptCore/heap/MachineStackMarker.cpp
+===================================================================
+--- webkitgtk-2.12.3.orig/Source/JavaScriptCore/heap/MachineStackMarker.cpp
++++ webkitgtk-2.12.3/Source/JavaScriptCore/heap/MachineStackMarker.cpp
+@@ -86,7 +86,7 @@ static void pthreadSignalHandlerSuspendR
+ }
+
+ ucontext_t* userContext = static_cast<ucontext_t*>(ucontext);
+-#if CPU(PPC)
++#if CPU(PPC) && defined(__GLIBC__)
+ thread->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
+ #else
+ thread->suspendedMachineContext = userContext->uc_mcontext;
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
deleted file mode 100644
index d7e4ef626..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 0b68ad206d2d90df78d91cad4da19152084014cf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 16 Sep 2015 05:15:04 +0000
-Subject: [PATCH] Enable backtrace on linux when using glibc
-
-We dont have backtrace() implemented on non-glibc libc's on linux
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Accepted
-
- Source/WTF/wtf/Assertions.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
-index 191d53f..a4d86b5 100644
---- a/Source/WTF/wtf/Assertions.cpp
-+++ b/Source/WTF/wtf/Assertions.cpp
-@@ -68,7 +68,7 @@
- #include <unistd.h>
- #endif
-
--#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
-+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
- #include <cxxabi.h>
- #include <dlfcn.h>
- #include <execinfo.h>
-@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f
-
- void WTFGetBacktrace(void** stack, int* size)
- {
--#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
-+#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
- *size = backtrace(stack, *size);
- #elif OS(WINDOWS)
- // The CaptureStackBackTrace function is available in XP, but it is not defined
---
-2.5.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch
deleted file mode 100644
index 77ebf37ef..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 30e2ef302a329850ba55c7c458c98cbf396186ec Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 31 Dec 2015 21:47:34 +0000
-Subject: [PATCH] Fix build with non-glibc libraries on linux
-
-qualify isnan() calls with std namespace
-malloc_trim is glibc specific API so guard it with __GLIBC__
-let ctype be used on non-glibc ( musl ) C library
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Accepted
-
- Source/JavaScriptCore/runtime/Options.cpp | 2 +-
- Source/WTF/wtf/DisallowCType.h | 2 +-
- Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp | 2 ++
- 3 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp
-index fe830b4..c49aade 100644
---- a/Source/JavaScriptCore/runtime/Options.cpp
-+++ b/Source/JavaScriptCore/runtime/Options.cpp
-@@ -610,7 +610,7 @@ bool Option::operator==(const Option& other) const
- case Options::Type::unsignedType:
- return m_entry.unsignedVal == other.m_entry.unsignedVal;
- case Options::Type::doubleType:
-- return (m_entry.doubleVal == other.m_entry.doubleVal) || (isnan(m_entry.doubleVal) && isnan(other.m_entry.doubleVal));
-+ return (m_entry.doubleVal == other.m_entry.doubleVal) || (std::isnan(m_entry.doubleVal) && std::isnan(other.m_entry.doubleVal));
- case Options::Type::int32Type:
- return m_entry.int32Val == other.m_entry.int32Val;
- case Options::Type::optionRangeType:
-diff --git a/Source/WTF/wtf/DisallowCType.h b/Source/WTF/wtf/DisallowCType.h
-index d85e767..dc6bcab 100644
---- a/Source/WTF/wtf/DisallowCType.h
-+++ b/Source/WTF/wtf/DisallowCType.h
-@@ -40,7 +40,7 @@
- // are used from wx headers. On GTK+ for Mac many GTK+ files include <libintl.h>
- // or <glib/gi18n-lib.h>, which in turn include <xlocale/_ctype.h> which uses
- // isacii().
--#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION)
-+#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION) && defined(__GLIBC__)
-
- #include <ctype.h>
-
-diff --git a/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp b/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
-index ea61909..1495642 100644
---- a/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
-+++ b/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
-@@ -202,7 +202,9 @@ void MemoryPressureHandler::respondToMemoryPressure(Critical critical, Synchrono
- void MemoryPressureHandler::platformReleaseMemory(Critical)
- {
- ReliefLogger log("Run malloc_trim");
-+#ifdef __GLIBC__
- malloc_trim(0);
-+#endif
- }
-
- void MemoryPressureHandler::ReliefLogger::platformLog()
---
-2.6.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/clang.patch b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/clang.patch
deleted file mode 100644
index e5267138b..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk/clang.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Clang's builtin for clear_cache accepts char* and errors out when using void*,
-using char* work on both gcc and clang since char* is auto-converted to void* in gcc case
-
-Source/JavaScriptCore/assembler/ARM64Assembler.h:2857:33: error: cannot initialize a parameter of type 'char *' with an rvalue of type 'void *'
- __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-1 error generated.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Accepted
-
-Index: webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
-===================================================================
---- webkitgtk-2.8.5.orig/Source/JavaScriptCore/assembler/ARM64Assembler.h
-+++ webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
-@@ -2854,7 +2854,7 @@ public:
- #if OS(LINUX) && COMPILER(GCC)
- static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
- {
-- __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
-+ __builtin___clear_cache(reinterpret_cast<char*>(begin), reinterpret_cast<char*>(end));
- }
- #endif
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.10.7.bb b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.10.7.bb
deleted file mode 100644
index 8eb6b9f3b..000000000
--- a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.10.7.bb
+++ /dev/null
@@ -1,88 +0,0 @@
-SUMMARY = "WebKit web rendering engine for the GTK+ platform"
-HOMEPAGE = "http://www.webkitgtk.org/"
-BUGTRACKER = "http://bugs.webkit.org/"
-
-LICENSE = "BSD & LGPLv2+"
-LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \
- file://Source/WebKit/LICENSE;md5=4646f90082c40bcf298c285f8bab0b12 \
- file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \
- file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \
- file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \
- "
-
-SRC_URI = "\
- http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
- file://clang.patch \
- file://0001-Enable-backtrace-on-linux-when-using-glibc.patch \
- file://0001-Fix-build-with-non-glibc-libraries-on-linux.patch \
- file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \
- file://0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch \
- file://0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch \
- "
-SRC_URI[md5sum] = "84832b9d8329413b4f1d87df5f7e8efe"
-SRC_URI[sha256sum] = "990d62c82ed6dede31a6ff0a82d847f16b812842ff3e1093d17113627652864e"
-
-inherit cmake lib_package pkgconfig perlnative pythonnative distro_features_check upstream-version-is-even gobject-introspection
-
-# depends on libxt
-REQUIRED_DISTRO_FEATURES = "x11"
-
-DEPENDS = "zlib libsoup-2.4 curl libxml2 cairo libxslt libxt libidn gnutls \
- gtk+3 gstreamer1.0 gstreamer1.0-plugins-base flex-native gperf-native sqlite3 \
- pango icu bison-native gnome-common gawk intltool-native libwebp \
- atk udev harfbuzz jpeg libpng pulseaudio librsvg libtheora libvorbis libxcomposite libxtst \
- ruby-native libnotify gstreamer1.0-plugins-bad \
- "
-
-PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', 'wayland' ,d)} \
- ${@base_contains('DISTRO_FEATURES', 'opengl', 'webgl', '' ,d)} \
- enchant \
- gtk2 \
- libsecret \
- "
-
-PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland"
-PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11"
-PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue"
-PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant"
-PACKAGECONFIG[gtk2] = "-DENABLE_PLUGIN_PROCESS_GTK2=ON,-DENABLE_PLUGIN_PROCESS_GTK2=OFF,gtk+"
-PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2"
-PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl"
-PACKAGECONFIG[libsecret] = "-DENABLE_CREDENTIAL_STORAGE=ON,-DENABLE_CREDENTIAL_STORAGE=OFF,libsecret"
-PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen"
-
-EXTRA_OECMAKE = " \
- -DPORT=GTK \
- -DCMAKE_BUILD_TYPE=Release \
- ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \
- -DENABLE_GTKDOC=OFF \
- -DENABLE_MINIBROWSER=ON \
- "
-
-# Javascript JIT is not supported on powerpc
-EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_powerpc64 = " -DENABLE_JIT=OFF "
-
-# ARM JIT code does not build on ARMv5/6 anymore, apparently they test only on v7 onwards
-EXTRA_OECMAKE_append_armv5 = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_armv6 = " -DENABLE_JIT=OFF "
-
-# binutils 2.25.1 has a bug on aarch64:
-# https://sourceware.org/bugzilla/show_bug.cgi?id=18430
-EXTRA_OECMAKE_append_aarch64 = " -DUSE_LD_GOLD=OFF "
-
-# JIT not supported on MIPS either
-EXTRA_OECMAKE_append_mips = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_mips64 = " -DENABLE_JIT=OFF "
-
-FILES_${PN} += "${libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so"
-
-# http://errors.yoctoproject.org/Errors/Details/20370/
-ARM_INSTRUCTION_SET = "arm"
-
-# Invalid data memory access: 0x00000000
-# ...
-# qemu: uncaught target signal 11 (Segmentation fault) - core dumped
-# Segmentation fault
-EXTRA_OECMAKE_append_powerpc = " -DENABLE_INTROSPECTION=OFF "
-
diff --git a/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.12.5.bb b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.12.5.bb
new file mode 100644
index 000000000..941d0e206
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.12.5.bb
@@ -0,0 +1,108 @@
+SUMMARY = "WebKit web rendering engine for the GTK+ platform"
+HOMEPAGE = "http://www.webkitgtk.org/"
+BUGTRACKER = "http://bugs.webkit.org/"
+
+LICENSE = "BSD & LGPLv2+"
+LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \
+ file://Source/WebKit/LICENSE;md5=4646f90082c40bcf298c285f8bab0b12 \
+ file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \
+ file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \
+ file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \
+ "
+
+SRC_URI = "\
+ http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
+ file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \
+ file://0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch \
+ file://0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch \
+ file://0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch \
+ file://musl-fixes.patch \
+ file://ppc-musl-fix.patch \
+ file://0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch \
+ file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \
+ "
+SRC_URI[md5sum] = "7a9ea00ec195488db90fdeb2d174ddaf"
+SRC_URI[sha256sum] = "6b147854b864a5f115fadb97b2b6200b2f696db015216a34e7298d11c88b1c40"
+
+inherit cmake lib_package pkgconfig gobject-introspection perlnative distro_features_check upstream-version-is-even gtk-doc
+
+# We cannot inherit pythonnative because that would conflict with inheriting python3native
+# (which is done by gobject-introspection). But webkit only needs the path to native Python 2.x binary
+# so we simply set it explicitly here.
+EXTRANATIVEPATH += "python-native"
+
+# depends on libxt
+REQUIRED_DISTRO_FEATURES = "x11"
+
+DEPENDS = "zlib libsoup-2.4 curl libxml2 cairo libxslt libxt libidn gnutls \
+ gtk+3 gstreamer1.0 gstreamer1.0-plugins-base flex-native gperf-native sqlite3 \
+ pango icu bison-native gawk intltool-native libwebp \
+ atk udev harfbuzz jpeg libpng pulseaudio librsvg libtheora libvorbis libxcomposite libxtst \
+ ruby-native libnotify gstreamer1.0-plugins-bad \
+ "
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'wayland' ,d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'webgl', '' ,d)} \
+ enchant \
+ libsecret \
+ "
+
+PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland"
+PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11"
+PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue"
+PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant"
+PACKAGECONFIG[gtk2] = "-DENABLE_PLUGIN_PROCESS_GTK2=ON,-DENABLE_PLUGIN_PROCESS_GTK2=OFF,gtk+"
+PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2"
+PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl"
+PACKAGECONFIG[libsecret] = "-DENABLE_CREDENTIAL_STORAGE=ON,-DENABLE_CREDENTIAL_STORAGE=OFF,libsecret"
+PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen"
+
+EXTRA_OECMAKE = " \
+ -DPORT=GTK \
+ -DCMAKE_BUILD_TYPE=Release \
+ ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \
+ ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '-DENABLE_GTKDOC=ON', '-DENABLE_GTKDOC=OFF', d)} \
+ -DENABLE_MINIBROWSER=ON \
+ "
+
+# Javascript JIT is not supported on powerpc
+EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_powerpc64 = " -DENABLE_JIT=OFF "
+
+# ARM JIT code does not build on ARMv4/5/6 anymore
+EXTRA_OECMAKE_append_armv5 = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_armv6 = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_armv4 = " -DENABLE_JIT=OFF "
+
+# binutils 2.25.1 has a bug on aarch64:
+# https://sourceware.org/bugzilla/show_bug.cgi?id=18430
+EXTRA_OECMAKE_append_aarch64 = " -DUSE_LD_GOLD=OFF "
+EXTRA_OECMAKE_append_mips = " -DUSE_LD_GOLD=OFF "
+EXTRA_OECMAKE_append_mips64 = " -DUSE_LD_GOLD=OFF "
+EXTRA_OECMAKE_append_toolchain-clang = " -DUSE_LD_GOLD=OFF "
+
+# JIT not supported on MIPS either
+EXTRA_OECMAKE_append_mips = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_mips64 = " -DENABLE_JIT=OFF "
+
+SECURITY_CFLAGS_remove_aarch64 = "-fpie"
+SECURITY_CFLAGS_append_aarch64 = " -fPIE"
+
+FILES_${PN} += "${libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so"
+
+# http://errors.yoctoproject.org/Errors/Details/20370/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
+# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474
+# https://bugs.webkit.org/show_bug.cgi?id=159880
+# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime.
+# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb).
+ARM_INSTRUCTION_SET_armv7a = "thumb"
+ARM_INSTRUCTION_SET_armv7r = "thumb"
+ARM_INSTRUCTION_SET_armv7ve = "thumb"
+
+# WebKit2-4.0: ../../libgpg-error-1.21/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
+# qemu: uncaught target signal 6 (Aborted) - core dumped
+EXTRA_OECMAKE_append_mips64 = " -DENABLE_INTROSPECTION=OFF -DENABLE_GTKDOC=OFF"
diff --git a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb
index db1530530..302c93504 100644
--- a/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb
@@ -38,6 +38,9 @@ CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sct
# x86_64-linux-libtool: error: specify a tag with '--tag'
CCACHE = ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
do_configure_prepend() {
# Avoid absolute paths for grep since it causes failures
# when using sstate between different hosts with different
diff --git a/import-layers/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb b/import-layers/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
index d61c8be24..bd0cfdfe4 100644
--- a/import-layers/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
@@ -1,7 +1,7 @@
# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "Glibc hierarchical argument parsing standalone library"
+SUMMARY = "Glibc hierarchical argument parsing standalone library"
HOMEPAGE = "http://www.lysator.liu.se/~nisse/misc/"
LICENSE = "LGPL-2.1"
LIC_FILES_CHKSUM = "file://argp.h;beginline=1;endline=20;md5=008b7e53dea6f9e1d9fdef0d9cf3184a"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.18.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.18.1.bb
deleted file mode 100644
index b8a93f3dc..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.18.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "AT-SPI 2 Toolkit Bridge"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "d7040a55df975865ab0d74a4b325afb5"
-SRC_URI[sha256sum] = "c4b15f9386d34d464ddad5f6cc85669742c016df87141ceee93513245979c12d"
-
-DEPENDS = "dbus glib-2.0 atk at-spi2-core"
-
-inherit autotools pkgconfig distro_features_check upstream-version-is-even
-
-# The at-spi2-core requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
-
-FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
-FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.20.1.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.20.1.bb
new file mode 100644
index 000000000..d4120b604
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.20.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "AT-SPI 2 Toolkit Bridge"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "23309b6f8e1623871ace6347fb734dce"
+SRC_URI[sha256sum] = "2358a794e918e8f47ce0c7370eee8fc8a6207ff1afe976ec9ff547a03277bf8e"
+
+DEPENDS = "dbus glib-2.0 atk at-spi2-core"
+
+inherit autotools pkgconfig distro_features_check upstream-version-is-even
+
+# The at-spi2-core requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
+
+FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
+FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
new file mode 100644
index 000000000..4103eaa2e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
@@ -0,0 +1,49 @@
+From 2f47c975ebe52b6916a45ade023ae3bac21bb0e0 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 21 Jun 2016 16:00:02 +0300
+Subject: [PATCH] build: Add --with-systemduserunitdir
+
+Default to "pkg-config --variable=systemduserunitdir systemd" but
+allow overriding the value.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=767911]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ bus/Makefile.am | 2 +-
+ configure.ac | 7 +++++++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/bus/Makefile.am b/bus/Makefile.am
+index b189e02..52fbb0b 100644
+--- a/bus/Makefile.am
++++ b/bus/Makefile.am
+@@ -26,7 +26,7 @@ dbusservice_DATA = org.a11y.Bus.service
+ org.a11y.Bus.service: org.a11y.Bus.service.in
+ sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
+
+-systemd_userdir = $(prefix)/lib/systemd/user
++systemd_userdir = $(systemduserunitdir)
+ systemd_user_DATA = at-spi-dbus-bus.service
+ at-spi-dbus-bus.service: at-spi-dbus-bus.service.in Makefile
+ sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
+diff --git a/configure.ac b/configure.ac
+index f9061c2..2b8eeed 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -183,6 +183,13 @@ else
+ fi
+ AC_SUBST(DBUS_SERVICES_DIR)
+
++AC_ARG_WITH([systemduserunitdir],
++ AS_HELP_STRING([--with-systemduserunitdir=DIR],
++ [Directory for systemd service files]),
++ [],
++ [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)])
++AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
++
+ AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
+
+ GOBJECT_INTROSPECTION_CHECK([0.9.6])
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb
deleted file mode 100644
index eced59750..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
- file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
- "
-
-SRC_URI[md5sum] = "fc18801e56f6ce6914126f837d42f556"
-SRC_URI[sha256sum] = "ada26add94155f97d0f601a20cb7a0e3fd3ba1588c3520b7288316494027d629"
-
-DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native gettext-native"
-
-inherit autotools gtk-doc pkgconfig distro_features_check upstream-version-is-even gobject-introspection
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-xevie --with-dbus-daemondir=${bindir}"
-
-FILES_${PN} += "${datadir}/dbus-1/services/*.service \
- ${datadir}/dbus-1/accessibility-services/*.service"
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.20.2.bb b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.20.2.bb
new file mode 100644
index 000000000..199243adf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.20.2.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
+ file://0001-build-Add-with-systemduserunitdir.patch \
+ "
+
+SRC_URI[md5sum] = "f6f6303da2e72317f881703f40bf0c62"
+SRC_URI[sha256sum] = "88a4de9d43139f13cca531b47b901bc1b56e0ab06ba899126644abd4ac16a143"
+
+DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native"
+
+inherit autotools gtk-doc gettext systemd pkgconfig distro_features_check upstream-version-is-even gobject-introspection
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "--disable-xevie \
+ --with-systemduserunitdir=${systemd_user_unitdir} \
+ --with-dbus-daemondir=${bindir}"
+
+FILES_${PN} += "${datadir}/dbus-1/services/*.service \
+ ${datadir}/dbus-1/accessibility-services/*.service \
+ ${datadir}/defaults/at-spi2 \
+ ${systemd_user_unitdir}/at-spi-dbus-bus.service \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.18.0.bb b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.18.0.bb
deleted file mode 100644
index 3c0e82df6..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.18.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Accessibility toolkit for GNOME"
-HOMEPAGE = "http://live.gnome.org/GAP/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/libs"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
- file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
- file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
-
-DEPENDS = "glib-2.0"
-
-inherit gnomebase gtk-doc upstream-version-is-even gobject-introspection
-
-SRC_URI[archive.md5sum] = "fd3678f35004b4c92e3da39356996054"
-SRC_URI[archive.sha256sum] = "ce6c48d77bf951083029d5a396dd552d836fff3c1715d3a7022e917e46d0c92b"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF = "--disable-glibtest \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.20.0.bb b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.20.0.bb
new file mode 100644
index 000000000..0422354e0
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/atk/atk_2.20.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Accessibility toolkit for GNOME"
+HOMEPAGE = "http://live.gnome.org/GAP/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/libs"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
+ file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
+
+DEPENDS = "glib-2.0"
+
+inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection
+
+SRC_URI[archive.md5sum] = "5187b0972f4d3905f285540b31395e20"
+SRC_URI[archive.sha256sum] = "493a50f6c4a025f588d380a551ec277e070b28a82e63ef8e3c06b3ee7c1238f0"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF = "--disable-glibtest \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc b/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc
index 198fb4fed..37a0218cb 100644
--- a/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc
@@ -14,6 +14,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \
file://acl-fix-the-order-of-expected-output-of-getfacl.patch \
file://test-fix-insufficient-quoting-of.patch \
file://test-fixups-on-SELinux-machines-for-root-testcases.patch \
+ file://test-fix-directory-permissions.patch \
"
require ea-acl.inc
@@ -33,7 +34,7 @@ do_install_append() {
inherit ptest
do_install_ptest() {
- tar -cf - test/ --exclude nfs | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
mkdir ${D}${PTEST_PATH}/include
cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
}
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest b/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest
index 3b31cc99a..a56946d8e 100644
--- a/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest
@@ -1,7 +1,64 @@
#!/bin/sh
+#
+#This script is used to run acl test suites
-gpasswd -a daemon bin
-make -C test -k tests root-tests |sed \
- -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
- -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
-gpasswd -d daemon bin
+#umask 077
+
+EXT3_IMAGE=ext3.img
+EXT3_MOUNT_POINT=/mnt/ext3
+
+trap 'rm -f ${EXT3_IMAGE}' EXIT
+
+dd if=/dev/zero of=${EXT3_IMAGE} bs=1M count=1
+if [ "$?" -eq 0 ]; then
+ echo "PASS: dump ext3.img"
+else
+ echo "FAIL: dump ext3.img"
+ exit 1
+fi
+
+mkfs.ext3 -F ${EXT3_IMAGE}
+if [ "$?" -eq 0 ]; then
+ echo "PASS: mkfs.ext3 -F ext3.img"
+else
+ echo "FAIL: mkfs.ext3 -F ext3.img"
+ exit 1
+fi
+
+if [ -d $EXT3_MOUNT_POINT ]; then
+ echo "mount point exist"
+else
+ mkdir -p $EXT3_MOUNT_POINT
+fi
+
+
+mount -o loop,rw,acl ${EXT3_IMAGE} $EXT3_MOUNT_POINT
+if [ "$?" -eq 0 ]; then
+ echo "PASS: mount ext3.img"
+else
+ echo "FAIL: mount ext3.img"
+ exit 1
+fi
+
+cp -rf ./test/ $EXT3_MOUNT_POINT
+
+cd $EXT3_MOUNT_POINT/test/
+
+if sed -e 's!^bin:x:2:$!bin:x:2:daemon!' < /etc/group > gtmp
+then if cp /etc/group group.orig;
+ then cp gtmp /etc/group
+ make -k tests root-tests | sed \
+ -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
+ -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
+ cp group.orig /etc/group
+ else echo "FAIL: couldn't save original group file."
+ exit 1
+ fi
+else echo "FAIL: couldn't create modified group file."
+ exit 1
+fi
+
+cd -
+umount $EXT3_MOUNT_POINT
+rm -rf $EXT3_MOUNT_POINT
+rm $EXT3_IMAGE
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch
new file mode 100644
index 000000000..cd4510c0b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch
@@ -0,0 +1,24 @@
+commit c45bae84817a70fef6c2b661a07a492a0d23ae85
+Author: Peter Seebach <peter.seebach@windriver.com>
+Date: Wed May 11 15:16:06 2016 -0500
+
+ Fix permissions on temporary directory
+
+ The temporary directory's permissions have to allow other users to
+ view the directory. A default umask of 022 is common, but not mandatory,
+ and secure systems may have more restrictive defaults.
+
+ Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+
+diff --git a/test/root/permissions.test b/test/root/permissions.test
+index 42615f5..098b52a 100644
+--- a/test/root/permissions.test
++++ b/test/root/permissions.test
+@@ -16,6 +16,7 @@ Cry immediately if we are not running as root.
+ First, set up a temporary directory and create a regular file with
+ defined permissions.
+
++ $ umask 022
+ $ mkdir d
+ $ cd d
+ $ umask 027
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc b/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc
index 68609784d..e8b5d054b 100644
--- a/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc
@@ -2,7 +2,7 @@ SUMMARY = "Utilities for manipulating filesystem extended attributes"
HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
SECTION = "libs"
-DEPENDS = "ncurses virtual/libintl"
+DEPENDS = "virtual/libintl"
LICENSE = "LGPLv2.1+ & GPLv2+"
LICENSE_${PN} = "GPLv2+"
@@ -26,7 +26,7 @@ do_install_append() {
inherit ptest
do_install_ptest() {
- tar -cf - test/ --exclude ext | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
mkdir ${D}${PTEST_PATH}/include
for i in builddefs buildmacros buildrules; \
do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb b/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb
index 44eee3964..556c8e43e 100644
--- a/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb
@@ -2,9 +2,9 @@ require attr.inc
# configure.ac was missing from the release tarball. This should be fixed in
# future releases of attr, remove this when updating the recipe.
-SRC_URI_append += "file://attr-Missing-configure.ac.patch \
- file://dont-use-decl-macros.patch \
- "
+SRC_URI += "file://attr-Missing-configure.ac.patch \
+ file://dont-use-decl-macros.patch \
+ "
SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859"
diff --git a/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.1.bb b/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.1.bb
deleted file mode 100644
index 8b257d2d1..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.1.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Programmable Completion for Bash 4"
-HOMEPAGE = "http://bash-completion.alioth.debian.org/"
-BUGTRACKER = "https://alioth.debian.org/projects/bash-completion/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SECTION = "console/utils"
-
-SRC_URI="http://bash-completion.alioth.debian.org/files/${BPN}-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "4e2a9f11a4042a38ee79ddcd048e8b9e"
-SRC_URI[sha256sum] = "2b606804a7d5f823380a882e0f7b6c8a37b0e768e72c3d4107c51fbe8a46ae4f"
-UPSTREAM_CHECK_REGEX = "bash-completion-(?P<pver>(?!2008).+)\.tar"
-
-PARALLEL_MAKE = ""
-
-inherit autotools
-
-do_install_append() {
- # compatdir
- install -d ${D}${sysconfdir}/bash_completion.d/
- echo '. ${datadir}/${BPN}/bash_completion' >${D}${sysconfdir}/bash_completion
-
- # Delete files already provided by util-linux
- local i
- for i in cal dmesg eject hexdump hwclock ionice look renice rtcwake su; do
- rm ${D}${datadir}/${BPN}/completions/$i
- done
-
- # Delete files for networkmanager
- rm ${D}${datadir}/${BPN}/completions/nmcli
-}
-
-RDEPENDS_${PN} = "bash"
-
-# Some recipes are providing ${PN}-bash-completion packages
-PACKAGES =+ "${PN}-extra"
-FILES_${PN}-extra = "${datadir}/${BPN}/completions/ \
- ${datadir}/${BPN}/helpers/"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.4.bb b/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.4.bb
new file mode 100644
index 000000000..42719f143
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.4.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Programmable Completion for Bash 4"
+HOMEPAGE = "http://bash-completion.alioth.debian.org/"
+BUGTRACKER = "https://alioth.debian.org/projects/bash-completion/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SECTION = "console/utils"
+
+SRC_URI = "https://github.com/scop/bash-completion/releases/download/${PV}/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "1ea94864fb2b2446fbbdf82f10bd25df"
+SRC_URI[sha256sum] = "c0f76b5202fec9ef8ffba82f5605025ca003f27cfd7a85115f838ba5136890f6"
+UPSTREAM_CHECK_REGEX = "bash-completion-(?P<pver>(?!2008).+)\.tar"
+UPSTREAM_CHECK_URI = "https://github.com/scop/bash-completion/releases"
+
+PARALLEL_MAKE = ""
+
+inherit autotools
+
+do_install_append() {
+ # compatdir
+ install -d ${D}${sysconfdir}/bash_completion.d/
+ echo '. ${datadir}/${BPN}/bash_completion' >${D}${sysconfdir}/bash_completion
+
+ # Delete files already provided by util-linux
+ local i
+ for i in mount umount; do
+ rm ${D}${datadir}/${BPN}/completions/$i
+ done
+}
+
+RDEPENDS_${PN} = "bash"
+
+# Some recipes are providing ${PN}-bash-completion packages
+PACKAGES =+ "${PN}-extra"
+FILES_${PN}-extra = "${datadir}/${BPN}/completions/ \
+ ${datadir}/${BPN}/helpers/"
+
+FILES_${PN}-dev += "${datadir}/cmake"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch
deleted file mode 100644
index ab907fca0..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 829a89e7f5785239a9384e3afd46c900f9d76ada Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 31 Aug 2015 19:55:32 +0000
-Subject: [PATCH] fix build with musl
-
-signal.h already includes bits/sigcontext.h
-Documentation seems to indicate that if you need the definitions in
-sigcontext.h, you are supposed to include signal.h and not sigcontext.h.
-
-a good fix should be to remove glibc
-specific understanding, in those ifdef's
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- os_dep.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/os_dep.c b/os_dep.c
-index 08c501d..5cb7873 100644
---- a/os_dep.c
-+++ b/os_dep.c
-@@ -41,7 +41,7 @@
- # else /* __GLIBC__ < 2 */
- /* libc5 doesn't have <sigcontext.h>: go directly with the kernel */
- /* one. Check LINUX_VERSION_CODE to see which we should reference. */
--# include <asm/sigcontext.h>
-+# include <signal.h>
- # endif /* __GLIBC__ < 2 */
- # endif
- #endif /* LINUX && !POWERPC */
---
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch
deleted file mode 100644
index c73c5400c..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 2571df0e30b4976d7a12dbc6fbec4f1c4027924d Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Thu, 28 Jan 2016 04:13:13 +0100
-Subject: [PATCH] Altera NIOS2 support
-
-Add simple nios2 configuration support.
-
-* include/private/gcconfig.h (NIOS2): New macro.
-* include/private/gcconfig.h (mach_type_known, CPP_WORDSZ, MACH_TYPE,
-OS_TYPE, DYNAMIC_LOADING, _end, __data_start, DATASTART, DATAEND,
-ALIGNMENT, HBLKSIZE, HBLKSIZE, LINUX_STACKBOTTOM, NO_GETCONTEXT):
-Define for NIOS2.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Backport [ https://github.com/ivmai/bdwgc.git 2571df0e30b4976d7a12dbc6fbec4f1c4027924d ]
----
- include/private/gcconfig.h | 24 +++++++++++++++++++++++-
- 1 file changed, 23 insertions(+), 1 deletion(-)
-
-diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
-index c467c26..92d4727 100644
---- a/include/private/gcconfig.h
-+++ b/include/private/gcconfig.h
-@@ -181,6 +181,10 @@
- # endif
- # define mach_type_known
- # endif
-+# if defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__)
-+# define NIOS2 /* Altera NIOS2 */
-+# define mach_type_known
-+# endif
- # if defined(DGUX) && (defined(i386) || defined(__i386__))
- # define I386
- # ifndef _USING_DGUX
-@@ -1658,6 +1662,24 @@
- # endif
- # endif
-
-+# ifdef NIOS2
-+# define CPP_WORDSZ 32
-+# define MACH_TYPE "NIOS2"
-+# ifdef LINUX
-+# define OS_TYPE "LINUX"
-+# define DYNAMIC_LOADING
-+ extern int _end[];
-+ extern int __data_start[];
-+# define DATASTART ((ptr_t)(__data_start))
-+# define DATAEND ((ptr_t)(_end))
-+# define ALIGNMENT 4
-+# ifndef HBLKSIZE
-+# define HBLKSIZE 4096
-+# endif
-+# define LINUX_STACKBOTTOM
-+# endif /* Linux */
-+# endif
-+
- # ifdef HP_PA
- # define MACH_TYPE "HP_PA"
- # ifdef __LP64__
-@@ -2622,6 +2644,7 @@
- #if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \
- || defined(OPENBSD) || defined(ARM32) \
-- || defined(MIPS) || defined(AVR32))) \
-+ || defined(MIPS) || defined(AVR32) \
-+ || defined(NIOS2))) \
- || (defined(LINUX) && (defined(SPARC) || defined(M68K))) \
- || ((defined(RTEMS) || defined(PLATFORM_ANDROID)) && defined(I386))) \
- && !defined(NO_GETCONTEXT)
---
-2.7.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch
new file mode 100644
index 000000000..4a1849665
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc/musl_header_fix.patch
@@ -0,0 +1,27 @@
+Add missing header to avoid:
+
+| 1472659610.016355: ../git/pthread_stop_world.c: In function 'GC_brief_async_signal_safe_sleep':
+| 1472659610.0540252: ../git/pthread_stop_world.c:397:22: error: storage size of 'tv' isn't known
+| 1472659610.0540252: struct timeval tv;
+| 1472659610.0540252: ^~
+| 1472659610.054099: ../git/pthread_stop_world.c:397:22: warning: unused variable 'tv' [-Wunused-variable]
+| 1472659610.054099: struct timeval tv;
+| 1472659610.054099: ^~
+| 1472659610.054099: Makefile:1530: recipe for target 'pthread_stop_world.lo' failed
+
+in musl builds.
+
+Upstream-Status: Pending
+
+Index: git/pthread_stop_world.c
+===================================================================
+--- git.orig/pthread_stop_world.c
++++ git/pthread_stop_world.c
+@@ -45,6 +45,7 @@
+ #include <semaphore.h>
+ #include <errno.h>
+ #include <unistd.h>
++#include <sys/time.h>
+ #include "atomic_ops.h"
+
+ /* It's safe to call original pthread_sigmask() here. */
diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
deleted file mode 100644
index 8d4dab399..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "A garbage collector for C and C++"
-
-DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\
- used as a garbage collecting replacement for C malloc or C++ new. It allows\
- you to allocate memory basically as you normally would, without explicitly\
- deallocating memory that is no longer useful. The collector automatically\
- recycles memory when it determines that it can no longer be otherwise\
- accessed.\
- The collector is also used by a number of programming language\
- implementations that either use C as intermediate code, want to facilitate\
- easier interoperation with C libraries, or just prefer the simple collector\
- interface.\
- Alternatively, the garbage collector may be used as a leak detector for C\
- or C++ programs, though that is not its primary goal.\
- Empirically, this collector works with most unmodified C programs, simply\
- by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\
- calls, and removing free calls."
-
-HOMEPAGE = "http://www.hboehm.info/gc/"
-SECTION = "devel"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://README.QUICK;md5=55f5088f90a982fed7af9a4897047ef7"
-
-SRCREV = "e31cdc288ffbee5bf25f948e19deb5a7ce846971"
-SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-7_4 \
- file://0001-fix-build-with-musl.patch \
- file://0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch \
- file://0002-Altera-NIOS2-support.patch \
- "
-
-FILES_${PN}-doc = "${datadir}"
-
-S = "${WORKDIR}/git"
-
-ARM_INSTRUCTION_SET = "arm"
-
-inherit autotools pkgconfig
-
-# by default use external libatomic-ops
-PACKAGECONFIG ??= "libatomic-ops"
-PACKAGECONFIG[libatomic-ops] = "--with-libatomic-ops=yes,--with-libatomic-ops=no,libatomic-ops"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.6.0.bb
new file mode 100644
index 000000000..dcb68f028
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.6.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "A garbage collector for C and C++"
+
+DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\
+ used as a garbage collecting replacement for C malloc or C++ new. It allows\
+ you to allocate memory basically as you normally would, without explicitly\
+ deallocating memory that is no longer useful. The collector automatically\
+ recycles memory when it determines that it can no longer be otherwise\
+ accessed.\
+ The collector is also used by a number of programming language\
+ implementations that either use C as intermediate code, want to facilitate\
+ easier interoperation with C libraries, or just prefer the simple collector\
+ interface.\
+ Alternatively, the garbage collector may be used as a leak detector for C\
+ or C++ programs, though that is not its primary goal.\
+ Empirically, this collector works with most unmodified C programs, simply\
+ by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\
+ calls, and removing free calls."
+
+HOMEPAGE = "http://www.hboehm.info/gc/"
+SECTION = "devel"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://README.QUICK;md5=4f81f24ec69726c312487c2ac740e9e3"
+
+SRCREV = "8ac1d84a40eb7a431fec1b8097e3f24b48fb23fa"
+SRC_URI = "git://github.com/ivmai/bdwgc.git \
+ file://0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch \
+ file://musl_header_fix.patch \
+ "
+
+FILES_${PN}-doc = "${datadir}"
+
+S = "${WORKDIR}/git"
+
+ARM_INSTRUCTION_SET = "arm"
+
+inherit autotools pkgconfig
+
+# by default use external libatomic-ops
+PACKAGECONFIG ??= "libatomic-ops"
+PACKAGECONFIG[libatomic-ops] = "--with-libatomic-ops=yes,--with-libatomic-ops=no,libatomic-ops"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb b/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb
new file mode 100644
index 000000000..e10f5fd34
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/bmap-tools/bmap-tools_3.2.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Tools to generate block map (AKA bmap) and flash images using bmap"
+DESCRIPTION = "Bmap-tools - tools to generate block map (AKA bmap) and flash images using \
+bmap. Bmaptool is a generic tool for creating the block map (bmap) for a file, \
+and copying files using the block map. The idea is that large file containing \
+unused blocks, like raw system image files, can be copied or flashed a lot \
+faster with bmaptool than with traditional tools like "dd" or "cp"."
+HOMEPAGE = "http://git.infradead.org/users/dedekind/bmap-tools.git"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "ftp://ftp.infradead.org/pub/${BPN}/${BPN}-${PV}.tgz"
+SRC_URI[md5sum] = "92cdad1cb4dfa0cca7176c8e22752616"
+SRC_URI[sha256sum] = "cc6c7f7dc0a37e2a32deb127308e24e6c4b80bfb54f3803c308efab02bf2d434"
+
+RDEPENDS_${PN} = "python-core python-compression"
+
+inherit setuptools
+
+BBCLASSEXTEND = "native"
+
+do_install_append_class-native() {
+ sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' ${D}${bindir}/bmaptool
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.60.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.61.0.bb
index 32646d707..32646d707 100644
--- a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.60.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.61.0.bb
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc
deleted file mode 100644
index a38693e25..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-# The Boost web site provides free peer-reviewed portable
-# C++ source libraries. The emphasis is on libraries which
-# work well with the C++ Standard Library. The libraries are
-# intended to be widely useful, and are in regular use by
-# thousands of programmers across a broad spectrum of applications.
-HOMEPAGE = "http://www.boost.org/"
-LICENSE = "BSL-1.0 & MIT & Python-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
-
-BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}"
-BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}"
-BOOST_P = "boost_${BOOST_VER}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2"
-
-SRC_URI[md5sum] = "65a840e1a0b13a558ff19eeb2c4f0cbe"
-SRC_URI[sha256sum] = "686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b"
-
-S = "${WORKDIR}/${BOOST_P}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.61.0.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.61.0.inc
new file mode 100644
index 000000000..cd9d8a495
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.61.0.inc
@@ -0,0 +1,19 @@
+# The Boost web site provides free peer-reviewed portable
+# C++ source libraries. The emphasis is on libraries which
+# work well with the C++ Standard Library. The libraries are
+# intended to be widely useful, and are in regular use by
+# thousands of programmers across a broad spectrum of applications.
+HOMEPAGE = "http://www.boost.org/"
+LICENSE = "BSL-1.0 & MIT & Python-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+BOOST_VER = "${@"_".join(d.getVar("PV", True).split("."))}"
+BOOST_MAJ = "${@"_".join(d.getVar("PV", True).split(".")[0:2])}"
+BOOST_P = "boost_${BOOST_VER}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2"
+
+SRC_URI[md5sum] = "6095876341956f65f9d35939ccea1a9f"
+SRC_URI[sha256sum] = "a547bd06c2fd9a71ba1d169d9cf0339da7ebf4753849a8f7d6fdb8feee99b640"
+
+S = "${WORKDIR}/${BOOST_P}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc
index 982446c06..ef16533ba 100644
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc
@@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
BOOST_LIBS = "\
atomic \
chrono \
+ container \
date_time \
+ exception \
filesystem \
graph \
iostreams \
log \
+ math \
program_options \
random \
regex \
@@ -22,12 +25,30 @@ BOOST_LIBS = "\
timer \
test \
thread \
+ wave \
"
-# optional boost-python library
-PACKAGECONFIG ??= ""
+# only supported by x86 and powerpc
+BOOST_LIBS_append_x86 = " context coroutine"
+BOOST_LIBS_append_x86-64 = " context coroutine"
+BOOST_LIBS_append_powerpc = " context coroutine"
+# need consistent settings for native builds (x86 override not applied for native)
+BOOST_LIBS_remove_class-native = " context coroutine"
+
+# optional libraries
+PACKAGECONFIG ??= "locale"
+PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
+PACKAGECONFIG[mpi] = ",,mpich"
PACKAGECONFIG[python] = ",,python python3"
-BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)}"
+
+BOOST_LIBS += "\
+ ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
+ bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi', '', d), d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)} \
+"
+
inherit python-dir
PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
@@ -54,6 +75,10 @@ python __anonymous () {
}
# Override the contents of specific packages
+FILES_${PN}-graph = "${libdir}/libboost_graph.so.*"
+FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*"
+FILES_${PN}-locale = "${libdir}/libboost_locale.so.*"
+FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"
FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \
${libdir}/libboost_wserialization*.so.*"
FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \
@@ -142,7 +167,7 @@ def get_boost_parallel_make(d):
BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(d)}"
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \
${BJAM_TOOLS} \
- -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/example/user-config.jam \
+ -sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \
--build-dir=${S}/${TARGET_SYS} \
--disable-icu \
${BJAM_EXTRA}'
@@ -150,25 +175,26 @@ BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \
# Native compilation of bzip2 isn't working
BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1'
-do_boostconfig() {
- cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
+do_configure() {
+ cp -f ${S}/boost/config/platform/linux.hpp ${S}/boost/config/platform/linux-gnueabi.hpp
# D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
- sed -i "/^using gcc : 4.3.1/d" ${S}/tools/build/example/user-config.jam
- sed -i "/^using python : ${PYTHON_BASEVERSION}"/d ${S}/tools/build/example/user-config.jam
- echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam
- echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam
- echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${S}/tools/build/example/user-config.jam
+ rm -f ${WORKDIR}/user-config.jam
+ echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam
+ echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${WORKDIR}/user-config.jam
+ echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${WORKDIR}/user-config.jam
+
+ if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false', d)}; then
+ echo "using mpi : : <find-shared-library>mpi ;" >> ${WORKDIR}/user-config.jam
+ fi
CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
- sed -i '/^using python/d' project-config.jam
+ sed -i '/^using python/d' ${S}/project-config.jam
}
-do_boostconfig[dirs] = "${S}"
-addtask do_boostconfig after do_patch before do_configure
-
do_compile() {
set -ex
+ rm -rf ${S}/${TARGET_SYS}
bjam ${BJAM_OPTS} --prefix=${prefix} \
--exec-prefix=${exec_prefix} \
--libdir=${libdir} \
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch
deleted file mode 100644
index df7e71fea..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From f50e7bc9fed323c5705c0ed992c03e80eeec1dd6 Mon Sep 17 00:00:00 2001
-From: Jonathan Wakely <jwakely@redhat.com>
-Date: Mon, 14 Sep 2015 15:05:24 +0100
-Subject: [PATCH] Do not qualify <fenv.h> names that might be macros.
-
-The patch was imported from the boost-test git repository
-(https://github.com/boostorg/test) as of commit id
-f50e7bc9fed323c5705c0ed992c03e80eeec1dd6.
-
-Upstream-Status: Accepted [commit f50e7bc9fed in develop branch]
-
-Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
----
- include/boost/test/impl/execution_monitor.ipp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/include/boost/test/impl/execution_monitor.ipp b/include/boost/test/impl/execution_monitor.ipp
-index b3e873e..a7bdce2 100644
---- a/include/boost/test/impl/execution_monitor.ipp
-+++ b/include/boost/test/impl/execution_monitor.ipp
-@@ -1380,8 +1380,8 @@ enable( unsigned mask )
-
- return ~old_cw & BOOST_FPE_ALL;
- #elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
-- ::feclearexcept(BOOST_FPE_ALL);
-- int res = ::feenableexcept( mask );
-+ feclearexcept(BOOST_FPE_ALL);
-+ int res = feenableexcept( mask );
- return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
- #else
- /* Not Implemented */
-@@ -1417,8 +1417,8 @@ disable( unsigned mask )
-
- return ~old_cw & BOOST_FPE_ALL;
- #elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
-- ::feclearexcept(BOOST_FPE_ALL);
-- int res = ::fedisableexcept( mask );
-+ feclearexcept(BOOST_FPE_ALL);
-+ int res = fedisableexcept( mask );
- return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
- #else
- /* Not Implemented */
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
new file mode 100644
index 000000000..8a85aac18
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
@@ -0,0 +1,49 @@
+From 40192301130dcd913aa6d9cb9dba9e5f8dbd9d16 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Wed, 24 Aug 2016 21:01:43 +0100
+Subject: [PATCH 1/4] use POSIX poll.h instead of sys/poll.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+POSIX specifies that <poll.h> is the correct header to
+include for poll()
+ http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html
+whereas <sys/poll.h> is only needed for ancient glibc (<2.3),
+so let's follow POSIX instead.
+
+As a side-effect, this silences a warning when compiling
+against the musl C-library:
+
+In file included from ./boost/asio/detail/socket_types.hpp:61:0,
+ from ./boost/asio/ip/address_v4.hpp:21,
+ from ./boost/asio/ip/address.hpp:21,
+ from libs/log/src/init_from_settings.cpp:65:
+<sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
+ #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+ ^~~~~~~
+
+etc.
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/12419
+ boost/asio/detail/socket_types.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/boost/asio/detail/socket_types.hpp b/boost/asio/detail/socket_types.hpp
+index e8c7109..7e65d3c 100644
+--- a/boost/asio/detail/socket_types.hpp
++++ b/boost/asio/detail/socket_types.hpp
+@@ -58,7 +58,7 @@
+ #else
+ # include <sys/ioctl.h>
+ # if !defined(__SYMBIAN32__)
+-# include <sys/poll.h>
++# include <poll.h>
+ # endif
+ # include <sys/types.h>
+ # include <sys/stat.h>
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch
new file mode 100644
index 000000000..569c98733
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch
@@ -0,0 +1,145 @@
+From 5c349a1c391c9ce171a1c80f5164fae764f27dba Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Wed, 24 Aug 2016 20:58:59 +0100
+Subject: [PATCH 2/4] boost/test/execution_monitor.hpp: fix mips soft float
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gcc.compile.c++ <builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o
+
+ "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pedantic -pthread -fPIC -Wno-variadic-macros -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_TEST_DYN_LINK=1 -DBOOST_TIMER_DYN_LINK=1 -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o" "libs/test/src/execution_monitor.cpp"
+
+In file included from ./boost/test/impl/execution_monitor.ipp:31:0,
+ from libs/test/src/execution_monitor.cpp:16:
+./boost/test/execution_monitor.hpp:491:27: error: 'FE_DIVBYZERO' was not declared in this scope
+ BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
+ ^~~~~~~~~~~~
+./boost/test/execution_monitor.hpp:492:27: error: 'FE_INEXACT' was not declared in this scope
+ BOOST_FPE_INEXACT = FE_INEXACT,
+ ^~~~~~~~~~
+./boost/test/execution_monitor.hpp:493:27: error: 'FE_INVALID' was not declared in this scope
+ BOOST_FPE_INVALID = FE_INVALID,
+ ^~~~~~~~~~
+./boost/test/execution_monitor.hpp:494:27: error: 'FE_OVERFLOW' was not declared in this scope
+ BOOST_FPE_OVERFLOW = FE_OVERFLOW,
+ ^~~~~~~~~~~
+./boost/test/execution_monitor.hpp:495:27: error: 'FE_UNDERFLOW' was not declared in this scope
+ BOOST_FPE_UNDERFLOW = FE_UNDERFLOW,
+ ^~~~~~~~~~~~
+
+The reason is that some (notably FPU-less) architectures,
+including mips*-nf, don't define/implement some of the
+floating point constants, even though fenv.h is
+available.
+
+The key point is:
+ A fully standards conforming fenv.h does not have to
+ define any FE_* macros, and if it does define them,
+ then it defines macros only for the FP exceptions it
+ actually supports.
+
+So correct usage requires a triple check:
+1) Check BOOST_NO_FENV_H to see if the header is supported.
+2) Include the header and then check FE_ALL_EXCEPT to see
+ if any FP exceptions are supported.
+3) Before using the individual FE_* macros, you need to
+ check for their existence too as not all may be
+ supported.
+
+https://svn.boost.org/trac/boost/ticket/11756
+
+Other projects have similar issues, e.g. pixman, and
+apply similar work-arounds:
+ https://lists.freedesktop.org/archives/pixman/2014-February/003172.html
+
+Architectures are notably also allowed to define FE_ALL_EXCEPT to 0!
+Keeping this in mind, and knowing that the compiler will eliminate
+code that can't be executed, we can change BOOST_FPE_ALL to be 0 for
+the case of compiling using Clang and/or fenv.h being unavailable
+as well, which allows simplification of the #ifdef's in
+execution_monitor.ipp a bit.
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/11756
+ boost/test/execution_monitor.hpp | 26 +++++++++++++++++++++++++-
+ boost/test/impl/execution_monitor.ipp | 10 ++++++++--
+ 2 files changed, 33 insertions(+), 3 deletions(-)
+
+diff --git a/boost/test/execution_monitor.hpp b/boost/test/execution_monitor.hpp
+index 0eee497..44fe59d 100644
+--- a/boost/test/execution_monitor.hpp
++++ b/boost/test/execution_monitor.hpp
+@@ -486,15 +486,39 @@ enum masks {
+ BOOST_FPE_ALL = MCW_EM,
+ #elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \
+ || defined(__ARM_PCS)
+- BOOST_FPE_ALL = 1,
++ BOOST_FPE_ALL = 0,
+ #else
++#if defined(FE_DIVBYZERO)
+ BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
++#else
++ BOOST_FPE_DIVBYZERO = 0,
++#endif
++#if defined(FE_INEXACT)
+ BOOST_FPE_INEXACT = FE_INEXACT,
++#else
++ BOOST_FPE_INEXACT = 0,
++#endif
++#if defined(FE_INVALID)
+ BOOST_FPE_INVALID = FE_INVALID,
++#else
++ BOOST_FPE_INVALID = 0,
++#endif
++#if defined(FE_OVERFLOW)
+ BOOST_FPE_OVERFLOW = FE_OVERFLOW,
++#else
++ BOOST_FPE_OVERFLOW = 0,
++#endif
++#if defined(FE_UNDERFLOW)
+ BOOST_FPE_UNDERFLOW = FE_UNDERFLOW,
++#else
++ BOOST_FPE_UNDERFLOW = 0,
++#endif
+
++#if defined(FE_ALL_EXCEPT)
+ BOOST_FPE_ALL = FE_ALL_EXCEPT,
++#else
++ BOOST_FPE_ALL = 0,
++#endif
+ #endif
+ BOOST_FPE_INV = BOOST_FPE_ALL+1
+ };
+diff --git a/boost/test/impl/execution_monitor.ipp b/boost/test/impl/execution_monitor.ipp
+index f7fc8ea..d1088b9 100644
+--- a/boost/test/impl/execution_monitor.ipp
++++ b/boost/test/impl/execution_monitor.ipp
+@@ -1381,7 +1381,10 @@ enable( unsigned mask )
+ #endif
+
+ return ~old_cw & BOOST_FPE_ALL;
+-#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
++#elif defined(__GLIBC__) && defined(__USE_GNU)
++ if (BOOST_FPE_ALL == 0)
++ /* Not Implemented */
++ return 0;
+ feclearexcept(BOOST_FPE_ALL);
+ int res = feenableexcept( mask );
+ return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
+@@ -1418,7 +1421,10 @@ disable( unsigned mask )
+ #endif
+
+ return ~old_cw & BOOST_FPE_ALL;
+-#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
++#elif defined(__GLIBC__) && defined(__USE_GNU)
++ if (BOOST_FPE_ALL == 0)
++ /* Not Implemented */
++ return BOOST_FPE_INV;
+ feclearexcept(BOOST_FPE_ALL);
+ int res = fedisableexcept( mask );
+ return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch
new file mode 100644
index 000000000..2b48d0d5d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch
@@ -0,0 +1,60 @@
+From 4f19d72ca94418431e068cfd4ffb96ed9b289f6c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Wed, 24 Aug 2016 17:34:59 +0100
+Subject: [PATCH 3/4] smart_ptr: mips assembly doesn't compile in mips16e mode
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gcc.compile.c++ <builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o
+
+ "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o" "libs/date_time/src/gregorian/greg_month.cpp"
+
+{standard input}: Assembler messages:
+{standard input}:17603: Warning: the `dsp' extension requires MIPS32 revision 2 or greater
+{standard input}:17604: Error: unrecognized opcode `ll $3,4($16)'
+{standard input}:17606: Error: unrecognized opcode `sc $2,4($16)'
+{standard input}:17734: Error: unrecognized opcode `ll $3,8($16)'
+{standard input}:17736: Error: unrecognized opcode `sc $2,8($16)'
+{standard input}:18084: Error: unrecognized opcode `ll $3,4($4)'
+{standard input}:18086: Error: unrecognized opcode `sc $2,4($4)'
+{standard input}:18318: Error: unrecognized opcode `ll $3,8($4)'
+{standard input}:18320: Error: unrecognized opcode `sc $2,8($4)'
+{standard input}:19921: Error: unrecognized opcode `ll $3,4($2)'
+{standard input}:19923: Error: unrecognized opcode `sc $3,4($2)'
+{standard input}:20199: Error: unrecognized opcode `ll $4,4($16)'
+{standard input}:20201: Error: unrecognized opcode `sc $2,4($16)'
+{standard input}:23392: Error: unrecognized opcode `ll $4,8($16)'
+{standard input}:23394: Error: unrecognized opcode `sc $2,8($16)'
+...failed updating 1 target...
+
+boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
+contains hand-written MIPS assembly, which is not compatible
+with the MIPS16e instruction set.
+
+By not using this file in MIPS16e mode, we fallback to using
+g++ 4.1+ __sync intrinsics (__sync_fetch_and_add() and
+__sync_val_compare_and_swap()) which are working fine.
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+Upstream-Status: Backport https://svn.boost.org/trac/boost/ticket/12418
+ boost/smart_ptr/detail/sp_counted_base.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp
+index 0addf07..0995ca8 100644
+--- a/boost/smart_ptr/detail/sp_counted_base.hpp
++++ b/boost/smart_ptr/detail/sp_counted_base.hpp
+@@ -65,7 +65,7 @@
+ #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX )
+ # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp>
+
+-#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__)
++#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 )
+ # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp>
+
+ #elif defined( BOOST_SP_HAS_SYNC )
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch
new file mode 100644
index 000000000..ab7826ba2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch
@@ -0,0 +1,59 @@
+From c234cc557f60729e071d6da59747c1a9289555c5 Mon Sep 17 00:00:00 2001
+From: Peter Dimov <pdimov@pdimov.com>
+Date: Sun, 28 Aug 2016 21:28:21 +0300
+Subject: [PATCH 4/4] Use <atomic> by default when BOOST_NO_CXX11_HDR_ATOMIC is
+ not defined
+
+---
+Upstream-Status: Backport [https://github.com/boostorg/smart_ptr/commit/20fedcff2ca3143503ec4e876d47745ab0ec7b0c]
+Signed-off-by: André Draszik <git@andred.net>
+ boost/smart_ptr/detail/atomic_count.hpp | 3 +++
+ boost/smart_ptr/detail/sp_counted_base.hpp | 3 +++
+ boost/smart_ptr/detail/spinlock.hpp | 3 +++
+ 3 files changed, 9 insertions(+)
+
+diff --git a/boost/smart_ptr/detail/atomic_count.hpp b/boost/smart_ptr/detail/atomic_count.hpp
+index 8aefd44..6e4f71a 100644
+--- a/boost/smart_ptr/detail/atomic_count.hpp
++++ b/boost/smart_ptr/detail/atomic_count.hpp
+@@ -73,6 +73,9 @@
+ #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )
+ # include <boost/smart_ptr/detail/atomic_count_nt.hpp>
+
++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
++# include <boost/smart_ptr/detail/atomic_count_std_atomic.hpp>
++
+ #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined( __PATHSCALE__ )
+ # include <boost/smart_ptr/detail/atomic_count_gcc_x86.hpp>
+
+diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp
+index 0995ca8..83ede23 100644
+--- a/boost/smart_ptr/detail/sp_counted_base.hpp
++++ b/boost/smart_ptr/detail/sp_counted_base.hpp
+@@ -44,6 +44,9 @@
+ #elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS )
+ # include <boost/smart_ptr/detail/sp_counted_base_clang.hpp>
+
++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
++# include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp>
++
+ #elif defined( __SNC__ )
+ # include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp>
+
+diff --git a/boost/smart_ptr/detail/spinlock.hpp b/boost/smart_ptr/detail/spinlock.hpp
+index 19f93d7..0b618df 100644
+--- a/boost/smart_ptr/detail/spinlock.hpp
++++ b/boost/smart_ptr/detail/spinlock.hpp
+@@ -43,6 +43,9 @@
+ #elif defined( BOOST_SP_USE_PTHREADS )
+ # include <boost/smart_ptr/detail/spinlock_pt.hpp>
+
++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
++# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
++
+ #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
+ # include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
+
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch
new file mode 100644
index 000000000..917617a04
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch
@@ -0,0 +1,112 @@
+Reference
+
+https://svn.boost.org/trac/boost/changeset/78326
+
+Upstream-Status: Backport
+CVE: CVE-2012-2677
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/boost/pool/pool.hpp.old b/boost/pool/pool.hpp
+index c47b11f..417a1e0 100644
+--- a/boost/pool/pool.hpp.old
++++ b/boost/pool/pool.hpp
+@@ -26,6 +26,8 @@
+
+ #include <boost/pool/poolfwd.hpp>
+
++// std::numeric_limits
++#include <boost/limits.hpp>
+ // boost::integer::static_lcm
+ #include <boost/integer/common_factor_ct.hpp>
+ // boost::simple_segregated_storage
+@@ -355,6 +357,15 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ return s;
+ }
+
++ size_type max_chunks() const
++ { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
++ size_type partition_size = alloc_size();
++ size_type POD_size = integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
++ size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
++
++ return max_chunks;
++ }
++
+ static void * & nextof(void * const ptr)
+ { //! \returns Pointer dereferenced.
+ //! (Provided and used for the sake of code readability :)
+@@ -375,6 +386,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ //! the first time that object needs to allocate system memory.
+ //! The default is 32. This parameter may not be 0.
+ //! \param nmax_size is the maximum number of chunks to allocate in one block.
++ set_next_size(nnext_size);
++ set_max_size(nmax_size);
+ }
+
+ ~pool()
+@@ -398,8 +411,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ }
+ void set_next_size(const size_type nnext_size)
+ { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.
+- //! \returns nnext_size.
+- next_size = start_size = nnext_size;
++ BOOST_USING_STD_MIN();
++ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks());
+ }
+ size_type get_max_size() const
+ { //! \returns max_size.
+@@ -407,7 +420,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ }
+ void set_max_size(const size_type nmax_size)
+ { //! Set max_size.
+- max_size = nmax_size;
++ BOOST_USING_STD_MIN();
++ max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks());
+ }
+ size_type get_requested_size() const
+ { //! \returns the requested size passed into the constructor.
+@@ -708,9 +722,9 @@ void * pool<UserAllocator>::malloc_need_resize()
+
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // initialize it,
+ store().add_block(node.begin(), node.element_size(), partition_size);
+@@ -748,9 +762,9 @@ void * pool<UserAllocator>::ordered_malloc_need_resize()
+
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // initialize it,
+ // (we can use "add_block" here because we know that
+@@ -792,6 +806,8 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n)
+ { //! Gets address of a chunk n, allocating new memory if not already available.
+ //! \returns Address of chunk n if allocated ok.
+ //! \returns 0 if not enough memory for n chunks.
++ if (n > max_chunks())
++ return 0;
+
+ const size_type partition_size = alloc_size();
+ const size_type total_req_size = n * requested_size;
+@@ -840,9 +856,9 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n)
+
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // insert it into the list,
+ // handle border case.
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch
new file mode 100644
index 000000000..595ba1786
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch
@@ -0,0 +1,31 @@
+From cabfcba1ff7511ffd6b91ca244288d44f585aad2 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Fri, 23 Sep 2016 01:04:50 -0700
+Subject: [PATCH] boost-math: disable pch for gcc
+
+Upstream-Status: Inappropriate [*]
+
+* It's a work around for a defect when build in parallel:
+https://svn.boost.org/trac/boost/ticket/12477
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ libs/math/build/Jamfile.v2 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/math/build/Jamfile.v2 b/libs/math/build/Jamfile.v2
+index e19fb2e..82472a7 100644
+--- a/libs/math/build/Jamfile.v2
++++ b/libs/math/build/Jamfile.v2
+@@ -13,7 +13,7 @@ project
+ #<toolset>intel-linux:<pch>off
+ <toolset>intel-darwin:<pch>off
+ <toolset>msvc-7.1:<pch>off
+- <toolset>gcc,<target-os>windows:<pch>off
++ <toolset>gcc:<pch>off
+ #<toolset>gcc:<cxxflags>-fvisibility=hidden
+ <toolset>intel-linux:<cxxflags>-fvisibility=hidden
+ #<toolset>sun:<cxxflags>-xldscope=hidden
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb
deleted file mode 100644
index 4d824c85b..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-include boost-${PV}.inc
-include boost.inc
-
-SRC_URI += "\
- file://arm-intrinsics.patch \
- file://0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch;striplevel=2 \
- file://consider-hardfp.patch \
-"
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb
new file mode 100644
index 000000000..40e3870a3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb
@@ -0,0 +1,13 @@
+include boost-${PV}.inc
+include boost.inc
+
+SRC_URI += "\
+ file://arm-intrinsics.patch \
+ file://consider-hardfp.patch \
+ file://boost-CVE-2012-2677.patch \
+ file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \
+ file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \
+ file://0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch \
+ file://0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch \
+ file://boost-math-disable-pch-for-gcc.patch \
+"
diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch
index 4b4b287d4..4a8ae5f4b 100644
--- a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch
@@ -6,9 +6,13 @@ This solves errors such as
| Running hooks in [...]/rootfs/etc/ca-certificates/update.d...
| [...]/usr/sbin/update-ca-certificates: line 194: Not: command not found
+| [...]/usr/sbin/update-ca-certificates: line 230: Not a directory: --: command not found
+| E: Not a directory: -- exited with code 127.
+
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
---
sbin/update-ca-certificates | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
@@ -24,7 +28,7 @@ Index: git/sbin/update-ca-certificates
- VERBOSE_ARG=
- [ "$verbose" = 0 ] || VERBOSE_ARG="--verbose"
- eval run-parts "$VERBOSE_ARG" --test -- "$HOOKSDIR" | while read hook
-+ eval run-parts --test -- "$HOOKSDIR" | while read hook
++ eval run-parts --test "$HOOKSDIR" | while read hook
do
( cat "$ADDED"
cat "$REMOVED" ) | "$hook" || echo "E: $hook exited with code $?."
diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch
deleted file mode 100644
index bf027233d..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status: Pending
-
-From 111e905fe931da1a3800accfc675cc01c8ee080c Mon Sep 17 00:00:00 2001
-From: Ulf Samuelsson <ulf@emagii.com>
-Date: Tue, 28 Feb 2012 06:42:58 +0100
-Subject: [PATCH] update-ca-certificates: remove c rehash
-
-Updated earlier patch to apply clean on 2012-02-12
-Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
----
- sbin/update-ca-certificates | 20 ++++++++++----------
- 1 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
-index 5375950..c567e3d 100755
---- a/sbin/update-ca-certificates
-+++ b/sbin/update-ca-certificates
-@@ -132,16 +132,16 @@ rm -f "$CERTBUNDLE"
- ADDED_CNT=$(wc -l < "$ADDED")
- REMOVED_CNT=$(wc -l < "$REMOVED")
-
--if [ "$ADDED_CNT" -gt 0 ] || [ "$REMOVED_CNT" -gt 0 ]
--then
-- # only run if set of files has changed
-- if [ "$verbose" = 0 ]
-- then
-- c_rehash . > /dev/null
-- else
-- c_rehash .
-- fi
--fi
-+#if [ "$ADDED_CNT" -gt 0 ] || [ "$REMOVED_CNT" -gt 0 ]
-+#then
-+# # only run if set of files has changed
-+# if [ "$verbose" = 0 ]
-+# then
-+# c_rehash . > /dev/null
-+# else
-+# c_rehash .
-+# fi
-+#fi
-
- chmod 0644 "$TEMPBUNDLE"
- mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
---
-1.7.4.1
diff --git a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb
index e0f193913..1bea0676b 100644
--- a/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb
@@ -9,12 +9,12 @@ LIC_FILES_CHKSUM = "file://debian/copyright;md5=e7358b9541ccf3029e9705ed8de57968
# This is needed to ensure we can run the postinst at image creation time
DEPENDS = "ca-certificates-native"
-DEPENDS_class-native = ""
+DEPENDS_class-native = "openssl-native"
+DEPENDS_class-nativesdk = "ca-certificates-native openssl-native"
SRCREV = "f54715702c5c0581c9461f78fd84e2c8d2ec243c"
SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
- file://0001-update-ca-certificates-remove-c-rehash.patch \
file://0002-update-ca-certificates-use-SYSROOT.patch \
file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
file://update-ca-certificates-support-Toybox.patch \
@@ -77,4 +77,6 @@ do_install_append_class-native () {
SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
}
+RDEPENDS_${PN} += "openssl"
+
BBCLASSEXTEND += "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/import-layers/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
index 2974e3664..ceac0fe31 100644
--- a/import-layers/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -30,7 +30,7 @@ PACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/s
PACKAGECONFIG[policykit] = "--with-polkit,--without-polkit,polkit"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--with-systemdsystemunitdir="
-FILES_${PN} += "${localstatedir}/log/ConsoleKit ${exec_prefix}/lib/ConsoleKit \
+FILES_${PN} += "${exec_prefix}/lib/ConsoleKit \
${libdir}/ConsoleKit ${systemd_unitdir} ${base_libdir} \
${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
@@ -45,6 +45,6 @@ do_install_append() {
> ${D}${sysconfdir}/tmpfiles.d/consolekit.conf
fi
- # Remove /var/run from package as console-kit-daemon will populate it on startup
- rm -fr "${D}${localstatedir}/run"
+ # Remove /var/ directories as the daemon creates them as required
+ rm -rf ${D}${localstatedir}
}
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch b/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
new file mode 100644
index 000000000..74e5d99cf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
@@ -0,0 +1,43 @@
+[PATCH] replace krb5-config with pkg-config
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index e99b303..dc93f39 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1196,7 +1196,7 @@ AC_ARG_WITH(gssapi,
+ fi
+ ])
+
+-: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
++KRB5CONFIG=`which pkg-config`
+
+ save_CPPFLAGS="$CPPFLAGS"
+ AC_MSG_CHECKING([if GSS-API support is requested])
+@@ -1207,7 +1207,7 @@ if test x"$want_gss" = xyes; then
+ if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
+ GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
+ elif test -f "$KRB5CONFIG"; then
+- GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
++ GSSAPI_INCS=`$KRB5CONFIG --cflags mit-krb5-gssapi`
+ elif test "$GSSAPI_ROOT" != "yes"; then
+ GSSAPI_INCS="-I$GSSAPI_ROOT/include"
+ fi
+@@ -1300,7 +1300,7 @@ if test x"$want_gss" = xyes; then
+ elif test -f "$KRB5CONFIG"; then
+ dnl krb5-config doesn't have --libs-only-L or similar, put everything
+ dnl into LIBS
+- gss_libs=`$KRB5CONFIG --libs gssapi`
++ gss_libs=`$KRB5CONFIG --libs mit-krb5-gssapi`
+ LIBS="$gss_libs $LIBS"
+ else
+ case $host in
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.47.1.bb b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.47.1.bb
deleted file mode 100644
index c2173d8a0..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.47.1.bb
+++ /dev/null
@@ -1,68 +0,0 @@
-SUMMARY = "Command line tool and library for client-side URL transfers"
-HOMEPAGE = "http://curl.haxx.se/"
-BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
-SECTION = "console/network"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac"
-
-SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2"
-
-# curl likes to set -g0 in CFLAGS, so we stop it
-# from mucking around with debug options
-#
-SRC_URI += " file://configure_ac.patch"
-
-SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
-SRC_URI[sha256sum] = "ddc643ab9382e24bbe4747d43df189a0a6ce38fcb33df041b9cb0b3cd47ae98f"
-
-inherit autotools pkgconfig binconfig multilib_header
-
-PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} gnutls proxy zlib"
-PACKAGECONFIG_class-native = "ipv6 proxy ssl zlib"
-PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl zlib"
-
-PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
-PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
-PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
-PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn"
-PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
-PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
-PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
-PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
-PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
-PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
-PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
-PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
-PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
-PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
-PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
-
-EXTRA_OECONF = " \
- --enable-crypto-auth \
- --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
- --without-libmetalink \
- --without-libpsl \
- --without-nghttp2 \
-"
-
-do_install_append() {
- oe_multilib_header curl/curlbuild.h
-}
-
-do_install_append_class-target() {
- # cleanup buildpaths from curl-config
- sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/curl-config
-}
-
-PACKAGES =+ "lib${BPN}"
-
-FILES_lib${BPN} = "${libdir}/lib*.so.*"
-RRECOMMENDS_lib${BPN} += "ca-certificates"
-
-FILES_${PN} += "${datadir}/zsh"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.50.1.bb b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.50.1.bb
new file mode 100644
index 000000000..a21419a4d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/curl/curl_7.50.1.bb
@@ -0,0 +1,71 @@
+SUMMARY = "Command line tool and library for client-side URL transfers"
+HOMEPAGE = "http://curl.haxx.se/"
+BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
+SECTION = "console/network"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac"
+
+SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
+ file://0001-replace-krb5-config-with-pkg-config.patch \
+"
+
+# curl likes to set -g0 in CFLAGS, so we stop it
+# from mucking around with debug options
+#
+SRC_URI += " file://configure_ac.patch"
+
+SRC_URI[md5sum] = "015f6a0217ca6f2c5442ca406476920b"
+SRC_URI[sha256sum] = "3c12c5f54ccaa1d40abc65d672107dcc75d3e1fcb38c267484334280096e5156"
+
+inherit autotools pkgconfig binconfig multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} gnutls proxy zlib"
+PACKAGECONFIG_class-native = "ipv6 proxy ssl zlib"
+PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl zlib"
+
+PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
+PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
+PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
+PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn"
+PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
+PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
+PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
+PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
+PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
+PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
+PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
+PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
+PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
+PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
+
+EXTRA_OECONF = " \
+ --enable-crypto-auth \
+ --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
+ --without-libmetalink \
+ --without-libpsl \
+ --without-nghttp2 \
+"
+
+do_install_append() {
+ oe_multilib_header curl/curlbuild.h
+}
+
+do_install_append_class-target() {
+ # cleanup buildpaths from curl-config
+ sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/curl-config
+}
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${libdir}/lib*.so.*"
+RRECOMMENDS_lib${BPN} += "ca-certificates"
+
+FILES_${PN} += "${datadir}/zsh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch b/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
index d4c6bb8e0..68a213136 100644
--- a/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
@@ -14,10 +14,10 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
dist/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/dist/Makefile.in b/dist/Makefile.in
-index 0a42375..d9e05b9 100644
---- a/dist/Makefile.in
-+++ b/dist/Makefile.in
+Index: db-6.0.30/dist/Makefile.in
+===================================================================
+--- db-6.0.30.orig/dist/Makefile.in
++++ db-6.0.30/dist/Makefile.in
@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
$(LN) -s $(libdb_version) $(libdb)
@@ -27,6 +27,3 @@ index 0a42375..d9e05b9 100644
$(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
$(LIBCSO_LIBS)
$(RM) $(libdb)
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch b/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
index 329bff5d3..868040834 100644
--- a/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
@@ -15,10 +15,10 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/Makefile.in b/Makefile.in
-index e451f70..0a42375 100644
---- a/Makefile.in
-+++ b/Makefile.in
+Index: db-6.0.30/dist/Makefile.in
+===================================================================
+--- db-6.0.30.orig/dist/Makefile.in
++++ db-6.0.30/dist/Makefile.in
@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
$(LN) -s $(libdb_version) $(libdb)
diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/import-layers/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
index 34e8db84d..6a8eada60 100644
--- a/import-layers/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
@@ -10,9 +10,11 @@ Upstream-Status: Inappropriate [embedded specific]
Author: jbowler@nslu2-linux.org
---- db-5.1.19/src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600
-+++ db-5.1.19/src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600
-@@ -474,6 +474,25 @@
+Index: db-6.0.30/src/dbinc/mutex_int.h
+===================================================================
+--- db-6.0.30.orig/src/dbinc/mutex_int.h
++++ db-6.0.30/src/dbinc/mutex_int.h
+@@ -474,6 +474,25 @@ typedef unsigned char tsl_t;
#ifdef LOAD_ACTUAL_MUTEX_CODE
/* gcc/arm: 0 is clear, 1 is set. */
@@ -38,7 +40,7 @@ Author: jbowler@nslu2-linux.org
#define MUTEX_SET(tsl) ({ \
int __r; \
__asm__ volatile( \
-@@ -484,6 +503,7 @@
+@@ -484,6 +503,7 @@ typedef unsigned char tsl_t;
); \
__r & 1; \
})
diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch b/import-layers/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch
index 2c7f1e186..27632e1dd 100644
--- a/import-layers/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch
@@ -6,9 +6,11 @@ Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---- dist.orig/Makefile.in 2012-05-11 19:57:48.000000000 +0200
-+++ dist/Makefile.in 2013-10-31 18:17:11.875532522 +0100
-@@ -1034,7 +1034,7 @@
+Index: db-6.0.30/dist/Makefile.in
+===================================================================
+--- db-6.0.30.orig/dist/Makefile.in
++++ db-6.0.30/dist/Makefile.in
+@@ -1041,7 +1041,7 @@ db_recover: db_recover@o@ util_sig@o@ $(
db_recover@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
$(POSTLINK) $@
diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb b/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
index c724f049f..0b51a1d44 100644
--- a/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
@@ -15,15 +15,17 @@ LICENSE = "Sleepycat"
VIRTUAL_NAME ?= "virtual/db"
RCONFLICTS_${PN} = "db3"
+PR = "r1"
+
SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
-SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \
+SRC_URI += "file://arm-thumb-mutex_db5.patch \
file://fix-parallel-build.patch \
"
SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"
SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628"
-LIC_FILES_CHKSUM = "file://../LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
inherit autotools
@@ -36,14 +38,6 @@ inherit autotools
# to select the correct db in the build (distro) .conf
PROVIDES += "${VIRTUAL_NAME}"
-# bitbake isn't quite clever enough to deal with sleepycat,
-# the distribution sits in the expected directory, but all
-# the builds must occur from a sub-directory. The following
-# persuades bitbake to go to the right place
-S = "${WORKDIR}/db-${PV}/dist"
-B = "${WORKDIR}/db-${PV}/build_unix"
-SPDX_S = "${WORKDIR}/db-${PV}"
-
# The executables go in a separate package - typically there
# is no need to install these unless doing real database
# management on the system.
@@ -75,21 +69,23 @@ ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
MUTEX = ""
MUTEX_arm = "${ARM_MUTEX}"
MUTEX_armeb = "${ARM_MUTEX}"
-EXTRA_OECONF += "${MUTEX}"
-EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
+EXTRA_OECONF += "${MUTEX} STRIP=true"
+EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
+
+AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
# Cancel the site stuff - it's set for db3 and destroys the
# configure.
CONFIG_SITE = ""
do_configure() {
- gnu-configize --force ${S}
- export STRIP="true"
+ cd ${B}
+ gnu-configize --force ${AUTOTOOLS_SCRIPT_PATH}
oe_runconf
}
do_compile_prepend() {
- sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \
- ${B}/libtool
+ # Stop libtool adding RPATHs
+ sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool
}
do_install_append() {
@@ -114,4 +110,3 @@ INSANE_SKIP_${PN} = "dev-so"
INSANE_SKIP_${PN}-cxx = "dev-so"
BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.30.bb b/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.30.bb
deleted file mode 100644
index 50a469b08..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.30.bb
+++ /dev/null
@@ -1,124 +0,0 @@
-# Version 6 of the Berkeley DB from Oracle (formerly Sleepycat)
-#
-# At present this package only installs the DB code
-# itself (shared libraries, .a in the dev package),
-# documentation and headers.
-#
-# The headers have the same names as those as v3
-# of the DB, only one version can be used *for dev*
-# at once - DB3 and DB6 can both be installed on the
-# same system at the same time if really necessary.
-SECTION = "libs"
-SUMMARY = "Berkeley Database v6"
-HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
-LICENSE = "AGPL-3.0"
-VIRTUAL_NAME ?= "virtual/db"
-RCONFLICTS_${PN} = "db3"
-
-# Note, when upgraded to 6.1.x, a patch in RPM will need to be removed to activate db 6.1 support.
-
-SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
-SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \
- file://fix-parallel-build.patch \
- file://Makefile-let-libso_target-depend-on-bt_rec.patch \
- file://Makefile-let-libdb-6.0.la-depend-os_map.l.patch;patchdir=.. \
- "
-
-SRC_URI[md5sum] = "ad28eb86ad3203b5422844db179c585b"
-SRC_URI[sha256sum] = "608e4b1cf390e9bf54c0ef00c5bd9ca76d36e2261b9f4d33d54516f3f6a20fd2"
-
-# Exclude NC versions which lack AES encryption
-UPSTREAM_CHECK_REGEX = "db-(?P<pver>\d+\.\d+(\.\d+)?).tar"
-UPSTREAM_CHECK_URI = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
-
-LIC_FILES_CHKSUM = "file://../LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
-
-inherit autotools
-
-# Put virtual/db in any appropriate provider of a
-# relational database, use it as a dependency in
-# place of a specific db and use:
-#
-# PREFERRED_PROVIDER_virtual/db
-#
-# to select the correct db in the build (distro) .conf
-PROVIDES += "${VIRTUAL_NAME}"
-
-# bitbake isn't quite clever enough to deal with sleepycat,
-# the distribution sits in the expected directory, but all
-# the builds must occur from a sub-directory. The following
-# persuades bitbake to go to the right place
-S = "${WORKDIR}/db-${PV}/dist"
-B = "${WORKDIR}/db-${PV}/build_unix"
-SPDX_S = "${WORKDIR}/db-${PV}"
-
-# The executables go in a separate package - typically there
-# is no need to install these unless doing real database
-# management on the system.
-inherit lib_package
-
-PACKAGES =+ "${PN}-cxx"
-FILES_${PN}-cxx = "${libdir}/*cxx*so"
-
-
-# The dev package has the .so link (as in db3) and the .a's -
-# it is therefore incompatible (cannot be installed at the
-# same time) as the db3 package
-# sort out the .so since they do version prior to the .so
-SOLIBS = "-6*.so"
-FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
-
-#configuration - set in local.conf to override
-# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
-DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
-
-EXTRA_OECONF = "${DB6_CONFIG} --enable-shared --enable-cxx --with-sysroot"
-
-# Override the MUTEX setting here, the POSIX library is
-# the default - "POSIX/pthreads/library".
-# Don't ignore the nice SWP instruction on the ARM:
-# These enable the ARM assembler mutex code
-ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
-MUTEX = ""
-MUTEX_arm = "${ARM_MUTEX}"
-MUTEX_armeb = "${ARM_MUTEX}"
-EXTRA_OECONF += "${MUTEX}"
-EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
-
-# Cancel the site stuff - it's set for db3 and destroys the
-# configure.
-CONFIG_SITE = ""
-do_configure() {
- gnu-configize --force ${S}
- export STRIP="true"
- oe_runconf
-}
-
-do_compile_prepend() {
- sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \
- ${B}/libtool
-}
-
-do_install_append() {
- mkdir -p ${D}/${includedir}/db60
- mv ${D}/${includedir}/db.h ${D}/${includedir}/db60/.
- mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db60/.
- ln -s db60/db.h ${D}/${includedir}/db.h
- ln -s db60/db_cxx.h ${D}/${includedir}/db_cxx.h
-
- # The docs end up in /usr/docs - not right.
- if test -d "${D}/${prefix}/docs"
- then
- mkdir -p "${D}/${datadir}"
- test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
- mv "${D}/${prefix}/docs" "${D}/${docdir}"
- fi
-
- chown -R root:root ${D}
-}
-
-INSANE_SKIP_${PN} = "dev-so"
-INSANE_SKIP_${PN}-cxx = "dev-so"
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.35.bb b/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.35.bb
new file mode 100644
index 000000000..32afbe82d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/db/db_6.0.35.bb
@@ -0,0 +1,122 @@
+# Version 6 of the Berkeley DB from Oracle (formerly Sleepycat)
+#
+# At present this package only installs the DB code
+# itself (shared libraries, .a in the dev package),
+# documentation and headers.
+#
+# The headers have the same names as those as v3
+# of the DB, only one version can be used *for dev*
+# at once - DB3 and DB6 can both be installed on the
+# same system at the same time if really necessary.
+SECTION = "libs"
+SUMMARY = "Berkeley Database v6"
+HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+LICENSE = "AGPL-3.0"
+VIRTUAL_NAME ?= "virtual/db"
+RCONFLICTS_${PN} = "db3"
+
+PR = "r1"
+
+# Note, when upgraded to 6.1.x, a patch in RPM will need to be removed to activate db 6.1 support.
+SRC_URI = "http://distfiles.gentoo.org/distfiles/db-${PV}.tar.gz \
+ file://arm-thumb-mutex_db5.patch \
+ file://fix-parallel-build.patch \
+ file://Makefile-let-libso_target-depend-on-bt_rec.patch \
+ file://Makefile-let-libdb-6.0.la-depend-os_map.l.patch \
+ "
+
+SRC_URI[md5sum] = "c65a4d3e930a116abaaf69edfc697f25"
+SRC_URI[sha256sum] = "24421affa8ae436fe427ae4f5f2d1634da83d3d55a5ad6354a98eeedb825de55"
+
+# Exclude NC versions which lack AES encryption
+UPSTREAM_CHECK_REGEX = "db-(?P<pver>\d+\.\d+(\.\d+)?).tar"
+UPSTREAM_CHECK_URI = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
+
+# Put virtual/db in any appropriate provider of a
+# relational database, use it as a dependency in
+# place of a specific db and use:
+#
+# PREFERRED_PROVIDER_virtual/db
+#
+# to select the correct db in the build (distro) .conf
+PROVIDES += "${VIRTUAL_NAME}"
+
+inherit autotools
+
+# The executables go in a separate package - typically there
+# is no need to install these unless doing real database
+# management on the system.
+inherit lib_package
+
+PACKAGES =+ "${PN}-cxx"
+FILES_${PN}-cxx = "${libdir}/*cxx*so"
+
+# The dev package has the .so link (as in db3) and the .a's -
+# it is therefore incompatible (cannot be installed at the
+# same time) as the db3 package
+# sort out the .so since they do version prior to the .so
+SOLIBS = "-6*.so"
+FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
+
+#configuration - set in local.conf to override
+# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
+DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
+
+EXTRA_OECONF = "${DB6_CONFIG} --enable-shared --enable-cxx --with-sysroot"
+
+# Cancel the site stuff - it's set for db3 and destroys the configure.
+CONFIG_SITE = ""
+
+AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
+
+do_configure() {
+ cd ${B}
+ gnu-configize --force ${AUTOTOOLS_SCRIPT_PATH}
+ oe_runconf
+}
+
+# Override the MUTEX setting here, the POSIX library is
+# the default - "POSIX/pthreads/library".
+# Don't ignore the nice SWP instruction on the ARM:
+# These enable the ARM assembler mutex code
+ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
+MUTEX = ""
+MUTEX_arm = "${ARM_MUTEX}"
+MUTEX_armeb = "${ARM_MUTEX}"
+EXTRA_OECONF += "${MUTEX}"
+EXTRA_OEMAKE_append_class-target = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
+EXTRA_OEMAKE += "STRIP=true"
+
+do_compile_prepend() {
+ # Stop libtool adding RPATHs
+ sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/libtool
+}
+
+do_install_append() {
+ mkdir -p ${D}/${includedir}/db60
+ mv ${D}/${includedir}/db.h ${D}/${includedir}/db60/.
+ mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db60/.
+ ln -s db60/db.h ${D}/${includedir}/db.h
+ ln -s db60/db_cxx.h ${D}/${includedir}/db_cxx.h
+
+ # The docs end up in /usr/docs - not right.
+ if test -d "${D}/${prefix}/docs"
+ then
+ mkdir -p "${D}/${datadir}"
+ test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
+ mv "${D}/${prefix}/docs" "${D}/${docdir}"
+ fi
+
+ chown -R root:root ${D}
+}
+
+# libdb isn't versioned in the typical manner (libdb-6.0.so is the full library
+# name) so skip these checks.
+INSANE_SKIP_${PN} = "dev-so"
+INSANE_SKIP_${PN}-cxx = "dev-so"
+
+BBCLASSEXTEND = "native nativesdk"
+
+RECIPE_NO_UPDATE_REASON = "latest db does not work with RPM-5.x due to changes in locking semantics"
diff --git a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.7.bb b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.7.bb
deleted file mode 100644
index 6a1d5bf83..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.7.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Miscellaneous utilities specific to Debian"
-SECTION = "base"
-LICENSE = "GPLv2 & SMAIL_GPL"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160204T040501Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
-# the package is taken from snapshots.debian.org; that source is static and goes stale
-# so we check the latest upstream from a directory that does get updated
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
-
-SRC_URI[md5sum] = "00186f527b35e2cecd4db593c6d512d0"
-SRC_URI[sha256sum] = "a269cacd40f52f2fa5d5636357714a49e8538459c16d77772efaa23711fe53d9"
-
-inherit autotools update-alternatives
-
-do_configure_prepend() {
- sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
-}
-
-do_install_append() {
- if [ "${base_bindir}" != "${bindir}" ]; then
- # Debian places some utils into ${base_bindir} as does busybox
- install -d ${D}${base_bindir}
- for app in run-parts tempfile; do
- mv ${D}${bindir}/$app ${D}${base_bindir}/$app
- done
- fi
-}
-
-# Note that we package the update-alternatives name.
-#
-PACKAGES =+ "${PN}-run-parts"
-FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
-
-RDEPENDS_${PN} += "${PN}-run-parts"
-
-
-ALTERNATIVE_PRIORITY="30"
-ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
-ALTERNATIVE_${PN}-run-parts = "run-parts"
-
-ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
-ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
-ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
-ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
-ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
-ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
-ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
diff --git a/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.bb b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.bb
new file mode 100644
index 000000000..d969fd3c9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/debianutils/debianutils_4.8.bb
@@ -0,0 +1,48 @@
+SUMMARY = "Miscellaneous utilities specific to Debian"
+SECTION = "base"
+LICENSE = "GPLv2 & SMAIL_GPL"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160629T224408Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
+# the package is taken from snapshots.debian.org; that source is static and goes stale
+# so we check the latest upstream from a directory that does get updated
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
+
+SRC_URI[md5sum] = "66a37e5ff17be431319bd0b43e9a46b5"
+SRC_URI[sha256sum] = "afa95bbe6b6fd3ef3c0c838b2d7232f09fabeff593ca4b5583cffa6748567ee2"
+
+inherit autotools update-alternatives
+
+do_configure_prepend() {
+ sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
+}
+
+do_install_append() {
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ # Debian places some utils into ${base_bindir} as does busybox
+ install -d ${D}${base_bindir}
+ for app in run-parts tempfile; do
+ mv ${D}${bindir}/$app ${D}${base_bindir}/$app
+ done
+ fi
+}
+
+# Note that we package the update-alternatives name.
+#
+PACKAGES =+ "${PN}-run-parts"
+FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
+
+RDEPENDS_${PN} += "${PN}-run-parts"
+
+
+ALTERNATIVE_PRIORITY="30"
+ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
+ALTERNATIVE_${PN}-run-parts = "run-parts"
+
+ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
+ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
+ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
+ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
+ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
+ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
+ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
diff --git a/import-layers/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb
index 97a47614c..44eb2e3df 100644
--- a/import-layers/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb
@@ -7,7 +7,7 @@ LICENSE = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=dfcbabf9131dc9a95febef6753a2958b \
file://src/enchant.h;beginline=1;endline=29;md5=8d881caa1d37523567e1d8f726675a18"
-DEPENDS = "aspell glib-2.0"
+DEPENDS = "glib-2.0"
inherit autotools pkgconfig
@@ -18,15 +18,17 @@ SRC_URI = "http://www.abisource.com/downloads/enchant/${PV}/enchant-${PV}.tar.gz
SRC_URI[md5sum] = "de11011aff801dc61042828041fb59c7"
SRC_URI[sha256sum] = "2fac9e7be7e9424b2c5570d8affe568db39f7572c10ed48d4e13cddf03f7097f"
-EXTRA_OECONF = "--with-aspell-prefix=${STAGING_DIR_HOST}${prefix} \
- --enable-aspell br_cv_binreloc=no \
- "
+PACKAGECONFIG ??= "aspell"
+PACKAGECONFIG[aspell] = " --with-aspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-aspell, --disable-aspell, aspell, aspell"
+PACKAGECONFIG[ispell] = " --with-ispell-prefix=${STAGING_DIR_HOST}${prefix} --enable-ispell, --disable-ispell, ispell, ispell"
+PACKAGECONFIG[uspell] = " --with-uspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-uspell, --disable-uspell, uspell, uspell"
+PACKAGECONFIG[hspell] = " --with-hspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-hspell, --disable-hspell, hspell, hspell"
+PACKAGECONFIG[myspell] = "--with-myspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-myspell, --disable-myspell, myspell, myspell"
+
+EXTRA_OECONF = "br_cv_binreloc=no"
export CXXFLAGS += " -L${STAGING_LIBDIR} -lstdc++ "
FILES_${PN} = "${bindir} ${libdir}/*${SOLIBS} ${datadir}/${BPN} ${libdir}/${BPN}/*.so"
FILES_${PN}-dev += "${libdir}/${BPN}/*{SOLIBSDEV} ${libdir}/${BPN}/*.la"
FILES_${PN}-staticdev += "${libdir}/${BPN}/*.a"
-
-RDEPENDS_${PN} += "aspell"
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.bb b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.bb
deleted file mode 100644
index adf8c5bd3..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-SUMMARY = "Key/value database library with extensible hashing"
-HOMEPAGE = "http://www.gnu.org/software/gdbm/"
-SECTION = "libs"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
-
-
-SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
- file://run-ptest \
- file://ptest.patch \
- "
-
-SRC_URI[md5sum] = "72c832680cf0999caedbe5b265c8c1bd"
-SRC_URI[sha256sum] = "8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3"
-
-inherit autotools gettext texinfo lib_package ptest
-
-# Needed for dbm python module
-EXTRA_OECONF = "-enable-libgdbm-compat"
-
-# Stop presence of dbm/nbdm on the host contaminating builds
-CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install_append () {
- # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
- # these headers
- install -d ${D}${includedir}/gdbm
- ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
- ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
-}
-
-RDEPENDS_${PN}-ptest += "diffutils"
-
-do_compile_ptest() {
- oe_runmake -C tests buildtests
-}
-
-PACKAGES =+ "${PN}-compat \
- "
-FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
- "
diff --git a/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.12.bb b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.12.bb
new file mode 100644
index 000000000..c380073c3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gdbm/gdbm_1.12.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Key/value database library with extensible hashing"
+HOMEPAGE = "http://www.gnu.org/software/gdbm/"
+SECTION = "libs"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
+
+
+SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
+ file://run-ptest \
+ file://ptest.patch \
+ "
+
+SRC_URI[md5sum] = "9ce96ff4c99e74295ea19040931c8fb9"
+SRC_URI[sha256sum] = "d97b2166ee867fd6ca5c022efee80702d6f30dd66af0e03ed092285c3af9bcea"
+
+inherit autotools gettext texinfo lib_package ptest
+
+# Needed for dbm python module
+EXTRA_OECONF = "-enable-libgdbm-compat"
+
+# Stop presence of dbm/nbdm on the host contaminating builds
+CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append () {
+ # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
+ # these headers
+ install -d ${D}${includedir}/gdbm
+ ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
+ ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
+}
+
+RDEPENDS_${PN}-ptest += "diffutils"
+
+do_compile_ptest() {
+ oe_runmake -C tests buildtests
+}
+
+PACKAGES =+ "${PN}-compat \
+ "
+FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
+ "
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
index 63aed05ec..26fd8ef8b 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
@@ -5,7 +5,7 @@ this patch avoids these kinds of errors:
| configure.in:2240: error: automatic de-ANSI-fication support has been removed
| Makefile.am:28: error: automatic de-ANSI-fication support has been removed
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/02
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
index 325ffe491..325ffe491 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch
new file mode 100644
index 000000000..665367658
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/0001-confiure.ac-Believe-the-cflags-from-environment.patch
@@ -0,0 +1,52 @@
+From ae1a4c37417a3bbbf8ea1cab198982b0cad47e29 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 12 Aug 2016 17:08:13 +0000
+Subject: [PATCH] confiure.ac: Believe the cflags from environment
+
+In some toolchains e.g. OpenEmbedded -march options
+are passed on compiler cmdline, it does not use
+the expected target triplets to make these decision
+during configure.
+
+Secondly, dont set armv4 for march when no selection
+is made, since it is passed from cmdline
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate[OE-Specific]
+
+ configure.ac | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 857ea3b..359e919 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -607,15 +607,6 @@ case $host in
+ GMP_INCLUDE_MPN(arm/arm-defs.m4)
+ CALLING_CONVENTIONS_OBJS='arm32call.lo arm32check.lo'
+
+- # This is needed for clang, which is not content with flags like -mfpu=neon
+- # alone.
+- case $host in
+- *-*-*eabi)
+- gcc_cflags_fpmode="-mfloat-abi=softfp" ;;
+- *-*-*eabihf)
+- gcc_cflags_fpmode="-mfloat-abi=hard" ;;
+- esac
+-
+ # FIXME: We make mandatory compiler options optional here. We should
+ # either enforce them, or organise to strip paths as the corresponding
+ # options fail.
+@@ -686,8 +677,6 @@ case $host in
+ ;;
+ *)
+ path="arm"
+- gcc_cflags_arch="-march=armv4"
+- GMP_DEFINE_RAW(["define(<NOTHUMB>,1)"])
+ ;;
+ esac
+ ;;
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/amd64.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/amd64.patch
index 564d12d42..564d12d42 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/amd64.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/amd64.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/use-includedir.patch b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/use-includedir.patch
index 74904a253..74904a253 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/use-includedir.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp-6.1.1/use-includedir.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.0.bb b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.0.bb
deleted file mode 100644
index de827f5b7..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.0.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-require gmp.inc
-
-LICENSE = "GPLv2+ | LGPLv3+"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
- file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-"
-
-REVISION = ""
-SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
- file://amd64.patch \
- file://use-includedir.patch \
- file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
- "
-
-SRC_URI[md5sum] = "86ee6e54ebfc4a90b643a65e402c4048"
-SRC_URI[sha256sum] = "498449a994efeba527885c10405993427995d3f86b8768d8cdf8d9dd7c6b73e8"
-
-acpaths = ""
-
-EXTRA_OECONF += " --enable-cxx=detect"
-
-PACKAGES =+ "libgmpxx"
-FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}"
-
-do_install_append_class-target() {
- sed -i "s|--sysroot=${STAGING_DIR_HOST}||g" ${D}${includedir}/gmp.h
-}
-
-SSTATE_SCAN_FILES += "gmp.h"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.1.bb b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.1.bb
new file mode 100644
index 000000000..303c3ef9e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gmp/gmp_6.1.1.bb
@@ -0,0 +1,38 @@
+require gmp.inc
+
+LICENSE = "GPLv2+ | LGPLv3+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+"
+
+REVISION = ""
+SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
+ file://amd64.patch \
+ file://use-includedir.patch \
+ file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
+ file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
+ "
+
+SRC_URI[md5sum] = "4c175f86e11eb32d8bf9872ca3a8e11d"
+SRC_URI[sha256sum] = "a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6"
+
+acpaths = ""
+
+EXTRA_OECONF += " --enable-cxx=detect"
+
+PACKAGES =+ "libgmpxx"
+FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}"
+
+do_install_append_class-target() {
+ sed -i "s|--sysroot=${STAGING_DIR_HOST}||g" ${D}${includedir}/gmp.h
+}
+
+SSTATE_SCAN_FILES += "gmp.h"
+
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET = "mips"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb
index b4ccbfed6..6ccffd54c 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
PR = "r9"
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-${PV}.tar.bz2 \
+SRC_URI = "${GNUPG_MIRROR}/gnupg/gnupg-${PV}.tar.bz2 \
file://long-long-thumb.patch \
file://configure.patch \
file://mips_gcc4.4.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.11.bb b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.11.bb
deleted file mode 100644
index 8e2189bca..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.11.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
-HOMEPAGE = "http://www.gnupg.org/"
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
- file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
-
-DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
-
-inherit autotools gettext texinfo pkgconfig
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://pkgconfig.patch \
- file://use-pkgconfig-instead-of-npth-config.patch \
- file://dirmngr-uses-libgpg-error.patch \
- file://autogen.sh-fix-find-version-for-beta-checking.patch \
- "
-
-SRC_URI[md5sum] = "873302c475c4c90badb67daac90ebd5d"
-SRC_URI[sha256sum] = "b7b0fb2c8c5d47d7ec916d4a1097c0ddcb94a12bb1c0ac424ad86b1ee316b61a"
-
-EXTRA_OECONF = "--disable-ldap \
- --disable-ccid-driver \
- --with-zlib=${STAGING_LIBDIR}/.. \
- --with-bzip2=${STAGING_LIBDIR}/.. \
- --with-readline=${STAGING_LIBDIR}/.. \
- "
-RRECOMMENDS_${PN} = "pinentry"
-
-do_configure_prepend () {
- # Else these could be used in prefernce to those in aclocal-copy
- rm -f ${S}/m4/gpg-error.m4
- rm -f ${S}/m4/libassuan.m4
- rm -f ${S}/m4/ksba.m4
- rm -f ${S}/m4/libgcrypt.m4
-}
-
-do_install_append() {
- ln -sf gpg2 ${D}${bindir}/gpg
- ln -sf gpgv2 ${D}${bindir}/gpgv
-}
-
-RDEPENDS_${PN} = "gnutls"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.14.bb b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.14.bb
new file mode 100644
index 000000000..5ea9b962e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.14.bb
@@ -0,0 +1,46 @@
+SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
+HOMEPAGE = "http://www.gnupg.org/"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+ file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
+DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
+
+inherit autotools gettext texinfo pkgconfig
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
+ file://use-pkgconfig-instead-of-npth-config.patch \
+ file://dirmngr-uses-libgpg-error.patch \
+ file://autogen.sh-fix-find-version-for-beta-checking.patch \
+ "
+
+SRC_URI[md5sum] = "46cf0a42ffad6c2615cafd633580b2de"
+SRC_URI[sha256sum] = "9450dee9693b6a12bf0c374dae77b66c30f69ff8f35fc9266ab8dd76998eba42"
+
+EXTRA_OECONF = "--disable-ldap \
+ --disable-ccid-driver \
+ --with-zlib=${STAGING_LIBDIR}/.. \
+ --with-bzip2=${STAGING_LIBDIR}/.. \
+ --with-readline=${STAGING_LIBDIR}/.. \
+ "
+RRECOMMENDS_${PN} = "pinentry"
+
+do_configure_prepend () {
+ # Else these could be used in prefernce to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+ rm -f ${S}/m4/libassuan.m4
+ rm -f ${S}/m4/ksba.m4
+ rm -f ${S}/m4/libgcrypt.m4
+}
+
+do_install_append() {
+ ln -sf gpg2 ${D}${bindir}/gpg
+ ln -sf gpgv2 ${D}${bindir}/gpgv
+}
+
+RDEPENDS_${PN} = "gnutls"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
index e7c91eb80..51b9d2b19 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
@@ -8,8 +8,9 @@ LICENSE_${PN}-xx = "LGPLv2.1+"
LICENSE_${PN}-bin = "GPLv3+"
LICENSE_${PN}-openssl = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \
+ file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
DEPENDS = "nettle gmp virtual/libiconv"
DEPENDS_append_libc-musl = " argp-standalone"
@@ -18,11 +19,10 @@ SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split
SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz"
-inherit autotools texinfo binconfig pkgconfig gettext lib_package
+inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc
PACKAGECONFIG ??= "libidn zlib"
-PACKAGECONFIG[docs] = "--enable-doc,--disable-doc"
PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn"
PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
@@ -30,7 +30,7 @@ PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
EXTRA_OECONF = " \
- --disable-crywrap \
+ --enable-doc \
--disable-libdane \
--disable-guile \
--disable-rpath \
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch
new file mode 100644
index 000000000..d7dd7cf69
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-Use-correct-include-dir-with-minitasn.patch
@@ -0,0 +1,31 @@
+From 2651b08477f42dd7a05ea7d6df410fb2c46de4fb Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 31 Aug 2016 11:04:06 +0300
+Subject: [PATCH] Use correct include dir with minitasn
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This allows compiling certtool-cfg without libtasn headers.
+
+Upstream-Status: Submitted [https://gitlab.com/gnutls/gnutls/merge_requests/54]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ src/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 182f3a5..cf65388 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -146,6 +146,7 @@ libcmd_cli_debug_la_SOURCES = cli-debug-args.def cli-debug-args.c cli-debug-args
+ COMMON_LIBS = $(LIBOPTS) $(LTLIBINTL)
+ if ENABLE_MINITASN1
+ COMMON_LIBS += ../lib/minitasn1/libminitasn1.la ../gl/libgnu.la
++AM_CPPFLAGS += -I$(top_srcdir)/lib/minitasn1
+ else
+ COMMON_LIBS += $(LIBTASN1_LIBS)
+ endif
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/CVE-2016-7444.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/CVE-2016-7444.patch
new file mode 100644
index 000000000..215be5a8e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls/CVE-2016-7444.patch
@@ -0,0 +1,35 @@
+CVE: CVE-2016-7444
+Upstream-Status: Backport
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+Upstream commit follows:
+
+
+From 964632f37dfdfb914ebc5e49db4fa29af35b1de9 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
+Date: Sat, 27 Aug 2016 17:00:22 +0200
+Subject: [PATCH] ocsp: corrected the comparison of the serial size in OCSP response
+
+Previously the OCSP certificate check wouldn't verify the serial length
+and could succeed in cases it shouldn't.
+
+Reported by Stefan Buehler.
+---
+ lib/x509/ocsp.c | 1 +
+ 1 file changed, 1 insertion(+), 0 deletions(-)
+
+diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c
+index 92db9b6..8181f2e 100644
+--- a/lib/x509/ocsp.c
++++ b/lib/x509/ocsp.c
+@@ -1318,6 +1318,7 @@ gnutls_ocsp_resp_check_crt(gnutls_ocsp_resp_t resp,
+ gnutls_assert();
+ goto cleanup;
+ }
++ cserial.size = t;
+
+ if (rserial.size != cserial.size
+ || memcmp(cserial.data, rserial.data, rserial.size) != 0) {
+--
+libgit2 0.24.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb
deleted file mode 100644
index b652f6fac..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require gnutls.inc
-
-SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
- file://0001-configure.ac-fix-sed-command.patch \
- file://use-pkg-config-to-locate-zlib.patch \
- "
-SRC_URI[md5sum] = "1b3b6d55d0e2b6d01a54f53129f1da9b"
-SRC_URI[sha256sum] = "48594fadba33d450f796ec69526cf2bce6ff9bc3dc90fbd7bf38dc3601f57c3f"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.3.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.3.bb
new file mode 100644
index 000000000..b2dbb0712
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/gnutls_3.5.3.bb
@@ -0,0 +1,13 @@
+require gnutls.inc
+
+SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
+ file://0001-configure.ac-fix-sed-command.patch \
+ file://use-pkg-config-to-locate-zlib.patch \
+ file://0001-Use-correct-include-dir-with-minitasn.patch \
+ file://CVE-2016-7444.patch \
+ "
+SRC_URI[md5sum] = "6c2c7f40ddf52933ee3ca474cb8cb63c"
+SRC_URI[sha256sum] = "92c4bc999a10a1b95299ebefaeea8333f19d8a98d957a35b5eae74881bdb1fef"
+
+# x86 .text relocations should be fixed from 3.5.5 onwards
+INSANE_SKIP_${PN}_append_x86 = " textrel"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
new file mode 100644
index 000000000..ae643946f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
@@ -0,0 +1,28 @@
+From 908e9fa4c1172f09e0e45420a403dc25ed0a466c Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Tue, 26 Jul 2016 08:45:33 +0200
+Subject: [PATCH 1/4] configure: don't add -Werror to build flags
+
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ configure.ac | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7a14e04..066f5fe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,8 +70,6 @@ AC_ARG_ENABLE([gcc-warnings],
+ )
+
+ if test "$gl_gcc_warnings" = yes; then
+- gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
+-
+ nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
+ nw="$nw -Wc++-compat" # We don't care strongly about C++ compilers
+ nw="$nw -Wtraditional" # Warns on #elif which we use often
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch
new file mode 100644
index 000000000..dd364223b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch
@@ -0,0 +1,28 @@
+From 3542c01618fcde83b29640ea2c60bfd2629ae0b7 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Tue, 26 Jul 2016 08:47:49 +0200
+Subject: [PATCH 2/4] ASN.y: corrected compiler warning
+
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ lib/ASN1.y | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/ASN1.y b/lib/ASN1.y
+index 731415d..6db638f 100644
+--- a/lib/ASN1.y
++++ b/lib/ASN1.y
+@@ -621,7 +621,7 @@ _asn1_create_errorDescription (int error, char *error_desc)
+ case ASN1_NAME_TOO_LONG:
+ snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE,
+ "%s:%u: name too long (more than %u characters)", file_name,
+- line_number, ASN1_MAX_NAME_SIZE);
++ line_number, (unsigned)ASN1_MAX_NAME_SIZE);
+ break;
+ case ASN1_IDENTIFIER_NOT_FOUND:
+ snprintf (error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE,
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch
new file mode 100644
index 000000000..24201437b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch
@@ -0,0 +1,73 @@
+From c8903aa27dc9de1d9efeed9d1f7894f1019548f7 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Tue, 26 Jul 2016 08:49:15 +0200
+Subject: [PATCH 3/4] parser_aux: corrected potential null pointer dereferences
+
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ lib/parser_aux.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/parser_aux.c b/lib/parser_aux.c
+index 2285b20..12ee16f 100644
+--- a/lib/parser_aux.c
++++ b/lib/parser_aux.c
+@@ -637,7 +637,7 @@ _asn1_change_integer_value (asn1_node node)
+ p = NULL;
+ break;
+ }
+- if (p->right)
++ if (p && p->right)
+ {
+ p = p->right;
+ break;
+@@ -753,7 +753,7 @@ _asn1_expand_object_id (asn1_node node)
+
+ if (move == RIGHT)
+ {
+- if (p->right)
++ if (p && p->right)
+ p = p->right;
+ else
+ move = UP;
+@@ -828,7 +828,7 @@ _asn1_expand_object_id (asn1_node node)
+
+ if (move == RIGHT)
+ {
+- if (p->right)
++ if (p && p->right)
+ p = p->right;
+ else
+ move = UP;
+@@ -898,7 +898,7 @@ _asn1_type_set_config (asn1_node node)
+
+ if (move == RIGHT)
+ {
+- if (p->right)
++ if (p && p->right)
+ p = p->right;
+ else
+ move = UP;
+@@ -1007,7 +1007,7 @@ _asn1_check_identifier (asn1_node node)
+ p = NULL;
+ break;
+ }
+- if (p->right)
++ if (p && p->right)
+ {
+ p = p->right;
+ break;
+@@ -1067,7 +1067,7 @@ _asn1_set_default_tag (asn1_node node)
+ p = NULL;
+ break;
+ }
+- if (p->right)
++ if (p && p->right)
+ {
+ p = p->right;
+ break;
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch
new file mode 100644
index 000000000..7bda0e6f2
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch
@@ -0,0 +1,56 @@
+From d647bb2fa1bd288a6ac02c18318f3cba2a34c3a0 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Tue, 26 Jul 2016 08:50:24 +0200
+Subject: [PATCH 4/4] tools: eliminated compiler warnings
+
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ src/asn1Coding.c | 2 +-
+ src/asn1Decoding.c | 2 +-
+ src/asn1Parser.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/asn1Coding.c b/src/asn1Coding.c
+index d4df593..b516bfe 100644
+--- a/src/asn1Coding.c
++++ b/src/asn1Coding.c
+@@ -188,7 +188,7 @@ main (int argc, char *argv[])
+ default:
+ fprintf (stderr,
+ "asn1Coding: ?? getopt returned character code Ox%x ??\n",
+- option_result);
++ (unsigned)option_result);
+ }
+ }
+
+diff --git a/src/asn1Decoding.c b/src/asn1Decoding.c
+index 078963e..20f91ac 100644
+--- a/src/asn1Decoding.c
++++ b/src/asn1Decoding.c
+@@ -131,7 +131,7 @@ main (int argc, char *argv[])
+ default:
+ fprintf (stderr,
+ "asn1Decoding: ?? getopt returned character code Ox%x ??\n",
+- option_result);
++ (unsigned)option_result);
+ }
+ }
+
+diff --git a/src/asn1Parser.c b/src/asn1Parser.c
+index 7a3ae67..475bfc9 100644
+--- a/src/asn1Parser.c
++++ b/src/asn1Parser.c
+@@ -139,7 +139,7 @@ main (int argc, char *argv[])
+ default:
+ fprintf (stderr,
+ "asn1Parser: ?? getopt returned character code Ox%x ??\n",
+- option_result);
++ (unsigned)option_result);
+ }
+
+ }
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.7.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.7.bb
deleted file mode 100644
index 7f0856945..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.7.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Library for ASN.1 and DER manipulation"
-HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN}-bin = "GPLv3+"
-LICENSE_${PN} = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
- file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
-
-SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
- file://dont-depend-on-help2man.patch \
- "
-
-SRC_URI[md5sum] = "12d10ca4ae0a3b95f7aa06a076da39ec"
-SRC_URI[sha256sum] = "a40780dc93fc6d819170240e8ece25352058a85fd1d2347ce0f143667d8f11c9"
-
-inherit autotools texinfo binconfig lib_package
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.9.bb b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.9.bb
new file mode 100644
index 000000000..b8ff9eaf7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.9.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Library for ASN.1 and DER manipulation"
+HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN}-bin = "GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+ file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
+
+SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
+ file://dont-depend-on-help2man.patch \
+ file://0001-configure-don-t-add-Werror-to-build-flags.patch \
+ file://0002-ASN.y-corrected-compiler-warning.patch \
+ file://0003-parser_aux-corrected-potential-null-pointer-derefere.patch \
+ file://0004-tools-eliminated-compiler-warnings.patch \
+ "
+
+SRC_URI[md5sum] = "3018d0f466a32b66dde41bb122e6cab6"
+SRC_URI[sha256sum] = "4f6f7a8fd691ac2b8307c8ca365bad711db607d4ad5966f6938a9d2ecd65c920"
+
+inherit autotools texinfo binconfig lib_package gtk-doc
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb
index 86eda239b..a2d05878b 100644
--- a/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb
@@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://src/gpgme.h.in;endline=23;md5=5027eec93a996272a9a0a6a86cf35775 \
file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/${BP}.tar.bz2 \
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
file://gpgme.pc \
file://pkgconfig.patch \
"
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch b/import-layers/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch
deleted file mode 100644
index 1519d8469..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-icu: Ticket #11959: pkgdata dies when compiled with lots'o'flags
-
-See: http://bugs.icu-project.org/trac/ticket/11959
-
-The patch avoids premature failure which results in a segfault.
-
-Upstream-Status: Backport of r38081
-Signed-off-by: Mike Crowe <mac@mcrowe.com>
-
-Index: source/tools/toolutil/flagparser.c
-===================================================================
---- source/tools/toolutil/flagparser.c (revision 38046)
-+++ source/tools/toolutil/flagparser.c (working copy)
-@@ -96,8 +96,8 @@
- uprv_free(buffer);
-
- T_FileStream_close(f);
--
-- if (U_FAILURE(*status)) {
-+
-+ if (U_FAILURE(*status) && *status != U_BUFFER_OVERFLOW_ERROR) {
- return -1;
- }
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu_56.1.bb b/import-layers/yocto-poky/meta/recipes-support/icu/icu_56.1.bb
deleted file mode 100644
index db0de106b..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/icu/icu_56.1.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-require icu.inc
-
-LIC_FILES_CHKSUM = "file://../license.html;md5=64eff4aadff4d104d6d437c4fde0e6d7"
-
-def icu_download_version(d):
- pvsplit = d.getVar('PV', True).split('.')
- return pvsplit[0] + "_" + pvsplit[1]
-
-ICU_PV = "${@icu_download_version(d)}"
-
-# http://errors.yoctoproject.org/Errors/Details/20486/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
-SRC_URI = "${BASE_SRC_URI} \
- file://icu-pkgdata-large-cmd.patch \
- file://fix-install-manx.patch \
- file://icu-release-56-1-flagparser-fix.patch \
- "
-
-SRC_URI_append_class-target = "\
- file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
- "
-SRC_URI[md5sum] = "c4a2d71ff56aec5ebfab2a3f059be99d"
-SRC_URI[sha256sum] = "3a64e9105c734dcf631c0b3ed60404531bce6c0f5a64bfe1a6402a4cc2314816"
-
-UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
-UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/icu/icu_57.1.bb b/import-layers/yocto-poky/meta/recipes-support/icu/icu_57.1.bb
new file mode 100644
index 000000000..90c2b8275
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/icu/icu_57.1.bb
@@ -0,0 +1,28 @@
+require icu.inc
+
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=787d3b37867445c1cdd6f6167bd0e347"
+
+def icu_download_version(d):
+ pvsplit = d.getVar('PV', True).split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+ICU_PV = "${@icu_download_version(d)}"
+
+# http://errors.yoctoproject.org/Errors/Details/20486/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
+SRC_URI = "${BASE_SRC_URI} \
+ file://icu-pkgdata-large-cmd.patch \
+ file://fix-install-manx.patch \
+ "
+
+SRC_URI_append_class-target = "\
+ file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
+ "
+SRC_URI[md5sum] = "976734806026a4ef8bdd17937c8898b9"
+SRC_URI[sha256sum] = "ff8c67cb65949b1e7808f2359f2b80f722697048e90e7cfc382ec1fe229e9581"
+
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
+UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.65.bb b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.65.bb
deleted file mode 100644
index 0b78dc45e..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.65.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "ISO language, territory, currency, script codes and their translations"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=fbc093901857fcd118f065f900982c24"
-
-SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
-SRC_URI[md5sum] = "890a08d4f962748e0a0758a8aa471896"
-SRC_URI[sha256sum] = "834de5193c8489eedeaf6509457a9b13476702386ae1f3ed4f391a349d630320"
-
-# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
-# are inhibited by allarch
-DEPENDS = "gettext-native"
-
-inherit allarch autotools
-
-FILES_${PN} += "${datadir}/xml/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.70.bb b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.70.bb
new file mode 100644
index 000000000..7edd8b7bb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.70.bb
@@ -0,0 +1,15 @@
+SUMMARY = "ISO language, territory, currency, script codes and their translations"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
+SRC_URI[md5sum] = "c61f8f02eecf978d3710ff594e43ca7e"
+SRC_URI[sha256sum] = "41e2fbaec2ed57e767b94f175d0dcd31b627aeb23b75cd604605a6fb6109d61f"
+
+# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
+# are inhibited by allarch
+DEPENDS = "gettext-native"
+
+inherit allarch autotools
+
+FILES_${PN} += "${datadir}/xml/"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.2.bb b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.2.bb
deleted file mode 100644
index f376d631e..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.2.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "IPC library used by GnuPG and GPGME"
-HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN} = "LGPLv2.1+"
-LICENSE_${PN}-doc = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/assuan.c;endline=20;md5=0f465544183405055ec179869fc5b5ba \
- file://src/assuan-defs.h;endline=20;md5=20cd55535260ca1779edae5c7b80b21e"
-
-DEPENDS = "libgpg-error"
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-${PV}.tar.bz2 \
- file://libassuan-add-pkgconfig-support.patch"
-
-SRC_URI[md5sum] = "70151995c2330ae1261c0a7ca34cf478"
-SRC_URI[sha256sum] = "bb06dc81380b74bf1b64d5849be5c0409a336f3b4c45f20ac688e86d1b5bcb20"
-
-BINCONFIG = "${bindir}/libassuan-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-do_configure_prepend () {
- # Else these could be used in preference to those in aclocal-copy
- rm -f ${S}/m4/*.m4
-}
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb
new file mode 100644
index 000000000..1b3916d73
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.3.bb
@@ -0,0 +1,31 @@
+SUMMARY = "IPC library used by GnuPG and GPGME"
+HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-doc = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/assuan.c;endline=20;md5=0f465544183405055ec179869fc5b5ba \
+ file://src/assuan-defs.h;endline=20;md5=20cd55535260ca1779edae5c7b80b21e"
+
+DEPENDS = "libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
+ file://libassuan-add-pkgconfig-support.patch"
+
+SRC_URI[md5sum] = "8e01a7c72d3e5d154481230668e6eb5a"
+SRC_URI[sha256sum] = "22843a3bdb256f59be49842abf24da76700354293a066d82ade8134bb5aa2b71"
+
+BINCONFIG = "${bindir}/libassuan-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/*.m4
+}
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb
deleted file mode 100644
index fdb70d8ef..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "A library for atomic integer operations"
-HOMEPAGE = "https://github.com/ivmai/libatomic_ops/"
-SECTION = "optional"
-PROVIDES += "libatomics-ops"
-LICENSE = "GPLv2 & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
- "
-
-SRC_URI = "\
- http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${PV}.tar.gz \
- file://0001-Add-initial-nios2-architecture-support.patch \
- "
-
-SRC_URI[md5sum] = "1d6538604b314d2fccdf86915e5c0857"
-SRC_URI[sha256sum] = "04fa615f62992547bcbda562260e28b504bc4c06e2f985f267f3ade30304b5dd"
-
-S = "${WORKDIR}/libatomic_ops-${PV}"
-
-ALLOW_EMPTY_${PN} = "1"
-
-ARM_INSTRUCTION_SET = "arm"
-
-inherit autotools pkgconfig
-
-do_install_append() {
- # those contain only docs, not necessary for now.
- install -m 0755 -d ${D}${docdir}
- mv ${D}${datadir}/libatomic_ops ${D}${docdir}/${BPN}
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb
new file mode 100644
index 000000000..930c1b8ed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.4.bb
@@ -0,0 +1,32 @@
+SUMMARY = "A library for atomic integer operations"
+HOMEPAGE = "https://github.com/ivmai/libatomic_ops/"
+SECTION = "optional"
+PROVIDES += "libatomics-ops"
+LICENSE = "GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
+ "
+
+SRC_URI = "\
+ http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${PV}.tar.gz \
+ file://0001-Add-initial-nios2-architecture-support.patch \
+ "
+
+SRC_URI[md5sum] = "426d804baae12c372967a6d183e25af2"
+SRC_URI[sha256sum] = "bf210a600dd1becbf7936dd2914cf5f5d3356046904848dcfd27d0c8b12b6f8f"
+
+S = "${WORKDIR}/libatomic_ops-${PV}"
+
+ALLOW_EMPTY_${PN} = "1"
+
+ARM_INSTRUCTION_SET = "arm"
+
+inherit autotools pkgconfig
+
+do_install_append() {
+ # those contain only docs, not necessary for now.
+ install -m 0755 -d ${D}${docdir}
+ mv ${D}${datadir}/libatomic_ops ${D}${docdir}/${BPN}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.2.bb b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.2.bb
deleted file mode 100644
index 3335386d8..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.2.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "Library of utility functions from BSD systems"
-DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
- and lacking on others like GNU systems, thus making it easier to port \
- projects with strong BSD origins, without needing to embed the same \
- code over and over again on each project."
-
-HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
-# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
-# OE @ ~/projects/libbsd $ grep ^License: COPYING | sort
-# License: BSD-2-clause
-# License: BSD-2-clause
-# License: BSD-2-clause-NetBSD
-# License: BSD-2-clause-author
-# License: BSD-2-clause-verbatim
-# License: BSD-3-clause
-# License: BSD-3-clause
-# License: BSD-3-clause
-# License: BSD-3-clause-Peter-Wemm
-# License: BSD-3-clause-Regents
-# License: BSD-4-clause-Christopher-G-Demetriou
-# License: BSD-4-clause-Niels-Provos
-# License: BSD-5-clause-Peter-Wemm
-# License: Beerware
-# License: Expat
-# License: ISC
-# License: ISC-Original
-# License: public-domain
-# License: public-domain-Colin-Plumb
-LICENSE = "BSD-4-Clause & ISC & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=145ec05a217d8f879f29cfc5f83084be"
-SECTION = "libs"
-
-SRC_URI = " \
- http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-"
-
-SRC_URI[md5sum] = "cdee252ccff978b50ad2336278c506c9"
-SRC_URI[sha256sum] = "b2f644cae94a6e2fe109449c20ad79a0f6ee4faec2205b07eefa0020565e250a"
-
-inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.3.bb b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.3.bb
new file mode 100644
index 000000000..92121efa8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.3.bb
@@ -0,0 +1,43 @@
+# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library of utility functions from BSD systems"
+DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
+ and lacking on others like GNU systems, thus making it easier to port \
+ projects with strong BSD origins, without needing to embed the same \
+ code over and over again on each project."
+
+HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
+# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
+# OE @ ~/projects/libbsd $ grep ^License: COPYING | sort
+# License: BSD-2-clause
+# License: BSD-2-clause
+# License: BSD-2-clause-NetBSD
+# License: BSD-2-clause-author
+# License: BSD-2-clause-verbatim
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause-Peter-Wemm
+# License: BSD-3-clause-Regents
+# License: BSD-4-clause-Christopher-G-Demetriou
+# License: BSD-4-clause-Niels-Provos
+# License: BSD-5-clause-Peter-Wemm
+# License: Beerware
+# License: Expat
+# License: ISC
+# License: ISC-Original
+# License: public-domain
+# License: public-domain-Colin-Plumb
+LICENSE = "BSD-4-Clause & ISC & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0b9c89d861915b86655b96e5e32fa2aa"
+SECTION = "libs"
+
+SRC_URI = " \
+ http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "e935c1bb6cc98a4a43cb1da22795493a"
+SRC_URI[sha256sum] = "934b634f4dfd865b6482650b8f522c70ae65c463529de8be907b53c89c3a34a8"
+
+inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb b/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb
deleted file mode 100644
index 571546766..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "An alternate posix capabilities library"
-DESCRIPTION = "The libcap-ng library is intended to make programming \
-with POSIX capabilities much easier than the traditional libcap library."
-HOMEPAGE = "http://freecode.com/projects/libcap-ng"
-SECTION = "base"
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
- file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
-
-SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
- file://python.patch"
-
-inherit lib_package autotools pythonnative
-
-SRC_URI[md5sum] = "3d7d126b29e2869a0257c17c8b0d9b2e"
-SRC_URI[sha256sum] = "615549ce39b333f6b78baee0c0b4ef18bc726c6bf1cca123dfd89dd963f6d06b"
-
-DEPENDS += "swig-native python"
-
-EXTRA_OECONF += "--without-python3"
-
-EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
-
-PACKAGES += "${PN}-python"
-
-FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
-
-BBCLASSEXTEND = "native"
-
-do_install_append() {
- # Moving libcap-ng to base_libdir
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- mkdir -p ${D}/${base_libdir}/
- mv -f ${D}${libdir}/libcap-ng.so.* ${D}${base_libdir}/
- relpath=${@os.path.relpath("${base_libdir}", "${libdir}")}
- ln -sf ${relpath}/libcap-ng.so.0.0.0 ${D}${libdir}/libcap-ng.so
- fi
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb b/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb
new file mode 100644
index 000000000..358319419
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb
@@ -0,0 +1,37 @@
+SUMMARY = "An alternate posix capabilities library"
+DESCRIPTION = "The libcap-ng library is intended to make programming \
+with POSIX capabilities much easier than the traditional libcap library."
+HOMEPAGE = "http://freecode.com/projects/libcap-ng"
+SECTION = "base"
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
+
+SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
+ file://python.patch"
+
+inherit lib_package autotools python3native
+
+SRC_URI[md5sum] = "0dece96644bd798020e170fbf7663802"
+SRC_URI[sha256sum] = "c21af997445cd4107a55d386f955c5ea6f6e96ead693e9151277c0ab5f97d05f"
+
+DEPENDS += "swig-native python3"
+
+EXTRA_OECONF += "--with-python --with-python3"
+EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
+
+PACKAGES += "${PN}-python"
+
+FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
+
+BBCLASSEXTEND = "native"
+
+do_install_append() {
+ # Moving libcap-ng to base_libdir
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mkdir -p ${D}/${base_libdir}/
+ mv -f ${D}${libdir}/libcap-ng.so.* ${D}${base_libdir}/
+ relpath=${@os.path.relpath("${base_libdir}", "${libdir}")}
+ ln -sf ${relpath}/libcap-ng.so.0.0.0 ${D}${libdir}/libcap-ng.so
+ fi
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch b/import-layers/yocto-poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch
new file mode 100644
index 000000000..05c771ac1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch
@@ -0,0 +1,32 @@
+Ensure the XATTR_NAME_CAPS is defined when it is used
+
+Upstream-Status: Pending
+
+VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build
+libcap-native in old release, like CentOS release 6.7 (Final), with the blow
+error:
+ cap_file.c: In function â€cap_get_fd’:
+ cap_file.c:199: error: â€XATTR_NAME_CAPS’ undeclared (first use in this function)
+ cap_file.c:199: error: (Each undeclared identifier is reported only once
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ libcap/cap_file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcap/cap_file.c b/libcap/cap_file.c
+index 40756ea..e27ca80 100644
+--- a/libcap/cap_file.c
++++ b/libcap/cap_file.c
+@@ -25,7 +25,7 @@ extern int fremovexattr(int, const char *);
+
+ #include "libcap.h"
+
+-#ifdef VFS_CAP_U32
++#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS)
+
+ #if VFS_CAP_U32 != __CAP_BLKS
+ # error VFS representation of capabilities is not the same size as kernel
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb b/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb
deleted file mode 100644
index a701019bb..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb
+++ /dev/null
@@ -1,76 +0,0 @@
-SUMMARY = "Library for getting/setting POSIX.1e capabilities"
-HOMEPAGE = "http://sites.google.com/site/fullycapable/"
-
-# no specific GPL version required
-LICENSE = "BSD | GPLv2"
-LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
-
-DEPENDS = "hostperl-runtime-native"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "d43ab9f680435a7fff35b4ace8d45b80"
-SRC_URI[sha256sum] = "cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65"
-
-inherit lib_package
-
-# do NOT pass target cflags to host compilations
-#
-do_configure() {
- # libcap uses := for compilers, fortunately, it gives us a hint
- # on what should be replaced with ?=
- sed -e 's,:=,?=,g' -i Make.Rules
- sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules
-
- # disable gperf detection
- sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
-}
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
-PACKAGECONFIG_class-native ??= ""
-
-PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
-PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
-
-EXTRA_OEMAKE = " \
- INDENT= \
- lib=${@os.path.basename('${libdir}')} \
- RAISE_SETFCAP=no \
- DYNAMIC=yes \
-"
-
-EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
-
-# these are present in the libcap defaults, so include in our CFLAGS too
-CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
-
-do_compile() {
- oe_runmake ${EXTRA_OECONF}
-}
-
-do_install() {
- oe_runmake install \
- ${EXTRA_OECONF} \
- DESTDIR="${D}" \
- prefix="${prefix}" \
- SBINDIR="${D}${sbindir}"
-}
-
-do_install_append() {
- # Move the library to base_libdir
- install -d ${D}${base_libdir}
- if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
- mv ${D}${libdir}/libcap* ${D}${base_libdir}
- if [ -d ${D}${libdir}/security ]; then
- mv ${D}${libdir}/security ${D}${base_libdir}
- fi
- fi
-}
-
-FILES_${PN}-dev += "${base_libdir}/*.so"
-
-# pam files
-FILES_${PN} += "${base_libdir}/security/*.so"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.25.bb b/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.25.bb
new file mode 100644
index 000000000..7ced4be62
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libcap/libcap_2.25.bb
@@ -0,0 +1,77 @@
+SUMMARY = "Library for getting/setting POSIX.1e capabilities"
+HOMEPAGE = "http://sites.google.com/site/fullycapable/"
+
+# no specific GPL version required
+LICENSE = "BSD | GPLv2"
+LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
+
+DEPENDS = "hostperl-runtime-native"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \
+ file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
+"
+SRC_URI[md5sum] = "6666b839e5d46c2ad33fc8aa2ceb5f77"
+SRC_URI[sha256sum] = "693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162"
+
+inherit lib_package
+
+# do NOT pass target cflags to host compilations
+#
+do_configure() {
+ # libcap uses := for compilers, fortunately, it gives us a hint
+ # on what should be replaced with ?=
+ sed -e 's,:=,?=,g' -i Make.Rules
+ sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules
+
+ # disable gperf detection
+ sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
+}
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
+PACKAGECONFIG_class-native ??= ""
+
+PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
+PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
+
+EXTRA_OEMAKE = " \
+ INDENT= \
+ lib=${@os.path.basename('${libdir}')} \
+ RAISE_SETFCAP=no \
+ DYNAMIC=yes \
+"
+
+EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
+
+# these are present in the libcap defaults, so include in our CFLAGS too
+CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
+
+do_compile() {
+ oe_runmake ${PACKAGECONFIG_CONFARGS}
+}
+
+do_install() {
+ oe_runmake install \
+ ${PACKAGECONFIG_CONFARGS} \
+ DESTDIR="${D}" \
+ prefix="${prefix}" \
+ SBINDIR="${sbindir}"
+}
+
+do_install_append() {
+ # Move the library to base_libdir
+ install -d ${D}${base_libdir}
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mv ${D}${libdir}/libcap* ${D}${base_libdir}
+ if [ -d ${D}${libdir}/security ]; then
+ mv ${D}${libdir}/security ${D}${base_libdir}
+ fi
+ fi
+}
+
+FILES_${PN}-dev += "${base_libdir}/*.so"
+
+# pam files
+FILES_${PN} += "${base_libdir}/security/*.so"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.6.bb b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.6.bb
deleted file mode 100644
index c8163e3bf..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.6.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Wrapper library for evdev devices"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
-SECTION = "libs"
-
-LICENSE = "MIT-X"
-LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
- file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
-
-SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "9b3f25bd8fb0f8efa4944d34668dddc0"
-SRC_URI[sha256sum] = "7b2ae1a0c7f9f7a96198ddc8fd167f090f233d6cbd8168b847e4f968445132d3"
-
-inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.2.bb b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.2.bb
new file mode 100644
index 000000000..c76e1d79f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libevdev/libevdev_1.5.2.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Wrapper library for evdev devices"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
+SECTION = "libs"
+
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
+ file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
+
+SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "96ad6edb5ce5c4428f1b183cc180ff8c"
+SRC_URI[sha256sum] = "5ee2163656a61f5703cb5c08a05c9471ffb7b640bfbe2c55194ea50d908f629b"
+
+inherit autotools pkgconfig
diff --git a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest
index d521688e7..0241851c7 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest
@@ -4,7 +4,7 @@ fail=0
for test in ./test/*
do
$test
- if [ $? -eq 0 ]
+ if [ $? -ne 0 ]
then
fail=1
fi
diff --git a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch
new file mode 100644
index 000000000..61c9eb31d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch
@@ -0,0 +1,177 @@
+From 655e82c92d5c3875aee04322f1993d6b0774a7bf Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Mon, 15 Aug 2016 15:00:13 +0800
+Subject: [PATCH] mips: fix MIPS softfloat build issue
+
+The patch for o32.S is taken from OpenWrt packages repo 3a7a4bf "libffi:
+fix MIPS softfloat build issue with current binutils"
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+Upstream-Status: Backport [https://github.com/libffi/libffi/commit/2ded2a4f494165c93293afc14ab0be1243cf8c49]
+ src/mips/n32.S | 17 +++++++++++++++++
+ src/mips/o32.S | 17 +++++++++++++++++
+ 2 files changed, 34 insertions(+)
+
+diff --git a/src/mips/n32.S b/src/mips/n32.S
+index c6985d3..8f25994 100644
+--- a/src/mips/n32.S
++++ b/src/mips/n32.S
+@@ -107,6 +107,16 @@ loadregs:
+
+ REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6.
+
++#ifdef __mips_soft_float
++ REG_L a0, 0*FFI_SIZEOF_ARG(t9)
++ REG_L a1, 1*FFI_SIZEOF_ARG(t9)
++ REG_L a2, 2*FFI_SIZEOF_ARG(t9)
++ REG_L a3, 3*FFI_SIZEOF_ARG(t9)
++ REG_L a4, 4*FFI_SIZEOF_ARG(t9)
++ REG_L a5, 5*FFI_SIZEOF_ARG(t9)
++ REG_L a6, 6*FFI_SIZEOF_ARG(t9)
++ REG_L a7, 7*FFI_SIZEOF_ARG(t9)
++#else
+ and t4, t6, ((1<<FFI_FLAG_BITS)-1)
+ REG_L a0, 0*FFI_SIZEOF_ARG(t9)
+ beqz t4, arg1_next
+@@ -193,6 +203,7 @@ arg7_next:
+ arg8_doublep:
+ l.d $f19, 7*FFI_SIZEOF_ARG(t9)
+ arg8_next:
++#endif
+
+ callit:
+ # Load the function pointer
+@@ -214,6 +225,7 @@ retint:
+ b epilogue
+
+ retfloat:
++#ifndef __mips_soft_float
+ bne t6, FFI_TYPE_FLOAT, retdouble
+ jal t9
+ REG_L t4, 4*FFI_SIZEOF_ARG($fp)
+@@ -272,6 +284,7 @@ retstruct_f_d:
+ s.s $f0, 0(t4)
+ s.d $f2, 8(t4)
+ b epilogue
++#endif
+
+ retstruct_d_soft:
+ bne t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft
+@@ -429,6 +442,7 @@ ffi_closure_N32:
+ REG_S a6, A6_OFF2($sp)
+ REG_S a7, A7_OFF2($sp)
+
++#ifndef __mips_soft_float
+ # Store all possible float/double registers.
+ s.d $f12, F12_OFF2($sp)
+ s.d $f13, F13_OFF2($sp)
+@@ -438,6 +452,7 @@ ffi_closure_N32:
+ s.d $f17, F17_OFF2($sp)
+ s.d $f18, F18_OFF2($sp)
+ s.d $f19, F19_OFF2($sp)
++#endif
+
+ # Call ffi_closure_mips_inner_N32 to do the real work.
+ LA t9, ffi_closure_mips_inner_N32
+@@ -458,6 +473,7 @@ cls_retint:
+ b cls_epilogue
+
+ cls_retfloat:
++#ifndef __mips_soft_float
+ bne v0, FFI_TYPE_FLOAT, cls_retdouble
+ l.s $f0, V0_OFF2($sp)
+ b cls_epilogue
+@@ -500,6 +516,7 @@ cls_retstruct_f_d:
+ l.s $f0, V0_OFF2($sp)
+ l.d $f2, V1_OFF2($sp)
+ b cls_epilogue
++#endif
+
+ cls_retstruct_small2:
+ REG_L v0, V0_OFF2($sp)
+diff --git a/src/mips/o32.S b/src/mips/o32.S
+index eb27981..429dd0a 100644
+--- a/src/mips/o32.S
++++ b/src/mips/o32.S
+@@ -82,13 +82,16 @@ sixteen:
+
+ ADDU $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args
+
++#ifndef __mips_soft_float
+ bnez t0, pass_d # make it quick for int
++#endif
+ REG_L a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the
+ REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs.
+ REG_L a2, 2*FFI_SIZEOF_ARG($sp)
+ REG_L a3, 3*FFI_SIZEOF_ARG($sp)
+ b call_it
+
++#ifndef __mips_soft_float
+ pass_d:
+ bne t0, FFI_ARGS_D, pass_f
+ l.d $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args
+@@ -130,6 +133,7 @@ pass_f_d:
+ # bne t0, FFI_ARGS_F_D, call_it
+ l.s $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args
+ l.d $f14, 2*FFI_SIZEOF_ARG($sp) # passing double and float
++#endif
+
+ call_it:
+ # Load the function pointer
+@@ -158,14 +162,23 @@ retfloat:
+ bne t2, FFI_TYPE_FLOAT, retdouble
+ jalr t9
+ REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+ s.s $f0, 0(t0)
++#else
++ REG_S v0, 0(t0)
++#endif
+ b epilogue
+
+ retdouble:
+ bne t2, FFI_TYPE_DOUBLE, noretval
+ jalr t9
+ REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+ s.d $f0, 0(t0)
++#else
++ REG_S v1, 4(t0)
++ REG_S v0, 0(t0)
++#endif
+ b epilogue
+
+ noretval:
+@@ -261,9 +274,11 @@ $LCFI7:
+ li $13, 1 # FFI_O32
+ bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
+
++#ifndef __mips_soft_float
+ # Store all possible float/double registers.
+ s.d $f12, FA_0_0_OFF2($fp)
+ s.d $f14, FA_1_0_OFF2($fp)
++#endif
+ 1:
+ # Call ffi_closure_mips_inner_O32 to do the work.
+ la t9, ffi_closure_mips_inner_O32
+@@ -281,6 +296,7 @@ $LCFI7:
+ li $13, 1 # FFI_O32
+ bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
+
++#ifndef __mips_soft_float
+ li $9, FFI_TYPE_FLOAT
+ l.s $f0, V0_OFF2($fp)
+ beq $8, $9, closure_done
+@@ -288,6 +304,7 @@ $LCFI7:
+ li $9, FFI_TYPE_DOUBLE
+ l.d $f0, V0_OFF2($fp)
+ beq $8, $9, closure_done
++#endif
+ 1:
+ REG_L $3, V1_OFF2($fp)
+ REG_L $2, V0_OFF2($fp)
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb
index 72e25fb9d..43eee8efc 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
file://not-win32.patch \
file://0001-mips-Use-compiler-internal-define-for-linux.patch \
+ file://0001-mips-fix-MIPS-softfloat-build-issue.patch \
"
SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
@@ -23,4 +24,8 @@ inherit autotools texinfo
FILES_${PN}-dev += "${libdir}/libffi-${PV}"
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET = "mips"
+
BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb
index 866b11a9a..2218f9cb7 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4641e94ec96f98fabc56ff9cc48be14b \
SECTION = "x11/libs"
-DEPENDS = "glib-2.0 pango gtk+ menu-cache intltool-native libexif libfm-extra gettext-native"
+DEPENDS = "glib-2.0 pango gtk+3 menu-cache intltool-native libexif libfm-extra gettext-native"
SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
@@ -17,7 +17,9 @@ SRC_URI[md5sum] = "74997d75e7e87dc73398746fd373bf52"
SRC_URI[sha256sum] = "7804f6f28cb3d1bc8ffb3151ab7ff0c063b27c5f9b06c682eb903e01cf25502f"
inherit autotools pkgconfig gtk-doc distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+EXTRA_OECONF = "--with-gtk=3"
do_configure[dirs] =+ "${S}/m4"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
index 67ddfc640..69589f548 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
@@ -4,61 +4,32 @@ Upstream-Status: Denied [upstream have indicated they don't want a pkg-config de
RP 2014/5/22
-Index: libgcrypt-1.2.4/configure.ac
-===================================================================
---- libgcrypt-1.2.4.orig/configure.ac 2008-03-19 22:14:50.000000000 +0000
-+++ libgcrypt-1.2.4/configure.ac 2008-03-19 22:14:58.000000000 +0000
-@@ -807,6 +807,7 @@
+Rebase to 1.7.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 1 +
+ src/libgcrypt.m4 | 71 +++--------------------------------------------------
+ src/libgcrypt.pc.in | 33 +++++++++++++++++++++++++
+ 3 files changed, 38 insertions(+), 67 deletions(-)
+ create mode 100644 src/libgcrypt.pc.in
+
+diff --git a/configure.ac b/configure.ac
+index f683e21..566e1c8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2314,6 +2314,7 @@ random/Makefile
doc/Makefile
src/Makefile
src/gcrypt.h
+src/libgcrypt.pc
src/libgcrypt-config
+ src/versioninfo.rc
tests/Makefile
- w32-dll/Makefile
-Index: libgcrypt-1.2.4/src/libgcrypt.pc.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ libgcrypt-1.2.4/src/libgcrypt.pc.in 2008-03-19 22:14:58.000000000 +0000
-@@ -0,0 +1,33 @@
-+# Process this file with autoconf to produce a pkg-config metadata file.
-+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
-+# Author: Simon Josefsson
-+#
-+# This file is free software; as a special exception the author gives
-+# unlimited permission to copy and/or distribute it, with or without
-+# modifications, as long as this notice is preserved.
-+#
-+# This file is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-+
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+# API info
-+api_version=@LIBGCRYPT_CONFIG_API_VERSION@
-+host=@LIBGCRYPT_CONFIG_HOST@
-+
-+# Misc information.
-+symmetric_ciphers=@LIBGCRYPT_CIPHERS@
-+asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
-+digests=@LIBGCRYPT_DIGESTS@
-+
-+Name: libgcrypt
-+Description: GNU crypto library
-+URL: http://www.gnupg.org
-+Version: @VERSION@
-+Libs: -L${libdir} -lgcrypt
-+Libs.private: -L${libdir} -lgpg-error
-+Cflags: -I${includedir}
-Index: libgcrypt-1.6.1/src/libgcrypt.m4
-===================================================================
---- libgcrypt-1.6.1.orig/src/libgcrypt.m4 2013-12-16 17:44:32.000000000 +0000
-+++ libgcrypt-1.6.1/src/libgcrypt.m4 2014-05-13 21:25:37.478389833 +0000
-@@ -22,17 +22,7 @@
+diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
+index c67cfec..4ea5f2c 100644
+--- a/src/libgcrypt.m4
++++ b/src/libgcrypt.m4
+@@ -29,30 +29,6 @@ dnl is added to the gpg_config_script_warn variable.
dnl
AC_DEFUN([AM_PATH_LIBGCRYPT],
[ AC_REQUIRE([AC_CANONICAL_HOST])
@@ -66,17 +37,30 @@ Index: libgcrypt-1.6.1/src/libgcrypt.m4
- AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
- [prefix where LIBGCRYPT is installed (optional)]),
- libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
-- if test x$libgcrypt_config_prefix != x ; then
-- if test x${LIBGCRYPT_CONFIG+set} != xset ; then
-- LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
+- if test x"${LIBGCRYPT_CONFIG}" = x ; then
+- if test x"${libgcrypt_config_prefix}" != x ; then
+- LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config"
+- else
+- case "${SYSROOT}" in
+- /*)
+- if test -x "${SYSROOT}/bin/libgcrypt-config" ; then
+- LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config"
+- fi
+- ;;
+- '')
+- ;;
+- *)
+- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+- ;;
+- esac
- fi
- fi
-
-- AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+-
+- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
tmp=ifelse([$1], ,1:1.2.0,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
-@@ -42,48 +32,13 @@
+@@ -62,48 +38,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
min_libgcrypt_version="$tmp"
fi
@@ -128,7 +112,7 @@ Index: libgcrypt-1.6.1/src/libgcrypt.m4
if test "$tmp" -gt 0 ; then
AC_MSG_CHECKING([LIBGCRYPT API version])
if test "$req_libgcrypt_api" -eq "$tmp" ; then
-@@ -96,10 +51,8 @@
+@@ -116,10 +57,8 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
fi
fi
if test $ok = yes; then
@@ -140,7 +124,7 @@ Index: libgcrypt-1.6.1/src/libgcrypt.m4
if test x"$libgcrypt_config_host" != xnone ; then
if test x"$libgcrypt_config_host" != x"$host" ; then
AC_MSG_WARN([[
-@@ -113,8 +66,6 @@
+@@ -134,8 +73,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
fi
fi
else
@@ -149,3 +133,45 @@ Index: libgcrypt-1.6.1/src/libgcrypt.m4
ifelse([$3], , :, [$3])
fi
AC_SUBST(LIBGCRYPT_CFLAGS)
+diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in
+new file mode 100644
+index 0000000..2fc8f53
+--- /dev/null
++++ b/src/libgcrypt.pc.in
+@@ -0,0 +1,33 @@
++# Process this file with autoconf to produce a pkg-config metadata file.
++# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
++# Author: Simon Josefsson
++#
++# This file is free software; as a special exception the author gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++#
++# This file is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@LIBGCRYPT_CONFIG_API_VERSION@
++host=@LIBGCRYPT_CONFIG_HOST@
++
++# Misc information.
++symmetric_ciphers=@LIBGCRYPT_CIPHERS@
++asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
++digests=@LIBGCRYPT_DIGESTS@
++
++Name: libgcrypt
++Description: GNU crypto library
++URL: http://www.gnupg.org
++Version: @VERSION@
++Libs: -L${libdir} -lgcrypt
++Libs.private: -L${libdir} -lgpg-error
++Cflags: -I${includedir}
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch
new file mode 100644
index 000000000..e7de8badf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/files/fix-undefined-reference-to-pthread.patch
@@ -0,0 +1,27 @@
+From cc0e2b403d33892963513a3ba98e4ae5a05a4d3c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sun, 12 Jun 2016 04:44:29 -0400
+Subject: [PATCH] tests/Makefile.am: fix undefined reference to `pthread_create'
+
+Add missing '-lpthread' to CFLAGS
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index d462f30..bef6dd7 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -62,4 +62,4 @@ EXTRA_DIST = README rsa-16k.key cavs_tests.sh cavs_driver.pl \
+
+ LDADD = $(standard_ldadd) $(GPG_ERROR_LIBS)
+ t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS)
+-t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS)
++t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS) -lpthread
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc
index 5478253e0..15805cd43 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -14,10 +14,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
DEPENDS = "libgpg-error libcap"
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \
file://add-pkgconfig-support.patch \
file://libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
file://fix-ICE-failure-on-mips-with-option-O-and-g.patch \
+ file://fix-undefined-reference-to-pthread.patch \
"
BINCONFIG = "${bindir}/libgcrypt-config"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb
deleted file mode 100644
index 717a23f1c..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require libgcrypt.inc
-
-SRC_URI[md5sum] = "f24fcb684932d4b5ed85f2f05cb1d9f8"
-SRC_URI[sha256sum] = "202bf109ccf2d614565c849f3e5687b94cde972167b35261e094252367627bc6"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb
new file mode 100644
index 000000000..ddd7c5392
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.7.3.bb
@@ -0,0 +1,4 @@
+require libgcrypt.inc
+
+SRC_URI[md5sum] = "bb5b00cb70b1215833857fd690080fbb"
+SRC_URI[sha256sum] = "c98470cf6a781f2af4bdfda710ad39f0f54b5044e8c43b878d4005737d6c213f"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/0001-libgpg-error-Add-nios2-support.patch b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/0001-libgpg-error-Add-nios2-support.patch
deleted file mode 100644
index dab1c13b6..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/0001-libgpg-error-Add-nios2-support.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From b2af652f43991e4ce6297917da542a9eb5135939 Mon Sep 17 00:00:00 2001
-From: Marek Vasut <marex@denx.de>
-Date: Thu, 17 Sep 2015 03:28:06 +0200
-Subject: [PATCH] libgpg-error: Add nios2 support
-
-Add configuration for the NIOS2 processor.
-
-Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Submitted
----
- src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h | 23 +++++++++++++++++++++++
- 1 file changed, 23 insertions(+)
- create mode 100644 src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h
-
-diff --git a/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h
-new file mode 100644
-index 0000000..3a24571
---- /dev/null
-+++ b/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h
-@@ -0,0 +1,23 @@
-+## lock-obj-pub.nios2-unknown-linux-gnu.h
-+## File created by gen-posix-lock-obj - DO NOT EDIT
-+## To be included by mkheader into gpg-error.h
-+
-+typedef struct
-+{
-+ long _vers;
-+ union {
-+ volatile char _priv[24];
-+ long _x_align;
-+ long *_xp_align;
-+ } u;
-+} gpgrt_lock_t;
-+
-+#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
-+ 0,0,0,0,0,0,0,0, \
-+ 0,0,0,0,0,0,0,0}}}
-+##
-+## Local Variables:
-+## mode: c
-+## buffer-read-only: t
-+## End:
-+##
---
-2.5.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.21.bb b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.21.bb
deleted file mode 100644
index 0dd16025a..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.21.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "Small library that defines common error values for all GnuPG components"
-HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
- file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://src/gpg-error.h.in;endline=23;md5=93d3155af141ae3b369a5d09ca9d6234 \
- file://src/init.c;endline=20;md5=8f5a9b59634f4aebcd0ec9d3ebd53bfe"
-
-
-SECTION = "libs"
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
- file://pkgconfig.patch \
- file://0001-libgpg-error-Add-nios2-support.patch \
- "
-SRC_URI[md5sum] = "ab0b5aba6d0a185b41d07bda804fd8b2"
-SRC_URI[sha256sum] = "b7dbdb3cad63a740e9f0c632a1da32d4afdb694ec86c8625c98ea0691713b84d"
-
-BINCONFIG = "${bindir}/gpg-error-config"
-
-inherit autotools binconfig-disabled pkgconfig gettext
-CPPFLAGS += "-P"
-do_compile_prepend() {
- TARGET_FILE=linux-gnu
- if [ ${TARGET_OS} != "linux" ]; then
- TARGET_FILE=${TARGET_OS}
- fi
-
- case ${TARGET_ARCH} in
- aarch64_be) TUPLE=aarch64-unknown-linux-gnu ;;
- arm) TUPLE=arm-unknown-linux-gnueabi ;;
- armeb) TUPLE=arm-unknown-linux-gnueabi ;;
- i586|i686) TUPLE=i686-pc-linux-gnu ;;
- mips64el) TUPLE=mipsel-unknown-linux-gnu ;;
- mips64) TUPLE=mips-unknown-linux-gnu ;;
- x86_64) TUPLE=x86_64-pc-linux-gnu ;;
- *) TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;;
- esac
-
- cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
- ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
-}
-
-do_install_append() {
- # we don't have common lisp in OE
- rm -rf "${D}${datadir}/common-lisp/"
-}
-
-FILES_${PN}-dev += "${bindir}/gpg-error"
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.24.bb b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.24.bb
new file mode 100644
index 000000000..84a882a0c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.24.bb
@@ -0,0 +1,53 @@
+SUMMARY = "Small library that defines common error values for all GnuPG components"
+HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/gpg-error.h.in;endline=23;md5=cf562f60b9dba7df20d6ee3f97ea1d5a \
+ file://src/init.c;endline=20;md5=872b2389fe9bae7ffb80d2b91225afbc"
+
+
+SECTION = "libs"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
+ "
+SRC_URI[md5sum] = "feb42198c0aaf3b28eabe8f41a34b983"
+SRC_URI[sha256sum] = "9268e1cc487de5e6e4460fca612a06e4f383072ac43ae90603e5e46783d3e540"
+
+BINCONFIG = "${bindir}/gpg-error-config"
+
+inherit autotools binconfig-disabled pkgconfig gettext
+CPPFLAGS += "-P"
+do_compile_prepend() {
+ TARGET_FILE=linux-gnu
+ if [ ${TARGET_OS} != "linux" ]; then
+ TARGET_FILE=${TARGET_OS}
+ fi
+
+ case ${TARGET_ARCH} in
+ aarch64_be) TUPLE=aarch64-unknown-linux-gnu ;;
+ arm) TUPLE=arm-unknown-linux-gnueabi ;;
+ armeb) TUPLE=arm-unknown-linux-gnueabi ;;
+ i586|i686) TUPLE=i686-pc-linux-gnu ;;
+ mips*el) TUPLE=mipsel-unknown-linux-gnu ;;
+ mips*) TUPLE=mips-unknown-linux-gnu ;;
+ x86_64) TUPLE=x86_64-pc-linux-gnu ;;
+ *) TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;;
+ esac
+
+ cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
+ ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
+}
+
+do_install_append() {
+ # we don't have common lisp in OE
+ rm -rf "${D}${datadir}/common-lisp/"
+}
+
+FILES_${PN}-dev += "${bindir}/gpg-error"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch b/import-layers/yocto-poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch
new file mode 100644
index 000000000..6db75f508
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch
@@ -0,0 +1,44 @@
+From 1a41069c0dc054e59cd76fc3d8cf7cc2a78b5e8d Mon Sep 17 00:00:00 2001
+From: Allen Winter <allen.winter@kdab.com>
+Date: Sat, 3 Sep 2016 16:56:29 -0400
+Subject: [PATCH] CMakeLists.txt, libical.pc.in - fix iculibs (remove full path) ISSUE: 227
+
+Upstream-Status: Backport
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+----
+diff -Naur libical-2.0.0-orig/CMakeLists.txt libical-2.0.0/CMakeLists.txt
+--- libical-2.0.0-orig/CMakeLists.txt 2016-09-08 18:05:06.166049345 +0300
++++ libical-2.0.0/CMakeLists.txt 2016-09-08 18:05:45.201561334 +0300
+@@ -128,6 +128,7 @@
+ # RSCALE info at http://tools.ietf.org/html/rfc7529
+ find_package(ICU)
+ if(ICU_FOUND)
++ set(ICUUC_LIBS "-licuuc") #for libical.pc
+ set(HAVE_LIBICU 1)
+ if(ICU_MAJOR_VERSION VERSION_GREATER 50)
+ set(HAVE_ICU_DANGI TRUE)
+@@ -137,6 +138,7 @@
+ endif()
+ if(ICU_I18N_FOUND)
+ set(HAVE_LIBICU_I18N 1)
++ set(ICUI18N_LIBS "-licui18n") #for libical.pc
+ endif()
+
+ # MSVC specific definitions
+diff -Naur libical-2.0.0-orig/libical.pc.in libical-2.0.0/libical.pc.in
+--- libical-2.0.0-orig/libical.pc.in 2015-12-28 23:44:53.000000000 +0200
++++ libical-2.0.0/libical.pc.in 2016-09-08 18:09:12.991963597 +0300
+@@ -3,10 +3,10 @@
+ libdir=@libdir@
+ includedir=@includedir@
+ threadslib=@PTHREAD_LIBS@
+-iculib=@ICU_LIBRARIES@ @ICU_I18N_LIBRARIES@
++iculibs=@ICUUC_LIBS@ @ICUI18N_LIBS@
+
+ Name: libical
+ Description: An implementation of basic iCAL protocols
+ Version: @VERSION@
+-Libs: -L${libdir} -lical -licalss -licalvcal ${threadslib} ${iculib}
++Libs: -L${libdir} -lical -licalss -licalvcal ${threadslib} ${iculibs}
+ Cflags: -I${includedir}
diff --git a/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb b/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
index 1042e6fa3..d4fe868eb 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
@@ -8,6 +8,7 @@ SECTION = "libs"
SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
file://Remove-cmake-check-for-Perl.patch \
+ file://0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch \
"
DEPENDS = "icu"
@@ -15,13 +16,6 @@ SRC_URI[md5sum] = "6bf8e5f5a3ba88baf390d0134e05d76e"
SRC_URI[sha256sum] = "654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf21456da"
UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases"
-inherit cmake
+inherit cmake pkgconfig
FILES_${PN}-dev += "${libdir}/cmake/*"
-
-#
-# Turn specific library paths in the pkgconfig file into standard library entries
-#
-do_install_append () {
- sed -i -e "s#${STAGING_LIBDIR}/lib\([a-z0-9]*\)\.so#-l\1#g" ${D}${libdir}/pkgconfig/libical.pc
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb
deleted file mode 100644
index bc2116419..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Easy API to create and parse X.509 and CMS related objects"
-HOMEPAGE = "http://www.gnupg.org/related_software/libksba/"
-LICENSE = "GPLv2+ | LGPLv3+ | GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd541d83f75d038c4e0617b672ed8bda \
- file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
- file://COPYING.GPLv3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \
- file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
- "
-
-DEPENDS = "libgpg-error"
-
-BINCONFIG = "${bindir}/ksba-config"
-
-inherit autotools binconfig-disabled pkgconfig texinfo
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
- file://ksba-add-pkgconfig-support.patch"
-
-SRC_URI[md5sum] = "a5dd3c57fca254935f5cf8db26e39065"
-SRC_URI[sha256sum] = "0c7f5ffe34d0414f6951d9880a46fcc2985c487f7c36369b9f11ad41131c7786"
-
-do_configure_prepend () {
- # Else these could be used in preference to those in aclocal-copy
- rm -f ${S}/m4/gpg-error.m4
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.4.bb b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.4.bb
new file mode 100644
index 000000000..e68255c67
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libksba/libksba_1.3.4.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Easy API to create and parse X.509 and CMS related objects"
+HOMEPAGE = "http://www.gnupg.org/related_software/libksba/"
+LICENSE = "GPLv2+ | LGPLv3+ | GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fd541d83f75d038c4e0617b672ed8bda \
+ file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.GPLv3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \
+ file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+ "
+
+DEPENDS = "libgpg-error"
+
+BINCONFIG = "${bindir}/ksba-config"
+
+inherit autotools binconfig-disabled pkgconfig texinfo
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://ksba-add-pkgconfig-support.patch"
+
+SRC_URI[md5sum] = "2bfc3d69053db7b6983b5627706033f4"
+SRC_URI[sha256sum] = "f6c2883cebec5608692d8730843d87f237c0964d923bbe7aa89c05f20558ad4f"
+
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch
new file mode 100644
index 000000000..b734028c7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0001-lib-add-utility-function-nl_strerror_l.patch
@@ -0,0 +1,146 @@
+From 683f27fbb68ca2028a7b3468f17164d484df2759 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Thu, 25 Aug 2016 13:14:59 +0100
+Subject: [PATCH 1/3] lib: add utility function nl_strerror_l()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+libnl currently uses strerror_r() throughout, but this is
+problematic because there is a non-standard GNU version
+implemented in glibc, and the standard POSIX version, which
+differ in signature. When using glibc, one can choose
+between the two versions using feature test macros
+_GNU_SOURCE and _POSIX_C_SOURCE.
+
+Given libnl is built using the former, we always get the
+glibc special version, and all code so far has been written
+for that non-standard version.
+
+Other C libraries like musl on the other hand only try
+to be posix compliant, and only ever provide the posix
+version of strerror_r(), which has a different signature.
+
+The alternative is to use strerror_l() rather than
+strerror_r() http://austingroupbugs.net/view.php?id=655
+- this will avoid the non-confirming versions issue
+- strerror_l() is now recommended by POSIX to replace
+ strerror_r() usage
+
+So rather than changing all uses of strerror_r() to be in
+line with posix, we are going to switch to the recommended
+interface strerror_l().
+
+Since strerror_l() is slightly more difficuly to use, we
+add a little (private) wrapper that we can use from all
+current callsites of strerror_r().
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
+Signed-off-by: Thomas Haller <thaller@redhat.com>
+---
+Upstream-Status: Backport https://github.com/thom311/libnl/commit/683f27fbb68ca2028a7b3468f17164d484df2759
+ include/Makefile.am | 1 +
+ include/netlink-private/utils.h | 17 +++++++++++++++++
+ lib/utils.c | 24 ++++++++++++++++++++++++
+ libnl-3.sym | 5 +++++
+ 4 files changed, 47 insertions(+)
+ create mode 100644 include/netlink-private/utils.h
+
+diff --git a/include/Makefile.am b/include/Makefile.am
+index 804e984..f8b977a 100644
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -166,6 +166,7 @@ noinst_HEADERS = \
+ netlink-private/socket.h \
+ netlink-private/tc.h \
+ netlink-private/types.h \
++ netlink-private/utils.h \
+ netlink-private/cache-api.h \
+ netlink-private/object-api.h \
+ netlink-private/route/link/api.h \
+diff --git a/include/netlink-private/utils.h b/include/netlink-private/utils.h
+new file mode 100644
+index 0000000..77aadb3
+--- /dev/null
++++ b/include/netlink-private/utils.h
+@@ -0,0 +1,17 @@
++/*
++ * netlink-private/utils.h Local Utility Functions
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation version 2.1
++ * of the License.
++ *
++ * Copyright (c) 2003-2012 Thomas Graf <tgraf@suug.ch>
++ */
++
++#ifndef NETLINK_UTILS_PRIV_H_
++#define NETLINK_UTILS_PRIV_H_
++
++extern const char * nl_strerror_l(int err);
++
++#endif
+diff --git a/lib/utils.c b/lib/utils.c
+index 61c3d95..c1c1b72 100644
+--- a/lib/utils.c
++++ b/lib/utils.c
+@@ -25,10 +25,12 @@
+ */
+
+ #include <netlink-private/netlink.h>
++#include <netlink-private/utils.h>
+ #include <netlink/netlink.h>
+ #include <netlink/utils.h>
+ #include <linux/socket.h>
+ #include <stdlib.h> /* exit() */
++#include <locale.h>
+
+ /**
+ * Global variable indicating the desired level of debugging output.
+@@ -118,6 +120,28 @@ int __nl_read_num_str_file(const char *path, int (*cb)(long, const char *))
+
+ return 0;
+ }
++
++const char *nl_strerror_l(int err)
++{
++ int errno_save = errno;
++ locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0);
++ const char *buf;
++
++ if (loc == (locale_t)0) {
++ if (errno == ENOENT)
++ loc = newlocale(LC_MESSAGES_MASK,
++ "POSIX", (locale_t)0);
++ }
++ if (loc != (locale_t)0) {
++ buf = strerror_l(err, loc);
++ freelocale(loc);
++ } else {
++ buf = "newlocale() failed";
++ }
++
++ errno = errno_save;
++ return buf;
++}
+ /** @endcond */
+
+ /**
+diff --git a/libnl-3.sym b/libnl-3.sym
+index 4e09bdd..9119e66 100644
+--- a/libnl-3.sym
++++ b/libnl-3.sym
+@@ -351,3 +351,8 @@ libnl_3_2_28 {
+ global:
+ nl_object_diff64;
+ } libnl_3_2_27;
++
++libnl_3_2_29 {
++global:
++ nl_strerror_l;
++} libnl_3_2_28;
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch
new file mode 100644
index 000000000..6347ec0b9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch
@@ -0,0 +1,403 @@
+From c1948ec29b8dcdc58d2d92700c325abdeab111a6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Thu, 25 Aug 2016 13:15:00 +0100
+Subject: [PATCH 2/3] lib: switch to using strerror_l() instead of strerror_r()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+glibc provides two versions of strerror_r(), which
+can be chosen between using feature test macros
+_GNU_SOURCE and _POSIX_C_SOURCE. libnl is built using
+the former, hence we get the glibc special version,
+and all code so far has been written for this.
+
+Other C libraries like musl on the other hand only try
+to be posix compliant, and only ever provide the posix
+version of strerror_r(), which has a different signature.
+
+Uses in libnl hence generally cause printf() of an *int*
+with a *string format* specifier for that reason.
+
+Additionally, strerror_r() has been deprecated:
+ http://austingroupbugs.net/view.php?id=655
+
+Switch to using strerror_l() (via our wrapper just
+introduced).
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
+Signed-off-by: Thomas Haller <thaller@redhat.com>
+---
+Upstream-Status: Backport https://github.com/thom311/libnl/commit/c1948ec29b8dcdc58d2d92700c325abdeab111a6
+ lib/cache_mngr.c | 5 ++---
+ lib/fib_lookup/lookup.c | 3 ++-
+ lib/handlers.c | 4 ++--
+ lib/msg.c | 4 ++--
+ lib/nl.c | 26 +++++++++-----------------
+ lib/route/route_obj.c | 3 ++-
+ lib/socket.c | 33 +++++++++++----------------------
+ 7 files changed, 30 insertions(+), 48 deletions(-)
+
+diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c
+index b9eb345..1f23eb1 100644
+--- a/lib/cache_mngr.c
++++ b/lib/cache_mngr.c
+@@ -33,6 +33,7 @@
+ */
+
+ #include <netlink-private/netlink.h>
++#include <netlink-private/utils.h>
+ #include <netlink/netlink.h>
+ #include <netlink/cache.h>
+ #include <netlink/utils.h>
+@@ -392,10 +393,8 @@ int nl_cache_mngr_poll(struct nl_cache_mngr *mngr, int timeout)
+ ret = poll(&fds, 1, timeout);
+ NL_DBG(3, "Cache manager %p, poll() returned %d\n", mngr, ret);
+ if (ret < 0) {
+- char buf[64];
+-
+ NL_DBG(4, "nl_cache_mngr_poll(%p): poll() failed with %d (%s)\n",
+- mngr, errno, strerror_r(errno, buf, sizeof(buf)));
++ mngr, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+diff --git a/lib/fib_lookup/lookup.c b/lib/fib_lookup/lookup.c
+index 43b6126..efc862b 100644
+--- a/lib/fib_lookup/lookup.c
++++ b/lib/fib_lookup/lookup.c
+@@ -17,6 +17,7 @@
+ */
+
+ #include <netlink-private/netlink.h>
++#include <netlink-private/utils.h>
+ #include <netlink/netlink.h>
+ #include <netlink/attr.h>
+ #include <netlink/utils.h>
+@@ -133,7 +134,7 @@ static void result_dump_line(struct nl_object *obj, struct nl_dump_params *p)
+ nl_rtntype2str(res->fr_type, buf, sizeof(buf)));
+ nl_dump(p, "scope %s error %s (%d)\n",
+ rtnl_scope2str(res->fr_scope, buf, sizeof(buf)),
+- strerror_r(-res->fr_error, buf, sizeof(buf)), res->fr_error);
++ nl_strerror_l(-res->fr_error), res->fr_error);
+ }
+
+ static void result_dump_details(struct nl_object *obj, struct nl_dump_params *p)
+diff --git a/lib/handlers.c b/lib/handlers.c
+index 97a0d9c..4a48b99 100644
+--- a/lib/handlers.c
++++ b/lib/handlers.c
+@@ -26,6 +26,7 @@
+ */
+
+ #include <netlink-private/netlink.h>
++#include <netlink-private/utils.h>
+ #include <netlink/netlink.h>
+ #include <netlink/utils.h>
+ #include <netlink/msg.h>
+@@ -79,10 +80,9 @@ static int nl_error_handler_verbose(struct sockaddr_nl *who,
+ struct nlmsgerr *e, void *arg)
+ {
+ FILE *ofd = arg ? arg : stderr;
+- char buf[256];
+
+ fprintf(ofd, "-- Error received: %s\n-- Original message: ",
+- strerror_r(-e->error, buf, sizeof(buf)));
++ nl_strerror_l(-e->error));
+ print_header_content(ofd, &e->msg);
+ fprintf(ofd, "\n");
+
+diff --git a/lib/msg.c b/lib/msg.c
+index e8a7e99..9af3f3a 100644
+--- a/lib/msg.c
++++ b/lib/msg.c
+@@ -27,6 +27,7 @@
+ */
+
+ #include <netlink-private/netlink.h>
++#include <netlink-private/utils.h>
+ #include <netlink/netlink.h>
+ #include <netlink/utils.h>
+ #include <netlink/cache.h>
+@@ -913,11 +914,10 @@ static void dump_error_msg(struct nl_msg *msg, FILE *ofd)
+ fprintf(ofd, " [ERRORMSG] %zu octets\n", sizeof(*err));
+
+ if (nlmsg_len(hdr) >= sizeof(*err)) {
+- char buf[256];
+ struct nl_msg *errmsg;
+
+ fprintf(ofd, " .error = %d \"%s\"\n", err->error,
+- strerror_r(-err->error, buf, sizeof(buf)));
++ nl_strerror_l(-err->error));
+ fprintf(ofd, " [ORIGINAL MESSAGE] %zu octets\n", sizeof(*hdr));
+
+ errmsg = nlmsg_inherit(&err->msg);
+diff --git a/lib/nl.c b/lib/nl.c
+index 123f657..a45c3ea 100644
+--- a/lib/nl.c
++++ b/lib/nl.c
+@@ -27,6 +27,7 @@
+
+ #include <netlink-private/netlink.h>
+ #include <netlink-private/socket.h>
++#include <netlink-private/utils.h>
+ #include <netlink/netlink.h>
+ #include <netlink/utils.h>
+ #include <netlink/handlers.h>
+@@ -105,7 +106,6 @@ int nl_connect(struct nl_sock *sk, int protocol)
+ int errsv;
+ socklen_t addrlen;
+ struct sockaddr_nl local = { 0 };
+- char buf[64];
+ int try_bind = 1;
+
+ #ifdef SOCK_CLOEXEC
+@@ -119,7 +119,7 @@ int nl_connect(struct nl_sock *sk, int protocol)
+ if (sk->s_fd < 0) {
+ errsv = errno;
+ NL_DBG(4, "nl_connect(%p): socket() failed with %d (%s)\n", sk, errsv,
+- strerror_r(errsv, buf, sizeof(buf)));
++ nl_strerror_l(errsv));
+ err = -nl_syserr2nlerr(errsv);
+ goto errout;
+ }
+@@ -158,7 +158,7 @@ int nl_connect(struct nl_sock *sk, int protocol)
+ _nl_socket_used_ports_set(used_ports, port);
+ } else {
+ NL_DBG(4, "nl_connect(%p): bind() for port %u failed with %d (%s)\n",
+- sk, (unsigned) port, errsv, strerror_r(errsv, buf, sizeof(buf)));
++ sk, (unsigned) port, errsv, nl_strerror_l(errsv));
+ _nl_socket_used_ports_release_all(used_ports);
+ err = -nl_syserr2nlerr(errsv);
+ goto errout;
+@@ -172,7 +172,7 @@ int nl_connect(struct nl_sock *sk, int protocol)
+ if (err != 0) {
+ errsv = errno;
+ NL_DBG(4, "nl_connect(%p): bind() failed with %d (%s)\n",
+- sk, errsv, strerror_r(errsv, buf, sizeof(buf)));
++ sk, errsv, nl_strerror_l(errsv));
+ err = -nl_syserr2nlerr(errsv);
+ goto errout;
+ }
+@@ -183,7 +183,7 @@ int nl_connect(struct nl_sock *sk, int protocol)
+ &addrlen);
+ if (err < 0) {
+ NL_DBG(4, "nl_connect(%p): getsockname() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, errno, nl_strerror_l(errno));
+ err = -nl_syserr2nlerr(errno);
+ goto errout;
+ }
+@@ -280,10 +280,8 @@ int nl_sendto(struct nl_sock *sk, void *buf, size_t size)
+ ret = sendto(sk->s_fd, buf, size, 0, (struct sockaddr *)
+ &sk->s_peer, sizeof(sk->s_peer));
+ if (ret < 0) {
+- char errbuf[64];
+-
+ NL_DBG(4, "nl_sendto(%p): sendto() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, errbuf, sizeof(errbuf)));
++ sk, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+@@ -343,10 +341,8 @@ int nl_sendmsg(struct nl_sock *sk, struct nl_msg *msg, struct msghdr *hdr)
+
+ ret = sendmsg(sk->s_fd, hdr, 0);
+ if (ret < 0) {
+- char errbuf[64];
+-
+ NL_DBG(4, "nl_sendmsg(%p): sendmsg() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, errbuf, sizeof(errbuf)));
++ sk, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+@@ -706,15 +702,13 @@ retry:
+ goto abort;
+ }
+ if (n < 0) {
+- char errbuf[64];
+-
+ if (errno == EINTR) {
+ NL_DBG(3, "recvmsg() returned EINTR, retrying\n");
+ goto retry;
+ }
+
+ NL_DBG(4, "nl_sendmsg(%p): nl_recv() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, errbuf, sizeof(errbuf)));
++ sk, errno, nl_strerror_l(errno));
+ retval = -nl_syserr2nlerr(errno);
+ goto abort;
+ }
+@@ -980,10 +974,8 @@ continue_reading:
+ goto out;
+ }
+ } else if (e->error) {
+- char buf[64];
+-
+ NL_DBG(4, "recvmsgs(%p): RTNETLINK responded with %d (%s)\n",
+- sk, -e->error, strerror_r(-e->error, buf, sizeof(buf)));
++ sk, -e->error, nl_strerror_l(-e->error));
+
+ /* Error message reported back from kernel. */
+ if (cb->cb_err) {
+diff --git a/lib/route/route_obj.c b/lib/route/route_obj.c
+index 7347ed2..21b67b1 100644
+--- a/lib/route/route_obj.c
++++ b/lib/route/route_obj.c
+@@ -31,6 +31,7 @@
+ */
+
+ #include <netlink-private/netlink.h>
++#include <netlink-private/utils.h>
+ #include <netlink/netlink.h>
+ #include <netlink/cache.h>
+ #include <netlink/utils.h>
+@@ -259,7 +260,7 @@ static void route_dump_details(struct nl_object *a, struct nl_dump_params *p)
+ if ((r->ce_mask & ROUTE_ATTR_CACHEINFO) && r->rt_cacheinfo.rtci_error) {
+ nl_dump_line(p, " cacheinfo error %d (%s)\n",
+ r->rt_cacheinfo.rtci_error,
+- strerror_r(-r->rt_cacheinfo.rtci_error, buf, sizeof(buf)));
++ nl_strerror_l(-r->rt_cacheinfo.rtci_error));
+ }
+
+ if (r->ce_mask & ROUTE_ATTR_METRICS) {
+diff --git a/lib/socket.c b/lib/socket.c
+index 97b2f69..55153b4 100644
+--- a/lib/socket.c
++++ b/lib/socket.c
+@@ -33,6 +33,7 @@
+
+ #include <netlink-private/netlink.h>
+ #include <netlink-private/socket.h>
++#include <netlink-private/utils.h>
+ #include <netlink/netlink.h>
+ #include <netlink/utils.h>
+ #include <netlink/handlers.h>
+@@ -449,11 +450,9 @@ int nl_socket_add_memberships(struct nl_sock *sk, int group, ...)
+ err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP,
+ &group, sizeof(group));
+ if (err < 0) {
+- char buf[64];
+-
+ va_end(ap);
+ NL_DBG(4, "nl_socket_add_memberships(%p): setsockopt() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+@@ -501,11 +500,9 @@ int nl_socket_drop_memberships(struct nl_sock *sk, int group, ...)
+ err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_DROP_MEMBERSHIP,
+ &group, sizeof(group));
+ if (err < 0) {
+- char buf[64];
+-
+ va_end(ap);
+ NL_DBG(4, "nl_socket_drop_memberships(%p): setsockopt() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+@@ -619,7 +616,6 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd)
+ {
+ int err = 0;
+ socklen_t addrlen;
+- char buf[64];
+ struct sockaddr_nl local = { 0 };
+ int so_type = -1, so_protocol = -1;
+
+@@ -633,7 +629,7 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd)
+ &addrlen);
+ if (err < 0) {
+ NL_DBG(4, "nl_socket_set_fd(%p,%d): getsockname() failed with %d (%s)\n",
+- sk, fd, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, fd, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+ if (addrlen != sizeof(local))
+@@ -648,7 +644,7 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd)
+ err = getsockopt(fd, SOL_SOCKET, SO_TYPE, &so_type, &addrlen);
+ if (err < 0) {
+ NL_DBG(4, "nl_socket_set_fd(%p,%d): getsockopt() for SO_TYPE failed with %d (%s)\n",
+- sk, fd, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, fd, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+ if (addrlen != sizeof(so_type))
+@@ -666,7 +662,7 @@ int nl_socket_set_fd(struct nl_sock *sk, int protocol, int fd)
+ if (errno == ENOPROTOOPT)
+ goto no_so_protocol;
+ NL_DBG(4, "nl_socket_set_fd(%p,%d): getsockopt() for SO_PROTOCOL failed with %d (%s)\n",
+- sk, fd, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, fd, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+ if (addrlen != sizeof(so_protocol))
+@@ -709,10 +705,8 @@ int nl_socket_set_nonblocking(const struct nl_sock *sk)
+ return -NLE_BAD_SOCK;
+
+ if (fcntl(sk->s_fd, F_SETFL, O_NONBLOCK) < 0) {
+- char buf[64];
+-
+ NL_DBG(4, "nl_socket_set_nonblocking(%p): fcntl() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+@@ -813,7 +807,6 @@ int nl_socket_modify_err_cb(struct nl_sock *sk, enum nl_cb_kind kind,
+ int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf)
+ {
+ int err;
+- char buf[64];
+
+ if (rxbuf <= 0)
+ rxbuf = 32768;
+@@ -828,7 +821,7 @@ int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf)
+ &txbuf, sizeof(txbuf));
+ if (err < 0) {
+ NL_DBG(4, "nl_socket_set_buffer_size(%p): setsockopt() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+@@ -836,7 +829,7 @@ int nl_socket_set_buffer_size(struct nl_sock *sk, int rxbuf, int txbuf)
+ &rxbuf, sizeof(rxbuf));
+ if (err < 0) {
+ NL_DBG(4, "nl_socket_set_buffer_size(%p): setsockopt() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+@@ -890,10 +883,8 @@ int nl_socket_set_passcred(struct nl_sock *sk, int state)
+ err = setsockopt(sk->s_fd, SOL_SOCKET, SO_PASSCRED,
+ &state, sizeof(state));
+ if (err < 0) {
+- char buf[64];
+-
+ NL_DBG(4, "nl_socket_set_passcred(%p): setsockopt() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+@@ -922,10 +913,8 @@ int nl_socket_recv_pktinfo(struct nl_sock *sk, int state)
+ err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_PKTINFO,
+ &state, sizeof(state));
+ if (err < 0) {
+- char buf[64];
+-
+ NL_DBG(4, "nl_socket_recv_pktinfo(%p): setsockopt() failed with %d (%s)\n",
+- sk, errno, strerror_r(errno, buf, sizeof(buf)));
++ sk, errno, nl_strerror_l(errno));
+ return -nl_syserr2nlerr(errno);
+ }
+
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch
new file mode 100644
index 000000000..a0f5a7809
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl/0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch
@@ -0,0 +1,82 @@
+From 6c2d111177e91184073c44f83d4a6182aaba06d7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Thu, 25 Aug 2016 13:15:01 +0100
+Subject: [PATCH 3/3] src: switch to using strerror_l() instead of strerror_r()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+glibc provides two versions of strerror_r(), which
+can be chosen between using feature test macros
+_GNU_SOURCE and _POSIX_C_SOURCE. libnl is built using
+the former, hence we get the glibc special version,
+and all code so far has been written for this.
+
+Other C libraries like musl on the other hand only try
+to be posix compliant, and only ever provide the posix
+version of strerror_r(), which has a different signature.
+
+Uses in libnl hence generally cause printf() of an *int*
+with a *string format* specifier for that reason.
+
+Additionally, strerror_r() has been deprecated:
+ http://austingroupbugs.net/view.php?id=655
+
+Switch to using strerror_l().
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+Reviewed-by: Stephane Ayotte <sayotte@tycoint.com>
+Signed-off-by: Thomas Haller <thaller@redhat.com>
+---
+Upstream-Status: Backport https://github.com/thom311/libnl/commit/6c2d111177e91184073c44f83d4a6182aaba06d7
+ src/lib/utils.c | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/src/lib/utils.c b/src/lib/utils.c
+index 467aaed..5878f27 100644
+--- a/src/lib/utils.c
++++ b/src/lib/utils.c
+@@ -22,6 +22,7 @@
+ */
+
+ #include <netlink/cli/utils.h>
++#include <locale.h>
+
+ /**
+ * Parse a text based 32 bit unsigned integer argument
+@@ -70,7 +71,6 @@ void nl_cli_print_version(void)
+ void nl_cli_fatal(int err, const char *fmt, ...)
+ {
+ va_list ap;
+- char buf[256];
+
+ fprintf(stderr, "Error: ");
+
+@@ -79,8 +79,22 @@ void nl_cli_fatal(int err, const char *fmt, ...)
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fprintf(stderr, "\n");
+- } else
+- fprintf(stderr, "%s\n", strerror_r(err, buf, sizeof(buf)));
++ } else {
++ char *buf;
++ locale_t loc = newlocale(LC_MESSAGES_MASK, "", (locale_t)0);
++ if (loc == (locale_t)0) {
++ if (errno == ENOENT)
++ loc = newlocale(LC_MESSAGES_MASK,
++ "POSIX", (locale_t)0);
++ if (loc == (locale_t)0)
++ buf = "newlocale() failed";
++ }
++ if (loc != (locale_t)0)
++ buf = strerror_l(err, loc);
++ fprintf(stderr, "%s\n", buf);
++ if (loc != (locale_t)0)
++ freelocale(loc);
++ }
+
+ exit(abs(err));
+ }
+--
+2.9.3
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb
deleted file mode 100644
index cabe84107..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "A library for applications dealing with netlink sockets"
-HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
-SECTION = "libs/network"
-
-PE = "1"
-PR = "r1"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "flex-native bison-native"
-
-SRC_URI = "http://www.infradead.org/~tgr/${BPN}/files/${BP}.tar.gz \
- file://fix-pktloc_syntax_h-race.patch \
- file://fix-pc-file.patch \
- "
-
-SRC_URI[md5sum] = "03f74d0cd5037cadc8cdfa313bbd195c"
-SRC_URI[sha256sum] = "8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5"
-
-inherit autotools pkgconfig
-
-FILES_${PN} = "${libdir}/libnl-3.so.* \
- ${libdir}/libnl.so.* \
- ${sysconfdir}"
-RREPLACES_${PN} = "libnl2"
-RCONFLICTS_${PN} = "libnl2"
-FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
-
-PACKAGES += "${PN}-cli ${PN}-route ${PN}-nf ${PN}-genl ${PN}-idiag"
-FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
- ${libdir}/libnl/cli/*/*.so \
- ${libdir}/libnl/cli/*/*.la \
- ${sbindir}/nl-*"
-FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
-FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
-FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
-FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
- ${libdir}/libnl-genl.so.* \
- ${sbindir}/genl-ctrl-list"
-RREPLACES_${PN}-genl = "libnl-genl2 libnl-genl-3-200"
-RCONFLICTS_${PN}-genl = "libnl-genl2 libnl-genl-3-200"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.28.bb b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.28.bb
new file mode 100644
index 000000000..26982f3ef
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libnl/libnl_3.2.28.bb
@@ -0,0 +1,48 @@
+SUMMARY = "A library for applications dealing with netlink sockets"
+HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
+SECTION = "libs/network"
+
+PE = "1"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "flex-native bison-native"
+
+SRC_URI = "https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV', True).replace('.','_')}/${BP}.tar.gz \
+ file://fix-pktloc_syntax_h-race.patch \
+ file://fix-pc-file.patch \
+ file://0001-lib-add-utility-function-nl_strerror_l.patch \
+ file://0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch \
+ file://0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch \
+"
+UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases"
+
+SRC_URI[md5sum] = "bab12db1eb94a42129f712a44be91a67"
+SRC_URI[sha256sum] = "cd608992c656e8f6e3ab6c1391b162a5a51c49336b9219f7f390e61fc5437c41"
+
+inherit autotools pkgconfig
+
+FILES_${PN} = "${libdir}/libnl-3.so.* \
+ ${libdir}/libnl.so.* \
+ ${sysconfdir}"
+RREPLACES_${PN} = "libnl2"
+RCONFLICTS_${PN} = "libnl2"
+FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la"
+FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
+
+PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
+FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
+ ${libdir}/libnl/cli/*/*.so \
+ ${bindir}/genl-ctrl-list \
+ ${bindir}/idiag-socket-details \
+ ${bindir}/nf-* \
+ ${bindir}/nl-*"
+FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
+ ${libdir}/libnl-genl.so.*"
+FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
+FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
+FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
+FILES_${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*"
+RREPLACES_${PN}-genl = "libnl-genl2"
+RCONFLICTS_${PN}-genl = "libnl-genl2"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb
deleted file mode 100644
index 384c2fe79..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb
+++ /dev/null
@@ -1,79 +0,0 @@
-DESCRIPTION = "The PCRE library is a set of functions that implement regular \
-expression pattern matching using the same syntax and semantics as Perl 5. PCRE \
-has its own native API, as well as a set of wrapper functions that correspond \
-to the POSIX regular expression API."
-SUMMARY = "Perl Compatible Regular Expressions"
-HOMEPAGE = "http://www.pcre.org"
-SECTION = "devel"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=7e4937814aee14758c1c95b59c80c44d"
-SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2 \
- file://pcre-cross.patch \
- file://fix-pcre-name-collision.patch \
- file://run-ptest \
- file://Makefile \
-"
-
-SRC_URI[md5sum] = "00aabbfe56d5a48b270f999b508c5ad2"
-SRC_URI[sha256sum] = "b9e02d36e23024d6c02a2e5b25204b3a4fa6ade43e0a5f869f254f49535079df"
-
-S = "${WORKDIR}/pcre-${PV}"
-
-PROVIDES += "pcre"
-DEPENDS += "bzip2 zlib"
-
-PACKAGECONFIG ??= "pcre8 unicode-properties"
-
-PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
-PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
-PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
-PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
-PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
-
-BINCONFIG = "${bindir}/pcre-config"
-
-inherit autotools binconfig-disabled ptest
-
-EXTRA_OECONF = "\
- --enable-newline-is-lf \
- --enable-rebuild-chartables \
- --enable-utf \
- --with-link-size=2 \
- --with-match-limit=10000000 \
-"
-
-# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
-# set CFLAGS_FOR_BUILD, required for the libpcre build.
-BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}"
-CFLAGS += "-D_REENTRANT"
-CXXFLAGS_append_powerpc = " -lstdc++"
-
-PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
-
-SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
-SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
-SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
-SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
-SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
-SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
-
-FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
-FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
-FILES_pcregrep = "${bindir}/pcregrep"
-FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
-FILES_pcretest = "${bindir}/pcretest"
-FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
-
-BBCLASSEXTEND = "native nativesdk"
-
-do_install_ptest() {
- t=${D}${PTEST_PATH}
- cp ${WORKDIR}/Makefile $t
- cp -r ${S}/testdata $t
- for i in pcre_stringpiece_unittest pcregrep pcretest; \
- do cp ${B}/.libs/$i $t; \
- done
- for i in RunTest RunGrepTest test-driver; \
- do cp ${S}/$i $t; \
- done
-}
diff --git a/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.39.bb b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.39.bb
new file mode 100644
index 000000000..2d4668b52
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libpcre/libpcre_8.39.bb
@@ -0,0 +1,81 @@
+DESCRIPTION = "The PCRE library is a set of functions that implement regular \
+expression pattern matching using the same syntax and semantics as Perl 5. PCRE \
+has its own native API, as well as a set of wrapper functions that correspond \
+to the POSIX regular expression API."
+SUMMARY = "Perl Compatible Regular Expressions"
+HOMEPAGE = "http://www.pcre.org"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=b8221cbf43c5587f90ccf228f1185cc2"
+SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2 \
+ file://pcre-cross.patch \
+ file://fix-pcre-name-collision.patch \
+ file://run-ptest \
+ file://Makefile \
+"
+
+SRC_URI[md5sum] = "e3fca7650a0556a2647821679d81f585"
+SRC_URI[sha256sum] = "b858099f82483031ee02092711689e7245586ada49e534a06e678b8ea9549e8b"
+
+S = "${WORKDIR}/pcre-${PV}"
+
+PROVIDES += "pcre"
+DEPENDS += "bzip2 zlib"
+
+PACKAGECONFIG ??= "pcre8 unicode-properties"
+
+PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
+PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
+PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
+PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
+PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
+
+BINCONFIG = "${bindir}/pcre-config"
+
+inherit autotools binconfig-disabled ptest
+
+EXTRA_OECONF = "\
+ --enable-newline-is-lf \
+ --enable-rebuild-chartables \
+ --enable-utf \
+ --with-link-size=2 \
+ --with-match-limit=10000000 \
+"
+
+# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
+# set CFLAGS_FOR_BUILD, required for the libpcre build.
+BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}"
+CFLAGS += "-D_REENTRANT"
+CXXFLAGS_append_powerpc = " -lstdc++"
+
+export CCLD_FOR_BUILD ="${BUILD_CCLD}"
+
+PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
+
+SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
+SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
+SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
+SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
+SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
+SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
+
+FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
+FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
+FILES_pcregrep = "${bindir}/pcregrep"
+FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
+FILES_pcretest = "${bindir}/pcretest"
+FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ cp ${WORKDIR}/Makefile $t
+ cp -r ${S}/testdata $t
+ for i in pcre_stringpiece_unittest pcregrep pcretest; \
+ do cp ${B}/.libs/$i $t; \
+ done
+ for i in RunTest RunGrepTest test-driver; \
+ do cp ${S}/$i $t; \
+ done
+}
diff --git a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch
deleted file mode 100644
index 5ae52f2d4..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From f5f2c2289eb35eb804c1c35e46ca41b58e4cae01 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 6 Apr 2015 14:13:49 -0700
-Subject: [PATCH] test: Include <sys/select.h> for select()
-
-As per posix we need to include this file otherwise we end up with errors like
-
-/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp: In member function 'bool TestServer::loop()':
-/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp:80:4: error: 'fd_set' was not declared in this scope
- fd_set fds;
- ^
-/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp:89:14: error: 'fds' was not declared in this scope
- FD_ZERO (&fds);
-<JIRA TICKET #1>, <JIRA TICKET #2>, <JIRA TICKET #n> : <one line summary of change>
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libproxy/test/get-pac-test.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libproxy/test/get-pac-test.cpp b/libproxy/test/get-pac-test.cpp
-index a61fc4b..bda4646 100644
---- a/libproxy/test/get-pac-test.cpp
-+++ b/libproxy/test/get-pac-test.cpp
-@@ -3,6 +3,7 @@
- #include <sstream>
- #include <string>
-
-+#include <sys/select.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
---
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb
deleted file mode 100644
index 8cc90bb8e..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Library providing automatic proxy configuration management"
-HOMEPAGE = "http://code.google.com/p/libproxy/"
-BUGTRACKER = "http://code.google.com/p/libproxy/issues/list"
-SECTION = "libs"
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
- file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
-
-DEPENDS = "glib-2.0"
-
-SRC_URI = "${DEBIAN_MIRROR}/main/libp/${BPN}/${BPN}_${PV}.orig.tar.gz \
- file://0001-test-Include-sys-select.h-for-select.patch \
- "
-
-SRC_URI[md5sum] = "3cd1ae2a4abecf44b3f24d6639d2cd84"
-SRC_URI[sha256sum] = "dc3f33de54163718f82b3e7c496a7de97f8862578414b8ecaad3cbfe4821864b"
-
-inherit cmake pkgconfig
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
-PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
-PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
-
-EXTRA_OECMAKE += " \
- -DWITH_KDE4=no \
- -DWITH_MOZJS=no \
- -DWITH_NM=no \
- -DWITH_PERL=no \
- -DWITH_PYTHON=no \
- -DWITH_WEBKIT=no \
- -DLIB_INSTALL_DIR=${libdir} \
- -DLIBEXEC_INSTALL_DIR=${libexecdir} \
-"
-
-FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
-FILES_${PN}-dev += "${datadir}/cmake"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.13.bb b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.13.bb
new file mode 100644
index 000000000..3940e228d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.13.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Library providing automatic proxy configuration management"
+HOMEPAGE = "https://github.com/libproxy/libproxy"
+BUGTRACKER = "https://github.com/libproxy/libproxy/issues"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/archive/${PV}.tar.gz"
+
+UPSTREAM_CHECK_URI = "https://github.com/libproxy/libproxy/releases"
+
+SRC_URI[md5sum] = "de293bb311f185a2ffa3492700a694c2"
+SRC_URI[sha256sum] = "d610bc0ef81a18ba418d759c5f4f87bf7102229a9153fb397d7d490987330ffd"
+
+inherit cmake pkgconfig
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
+PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
+PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
+
+EXTRA_OECMAKE += " \
+ -DWITH_KDE4=no \
+ -DWITH_MOZJS=no \
+ -DWITH_NM=no \
+ -DWITH_PERL=no \
+ -DWITH_PYTHON=no \
+ -DWITH_WEBKIT=no \
+ -DLIB_INSTALL_DIR=${libdir} \
+ -DLIBEXEC_INSTALL_DIR=${libexecdir} \
+"
+
+FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
+FILES_${PN}-dev += "${datadir}/cmake"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.52.2.bb b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.52.2.bb
deleted file mode 100644
index f6e3db2c9..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.52.2.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "An HTTP library implementation in C"
-HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome/libs"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native"
-
-SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
-
-SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "e4757d09012ed93822b1ee41435fec24"
-SRC_URI[sha256sum] = "db55628b5c7d952945bb71b236469057c8dfb8dea0c271513579c6273c2093dc"
-
-S = "${WORKDIR}/libsoup-${PV}"
-
-inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection
-
-# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
-
-EXTRA_OECONF = "--disable-vala"
-
-# When built without gnome support, libsoup-2.4 will contain only one shared lib
-# and will therefore become subject to renaming by debian.bbclass. Prevent
-# renaming in order to keep the package name consistent regardless of whether
-# gnome support is enabled or disabled.
-DEBIAN_NOAUTONAME_${PN} = "1"
-
-# glib-networking is needed for SSL, proxies, etc.
-RRECOMMENDS_${PN} = "glib-networking"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb
new file mode 100644
index 000000000..b93a9fde7
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.54.1.bb
@@ -0,0 +1,35 @@
+SUMMARY = "An HTTP library implementation in C"
+HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome/libs"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native"
+
+SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
+
+SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "73b1fb774de16c29b380f87016f9f9dd"
+SRC_URI[sha256sum] = "47b42c232034734d66e5f093025843a5d8cc4b2357c011085a2fd04ef02dd633"
+
+S = "${WORKDIR}/libsoup-${PV}"
+
+inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+
+# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
+PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
+
+EXTRA_OECONF = "--disable-vala"
+
+# When built without gnome support, libsoup-2.4 will contain only one shared lib
+# and will therefore become subject to renaming by debian.bbclass. Prevent
+# renaming in order to keep the package name consistent regardless of whether
+# gnome support is enabled or disabled.
+DEBIAN_NOAUTONAME_${PN} = "1"
+
+# glib-networking is needed for SSL, proxies, etc.
+RRECOMMENDS_${PN} = "glib-networking"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch
deleted file mode 100644
index 5426fcc5c..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From e623c7703945a5eb6c9a30586ec5e23b2f7396f6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 23 Mar 2016 06:08:59 +0000
-Subject: [PATCH] Fix build on mips/musl
-
-Do not include endian.h on musl it includes
-further headers which can not be compiled in __ASSEMBLER__
- mode
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/coredump/_UCD_internal.h | 34 ++++++++++++++++++++++++++++++++++
- src/mips/getcontext.S | 3 +--
- 2 files changed, 35 insertions(+), 2 deletions(-)
-
-diff --git a/src/coredump/_UCD_internal.h b/src/coredump/_UCD_internal.h
-index 3c95a2a..80acc15 100644
---- a/src/coredump/_UCD_internal.h
-+++ b/src/coredump/_UCD_internal.h
-@@ -34,6 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
- #ifdef HAVE_SYS_PROCFS_H
- #include <sys/procfs.h> /* struct elf_prstatus */
- #endif
-+#include <sys/reg.h>
- #include <errno.h>
- #include <string.h>
- #include <limits.h>
-@@ -44,6 +45,39 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
- #include "libunwind_i.h"
-
-+#ifndef __GLIBC__
-+#define EF_REG0 6
-+#define EF_REG1 7
-+#define EF_REG2 8
-+#define EF_REG3 9
-+#define EF_REG4 10
-+#define EF_REG5 11
-+#define EF_REG6 12
-+#define EF_REG7 13
-+#define EF_REG8 14
-+#define EF_REG9 15
-+#define EF_REG10 16
-+#define EF_REG11 17
-+#define EF_REG12 18
-+#define EF_REG13 19
-+#define EF_REG14 20
-+#define EF_REG15 21
-+#define EF_REG16 22
-+#define EF_REG17 23
-+#define EF_REG18 24
-+#define EF_REG19 25
-+#define EF_REG20 26
-+#define EF_REG21 27
-+#define EF_REG22 28
-+#define EF_REG23 29
-+#define EF_REG24 30
-+#define EF_REG25 31
-+#define EF_REG28 34
-+#define EF_REG29 35
-+#define EF_REG30 36
-+#define EF_REG31 37
-+#endif
-+
-
- #if SIZEOF_OFF_T == 4
- typedef uint32_t uoff_t;
-diff --git a/src/mips/getcontext.S b/src/mips/getcontext.S
-index d1dbd57..de9b681 100644
---- a/src/mips/getcontext.S
-+++ b/src/mips/getcontext.S
-@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
- #include "offsets.h"
--#include <endian.h>
-
- .text
-
- #if _MIPS_SIM == _ABIO32
--# if __BYTE_ORDER == __BIG_ENDIAN
-+# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
- # define OFFSET 4
- # else
- # define OFFSET 0
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch
deleted file mode 100644
index af972f84e..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 396b6c7ab737e2bff244d640601c436a26260ca1 Mon Sep 17 00:00:00 2001
-From: Arun Sharma <arun@sharma-home.net>
-Date: Fri, 19 Jun 2015 19:47:22 -0700
-Subject: [PATCH] Invalid dwarf opcodes can cause references beyond the end of
- the array.
-
-Upstream-Status: backport
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- include/dwarf_i.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/dwarf_i.h b/include/dwarf_i.h
-index 1e6231e..4a02a7d 100644
---- a/include/dwarf_i.h
-+++ b/include/dwarf_i.h
-@@ -20,7 +20,7 @@
- extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH];
- /* REG is evaluated multiple times; it better be side-effects free! */
- # define dwarf_to_unw_regnum(reg) \
-- (((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
-+ (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
- #endif
-
- #ifdef UNW_LOCAL_ONLY
---
-1.7.9.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch
deleted file mode 100644
index 7309ffd86..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From b07435a90bd636ee718e2238fb46c74a6dd5e069 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 22 Mar 2016 16:41:13 +0000
-Subject: [PATCH] disable tests
-
-Tests use getcontext() API which is
-not there on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [MUSL-only]
-
- Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index e24fe1e..15380e4 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -39,7 +39,7 @@ endif
-
- nodist_include_HEADERS = include/libunwind-common.h
-
--SUBDIRS = src tests doc
-+SUBDIRS = src doc
-
- noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
- include/compiler.h include/libunwind_i.h include/mempool.h \
---
-1.8.3.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
deleted file mode 100644
index 228ec322d..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
+++ /dev/null
@@ -1,2529 +0,0 @@
-From ac6c0a6535975f1dc2da6e4e2766614baac2a14a Mon Sep 17 00:00:00 2001
-From: Yvan Roux <yvan.roux@linaro.org>
-Date: Sat, 11 May 2013 09:18:23 -0600
-Subject: [PATCH] AArch64 port.
-
-Upstream-Status: Backport
-
----
- Makefile.am | 6
- README | 1
- configure.ac | 6
- include/libunwind-aarch64.h | 187 ++++++++++++++++++++++
- include/libunwind.h.in | 4
- include/tdep-aarch64/dwarf-config.h | 52 ++++++
- include/tdep-aarch64/jmpbuf.h | 33 +++
- include/tdep-aarch64/libunwind_i.h | 294 +++++++++++++++++++++++++++++++++++
- include/tdep/dwarf-config.h | 4
- include/tdep/jmpbuf.h | 2
- include/tdep/libunwind_i.h.in | 4
- src/Makefile.am | 39 ++++
- src/aarch64/Gcreate_addr_space.c | 60 +++++++
- src/aarch64/Gget_proc_info.c | 39 ++++
- src/aarch64/Gget_save_loc.c | 100 +++++++++++
- src/aarch64/Gglobal.c | 57 ++++++
- src/aarch64/Ginit.c | 187 ++++++++++++++++++++++
- src/aarch64/Ginit_local.c | 55 ++++++
- src/aarch64/Ginit_remote.c | 45 +++++
- src/aarch64/Gis_signal_frame.c | 64 +++++++
- src/aarch64/Gregs.c | 113 +++++++++++++
- src/aarch64/Gresume.c | 177 +++++++++++++++++++++
- src/aarch64/Gstep.c | 129 +++++++++++++++
- src/aarch64/Lcreate_addr_space.c | 5
- src/aarch64/Lget_proc_info.c | 5
- src/aarch64/Lget_save_loc.c | 5
- src/aarch64/Lglobal.c | 5
- src/aarch64/Linit.c | 5
- src/aarch64/Linit_local.c | 5
- src/aarch64/Linit_remote.c | 5
- src/aarch64/Lis_signal_frame.c | 5
- src/aarch64/Lregs.c | 5
- src/aarch64/Lresume.c | 5
- src/aarch64/Lstep.c | 5
- src/aarch64/gen-offsets.c | 68 ++++++++
- src/aarch64/init.h | 127 +++++++++++++++
- src/aarch64/is_fpreg.c | 32 +++
- src/aarch64/offsets.h | 49 +++++
- src/aarch64/regname.c | 106 ++++++++++++
- src/aarch64/siglongjmp.S | 12 +
- src/aarch64/unwind_i.h | 43 +++++
- src/coredump/_UCD_access_reg_linux.c | 5
- src/ptrace/_UPT_reg_offset.c | 36 ++++
- 43 files changed, 2184 insertions(+), 7 deletions(-)
- create mode 100644 include/libunwind-aarch64.h
- create mode 100644 include/tdep-aarch64/dwarf-config.h
- create mode 100644 include/tdep-aarch64/jmpbuf.h
- create mode 100644 include/tdep-aarch64/libunwind_i.h
- create mode 100644 src/aarch64/Gcreate_addr_space.c
- create mode 100644 src/aarch64/Gget_proc_info.c
- create mode 100644 src/aarch64/Gget_save_loc.c
- create mode 100644 src/aarch64/Gglobal.c
- create mode 100644 src/aarch64/Ginit.c
- create mode 100644 src/aarch64/Ginit_local.c
- create mode 100644 src/aarch64/Ginit_remote.c
- create mode 100644 src/aarch64/Gis_signal_frame.c
- create mode 100644 src/aarch64/Gregs.c
- create mode 100644 src/aarch64/Gresume.c
- create mode 100644 src/aarch64/Gstep.c
- create mode 100644 src/aarch64/Lcreate_addr_space.c
- create mode 100644 src/aarch64/Lget_proc_info.c
- create mode 100644 src/aarch64/Lget_save_loc.c
- create mode 100644 src/aarch64/Lglobal.c
- create mode 100644 src/aarch64/Linit.c
- create mode 100644 src/aarch64/Linit_local.c
- create mode 100644 src/aarch64/Linit_remote.c
- create mode 100644 src/aarch64/Lis_signal_frame.c
- create mode 100644 src/aarch64/Lregs.c
- create mode 100644 src/aarch64/Lresume.c
- create mode 100644 src/aarch64/Lstep.c
- create mode 100644 src/aarch64/gen-offsets.c
- create mode 100644 src/aarch64/init.h
- create mode 100644 src/aarch64/is_fpreg.c
- create mode 100644 src/aarch64/offsets.h
- create mode 100644 src/aarch64/regname.c
- create mode 100644 src/aarch64/siglongjmp.S
- create mode 100644 src/aarch64/unwind_i.h
-
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -2,6 +2,9 @@ include_HEADERS = include/libunwind-dyna
- include/libunwind-ptrace.h \
- include/libunwind-coredump.h
-
-+if ARCH_AARCH64
-+include_HEADERS += include/libunwind-aarch64.h
-+endif
- if ARCH_ARM
- include_HEADERS += include/libunwind-arm.h
- endif
-@@ -41,6 +44,9 @@ SUBDIRS = src tests doc
- noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
- include/compiler.h include/libunwind_i.h include/mempool.h \
- include/remote.h \
-+ include/tdep-aarch64/dwarf-config.h \
-+ include/tdep-aarch64/jmpbuf.h \
-+ include/tdep-aarch64/libunwind_i.h \
- include/tdep-arm/dwarf-config.h include/tdep-arm/ex_tables.h \
- include/tdep-arm/jmpbuf.h include/tdep-arm/libunwind_i.h \
- include/tdep-ia64/jmpbuf.h include/tdep-ia64/rse.h \
---- a/README
-+++ b/README
-@@ -9,6 +9,7 @@ several architecture/operating-system co
- Linux/IA-64: Fully tested and supported.
- Linux/PARISC: Works well, but C library missing unwind-info.
- HP-UX/IA-64: Mostly works but known to have some serious limitations.
-+ Linux/AArch64: Newly added.
- Linux/PPC64: Newly added.
- Linux/SuperH: Newly added.
- FreeBSD/i386: Newly added.
---- a/configure.ac
-+++ b/configure.ac
-@@ -104,7 +104,7 @@ SET_ARCH([$target_cpu],[target_arch])
-
- AC_ARG_ENABLE(coredump,
- AS_HELP_STRING([--enable-coredump],[building libunwind-coredump library]),,
-- [AS_CASE([$host_arch], [arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
-+ [AS_CASE([$host_arch], [aarch64*|arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
- )
-
- AC_MSG_CHECKING([if we should build libunwind-coredump])
-@@ -121,6 +121,7 @@ AC_MSG_RESULT([$target_os])
-
- AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes)
- AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$host_arch)
-+AM_CONDITIONAL(ARCH_AARCH64, test x$target_arch = xaarch64)
- AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm)
- AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64)
- AM_CONDITIONAL(ARCH_HPPA, test x$target_arch = xhppa)
-@@ -137,7 +138,7 @@ AM_CONDITIONAL(OS_FREEBSD, expr x$target
- AC_MSG_CHECKING([for ELF helper width])
- case "${target_arch}" in
- (arm|hppa|ppc32|x86|sh) use_elf32=yes; AC_MSG_RESULT([32]);;
--(ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
-+(aarch64|ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
- (mips) use_elfxx=yes; AC_MSG_RESULT([xx]);;
- *) AC_MSG_ERROR([Unknown ELF target: ${target_arch}])
- esac
-@@ -186,6 +187,7 @@ AS_HELP_STRING([--enable-cxx-exceptions]
- # C++ exception handling doesn't work too well on x86
- case $target_arch in
- x86*) enable_cxx_exceptions=no;;
-+ aarch64*) enable_cxx_exceptions=no;;
- arm*) enable_cxx_exceptions=no;;
- mips*) enable_cxx_exceptions=no;;
- *) enable_cxx_exceptions=yes;;
---- /dev/null
-+++ b/include/libunwind-aarch64.h
-@@ -0,0 +1,187 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2001-2004 Hewlett-Packard Co
-+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#ifndef LIBUNWIND_H
-+#define LIBUNWIND_H
-+
-+#if defined(__cplusplus) || defined(c_plusplus)
-+extern "C" {
-+#endif
-+
-+#include <inttypes.h>
-+#include <stddef.h>
-+#include <ucontext.h>
-+
-+#define UNW_TARGET aarch64
-+#define UNW_TARGET_AARCH64 1
-+
-+#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
-+
-+/* This needs to be big enough to accommodate "struct cursor", while
-+ leaving some slack for future expansion. Changing this value will
-+ require recompiling all users of this library. Stack allocation is
-+ relatively cheap and unwind-state copying is relatively rare, so we
-+ want to err on making it rather too big than too small. */
-+
-+#define UNW_TDEP_CURSOR_LEN 4096
-+
-+typedef uint64_t unw_word_t;
-+typedef int64_t unw_sword_t;
-+
-+typedef long double unw_tdep_fpreg_t;
-+
-+typedef struct
-+ {
-+ /* no aarch64-specific auxiliary proc-info */
-+ }
-+unw_tdep_proc_info_t;
-+
-+typedef enum
-+ {
-+ /* 64-bit general registers. */
-+ UNW_AARCH64_X0,
-+ UNW_AARCH64_X1,
-+ UNW_AARCH64_X2,
-+ UNW_AARCH64_X3,
-+ UNW_AARCH64_X4,
-+ UNW_AARCH64_X5,
-+ UNW_AARCH64_X6,
-+ UNW_AARCH64_X7,
-+ UNW_AARCH64_X8,
-+
-+ /* Temporary registers. */
-+ UNW_AARCH64_X9,
-+ UNW_AARCH64_X10,
-+ UNW_AARCH64_X11,
-+ UNW_AARCH64_X12,
-+ UNW_AARCH64_X13,
-+ UNW_AARCH64_X14,
-+ UNW_AARCH64_X15,
-+
-+ /* Intra-procedure-call temporary registers. */
-+ UNW_AARCH64_X16,
-+ UNW_AARCH64_X17,
-+
-+ /* Callee-saved registers. */
-+ UNW_AARCH64_X18,
-+ UNW_AARCH64_X19,
-+ UNW_AARCH64_X20,
-+ UNW_AARCH64_X21,
-+ UNW_AARCH64_X22,
-+ UNW_AARCH64_X23,
-+ UNW_AARCH64_X24,
-+ UNW_AARCH64_X25,
-+ UNW_AARCH64_X26,
-+ UNW_AARCH64_X27,
-+ UNW_AARCH64_X28,
-+
-+ /* 64-bit frame pointer. */
-+ UNW_AARCH64_X29,
-+
-+ /* 64-bit link register. */
-+ UNW_AARCH64_X30,
-+
-+ /* 64-bit stack pointer. */
-+ UNW_AARCH64_SP = 31,
-+ UNW_AARCH64_PC,
-+ UNW_AARCH64_PSTATE,
-+
-+ /* 128-bit FP/Advanced SIMD registers. */
-+ UNW_AARCH64_V0 = 64,
-+ UNW_AARCH64_V1,
-+ UNW_AARCH64_V2,
-+ UNW_AARCH64_V3,
-+ UNW_AARCH64_V4,
-+ UNW_AARCH64_V5,
-+ UNW_AARCH64_V6,
-+ UNW_AARCH64_V7,
-+ UNW_AARCH64_V8,
-+ UNW_AARCH64_V9,
-+ UNW_AARCH64_V10,
-+ UNW_AARCH64_V11,
-+ UNW_AARCH64_V12,
-+ UNW_AARCH64_V13,
-+ UNW_AARCH64_V14,
-+ UNW_AARCH64_V15,
-+ UNW_AARCH64_V16,
-+ UNW_AARCH64_V17,
-+ UNW_AARCH64_V18,
-+ UNW_AARCH64_V19,
-+ UNW_AARCH64_V20,
-+ UNW_AARCH64_V21,
-+ UNW_AARCH64_V22,
-+ UNW_AARCH64_V23,
-+ UNW_AARCH64_V24,
-+ UNW_AARCH64_V25,
-+ UNW_AARCH64_V26,
-+ UNW_AARCH64_V27,
-+ UNW_AARCH64_V28,
-+ UNW_AARCH64_V29,
-+ UNW_AARCH64_V30,
-+ UNW_AARCH64_V31,
-+
-+ UNW_AARCH64_FPSR,
-+ UNW_AARCH64_FPCR,
-+
-+ /* For AArch64, the CFA is the value of SP (x31) at the call site of the
-+ previous frame. */
-+ UNW_AARCH64_CFA = UNW_AARCH64_SP,
-+
-+ UNW_TDEP_LAST_REG = UNW_AARCH64_FPCR,
-+
-+ UNW_TDEP_IP = UNW_AARCH64_X30,
-+ UNW_TDEP_SP = UNW_AARCH64_SP,
-+ UNW_TDEP_EH = UNW_AARCH64_X0,
-+
-+ }
-+aarch64_regnum_t;
-+
-+/* Use R0 through R3 to pass exception handling information. */
-+#define UNW_TDEP_NUM_EH_REGS 4
-+
-+typedef struct unw_tdep_save_loc
-+ {
-+ /* Additional target-dependent info on a save location. */
-+ }
-+unw_tdep_save_loc_t;
-+
-+
-+/* On AArch64, we can directly use ucontext_t as the unwind context. */
-+typedef ucontext_t unw_tdep_context_t;
-+
-+#include "libunwind-common.h"
-+#include "libunwind-dynamic.h"
-+
-+#define unw_tdep_getcontext(uc) (getcontext (uc), 0)
-+#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
-+
-+extern int unw_tdep_is_fpreg (int);
-+
-+#if defined(__cplusplus) || defined(c_plusplus)
-+}
-+#endif
-+
-+#endif /* LIBUNWIND_H */
---- a/include/libunwind.h.in
-+++ b/include/libunwind.h.in
-@@ -3,7 +3,9 @@
-
- #ifndef UNW_REMOTE_ONLY
-
--#if defined __arm__
-+#if defined __aarch64__
-+#include "libunwind-aarch64.h"
-+#elif defined __arm__
- # include "libunwind-arm.h"
- #elif defined __hppa__
- # include "libunwind-hppa.h"
---- /dev/null
-+++ b/include/tdep-aarch64/dwarf-config.h
-@@ -0,0 +1,52 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#ifndef dwarf_config_h
-+#define dwarf_config_h
-+
-+/* This matches the value udes by GCC (see
-+ gcc/config/aarch64/aarch64.h:DWARF_FRAME_REGISTERS. */
-+#define DWARF_NUM_PRESERVED_REGS 97
-+
-+/* Return TRUE if the ADDR_SPACE uses big-endian byte-order. */
-+#define dwarf_is_big_endian(addr_space) 0
-+
-+#define dwarf_to_unw_regnum(reg) (((reg) <= UNW_AARCH64_V31) ? (reg) : 0)
-+
-+/* Convert a pointer to a dwarf_cursor structure to a pointer to
-+ unw_cursor_t. */
-+#define dwarf_to_cursor(c) ((unw_cursor_t *) (c))
-+
-+typedef struct dwarf_loc
-+ {
-+ unw_word_t val;
-+#ifndef UNW_LOCAL_ONLY
-+ unw_word_t type; /* see DWARF_LOC_TYPE_* macros. */
-+#endif
-+ }
-+dwarf_loc_t;
-+
-+#endif /* dwarf_config_h */
---- /dev/null
-+++ b/include/tdep-aarch64/jmpbuf.h
-@@ -0,0 +1,33 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+/* Use glibc's jump-buffer indices; NPTL peeks at SP: */
-+
-+/* FIXME for AArch64 */
-+
-+#define JB_SP 13
-+#define JB_RP 14
-+#define JB_MASK_SAVED 15
-+#define JB_MASK 16
---- /dev/null
-+++ b/include/tdep-aarch64/libunwind_i.h
-@@ -0,0 +1,294 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2001-2005 Hewlett-Packard Co
-+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#ifndef AARCH64_LIBUNWIND_I_H
-+#define AARCH64_LIBUNWIND_I_H
-+
-+/* Target-dependent definitions that are internal to libunwind but need
-+ to be shared with target-independent code. */
-+
-+#include <stdlib.h>
-+#include <libunwind.h>
-+
-+#include "elf64.h"
-+#include "mempool.h"
-+#include "dwarf.h"
-+
-+typedef struct
-+ {
-+ /* no aarch64-specific fast trace */
-+ }
-+unw_tdep_frame_t;
-+
-+#ifdef UNW_LOCAL_ONLY
-+
-+typedef unw_word_t aarch64_loc_t;
-+
-+#else /* !UNW_LOCAL_ONLY */
-+
-+typedef struct aarch64_loc
-+ {
-+ unw_word_t w0, w1;
-+ }
-+aarch64_loc_t;
-+
-+#endif /* !UNW_LOCAL_ONLY */
-+
-+struct unw_addr_space
-+ {
-+ struct unw_accessors acc;
-+ int big_endian;
-+ unw_caching_policy_t caching_policy;
-+#ifdef HAVE_ATOMIC_OPS_H
-+ AO_t cache_generation;
-+#else
-+ uint32_t cache_generation;
-+#endif
-+ unw_word_t dyn_generation; /* see dyn-common.h */
-+ unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */
-+ struct dwarf_rs_cache global_cache;
-+ struct unw_debug_frame_list *debug_frames;
-+ };
-+
-+struct cursor
-+ {
-+ struct dwarf_cursor dwarf; /* must be first */
-+ enum
-+ {
-+ AARCH64_SCF_NONE,
-+ AARCH64_SCF_LINUX_RT_SIGFRAME,
-+ }
-+ sigcontext_format;
-+ unw_word_t sigcontext_addr;
-+ unw_word_t sigcontext_sp;
-+ unw_word_t sigcontext_pc;
-+ };
-+
-+#define DWARF_GET_LOC(l) ((l).val)
-+
-+#ifdef UNW_LOCAL_ONLY
-+# define DWARF_NULL_LOC DWARF_LOC (0, 0)
-+# define DWARF_IS_NULL_LOC(l) (DWARF_GET_LOC (l) == 0)
-+# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r) })
-+# define DWARF_IS_REG_LOC(l) 0
-+# define DWARF_REG_LOC(c,r) (DWARF_LOC((unw_word_t) \
-+ tdep_uc_addr((c)->as_arg, (r)), 0))
-+# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
-+# define DWARF_FPREG_LOC(c,r) (DWARF_LOC((unw_word_t) \
-+ tdep_uc_addr((c)->as_arg, (r)), 0))
-+
-+static inline int
-+dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
-+{
-+ if (!DWARF_GET_LOC (loc))
-+ return -1;
-+ *val = *(unw_fpreg_t *) DWARF_GET_LOC (loc);
-+ return 0;
-+}
-+
-+static inline int
-+dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
-+{
-+ if (!DWARF_GET_LOC (loc))
-+ return -1;
-+ *(unw_fpreg_t *) DWARF_GET_LOC (loc) = val;
-+ return 0;
-+}
-+
-+static inline int
-+dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
-+{
-+ if (!DWARF_GET_LOC (loc))
-+ return -1;
-+ *val = *(unw_word_t *) DWARF_GET_LOC (loc);
-+ return 0;
-+}
-+
-+static inline int
-+dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
-+{
-+ if (!DWARF_GET_LOC (loc))
-+ return -1;
-+ *(unw_word_t *) DWARF_GET_LOC (loc) = val;
-+ return 0;
-+}
-+
-+#else /* !UNW_LOCAL_ONLY */
-+# define DWARF_LOC_TYPE_FP (1 << 0)
-+# define DWARF_LOC_TYPE_REG (1 << 1)
-+# define DWARF_NULL_LOC DWARF_LOC (0, 0)
-+# define DWARF_IS_NULL_LOC(l) \
-+ ({ dwarf_loc_t _l = (l); _l.val == 0 && _l.type == 0; })
-+# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r), .type = (t) })
-+# define DWARF_IS_REG_LOC(l) (((l).type & DWARF_LOC_TYPE_REG) != 0)
-+# define DWARF_IS_FP_LOC(l) (((l).type & DWARF_LOC_TYPE_FP) != 0)
-+# define DWARF_REG_LOC(c,r) DWARF_LOC((r), DWARF_LOC_TYPE_REG)
-+# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
-+# define DWARF_FPREG_LOC(c,r) DWARF_LOC((r), (DWARF_LOC_TYPE_REG \
-+ | DWARF_LOC_TYPE_FP))
-+
-+static inline int
-+dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
-+{
-+ char *valp = (char *) &val;
-+ unw_word_t addr;
-+ int ret;
-+
-+ if (DWARF_IS_NULL_LOC (loc))
-+ return -UNW_EBADREG;
-+
-+ if (DWARF_IS_REG_LOC (loc))
-+ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
-+ val, 0, c->as_arg);
-+
-+ addr = DWARF_GET_LOC (loc);
-+ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
-+ 0, c->as_arg)) < 0)
-+ return ret;
-+
-+ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1, 0,
-+ c->as_arg);
-+}
-+
-+static inline int
-+dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
-+{
-+ char *valp = (char *) &val;
-+ unw_word_t addr;
-+ int ret;
-+
-+ if (DWARF_IS_NULL_LOC (loc))
-+ return -UNW_EBADREG;
-+
-+ if (DWARF_IS_REG_LOC (loc))
-+ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
-+ &val, 1, c->as_arg);
-+
-+ addr = DWARF_GET_LOC (loc);
-+ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
-+ 1, c->as_arg)) < 0)
-+ return ret;
-+
-+ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1,
-+ 1, c->as_arg);
-+}
-+
-+static inline int
-+dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
-+{
-+ if (DWARF_IS_NULL_LOC (loc))
-+ return -UNW_EBADREG;
-+
-+ /* If a code-generator were to save a value of type unw_word_t in a
-+ floating-point register, we would have to support this case. I
-+ suppose it could happen with MMX registers, but does it really
-+ happen? */
-+ assert (!DWARF_IS_FP_LOC (loc));
-+
-+ if (DWARF_IS_REG_LOC (loc))
-+ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), val,
-+ 0, c->as_arg);
-+ else
-+ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val,
-+ 0, c->as_arg);
-+}
-+
-+static inline int
-+dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
-+{
-+ if (DWARF_IS_NULL_LOC (loc))
-+ return -UNW_EBADREG;
-+
-+ /* If a code-generator were to save a value of type unw_word_t in a
-+ floating-point register, we would have to support this case. I
-+ suppose it could happen with MMX registers, but does it really
-+ happen? */
-+ assert (!DWARF_IS_FP_LOC (loc));
-+
-+ if (DWARF_IS_REG_LOC (loc))
-+ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), &val,
-+ 1, c->as_arg);
-+ else
-+ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), &val,
-+ 1, c->as_arg);
-+}
-+
-+#endif /* !UNW_LOCAL_ONLY */
-+
-+
-+
-+#define tdep_getcontext_trace unw_getcontext
-+#define tdep_init_done UNW_OBJ(init_done)
-+#define tdep_init UNW_OBJ(init)
-+/* Platforms that support UNW_INFO_FORMAT_TABLE need to define
-+ tdep_search_unwind_table. */
-+#define tdep_search_unwind_table dwarf_search_unwind_table
-+#define tdep_find_unwind_table dwarf_find_unwind_table
-+#define tdep_uc_addr UNW_OBJ(uc_addr)
-+#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
-+#define tdep_access_reg UNW_OBJ(access_reg)
-+#define tdep_access_fpreg UNW_OBJ(access_fpreg)
-+#define tdep_fetch_frame(c,ip,n) do {} while(0)
-+#define tdep_cache_frame(c,rs) do {} while(0)
-+#define tdep_reuse_frame(c,rs) do {} while(0)
-+#define tdep_stash_frame(c,rs) do {} while(0)
-+#define tdep_trace(cur,addr,n) (-UNW_ENOINFO)
-+
-+#ifdef UNW_LOCAL_ONLY
-+# define tdep_find_proc_info(c,ip,n) \
-+ dwarf_find_proc_info((c)->as, (ip), &(c)->pi, (n), \
-+ (c)->as_arg)
-+# define tdep_put_unwind_info(as,pi,arg) \
-+ dwarf_put_unwind_info((as), (pi), (arg))
-+#else
-+# define tdep_find_proc_info(c,ip,n) \
-+ (*(c)->as->acc.find_proc_info)((c)->as, (ip), &(c)->pi, (n), \
-+ (c)->as_arg)
-+# define tdep_put_unwind_info(as,pi,arg) \
-+ (*(as)->acc.put_unwind_info)((as), (pi), (arg))
-+#endif
-+
-+#define tdep_get_as(c) ((c)->dwarf.as)
-+#define tdep_get_as_arg(c) ((c)->dwarf.as_arg)
-+#define tdep_get_ip(c) ((c)->dwarf.ip)
-+#define tdep_big_endian(as) ((as)->big_endian)
-+
-+extern int tdep_init_done;
-+
-+extern void tdep_init (void);
-+extern int tdep_search_unwind_table (unw_addr_space_t as, unw_word_t ip,
-+ unw_dyn_info_t *di, unw_proc_info_t *pi,
-+ int need_unwind_info, void *arg);
-+extern void *tdep_uc_addr (unw_tdep_context_t *uc, int reg);
-+extern int tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip,
-+ unsigned long *segbase, unsigned long *mapoff,
-+ char *path, size_t pathlen);
-+extern int tdep_access_reg (struct cursor *c, unw_regnum_t reg,
-+ unw_word_t *valp, int write);
-+extern int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg,
-+ unw_fpreg_t *valp, int write);
-+
-+#endif /* AARCH64_LIBUNWIND_I_H */
---- a/include/tdep/dwarf-config.h
-+++ b/include/tdep/dwarf-config.h
-@@ -1,7 +1,9 @@
- /* Provide a real file - not a symlink - as it would cause multiarch conflicts
- when multiple different arch releases are installed simultaneously. */
-
--#if defined __arm__
-+#if defined __aarch64__
-+# include "tdep-aarch64/dwarf-config.h"
-+#elif defined __arm__
- # include "tdep-arm/dwarf-config.h"
- #elif defined __hppa__
- # include "tdep-hppa/dwarf-config.h"
---- a/include/tdep/jmpbuf.h
-+++ b/include/tdep/jmpbuf.h
-@@ -3,6 +3,8 @@
-
- #ifndef UNW_REMOTE_ONLY
-
-+#if defined __aarch64__
-+# include "tdep-aarch64/jmpbuf.h"
- #if defined __arm__
- # include "tdep-arm/jmpbuf.h"
- #elif defined __hppa__
---- a/include/tdep/libunwind_i.h.in
-+++ b/include/tdep/libunwind_i.h.in
-@@ -3,7 +3,9 @@
-
- #ifndef UNW_REMOTE_ONLY
-
--#if defined __arm__
-+#if defined __aarch64__
-+# include "tdep-aarch64/libunwind_i.h"
-+#elif defined __arm__
- # include "tdep-arm/libunwind_i.h"
- #elif defined __hppa__
- # include "tdep-hppa/libunwind_i.h"
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -170,6 +170,28 @@ libunwind_elfxx_la_SOURCES = elfxx.c
- noinst_LTLIBRARIES += $(LIBUNWIND_ELF)
- libunwind_la_LIBADD += $(LIBUNWIND_ELF)
-
-+# The list of files that go into libunwind and libunwind-aarch64:
-+noinst_HEADERS += aarch64/init.h aarch64/offsets.h aarch64/unwind_i.h
-+libunwind_la_SOURCES_aarch64_common = $(libunwind_la_SOURCES_common) \
-+ aarch64/is_fpreg.c aarch64/regname.c
-+
-+# The list of files that go into libunwind:
-+libunwind_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
-+ $(libunwind_la_SOURCES_local) \
-+ aarch64/Lcreate_addr_space.c aarch64/Lget_proc_info.c \
-+ aarch64/Lget_save_loc.c aarch64/Lglobal.c aarch64/Linit.c \
-+ aarch64/Linit_local.c aarch64/Linit_remote.c \
-+ aarch64/Lis_signal_frame.c aarch64/Lregs.c aarch64/Lresume.c \
-+ aarch64/Lstep.c
-+
-+libunwind_aarch64_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
-+ $(libunwind_la_SOURCES_generic) \
-+ aarch64/Gcreate_addr_space.c aarch64/Gget_proc_info.c \
-+ aarch64/Gget_save_loc.c aarch64/Gglobal.c aarch64/Ginit.c \
-+ aarch64/Ginit_local.c aarch64/Ginit_remote.c \
-+ aarch64/Gis_signal_frame.c aarch64/Gregs.c aarch64/Gresume.c \
-+ aarch64/Gstep.c
-+
- # The list of files that go into libunwind and libunwind-arm:
- noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h
- libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common) \
-@@ -418,6 +440,18 @@ if OS_FREEBSD
- libunwind_coredump_la_SOURCES += coredump/_UCD_access_reg_freebsd.c
- endif
-
-+if ARCH_AARCH64
-+ lib_LTLIBRARIES += libunwind-aarch64.la
-+ libunwind_la_SOURCES = $(libunwind_la_SOURCES_aarch64)
-+ libunwind_aarch64_la_SOURCES = $(libunwind_aarch64_la_SOURCES_aarch64)
-+ libunwind_aarch64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
-+ libunwind_aarch64_la_LIBADD = libunwind-dwarf-generic.la
-+ libunwind_aarch64_la_LIBADD += libunwind-elf64.la
-+if !REMOTE_ONLY
-+ libunwind_aarch64_la_LIBADD += libunwind.la -lc
-+endif
-+ libunwind_setjmp_la_SOURCES += aarch64/siglongjmp.S
-+else
- if ARCH_ARM
- lib_LTLIBRARIES += libunwind-arm.la
- libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm)
-@@ -545,6 +579,7 @@ endif # ARCH_MIPS
- endif # ARCH_HPPA
- endif # ARCH_IA64
- endif # ARCH_ARM
-+endif # ARCH_AARCH64
-
- # libunwind-setjmp depends on libunwind-$(arch). Therefore must be added
- # at the end.
-@@ -567,7 +602,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I
- AM_CCASFLAGS = $(AM_CPPFLAGS)
- noinst_HEADERS += unwind/unwind-internal.h
-
--EXTRA_DIST = $(libunwind_la_SOURCES_arm) \
-+EXTRA_DIST = $(libunwind_la_SOURCES_aarch64) \
-+ $(libunwind_la_SOURCES_arm) \
- $(libunwind_la_SOURCES_hppa) \
- $(libunwind_la_SOURCES_ia64) \
- $(libunwind_la_SOURCES_mips) \
-@@ -579,6 +615,7 @@ EXTRA_DIST = $(libunwind_la_SOURCES_arm)
- $(libunwind_la_SOURCES_common) \
- $(libunwind_la_SOURCES_local) \
- $(libunwind_la_SOURCES_generic) \
-+ $(libunwind_aarch64_la_SOURCES_aarch64) \
- $(libunwind_arm_la_SOURCES_arm) \
- $(libunwind_hppa_la_SOURCES_hppa) \
- $(libunwind_ia64_la_SOURCES_ia64) \
---- /dev/null
-+++ b/src/aarch64/Gcreate_addr_space.c
-@@ -0,0 +1,60 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include <string.h>
-+#include <stdlib.h>
-+
-+#include "unwind_i.h"
-+
-+PROTECTED unw_addr_space_t
-+unw_create_addr_space (unw_accessors_t *a, int byte_order)
-+{
-+#ifdef UNW_LOCAL_ONLY
-+ return NULL;
-+#else
-+ unw_addr_space_t as;
-+
-+ /* AArch64 supports little-endian and big-endian. */
-+ if (byte_order != 0 && byte_order != __LITTLE_ENDIAN
-+ && byte_order != __BIG_ENDIAN)
-+ return NULL;
-+
-+ as = malloc (sizeof (*as));
-+ if (!as)
-+ return NULL;
-+
-+ memset (as, 0, sizeof (*as));
-+
-+ as->acc = *a;
-+
-+ /* Default to little-endian for AArch64. */
-+ if (byte_order == 0 || byte_order == __LITTLE_ENDIAN)
-+ as->big_endian = 0;
-+ else
-+ as->big_endian = 1;
-+
-+ return as;
-+#endif
-+}
---- /dev/null
-+++ b/src/aarch64/Gget_proc_info.c
-@@ -0,0 +1,39 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+
-+PROTECTED int
-+unw_get_proc_info (unw_cursor_t *cursor, unw_proc_info_t *pi)
-+{
-+ struct cursor *c = (struct cursor *) cursor;
-+ int ret;
-+
-+ ret = dwarf_make_proc_info (&c->dwarf);
-+ if (ret < 0)
-+ return ret;
-+
-+ *pi = c->dwarf.pi;
-+ return 0;
-+}
---- /dev/null
-+++ b/src/aarch64/Gget_save_loc.c
-@@ -0,0 +1,100 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+
-+PROTECTED int
-+unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
-+{
-+ struct cursor *c = (struct cursor *) cursor;
-+ dwarf_loc_t loc;
-+
-+ switch (reg)
-+ {
-+ case UNW_AARCH64_X0:
-+ case UNW_AARCH64_X1:
-+ case UNW_AARCH64_X2:
-+ case UNW_AARCH64_X3:
-+ case UNW_AARCH64_X4:
-+ case UNW_AARCH64_X5:
-+ case UNW_AARCH64_X6:
-+ case UNW_AARCH64_X7:
-+ case UNW_AARCH64_X8:
-+ case UNW_AARCH64_X9:
-+ case UNW_AARCH64_X10:
-+ case UNW_AARCH64_X11:
-+ case UNW_AARCH64_X12:
-+ case UNW_AARCH64_X13:
-+ case UNW_AARCH64_X14:
-+ case UNW_AARCH64_X15:
-+ case UNW_AARCH64_X16:
-+ case UNW_AARCH64_X17:
-+ case UNW_AARCH64_X18:
-+ case UNW_AARCH64_X19:
-+ case UNW_AARCH64_X20:
-+ case UNW_AARCH64_X21:
-+ case UNW_AARCH64_X22:
-+ case UNW_AARCH64_X23:
-+ case UNW_AARCH64_X24:
-+ case UNW_AARCH64_X25:
-+ case UNW_AARCH64_X26:
-+ case UNW_AARCH64_X27:
-+ case UNW_AARCH64_X28:
-+ case UNW_AARCH64_X29:
-+ case UNW_AARCH64_X30:
-+ case UNW_AARCH64_SP:
-+ case UNW_AARCH64_PC:
-+ case UNW_AARCH64_PSTATE:
-+ loc = c->dwarf.loc[reg];
-+ break;
-+
-+ default:
-+ loc = DWARF_NULL_LOC; /* default to "not saved" */
-+ break;
-+ }
-+
-+ memset (sloc, 0, sizeof (*sloc));
-+
-+ if (DWARF_IS_NULL_LOC (loc))
-+ {
-+ sloc->type = UNW_SLT_NONE;
-+ return 0;
-+ }
-+
-+#if !defined(UNW_LOCAL_ONLY)
-+ if (DWARF_IS_REG_LOC (loc))
-+ {
-+ sloc->type = UNW_SLT_REG;
-+ sloc->u.regnum = DWARF_GET_LOC (loc);
-+ }
-+ else
-+#endif
-+ {
-+ sloc->type = UNW_SLT_MEMORY;
-+ sloc->u.addr = DWARF_GET_LOC (loc);
-+ }
-+ return 0;
-+}
---- /dev/null
-+++ b/src/aarch64/Gglobal.c
-@@ -0,0 +1,57 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+#include "dwarf_i.h"
-+
-+HIDDEN define_lock (aarch64_lock);
-+HIDDEN int tdep_init_done;
-+
-+HIDDEN void
-+tdep_init (void)
-+{
-+ intrmask_t saved_mask;
-+
-+ sigfillset (&unwi_full_mask);
-+
-+ lock_acquire (&aarch64_lock, saved_mask);
-+ {
-+ if (tdep_init_done)
-+ /* another thread else beat us to it... */
-+ goto out;
-+
-+ mi_init ();
-+
-+ dwarf_init ();
-+
-+#ifndef UNW_REMOTE_ONLY
-+ aarch64_local_addr_space_init ();
-+#endif
-+ tdep_init_done = 1; /* signal that we're initialized... */
-+ }
-+ out:
-+ lock_release (&aarch64_lock, saved_mask);
-+}
---- /dev/null
-+++ b/src/aarch64/Ginit.c
-@@ -0,0 +1,187 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include <stdlib.h>
-+#include <string.h>
-+
-+#include "unwind_i.h"
-+
-+#ifdef UNW_REMOTE_ONLY
-+
-+/* unw_local_addr_space is a NULL pointer in this case. */
-+PROTECTED unw_addr_space_t unw_local_addr_space;
-+
-+#else /* !UNW_REMOTE_ONLY */
-+
-+static struct unw_addr_space local_addr_space;
-+
-+PROTECTED unw_addr_space_t unw_local_addr_space = &local_addr_space;
-+
-+static inline void *
-+uc_addr (ucontext_t *uc, int reg)
-+{
-+ if (reg >= UNW_AARCH64_X0 && reg <= UNW_AARCH64_V31)
-+ return &uc->uc_mcontext.regs[reg];
-+ else
-+ return NULL;
-+}
-+
-+# ifdef UNW_LOCAL_ONLY
-+
-+HIDDEN void *
-+tdep_uc_addr (ucontext_t *uc, int reg)
-+{
-+ return uc_addr (uc, reg);
-+}
-+
-+# endif /* UNW_LOCAL_ONLY */
-+
-+HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
-+
-+/* XXX fix me: there is currently no way to locate the dyn-info list
-+ by a remote unwinder. On ia64, this is done via a special
-+ unwind-table entry. Perhaps something similar can be done with
-+ DWARF2 unwind info. */
-+
-+static void
-+put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
-+{
-+ /* it's a no-op */
-+}
-+
-+static int
-+get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
-+ void *arg)
-+{
-+ *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
-+ return 0;
-+}
-+
-+static int
-+access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write,
-+ void *arg)
-+{
-+ if (write)
-+ {
-+ Debug (16, "mem[%lx] <- %lx\n", addr, *val);
-+ *(unw_word_t *) addr = *val;
-+ }
-+ else
-+ {
-+ *val = *(unw_word_t *) addr;
-+ Debug (16, "mem[%lx] -> %lx\n", addr, *val);
-+ }
-+ return 0;
-+}
-+
-+static int
-+access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
-+ void *arg)
-+{
-+ unw_word_t *addr;
-+ ucontext_t *uc = arg;
-+
-+ if (unw_is_fpreg (reg))
-+ goto badreg;
-+
-+ if (!(addr = uc_addr (uc, reg)))
-+ goto badreg;
-+
-+ if (write)
-+ {
-+ *(unw_word_t *) addr = *val;
-+ Debug (12, "%s <- %lx\n", unw_regname (reg), *val);
-+ }
-+ else
-+ {
-+ *val = *(unw_word_t *) addr;
-+ Debug (12, "%s -> %lx\n", unw_regname (reg), *val);
-+ }
-+ return 0;
-+
-+ badreg:
-+ Debug (1, "bad register number %u\n", reg);
-+ return -UNW_EBADREG;
-+}
-+
-+static int
-+access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val,
-+ int write, void *arg)
-+{
-+ ucontext_t *uc = arg;
-+ unw_fpreg_t *addr;
-+
-+ if (!unw_is_fpreg (reg))
-+ goto badreg;
-+
-+ if (!(addr = uc_addr (uc, reg)))
-+ goto badreg;
-+
-+ if (write)
-+ {
-+ Debug (12, "%s <- %08lx.%08lx.%08lx\n", unw_regname (reg),
-+ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
-+ *(unw_fpreg_t *) addr = *val;
-+ }
-+ else
-+ {
-+ *val = *(unw_fpreg_t *) addr;
-+ Debug (12, "%s -> %08lx.%08lx.%08lx\n", unw_regname (reg),
-+ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
-+ }
-+ return 0;
-+
-+ badreg:
-+ Debug (1, "bad register number %u\n", reg);
-+ /* attempt to access a non-preserved register */
-+ return -UNW_EBADREG;
-+}
-+
-+static int
-+get_static_proc_name (unw_addr_space_t as, unw_word_t ip,
-+ char *buf, size_t buf_len, unw_word_t *offp,
-+ void *arg)
-+{
-+ return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp);
-+}
-+
-+HIDDEN void
-+aarch64_local_addr_space_init (void)
-+{
-+ memset (&local_addr_space, 0, sizeof (local_addr_space));
-+ local_addr_space.caching_policy = UNW_CACHE_GLOBAL;
-+ local_addr_space.acc.find_proc_info = dwarf_find_proc_info;
-+ local_addr_space.acc.put_unwind_info = put_unwind_info;
-+ local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr;
-+ local_addr_space.acc.access_mem = access_mem;
-+ local_addr_space.acc.access_reg = access_reg;
-+ local_addr_space.acc.access_fpreg = access_fpreg;
-+ local_addr_space.acc.resume = aarch64_local_resume;
-+ local_addr_space.acc.get_proc_name = get_static_proc_name;
-+ unw_flush_cache (&local_addr_space, 0, 0);
-+}
-+
-+#endif /* !UNW_REMOTE_ONLY */
---- /dev/null
-+++ b/src/aarch64/Ginit_local.c
-@@ -0,0 +1,55 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2011-2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+#include "init.h"
-+
-+#ifdef UNW_REMOTE_ONLY
-+
-+PROTECTED int
-+unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
-+{
-+ return -UNW_EINVAL;
-+}
-+
-+#else /* !UNW_REMOTE_ONLY */
-+
-+PROTECTED int
-+unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
-+{
-+ struct cursor *c = (struct cursor *) cursor;
-+
-+ if (!tdep_init_done)
-+ tdep_init ();
-+
-+ Debug (1, "(cursor=%p)\n", c);
-+
-+ c->dwarf.as = unw_local_addr_space;
-+ c->dwarf.as_arg = uc;
-+
-+ return common_init (c, 1);
-+}
-+
-+#endif /* !UNW_REMOTE_ONLY */
---- /dev/null
-+++ b/src/aarch64/Ginit_remote.c
-@@ -0,0 +1,45 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "init.h"
-+#include "unwind_i.h"
-+
-+PROTECTED int
-+unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg)
-+{
-+#ifdef UNW_LOCAL_ONLY
-+ return -UNW_EINVAL;
-+#else /* !UNW_LOCAL_ONLY */
-+ struct cursor *c = (struct cursor *) cursor;
-+
-+ if (!tdep_init_done)
-+ tdep_init ();
-+
-+ Debug (1, "(cursor=%p)\n", c);
-+
-+ c->dwarf.as = as;
-+ c->dwarf.as_arg = as_arg;
-+ return common_init (c, 0);
-+#endif /* !UNW_LOCAL_ONLY */
-+}
---- /dev/null
-+++ b/src/aarch64/Gis_signal_frame.c
-@@ -0,0 +1,64 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+
-+/* The restorer stub will always have the form:
-+
-+ d2801168 movz x8, #0x8b
-+ d4000001 svc #0x0
-+*/
-+
-+PROTECTED int
-+unw_is_signal_frame (unw_cursor_t *cursor)
-+{
-+#ifdef __linux__
-+ struct cursor *c = (struct cursor *) cursor;
-+ unw_word_t w0, ip;
-+ unw_addr_space_t as;
-+ unw_accessors_t *a;
-+ void *arg;
-+ int ret;
-+
-+ as = c->dwarf.as;
-+ a = unw_get_accessors (as);
-+ arg = c->dwarf.as_arg;
-+
-+ ip = c->dwarf.ip;
-+
-+ ret = (*a->access_mem) (as, ip, &w0, 0, arg);
-+ if (ret < 0)
-+ return ret;
-+
-+ /* FIXME: distinguish 32bit insn vs 64bit registers. */
-+ if (w0 != 0xd4000001d2801168)
-+ return 0;
-+
-+ return 1;
-+
-+#else
-+ return -UNW_ENOINFO;
-+#endif
-+}
---- /dev/null
-+++ b/src/aarch64/Gregs.c
-@@ -0,0 +1,113 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+
-+HIDDEN int
-+tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
-+ int write)
-+{
-+ dwarf_loc_t loc = DWARF_NULL_LOC;
-+ unsigned int mask;
-+
-+ switch (reg)
-+ {
-+ case UNW_AARCH64_X0:
-+ case UNW_AARCH64_X1:
-+ case UNW_AARCH64_X2:
-+ case UNW_AARCH64_X3:
-+ mask = 1 << reg;
-+ if (write)
-+ {
-+ c->dwarf.eh_args[reg] = *valp;
-+ c->dwarf.eh_valid_mask |= mask;
-+ return 0;
-+ }
-+ else if ((c->dwarf.eh_valid_mask & mask) != 0)
-+ {
-+ *valp = c->dwarf.eh_args[reg];
-+ return 0;
-+ }
-+ else
-+ loc = c->dwarf.loc[reg];
-+ break;
-+
-+ case UNW_AARCH64_X4:
-+ case UNW_AARCH64_X5:
-+ case UNW_AARCH64_X6:
-+ case UNW_AARCH64_X7:
-+ case UNW_AARCH64_X8:
-+ case UNW_AARCH64_X9:
-+ case UNW_AARCH64_X10:
-+ case UNW_AARCH64_X11:
-+ case UNW_AARCH64_X12:
-+ case UNW_AARCH64_X13:
-+ case UNW_AARCH64_X14:
-+ case UNW_AARCH64_X15:
-+ case UNW_AARCH64_X16:
-+ case UNW_AARCH64_X17:
-+ case UNW_AARCH64_X18:
-+ case UNW_AARCH64_X19:
-+ case UNW_AARCH64_X20:
-+ case UNW_AARCH64_X21:
-+ case UNW_AARCH64_X22:
-+ case UNW_AARCH64_X23:
-+ case UNW_AARCH64_X24:
-+ case UNW_AARCH64_X25:
-+ case UNW_AARCH64_X26:
-+ case UNW_AARCH64_X27:
-+ case UNW_AARCH64_X28:
-+ case UNW_AARCH64_X29:
-+ case UNW_AARCH64_X30:
-+ case UNW_AARCH64_PC:
-+ case UNW_AARCH64_PSTATE:
-+ loc = c->dwarf.loc[reg];
-+ break;
-+
-+ case UNW_AARCH64_SP:
-+ if (write)
-+ return -UNW_EREADONLYREG;
-+ *valp = c->dwarf.cfa;
-+ return 0;
-+
-+ default:
-+ Debug (1, "bad register number %u\n", reg);
-+ return -UNW_EBADREG;
-+ }
-+
-+ if (write)
-+ return dwarf_put (&c->dwarf, loc, *valp);
-+ else
-+ return dwarf_get (&c->dwarf, loc, valp);
-+}
-+
-+HIDDEN int
-+tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, unw_fpreg_t *valp,
-+ int write)
-+{
-+ Debug (1, "bad register number %u\n", reg);
-+ return -UNW_EBADREG;
-+}
---- /dev/null
-+++ b/src/aarch64/Gresume.c
-@@ -0,0 +1,177 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2011-2013 Linaro Limited
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+#include "offsets.h"
-+
-+#ifndef UNW_REMOTE_ONLY
-+
-+HIDDEN inline int
-+aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
-+{
-+#ifdef __linux__
-+ struct cursor *c = (struct cursor *) cursor;
-+ unw_tdep_context_t *uc = c->dwarf.as_arg;
-+
-+ if (c->sigcontext_format == AARCH64_SCF_NONE)
-+ {
-+ /* Since there are no signals involved here we restore the non scratch
-+ registers only. */
-+ unsigned long regs[11];
-+ regs[0] = uc->uc_mcontext.regs[19];
-+ regs[1] = uc->uc_mcontext.regs[20];
-+ regs[2] = uc->uc_mcontext.regs[21];
-+ regs[3] = uc->uc_mcontext.regs[22];
-+ regs[4] = uc->uc_mcontext.regs[23];
-+ regs[5] = uc->uc_mcontext.regs[24];
-+ regs[6] = uc->uc_mcontext.regs[25];
-+ regs[7] = uc->uc_mcontext.regs[26];
-+ regs[8] = uc->uc_mcontext.regs[27];
-+ regs[9] = uc->uc_mcontext.regs[28];
-+ regs[10] = uc->uc_mcontext.regs[30]; /* LR */
-+ unsigned long sp = uc->uc_mcontext.sp;
-+
-+ struct regs_overlay {
-+ char x[sizeof(regs)];
-+ };
-+
-+ asm volatile (
-+ "ldp x19, x20, [%0]\n"
-+ "ldp x21, x22, [%0,16]\n"
-+ "ldp x23, x24, [%0,32]\n"
-+ "ldp x25, x26, [%0,48]\n"
-+ "ldp x27, x28, [%0,64]\n"
-+ "ldr x30, [%0,80]\n"
-+ "mov sp, %1\n"
-+ "ret \n"
-+ :
-+ : "r" (regs),
-+ "r" (sp),
-+ "m" (*(struct regs_overlay *)regs)
-+ );
-+ }
-+ else
-+ {
-+ struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
-+
-+ if (c->dwarf.eh_valid_mask & 0x1) sc->regs[0] = c->dwarf.eh_args[0];
-+ if (c->dwarf.eh_valid_mask & 0x2) sc->regs[1] = c->dwarf.eh_args[1];
-+ if (c->dwarf.eh_valid_mask & 0x4) sc->regs[2] = c->dwarf.eh_args[2];
-+ if (c->dwarf.eh_valid_mask & 0x8) sc->regs[3] = c->dwarf.eh_args[3];
-+
-+ sc->regs[4] = uc->uc_mcontext.regs[4];
-+ sc->regs[5] = uc->uc_mcontext.regs[5];
-+ sc->regs[6] = uc->uc_mcontext.regs[6];
-+ sc->regs[7] = uc->uc_mcontext.regs[7];
-+ sc->regs[8] = uc->uc_mcontext.regs[8];
-+ sc->regs[9] = uc->uc_mcontext.regs[9];
-+ sc->regs[10] = uc->uc_mcontext.regs[10];
-+ sc->regs[11] = uc->uc_mcontext.regs[11];
-+ sc->regs[12] = uc->uc_mcontext.regs[12];
-+ sc->regs[13] = uc->uc_mcontext.regs[13];
-+ sc->regs[14] = uc->uc_mcontext.regs[14];
-+ sc->regs[15] = uc->uc_mcontext.regs[15];
-+ sc->regs[16] = uc->uc_mcontext.regs[16];
-+ sc->regs[17] = uc->uc_mcontext.regs[17];
-+ sc->regs[18] = uc->uc_mcontext.regs[18];
-+ sc->regs[19] = uc->uc_mcontext.regs[19];
-+ sc->regs[20] = uc->uc_mcontext.regs[20];
-+ sc->regs[21] = uc->uc_mcontext.regs[21];
-+ sc->regs[22] = uc->uc_mcontext.regs[22];
-+ sc->regs[23] = uc->uc_mcontext.regs[23];
-+ sc->regs[24] = uc->uc_mcontext.regs[24];
-+ sc->regs[25] = uc->uc_mcontext.regs[25];
-+ sc->regs[26] = uc->uc_mcontext.regs[26];
-+ sc->regs[27] = uc->uc_mcontext.regs[27];
-+ sc->regs[28] = uc->uc_mcontext.regs[28];
-+ sc->regs[29] = uc->uc_mcontext.regs[29];
-+ sc->regs[30] = uc->uc_mcontext.regs[30];
-+ sc->sp = uc->uc_mcontext.sp;
-+ sc->pc = uc->uc_mcontext.pc;
-+ sc->pstate = uc->uc_mcontext.pstate;
-+
-+ asm volatile (
-+ "mov sp, %0\n"
-+ "ret %1\n"
-+ : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
-+ );
-+ }
-+ unreachable();
-+#else
-+ printf ("%s: implement me\n", __FUNCTION__);
-+#endif
-+ return -UNW_EINVAL;
-+}
-+
-+#endif /* !UNW_REMOTE_ONLY */
-+
-+static inline void
-+establish_machine_state (struct cursor *c)
-+{
-+ unw_addr_space_t as = c->dwarf.as;
-+ void *arg = c->dwarf.as_arg;
-+ unw_fpreg_t fpval;
-+ unw_word_t val;
-+ int reg;
-+
-+ Debug (8, "copying out cursor state\n");
-+
-+ for (reg = 0; reg <= UNW_AARCH64_PSTATE; ++reg)
-+ {
-+ Debug (16, "copying %s %d\n", unw_regname (reg), reg);
-+ if (unw_is_fpreg (reg))
-+ {
-+ if (tdep_access_fpreg (c, reg, &fpval, 0) >= 0)
-+ as->acc.access_fpreg (as, reg, &fpval, 1, arg);
-+ }
-+ else
-+ {
-+ if (tdep_access_reg (c, reg, &val, 0) >= 0)
-+ as->acc.access_reg (as, reg, &val, 1, arg);
-+ }
-+ }
-+}
-+
-+PROTECTED int
-+unw_resume (unw_cursor_t *cursor)
-+{
-+ struct cursor *c = (struct cursor *) cursor;
-+
-+ Debug (1, "(cursor=%p)\n", c);
-+
-+ if (!c->dwarf.ip)
-+ {
-+ /* This can happen easily when the frame-chain gets truncated
-+ due to bad or missing unwind-info. */
-+ Debug (1, "refusing to resume execution at address 0\n");
-+ return -UNW_EINVAL;
-+ }
-+
-+ establish_machine_state (c);
-+
-+ return (*c->dwarf.as->acc.resume) (c->dwarf.as, (unw_cursor_t *) c,
-+ c->dwarf.as_arg);
-+}
---- /dev/null
-+++ b/src/aarch64/Gstep.c
-@@ -0,0 +1,129 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2011-2013 Linaro Limited
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+#include "offsets.h"
-+
-+PROTECTED int
-+unw_handle_signal_frame (unw_cursor_t *cursor)
-+{
-+ struct cursor *c = (struct cursor *) cursor;
-+ int ret;
-+ unw_word_t sc_addr, sp, sp_addr = c->dwarf.cfa;
-+ struct dwarf_loc sp_loc = DWARF_LOC (sp_addr, 0);
-+
-+ if ((ret = dwarf_get (&c->dwarf, sp_loc, &sp)) < 0)
-+ return -UNW_EUNSPEC;
-+
-+ ret = unw_is_signal_frame (cursor);
-+ Debug(1, "unw_is_signal_frame()=%d\n", ret);
-+
-+ /* Save the SP and PC to be able to return execution at this point
-+ later in time (unw_resume). */
-+ c->sigcontext_sp = c->dwarf.cfa;
-+ c->sigcontext_pc = c->dwarf.ip;
-+
-+ if (ret)
-+ {
-+ c->sigcontext_format = AARCH64_SCF_LINUX_RT_SIGFRAME;
-+ sc_addr = sp_addr + sizeof (siginfo_t) + LINUX_UC_MCONTEXT_OFF;
-+ }
-+ else
-+ return -UNW_EUNSPEC;
-+
-+ c->sigcontext_addr = sc_addr;
-+
-+ /* Update the dwarf cursor.
-+ Set the location of the registers to the corresponding addresses of the
-+ uc_mcontext / sigcontext structure contents. */
-+ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_LOC (sc_addr + LINUX_SC_X0_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_LOC (sc_addr + LINUX_SC_X1_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_LOC (sc_addr + LINUX_SC_X2_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_LOC (sc_addr + LINUX_SC_X3_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_LOC (sc_addr + LINUX_SC_X4_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_LOC (sc_addr + LINUX_SC_X5_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_LOC (sc_addr + LINUX_SC_X6_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_LOC (sc_addr + LINUX_SC_X7_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_LOC (sc_addr + LINUX_SC_X8_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_LOC (sc_addr + LINUX_SC_X9_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_LOC (sc_addr + LINUX_SC_X10_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_LOC (sc_addr + LINUX_SC_X11_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_LOC (sc_addr + LINUX_SC_X12_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_LOC (sc_addr + LINUX_SC_X13_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_LOC (sc_addr + LINUX_SC_X14_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_LOC (sc_addr + LINUX_SC_X15_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_LOC (sc_addr + LINUX_SC_X16_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_LOC (sc_addr + LINUX_SC_X17_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_LOC (sc_addr + LINUX_SC_X18_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_LOC (sc_addr + LINUX_SC_X19_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_LOC (sc_addr + LINUX_SC_X20_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_LOC (sc_addr + LINUX_SC_X21_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_LOC (sc_addr + LINUX_SC_X22_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_LOC (sc_addr + LINUX_SC_X23_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_LOC (sc_addr + LINUX_SC_X24_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_LOC (sc_addr + LINUX_SC_X25_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_LOC (sc_addr + LINUX_SC_X26_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_LOC (sc_addr + LINUX_SC_X27_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_LOC (sc_addr + LINUX_SC_X28_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_LOC (sc_addr + LINUX_SC_X29_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_LOC (sc_addr + LINUX_SC_X30_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_LOC (sc_addr + LINUX_SC_SP_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_LOC (sc_addr + LINUX_SC_PC_OFF, 0);
-+ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_LOC (sc_addr + LINUX_SC_PSTATE_OFF, 0);
-+
-+ /* Set SP/CFA and PC/IP. */
-+ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
-+ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
-+
-+ c->dwarf.pi_valid = 0;
-+
-+ return 1;
-+}
-+
-+PROTECTED int
-+unw_step (unw_cursor_t *cursor)
-+{
-+ struct cursor *c = (struct cursor *) cursor;
-+ int ret;
-+
-+ Debug (1, "(cursor=%p, ip=0x%016lx, cfa=0x%016lx))\n",
-+ c, c->dwarf.ip, c->dwarf.cfa);
-+
-+ /* Check if this is a signal frame. */
-+ if (unw_is_signal_frame (cursor))
-+ return unw_handle_signal_frame (cursor);
-+
-+ ret = dwarf_step (&c->dwarf);
-+ Debug(1, "dwarf_step()=%d\n", ret);
-+
-+ if (unlikely (ret == -UNW_ESTOPUNWIND))
-+ return ret;
-+
-+ if (unlikely (ret < 0))
-+ return 0;
-+
-+ return (c->dwarf.ip == 0) ? 0 : 1;
-+}
---- /dev/null
-+++ b/src/aarch64/Lcreate_addr_space.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Gcreate_addr_space.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Lget_proc_info.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Gget_proc_info.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Lget_save_loc.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Gget_save_loc.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Lglobal.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Gglobal.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Linit.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Ginit.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Linit_local.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Ginit_local.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Linit_remote.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Ginit_remote.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Lis_signal_frame.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Gis_signal_frame.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Lregs.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Gregs.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Lresume.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Gresume.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/Lstep.c
-@@ -0,0 +1,5 @@
-+#define UNW_LOCAL_ONLY
-+#include <libunwind.h>
-+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
-+#include "Gstep.c"
-+#endif
---- /dev/null
-+++ b/src/aarch64/gen-offsets.c
-@@ -0,0 +1,68 @@
-+#include <stdio.h>
-+#include <stddef.h>
-+#include <ucontext.h>
-+#include <asm/sigcontext.h>
-+
-+#define UC(N,X) \
-+ printf ("#define LINUX_UC_" N "_OFF\t0x%X\n", offsetof (ucontext_t, X))
-+
-+#define SC(N,X) \
-+ printf ("#define LINUX_SC_" N "_OFF\t0x%X\n", offsetof (struct sigcontext, X))
-+
-+int
-+main (void)
-+{
-+ printf (
-+"/* Linux-specific definitions: */\n\n"
-+
-+"/* Define various structure offsets to simplify cross-compilation. */\n\n"
-+
-+"/* Offsets for AArch64 Linux \"ucontext_t\": */\n\n");
-+
-+ UC ("FLAGS", uc_flags);
-+ UC ("LINK", uc_link);
-+ UC ("STACK", uc_stack);
-+ UC ("MCONTEXT", uc_mcontext);
-+ UC ("SIGMASK", uc_sigmask);
-+
-+ printf ("\n/* Offsets for AArch64 Linux \"struct sigcontext\": */\n\n");
-+
-+ SC ("R0", regs[0]);
-+ SC ("R1", regs[1]);
-+ SC ("R2", regs[2]);
-+ SC ("R3", regs[3]);
-+ SC ("R4", regs[4]);
-+ SC ("R5", regs[5]);
-+ SC ("R6", regs[6]);
-+ SC ("R7", regs[7]);
-+ SC ("R8", regs[8]);
-+ SC ("R9", regs[9]);
-+ SC ("R10", regs[10]);
-+ SC ("R11", regs[11]);
-+ SC ("R12", regs[12]);
-+ SC ("R13", regs[13]);
-+ SC ("R14", regs[14]);
-+ SC ("R15", regs[15]);
-+ SC ("R16", regs[16]);
-+ SC ("R17", regs[17]);
-+ SC ("R18", regs[18]);
-+ SC ("R19", regs[19]);
-+ SC ("R20", regs[20]);
-+ SC ("R21", regs[21]);
-+ SC ("R22", regs[22]);
-+ SC ("R23", regs[23]);
-+ SC ("R24", regs[24]);
-+ SC ("R25", regs[25]);
-+ SC ("R26", regs[26]);
-+ SC ("R27", regs[27]);
-+ SC ("R28", regs[28]);
-+ SC ("R29", regs[29]);
-+ SC ("R30", regs[30]);
-+ SC ("R31", regs[31]);
-+
-+ SC ("PC", pc);
-+ SC ("SP", sp);
-+ SC ("Fault", fault_address);
-+ SC ("state", pstate);
-+ return 0;
-+}
---- /dev/null
-+++ b/src/aarch64/init.h
-@@ -0,0 +1,127 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+
-+static inline int
-+common_init (struct cursor *c, unsigned use_prev_instr)
-+{
-+ int ret, i;
-+
-+ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X0);
-+ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X1);
-+ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X2);
-+ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X3);
-+ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X4);
-+ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X5);
-+ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X6);
-+ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X7);
-+ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X8);
-+ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X9);
-+ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X10);
-+ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X11);
-+ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X12);
-+ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X13);
-+ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X14);
-+ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X15);
-+ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X16);
-+ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X17);
-+ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X18);
-+ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X19);
-+ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X20);
-+ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X21);
-+ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X22);
-+ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X23);
-+ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X24);
-+ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X25);
-+ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X26);
-+ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X27);
-+ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X28);
-+ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X29);
-+ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X30);
-+ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_SP);
-+ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_PC);
-+ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_REG_LOC (&c->dwarf,
-+ UNW_AARCH64_PSTATE);
-+ c->dwarf.loc[UNW_AARCH64_V0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V0);
-+ c->dwarf.loc[UNW_AARCH64_V1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V1);
-+ c->dwarf.loc[UNW_AARCH64_V2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V2);
-+ c->dwarf.loc[UNW_AARCH64_V3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V3);
-+ c->dwarf.loc[UNW_AARCH64_V4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V4);
-+ c->dwarf.loc[UNW_AARCH64_V5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V5);
-+ c->dwarf.loc[UNW_AARCH64_V6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V6);
-+ c->dwarf.loc[UNW_AARCH64_V7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V7);
-+ c->dwarf.loc[UNW_AARCH64_V8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V8);
-+ c->dwarf.loc[UNW_AARCH64_V9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V9);
-+ c->dwarf.loc[UNW_AARCH64_V10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V10);
-+ c->dwarf.loc[UNW_AARCH64_V11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V11);
-+ c->dwarf.loc[UNW_AARCH64_V12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V12);
-+ c->dwarf.loc[UNW_AARCH64_V13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V13);
-+ c->dwarf.loc[UNW_AARCH64_V14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V14);
-+ c->dwarf.loc[UNW_AARCH64_V15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V15);
-+ c->dwarf.loc[UNW_AARCH64_V16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V16);
-+ c->dwarf.loc[UNW_AARCH64_V17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V17);
-+ c->dwarf.loc[UNW_AARCH64_V18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V18);
-+ c->dwarf.loc[UNW_AARCH64_V19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V19);
-+ c->dwarf.loc[UNW_AARCH64_V20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V20);
-+ c->dwarf.loc[UNW_AARCH64_V21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V21);
-+ c->dwarf.loc[UNW_AARCH64_V22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V22);
-+ c->dwarf.loc[UNW_AARCH64_V23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V23);
-+ c->dwarf.loc[UNW_AARCH64_V24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V24);
-+ c->dwarf.loc[UNW_AARCH64_V25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V25);
-+ c->dwarf.loc[UNW_AARCH64_V26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V26);
-+ c->dwarf.loc[UNW_AARCH64_V27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V27);
-+ c->dwarf.loc[UNW_AARCH64_V28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V28);
-+ c->dwarf.loc[UNW_AARCH64_V29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V29);
-+ c->dwarf.loc[UNW_AARCH64_V30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V30);
-+ c->dwarf.loc[UNW_AARCH64_V31] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V31);
-+
-+ for (i = UNW_AARCH64_PSTATE + 1; i < UNW_AARCH64_V0; ++i)
-+ c->dwarf.loc[i] = DWARF_NULL_LOC;
-+
-+ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
-+ if (ret < 0)
-+ return ret;
-+
-+ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
-+ if (ret < 0)
-+ return ret;
-+
-+ c->sigcontext_format = AARCH64_SCF_NONE;
-+ c->sigcontext_addr = 0;
-+ c->sigcontext_sp = 0;
-+ c->sigcontext_pc = 0;
-+
-+ c->dwarf.args_size = 0;
-+ c->dwarf.ret_addr_column = 0;
-+ c->dwarf.stash_frames = 0;
-+ c->dwarf.use_prev_instr = use_prev_instr;
-+ c->dwarf.pi_valid = 0;
-+ c->dwarf.pi_is_dynamic = 0;
-+ c->dwarf.hint = 0;
-+ c->dwarf.prev_rs = 0;
-+
-+ return 0;
-+}
---- /dev/null
-+++ b/src/aarch64/is_fpreg.c
-@@ -0,0 +1,32 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "libunwind_i.h"
-+
-+PROTECTED int
-+unw_is_fpreg (int regnum)
-+{
-+ return (regnum >= UNW_AARCH64_V0 && regnum <= UNW_AARCH64_V31);
-+}
---- /dev/null
-+++ b/src/aarch64/offsets.h
-@@ -0,0 +1,49 @@
-+/* Linux-specific definitions: */
-+
-+/* Define various structure offsets to simplify cross-compilation. */
-+
-+/* Offsets for AArch64 Linux "ucontext_t": */
-+
-+#define LINUX_UC_FLAGS_OFF 0x0
-+#define LINUX_UC_LINK_OFF 0x8
-+#define LINUX_UC_STACK_OFF 0x10
-+#define LINUX_UC_SIGMASK_OFF 0x28
-+#define LINUX_UC_MCONTEXT_OFF 0xb0
-+
-+/* Offsets for AArch64 Linux "struct sigcontext": */
-+
-+#define LINUX_SC_FAULTADDRESS_OFF 0x00
-+#define LINUX_SC_X0_OFF 0x008
-+#define LINUX_SC_X1_OFF 0x010
-+#define LINUX_SC_X2_OFF 0x018
-+#define LINUX_SC_X3_OFF 0x020
-+#define LINUX_SC_X4_OFF 0x028
-+#define LINUX_SC_X5_OFF 0x030
-+#define LINUX_SC_X6_OFF 0x038
-+#define LINUX_SC_X7_OFF 0x040
-+#define LINUX_SC_X8_OFF 0x048
-+#define LINUX_SC_X9_OFF 0x050
-+#define LINUX_SC_X10_OFF 0x058
-+#define LINUX_SC_X11_OFF 0x060
-+#define LINUX_SC_X12_OFF 0x068
-+#define LINUX_SC_X13_OFF 0x070
-+#define LINUX_SC_X14_OFF 0x078
-+#define LINUX_SC_X15_OFF 0x080
-+#define LINUX_SC_X16_OFF 0x088
-+#define LINUX_SC_X17_OFF 0x090
-+#define LINUX_SC_X18_OFF 0x098
-+#define LINUX_SC_X19_OFF 0x0a0
-+#define LINUX_SC_X20_OFF 0x0a8
-+#define LINUX_SC_X21_OFF 0x0b0
-+#define LINUX_SC_X22_OFF 0x0b8
-+#define LINUX_SC_X23_OFF 0x0c0
-+#define LINUX_SC_X24_OFF 0x0c8
-+#define LINUX_SC_X25_OFF 0x0d0
-+#define LINUX_SC_X26_OFF 0x0d8
-+#define LINUX_SC_X27_OFF 0x0e0
-+#define LINUX_SC_X28_OFF 0x0e8
-+#define LINUX_SC_X29_OFF 0x0f0
-+#define LINUX_SC_X30_OFF 0x0f8
-+#define LINUX_SC_SP_OFF 0x100
-+#define LINUX_SC_PC_OFF 0x108
-+#define LINUX_SC_PSTATE_OFF 0x110
---- /dev/null
-+++ b/src/aarch64/regname.c
-@@ -0,0 +1,106 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#include "unwind_i.h"
-+
-+static const char *const regname[] =
-+ {
-+ [UNW_AARCH64_X0] = "x0",
-+ [UNW_AARCH64_X1] = "x1",
-+ [UNW_AARCH64_X2] = "x2",
-+ [UNW_AARCH64_X3] = "x3",
-+ [UNW_AARCH64_X4] = "x4",
-+ [UNW_AARCH64_X5] = "x5",
-+ [UNW_AARCH64_X6] = "x6",
-+ [UNW_AARCH64_X7] = "x7",
-+ [UNW_AARCH64_X8] = "x8",
-+ [UNW_AARCH64_X9] = "x9",
-+ [UNW_AARCH64_X10] = "x10",
-+ [UNW_AARCH64_X11] = "x11",
-+ [UNW_AARCH64_X12] = "x12",
-+ [UNW_AARCH64_X13] = "x13",
-+ [UNW_AARCH64_X14] = "x14",
-+ [UNW_AARCH64_X15] = "x15",
-+ [UNW_AARCH64_X16] = "ip0",
-+ [UNW_AARCH64_X17] = "ip1",
-+ [UNW_AARCH64_X18] = "x18",
-+ [UNW_AARCH64_X19] = "x19",
-+ [UNW_AARCH64_X20] = "x20",
-+ [UNW_AARCH64_X21] = "x21",
-+ [UNW_AARCH64_X22] = "x22",
-+ [UNW_AARCH64_X23] = "x23",
-+ [UNW_AARCH64_X24] = "x24",
-+ [UNW_AARCH64_X25] = "x25",
-+ [UNW_AARCH64_X26] = "x26",
-+ [UNW_AARCH64_X27] = "x27",
-+ [UNW_AARCH64_X28] = "x28",
-+ [UNW_AARCH64_X29] = "fp",
-+ [UNW_AARCH64_X30] = "lr",
-+ [UNW_AARCH64_SP] = "sp",
-+ [UNW_AARCH64_PC] = "pc",
-+ [UNW_AARCH64_V0] = "v0",
-+ [UNW_AARCH64_V1] = "v1",
-+ [UNW_AARCH64_V2] = "v2",
-+ [UNW_AARCH64_V3] = "v3",
-+ [UNW_AARCH64_V4] = "v4",
-+ [UNW_AARCH64_V5] = "v5",
-+ [UNW_AARCH64_V6] = "v6",
-+ [UNW_AARCH64_V7] = "v7",
-+ [UNW_AARCH64_V8] = "v8",
-+ [UNW_AARCH64_V9] = "v9",
-+ [UNW_AARCH64_V10] = "v10",
-+ [UNW_AARCH64_V11] = "v11",
-+ [UNW_AARCH64_V12] = "v12",
-+ [UNW_AARCH64_V13] = "v13",
-+ [UNW_AARCH64_V14] = "v14",
-+ [UNW_AARCH64_V15] = "v15",
-+ [UNW_AARCH64_V16] = "v16",
-+ [UNW_AARCH64_V17] = "v17",
-+ [UNW_AARCH64_V18] = "v18",
-+ [UNW_AARCH64_V19] = "v19",
-+ [UNW_AARCH64_V20] = "v20",
-+ [UNW_AARCH64_V21] = "v21",
-+ [UNW_AARCH64_V22] = "v22",
-+ [UNW_AARCH64_V23] = "v23",
-+ [UNW_AARCH64_V24] = "v24",
-+ [UNW_AARCH64_V25] = "v25",
-+ [UNW_AARCH64_V26] = "v26",
-+ [UNW_AARCH64_V27] = "v27",
-+ [UNW_AARCH64_V28] = "v28",
-+ [UNW_AARCH64_V29] = "v29",
-+ [UNW_AARCH64_V30] = "v30",
-+ [UNW_AARCH64_V31] = "v31",
-+ [UNW_AARCH64_FPSR] = "fpsr",
-+ [UNW_AARCH64_FPCR] = "fpcr",
-+ };
-+
-+PROTECTED const char *
-+unw_regname (unw_regnum_t reg)
-+{
-+ if (reg < (unw_regnum_t) ARRAY_SIZE (regname) && regname[reg] != NULL)
-+ return regname[reg];
-+ else
-+ return "???";
-+}
---- /dev/null
-+++ b/src/aarch64/siglongjmp.S
-@@ -0,0 +1,12 @@
-+ /* Dummy implementation for now. */
-+
-+ .global _UI_siglongjmp_cont
-+ .global _UI_longjmp_cont
-+
-+_UI_siglongjmp_cont:
-+_UI_longjmp_cont:
-+ ret
-+#ifdef __linux__
-+ /* We do not need executable stack. */
-+ .section .note.GNU-stack,"",%progbits
-+#endif
---- /dev/null
-+++ b/src/aarch64/unwind_i.h
-@@ -0,0 +1,43 @@
-+/* libunwind - a platform-independent unwind library
-+ Copyright (C) 2008 CodeSourcery
-+ Copyright (C) 2013 Linaro Limited
-+
-+This file is part of libunwind.
-+
-+Permission is hereby granted, free of charge, to any person obtaining
-+a copy of this software and associated documentation files (the
-+"Software"), to deal in the Software without restriction, including
-+without limitation the rights to use, copy, modify, merge, publish,
-+distribute, sublicense, and/or sell copies of the Software, and to
-+permit persons to whom the Software is furnished to do so, subject to
-+the following conditions:
-+
-+The above copyright notice and this permission notice shall be
-+included in all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-+
-+#ifndef unwind_i_h
-+#define unwind_i_h
-+
-+#include <stdint.h>
-+
-+#include <libunwind-aarch64.h>
-+
-+#include "libunwind_i.h"
-+
-+#define aarch64_lock UNW_OBJ(lock)
-+#define aarch64_local_resume UNW_OBJ(local_resume)
-+#define aarch64_local_addr_space_init UNW_OBJ(local_addr_space_init)
-+
-+extern void aarch64_local_addr_space_init (void);
-+extern int aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
-+ void *arg);
-+
-+#endif /* unwind_i_h */
---- a/src/coredump/_UCD_access_reg_linux.c
-+++ b/src/coredump/_UCD_access_reg_linux.c
-@@ -39,7 +39,10 @@ _UCD_access_reg (unw_addr_space_t as,
- return -UNW_EINVAL;
- }
-
--#if defined(UNW_TARGET_ARM)
-+#if defined(UNW_TARGET_AARCH64)
-+ if (regnum < 0 || regnum >= UNW_AARCH64_FPCR)
-+ goto badreg;
-+#elif defined(UNW_TARGET_ARM)
- if (regnum < 0 || regnum >= 16)
- goto badreg;
- #elif defined(UNW_TARGET_SH)
---- a/src/ptrace/_UPT_reg_offset.c
-+++ b/src/ptrace/_UPT_reg_offset.c
-@@ -1,6 +1,7 @@
- /* libunwind - a platform-independent unwind library
- Copyright (C) 2003-2004 Hewlett-Packard Co
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
-+ Copyright (C) 2013 Linaro Limited
-
- This file is part of libunwind.
-
-@@ -501,6 +502,41 @@ const int _UPT_reg_offset[UNW_REG_LAST +
- [UNW_ARM_R15] = 0x3c,
- #elif defined(UNW_TARGET_MIPS)
- #elif defined(UNW_TARGET_SH)
-+#elif defined(UNW_TARGET_AARCH64)
-+ [UNW_AARCH64_X0] = 0x00,
-+ [UNW_AARCH64_X1] = 0x08,
-+ [UNW_AARCH64_X2] = 0x10,
-+ [UNW_AARCH64_X3] = 0x18,
-+ [UNW_AARCH64_X4] = 0x20,
-+ [UNW_AARCH64_X5] = 0x28,
-+ [UNW_AARCH64_X6] = 0x30,
-+ [UNW_AARCH64_X7] = 0x38,
-+ [UNW_AARCH64_X8] = 0x40,
-+ [UNW_AARCH64_X9] = 0x48,
-+ [UNW_AARCH64_X10] = 0x50,
-+ [UNW_AARCH64_X11] = 0x58,
-+ [UNW_AARCH64_X12] = 0x60,
-+ [UNW_AARCH64_X13] = 0x68,
-+ [UNW_AARCH64_X14] = 0x70,
-+ [UNW_AARCH64_X15] = 0x78,
-+ [UNW_AARCH64_X16] = 0x80,
-+ [UNW_AARCH64_X17] = 0x88,
-+ [UNW_AARCH64_X18] = 0x90,
-+ [UNW_AARCH64_X19] = 0x98,
-+ [UNW_AARCH64_X20] = 0xa0,
-+ [UNW_AARCH64_X21] = 0xa8,
-+ [UNW_AARCH64_X22] = 0xb0,
-+ [UNW_AARCH64_X23] = 0xb8,
-+ [UNW_AARCH64_X24] = 0xc0,
-+ [UNW_AARCH64_X25] = 0xc8,
-+ [UNW_AARCH64_X26] = 0xd0,
-+ [UNW_AARCH64_X27] = 0xd8,
-+ [UNW_AARCH64_X28] = 0xe0,
-+ [UNW_AARCH64_X29] = 0xe8,
-+ [UNW_AARCH64_X30] = 0xf0,
-+ [UNW_AARCH64_SP] = 0xf8,
-+ [UNW_AARCH64_PC] = 0x100,
-+ [UNW_AARCH64_PSTATE] = 0x108
- #else
- # error Fix me.
- #endif
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
deleted file mode 100644
index dc0f5c1b4..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Fix test case link failure on PowerPC systems with Altivec
-
-Upstream-Status:backport
-
-On systems where the system compiler supports Altivec by default,
-the libunwind Makefile will attempt to build an extra test case
-ppc64-test-altivec. Unfortunately, the link step will fail since
-the Makefile does not actually link against the libunwind library.
-
-Fixed by adding the appropriate LDADD macro.
-
-Signed-off-by: Ulrich Weigand <address@hidden>
----
- tests/Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 0e30536..9c76628 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -201,3 +201,4 @@ Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
- Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
- ia64_test_dyn1_LDADD = $(LIBUNWIND)
- ia64_test_sig_LDADD = $(LIBUNWIND)
-+ppc64_test_altivec_LDADD = $(LIBUNWIND)
---
-1.8.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
deleted file mode 100644
index 0e55c91b8..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
-From: Thierry Reding <treding@nvidia.com>
-Date: Fri, 27 Jun 2014 08:40:33 +0200
-Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
-
-For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
-example, libgcc_s.so.1 contains some symbols needed by libunwind which
-are not present in libgcc.
-
-This causes the following link error when building the X.Org X server
-with libunwind support:
-
- CCLD Xorg
- /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
- /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
-
-Linking against libgcc_s explicitly solves this problem.
-
-Upstream-Status: Backport
-
-Signed-off-by: Thierry Reding <treding@nvidia.com>
-Signed-off-by: Jonathan Liu <net147@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index cffe19b..3beb5f2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -258,7 +258,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __INTEL_COMPILER
-
- if test x$GCC = xyes -a x$intel_compiler != xyes; then
- CFLAGS="${CFLAGS} -fexceptions -Wall -Wsign-compare"
-- LIBCRTS="-lgcc"
-+ LIBCRTS="-lgcc_s"
- fi
- AC_MSG_RESULT([$intel_compiler])
-
---
-2.3.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
deleted file mode 100644
index 268b702dc..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 10b064ffe902d5af31bb49bd8e4f03c545f8d462 Mon Sep 17 00:00:00 2001
-From: Ladislav Michl <ladis@linux-mips.org>
-Date: Tue, 13 Nov 2012 11:19:47 +0100
-Subject: [PATCH] Support building with older compilers.
-
-Add a check for __builtin_unreachable.
-
-Upstream-Status: Pending
----
- configure.ac | 11 +++++++++++
- include/libunwind_i.h | 6 ++++++
- src/arm/Gresume.c | 2 +-
- src/sh/Gresume.c | 2 +-
- 4 files changed, 19 insertions(+), 2 deletions(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -285,6 +285,17 @@ if test x$have__builtin___clear_cache =
- fi
- AC_MSG_RESULT([$have__builtin___clear_cache])
-
-+AC_MSG_CHECKING([for __builtin_unreachable])
-+AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM([[]], [[__builtin_unreachable()]])],
-+ [have__builtin_unreachable=yes],
-+ [have__builtin_unreachable=no])
-+if test x$have__builtin_unreachable = xyes; then
-+ AC_DEFINE([HAVE__BUILTIN_UNREACHABLE], [1],
-+ [Defined if __builtin_unreachable() is available])
-+fi
-+AC_MSG_RESULT([$have__builtin_unreachable])
-+
- AC_MSG_CHECKING([for __sync atomics])
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[]], [[
---- a/include/libunwind_i.h
-+++ b/include/libunwind_i.h
-@@ -72,6 +72,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
- # endif
- #endif
-
-+#if defined(HAVE__BUILTIN_UNREACHABLE)
-+# define unreachable() __builtin_unreachable()
-+#else
-+# define unreachable() do { } while (1)
-+#endif
-+
- #ifdef DEBUG
- # define UNW_DEBUG 1
- #else
---- a/src/arm/Gresume.c
-+++ b/src/arm/Gresume.c
-@@ -96,7 +96,7 @@ arm_local_resume (unw_addr_space_t as, u
- : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
- );
- }
-- __builtin_unreachable();
-+ unreachable();
- #else
- printf ("%s: implement me\n", __FUNCTION__);
- #endif
---- a/src/sh/Gresume.c
-+++ b/src/sh/Gresume.c
-@@ -109,7 +109,7 @@ sh_local_resume (unw_addr_space_t as, un
- "r" (c->sigcontext_pc)
- );
- }
-- __builtin_unreachable();
-+ unreachable();
- #endif
- return -UNW_EINVAL;
- }
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind.inc b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind.inc
index 1c342d392..e4ae8df27 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind.inc
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind.inc
@@ -18,15 +18,6 @@ ATOMICOPS_armv5 = "-DAO_USE_PTHREAD_DEFS=1"
ATOMICOPS_armv4 = "-DAO_USE_PTHREAD_DEFS=1"
ATOMICOPS ?= ""
-LDFLAGS_append_x86 = " -fuse-ld=gold"
-LDFLAGS_append_x86-64 = " -fuse-ld=gold"
-
-LDFLAGS_append_arm = " -fuse-ld=gold"
-LDFLAGS_append_aarch64 = " -fuse-ld=gold"
-
-LDFLAGS_append_powerpc = " -fuse-ld=gold -mbss-plt"
-LDFLAGS_append_powerpc64 = " -fuse-ld=gold -mbss-plt"
-
SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared -lssp"
BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch
new file mode 100644
index 000000000..8bcc252ba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch
@@ -0,0 +1,81 @@
+From e623c7703945a5eb6c9a30586ec5e23b2f7396f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 23 Mar 2016 06:08:59 +0000
+Subject: [PATCH] Fix build on mips/musl
+
+Do not include endian.h on musl it includes
+further headers which can not be compiled in __ASSEMBLER__
+ mode
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/coredump/_UCD_internal.h | 34 ++++++++++++++++++++++++++++++++++
+ src/mips/getcontext.S | 3 +--
+ 2 files changed, 35 insertions(+), 2 deletions(-)
+
+Index: git/src/coredump/_UCD_internal.h
+===================================================================
+--- git.orig/src/coredump/_UCD_internal.h
++++ git/src/coredump/_UCD_internal.h
+@@ -44,6 +44,41 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
+
+ #include "libunwind_i.h"
+
++#ifndef __GLIBC__
++#include <sys/reg.h>
++
++#define EF_REG0 6
++#define EF_REG1 7
++#define EF_REG2 8
++#define EF_REG3 9
++#define EF_REG4 10
++#define EF_REG5 11
++#define EF_REG6 12
++#define EF_REG7 13
++#define EF_REG8 14
++#define EF_REG9 15
++#define EF_REG10 16
++#define EF_REG11 17
++#define EF_REG12 18
++#define EF_REG13 19
++#define EF_REG14 20
++#define EF_REG15 21
++#define EF_REG16 22
++#define EF_REG17 23
++#define EF_REG18 24
++#define EF_REG19 25
++#define EF_REG20 26
++#define EF_REG21 27
++#define EF_REG22 28
++#define EF_REG23 29
++#define EF_REG24 30
++#define EF_REG25 31
++#define EF_REG28 34
++#define EF_REG29 35
++#define EF_REG30 36
++#define EF_REG31 37
++#endif
++
+
+ #if SIZEOF_OFF_T == 4
+ typedef uint32_t uoff_t;
+Index: git/src/mips/getcontext.S
+===================================================================
+--- git.orig/src/mips/getcontext.S
++++ git/src/mips/getcontext.S
+@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+ #include "offsets.h"
+-#include <endian.h>
+
+ .text
+
+ #if _MIPS_SIM == _ABIO32
+-# if __BYTE_ORDER == __BIG_ENDIAN
++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ # define OFFSET 4
+ # else
+ # define OFFSET 0
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch
new file mode 100644
index 000000000..673a5bb99
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch
@@ -0,0 +1,69 @@
+From 459e471fcc33d300f7bbcdaf3e0dc338d9dc15b9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Apr 2016 16:56:34 +0000
+Subject: [PATCH] add knobs to disable/enable tests
+
+Some tests do not compile on musl libc
+in general its good to have such a knob
+since not all builds may want to enable
+tests
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am | 6 +++++-
+ configure.ac | 12 ++++++++++--
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 6a3ed9e..0c29b3e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -42,7 +42,11 @@ endif
+
+ nodist_include_HEADERS = include/libunwind-common.h
+
+-SUBDIRS = src tests
++SUBDIRS = src
++
++if CONFIG_TESTS
++SUBDIRS += tests
++endif
+
+ if CONFIG_DOCS
+ SUBDIRS += doc
+diff --git a/configure.ac b/configure.ac
+index 85d78f8..d362387 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -129,6 +129,10 @@ AC_ARG_ENABLE(documentation,
+ AS_HELP_STRING([--disable-documentation],[Disable generating the man pages]),,
+ [enable_documentation=yes])
+
++AC_ARG_ENABLE(tests,
++ AS_HELP_STRING([--disable-tests],[Disable building tests]),,
++ [enable_tests=yes])
++
+ AC_MSG_CHECKING([if we should build libunwind-setjmp])
+ AC_MSG_RESULT([$enable_setjmp])
+
+@@ -395,9 +399,13 @@ AM_CONDITIONAL([CONFIG_DOCS], [test x$enable_documentation = xyes])
+ if test "x$enable_documentation" = "xyes"; then
+ AC_CONFIG_FILES(doc/Makefile doc/common.tex)
+ fi
++AM_CONDITIONAL([CONFIG_TESTS], [test x$enable_tests = xyes])
++if test "x$enable_tests" = "xyes"; then
++ AC_CONFIG_FILES(tests/Makefile tests/check-namespace.sh)
++fi
++
+
+-AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh
+- include/libunwind-common.h
++AC_CONFIG_FILES(Makefile src/Makefile include/libunwind-common.h
+ include/libunwind.h include/tdep/libunwind_i.h)
+ AC_CONFIG_FILES(src/unwind/libunwind.pc src/coredump/libunwind-coredump.pc
+ src/ptrace/libunwind-ptrace.pc src/setjmp/libunwind-setjmp.pc
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
index 9aed419a1..9aed419a1 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
new file mode 100644
index 000000000..ca0641f5a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
@@ -0,0 +1,248 @@
+From e0eea53c77fce8537c58a072b684043507987bcc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Jul 2016 01:07:53 +0000
+Subject: [PATCH] ppc32: Consider ucontext mismatches between glibc and musl
+
+This helps in porting libunwind onto musl based systems
+ptrace.h change is required again an error that surfaces
+with musl
+
+/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/asm/ptrace.h:31:8: error: redefinition of 'struct pt_regs'
+ struct pt_regs {
+ ^~~~~~~
+In file included from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/user.h:11:0,
+ from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/procfs.h:9,
+ from ../../git/src/ptrace/_UPT_internal.h:40,
+ from ../../git/src/ptrace/_UPT_reg_offset.c:27:
+/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/bits/user.h:1:8: note: originally defined here
+ struct pt_regs {
+ ^~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/ppc32/Ginit.c | 6 +-
+ src/ppc32/ucontext_i.h | 158 ++++++++++++++++++++++---------------------
+ src/ptrace/_UPT_reg_offset.c | 7 ++
+ 3 files changed, 92 insertions(+), 79 deletions(-)
+
+diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c
+index f2e6e82..617aaa1 100644
+--- a/src/ppc32/Ginit.c
++++ b/src/ppc32/Ginit.c
+@@ -48,12 +48,12 @@ uc_addr (ucontext_t *uc, int reg)
+ void *addr;
+
+ if ((unsigned) (reg - UNW_PPC32_R0) < 32)
+- addr = &uc->uc_mcontext.uc_regs->gregs[reg - UNW_PPC32_R0];
++ addr = &uc->GET_UC_REGS->gregs[reg - UNW_PPC32_R0];
+
+ else
+ if ( ((unsigned) (reg - UNW_PPC32_F0) < 32) &&
+ ((unsigned) (reg - UNW_PPC32_F0) >= 0) )
+- addr = &uc->uc_mcontext.uc_regs->fpregs.fpregs[reg - UNW_PPC32_F0];
++ addr = &uc->GET_UC_REGS->fpregs.fpregs[reg - UNW_PPC32_F0];
+
+ else
+ {
+@@ -76,7 +76,7 @@ uc_addr (ucontext_t *uc, int reg)
+ default:
+ return NULL;
+ }
+- addr = &uc->uc_mcontext.uc_regs->gregs[gregs_idx];
++ addr = &uc->GET_UC_REGS->gregs[gregs_idx];
+ }
+ return addr;
+ }
+diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h
+index c6ba806..b79f15c 100644
+--- a/src/ppc32/ucontext_i.h
++++ b/src/ppc32/ucontext_i.h
+@@ -46,83 +46,89 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+ various structure members. */
+ static ucontext_t dmy_ctxt UNUSED;
+
+-#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[0] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[1] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[2] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[3] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[4] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[5] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[6] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[7] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[8] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[9] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[10] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[11] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[12] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[13] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[14] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[15] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[16] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[17] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[18] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[19] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[20] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[21] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[22] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[23] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[24] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[25] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[26] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[27] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[28] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[29] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[30] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[31] - (void *)&dmy_ctxt)
++#ifdef __GLIBC__
++#define GET_UC_REGS uc_mcontext.uc_regs
++#else
++#define GET_UC_REGS uc_regs
++#endif
++
++#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[0] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[1] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[2] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[3] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[4] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[5] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[6] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[7] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[8] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[9] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[10] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[11] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[12] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[13] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[14] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[15] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[16] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[17] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[18] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[19] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[20] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[21] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[22] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[23] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[24] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[25] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[26] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[27] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[28] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[29] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[30] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[31] - (void *)&dmy_ctxt)
+
+-#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[MSR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CTR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[LINK_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[XER_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CCR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[SOFTE_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[TRAP_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DAR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DSISR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[RESULT_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[MSR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CTR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.GET_UC_REGS->gregs[LINK_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.GET_UC_REGS->gregs[XER_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CCR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.GET_UC_REGS->gregs[SOFTE_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.GET_UC_REGS->gregs[TRAP_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DAR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DSISR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.GET_UC_REGS->gregs[RESULT_IDX] - (void *)&dmy_ctxt)
+
+-#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[0] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[1] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[2] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[3] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[4] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[5] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[6] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[7] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[8] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[9] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[10] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[11] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[12] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[13] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[14] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[15] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[16] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[17] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[18] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[19] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[20] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[21] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[22] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[23] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[24] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[25] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[26] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[27] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[28] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[29] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[30] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[31] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[32] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[0] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[1] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[2] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[3] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[4] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[5] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[6] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[7] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[8] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[9] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[10] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[11] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[12] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[13] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[14] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[15] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[16] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[17] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[18] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[19] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[20] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[21] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[22] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[23] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[24] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[25] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[26] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[27] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[28] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[29] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[30] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[31] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[32] - (void *)&dmy_ctxt)
+
+ #endif
+diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c
+index 68461a2..fcc43f7 100644
+--- a/src/ptrace/_UPT_reg_offset.c
++++ b/src/ptrace/_UPT_reg_offset.c
+@@ -27,6 +27,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+ #include "_UPT_internal.h"
+
+ #include <stddef.h>
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
++#include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+
+ #ifdef HAVE_ASM_PTRACE_OFFSETS_H
+ # include <asm/ptrace_offsets.h>
+--
+1.8.3.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-x86-Stub-out-x86_local_resume.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch
index 371013aaa..371013aaa 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-x86-Stub-out-x86_local_resume.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
index 0dff2c86d..0dff2c86d 100644
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch
new file mode 100644
index 000000000..79f63fd84
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch
@@ -0,0 +1,37 @@
+If you:
+
+TCLIBC=musl bitbake unwind
+TCLIBC=musl bitbake gcc-runtime -c cleansstate
+TCLIBC=musl bitbake gcc-runtime
+
+you will see libstdc++ fail to build due to finding libunwind's header file.
+
+Khem: "When we build any of gcc components they expect to use internal version
+and that works with glibc based gcc since the search headers first look into gcc
+headers, however with musl the gcc headers are searched after the standard
+headers ( which is by design the right thing )."
+
+This patch hacks around the issue by looking for a define used during gcc-runtime's
+build and skipping to the internal header in that case.
+
+[YOCTO #10129]
+
+RP 2016/8/18
+
+Upstream-Status: Inappropriate [really need to fix gcc]
+
+Index: git/include/unwind.h
+===================================================================
+--- git.orig/include/unwind.h
++++ git/include/unwind.h
+@@ -23,6 +23,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER L
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
++#ifdef _GLIBCXX_SHARED
++#include_next <unwind.h>
++#endif
++
+ #ifndef _UNWIND_H
+ #define _UNWIND_H
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb
deleted file mode 100644
index aff84092a..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require libunwind.inc
-
-SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
- file://Support-building-with-older-compilers.patch \
- file://AArch64-port.patch \
- file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \
- file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \
- file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \
- file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
- file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
-"
-SRC_URI_append_libc-musl = "\
- file://0001-x86-Stub-out-x86_local_resume.patch \
- file://0001-disable-tests.patch \
- file://0001-Fix-build-on-mips-musl.patch \
-"
-SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
-SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"
-
-# http://errors.yoctoproject.org/Errors/Details/20487/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_git.bb b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_git.bb
new file mode 100644
index 000000000..424943087
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libunwind/libunwind_git.bb
@@ -0,0 +1,29 @@
+require libunwind.inc
+
+PV = "1.1+git${SRCPV}"
+
+SRCREV = "bc8698fd7ed13a629a8ec3cb2a89bd74f9d8b5c0"
+
+SRC_URI = "git://git.sv.gnu.org/libunwind.git \
+ file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
+ file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
+ file://0001-x86-Stub-out-x86_local_resume.patch \
+ file://0001-Fix-build-on-mips-musl.patch \
+ file://0001-add-knobs-to-disable-enable-tests.patch \
+ file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
+ "
+
+SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
+EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests "
+
+# http://errors.yoctoproject.org/Errors/Details/20487/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+# see https://sourceware.org/bugzilla/show_bug.cgi?id=19987
+SECURITY_CFLAGS_remove_aarch64 = "-fpie"
+SECURITY_CFLAGS_append_aarch64 = " -fPIE"
+
+S = "${WORKDIR}/git"
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.1.bb b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.1.bb
deleted file mode 100644
index aadc32ff7..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Userspace RCU (read-copy-update) library"
-HOMEPAGE = "http://lttng.org/urcu"
-BUGTRACKER = "http://lttng.org/project/issues"
-
-LICENSE = "LGPLv2.1+ & MIT-style"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
- file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
- file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
-
-SRC_URI = " \
- http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
- file://0001-Support-for-NIOS2-architecture.patch \
- file://0002-Support-for-aarch64_be.patch \
- "
-
-SRC_URI[md5sum] = "124eaeea06863271c0bdf2a0cc1d8e4b"
-SRC_URI[sha256sum] = "f8d278e9d95bec97c9ba954fc4c3fb584936bc0010713a8fe358b916bafd8715"
-
-S = "${WORKDIR}/userspace-rcu-${PV}"
-CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
-inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.2.bb b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.2.bb
new file mode 100644
index 000000000..23fb8c4b4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.2.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Userspace RCU (read-copy-update) library"
+HOMEPAGE = "http://lttng.org/urcu"
+BUGTRACKER = "http://lttng.org/project/issues"
+
+LICENSE = "LGPLv2.1+ & MIT-style"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
+ file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
+ file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
+
+SRC_URI = " \
+ http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
+ file://0001-Support-for-NIOS2-architecture.patch \
+ file://0002-Support-for-aarch64_be.patch \
+ "
+
+SRC_URI[md5sum] = "49f86e68c1e2f41d303381a271b791d1"
+SRC_URI[sha256sum] = "8f7fa313b1e0a3f742cea24ce63a39c0efe63e615a769e2961e55bd2663ecaa3"
+
+S = "${WORKDIR}/userspace-rcu-${PV}"
+CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
+inherit autotools
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
new file mode 100644
index 000000000..71867067b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
@@ -0,0 +1,130 @@
+From ed71ac9548a2bb6ecd2dc5ad880c604975f872b0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 2 Jun 2016 14:20:04 +0300
+Subject: [PATCH] Use pkg-config to find gcrypt and libxml2.
+
+Upstream-Status: Pending [libxml2 is upstreamable]
+
+RP 2014/5/22
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.in | 70 +++++++++++-------------------------------------------------
+ 1 file changed, 12 insertions(+), 58 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 8bdf45a..0b2b312 100644
+--- a/configure.in
++++ b/configure.in
+@@ -377,6 +377,8 @@ AC_SUBST(pythondir)
+ AC_SUBST(PYTHON_SUBDIR)
+ AC_SUBST(PYTHON_LIBS)
+
++PKG_PROG_PKG_CONFIG
++
+ AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
+ WITH_CRYPTO=0
+ CRYPTO_TESTDIR=
+@@ -394,27 +396,14 @@ case $host in
+ CRYPTO_TESTDIR=crypto
+ ;;
+ *)
+- AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+- if test "$LIBGCRYPT_CONFIG" != "no" ; then
+- LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
+- if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
+- then
+- LIBGCRYPT_CFLAGS=""
+- LIBGCRYPT_LIBS=""
+- echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.'
+- else
+- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
+- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
+- AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
+- echo 'Crypto extensions will be available.'
++ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [
++ AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
++ echo 'Crypto extensions will be available.'
+ WITH_CRYPTO=1
+ CRYPTO_TESTDIR=crypto
+- fi
+- else
+- LIBGCRYPT_CFLAGS=""
+- LIBGCRYPT_LIBS=""
+- echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.'
+- fi
++ ], [
++ echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.'
++ ])
+ esac
+ fi
+ AC_SUBST(WITH_CRYPTO)
+@@ -476,24 +465,8 @@ dnl original work - Mathieu Lacage 30/03/2000
+ dnl some tweaking - David Härdeman 30/10/2001
+ dnl
+
+-LIBXML_CONFIG_PREFIX=""
+ LIBXML_SRC=""
+
+-AC_ARG_WITH(libxml-prefix,
+- [ --with-libxml-prefix=[PFX] Specify location of libxml config],
+- LIBXML_CONFIG_PREFIX=$withval
+-)
+-
+-AC_ARG_WITH(libxml-include-prefix,
+- [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
+- LIBXML_CFLAGS="-I$withval"
+-)
+-
+-AC_ARG_WITH(libxml-libs-prefix,
+- [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
+- LIBXML_LIBS="-L$withval"
+-)
+-
+ AC_ARG_WITH(libxml-src,
+ [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)],
+ LIBXML_SRC="$withval"
+@@ -556,28 +529,9 @@ then
+ fi
+ fi
+
+-dnl
+-dnl make sure xml2-config is executable,
+-dnl test version and init our variables
+-dnl
+-
+-if ${XML_CONFIG} --libs print > /dev/null 2>&1
+-then
+- XMLVERS=`$XML_CONFIG --version`
+- if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
+- then
+- AC_MSG_RESULT($XMLVERS found)
+- else
+- AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
+- fi
+- LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`"
+- if test "x$LIBXML_SRC" = "x"; then
+- LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`"
+- fi
+-else
+- AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
+-fi
+-
++PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],,
++ [AC_MSG_ERROR([Could not find libxml-2.0 >= $LIBXML_REQUIRED_VERSION anywhere, check ftp://xmlsoft.org/.])]
++)
+
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CPPFLAGS)
+@@ -602,7 +556,7 @@ fi
+
+ if test "$with_plugins" = "yes" ; then
+ AC_MSG_CHECKING([libxml2 module support])
+- WITH_MODULES="`$XML_CONFIG --modules`"
++ WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
+ if test "${WITH_MODULES}" = "1"; then
+ AC_MSG_RESULT(yes)
+ else
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch
deleted file mode 100644
index f4113efba..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 7ca19df892ca22d9314e95d59ce2abdeff46b617 Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Thu, 29 Oct 2015 19:33:23 +0800
-Subject: Fix for type confusion in preprocessing attributes
-
-CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10
-We need to check that the parent node is an element before dereferencing
-its namespace
-
-Upstream-Status: Backport
-CVE: CVE-2015-7995
-
-https://git.gnome.org/browse/libxslt/commit/?id=7ca19df892ca22d9314e95d59ce2abdeff46b617
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- libxslt/preproc.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-Index: libxslt-1.1.28/libxslt/preproc.c
-===================================================================
---- libxslt-1.1.28.orig/libxslt/preproc.c
-+++ libxslt-1.1.28/libxslt/preproc.c
-@@ -2245,7 +2245,8 @@ xsltStylePreCompute(xsltStylesheetPtr st
- } else if (IS_XSLT_NAME(inst, "attribute")) {
- xmlNodePtr parent = inst->parent;
-
-- if ((parent == NULL) || (parent->ns == NULL) ||
-+ if ((parent == NULL) ||
-+ (parent->type != XML_ELEMENT_NODE) || (parent->ns == NULL) ||
- ((parent->ns != inst->ns) &&
- (!xmlStrEqual(parent->ns->href, inst->ns->href))) ||
- (!xmlStrEqual(parent->name, BAD_CAST "attribute-set"))) {
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch
deleted file mode 100644
index 89d14c944..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-Use pkg-config to find gcrypt and libxml2.
-
-Upstream-Status: Pending [libxml2 is upstreamable]
-
-RP 2014/5/22
-
-Index: libxslt-1.1.28/configure.in
-===================================================================
---- libxslt-1.1.28.orig/configure.in 2014-05-13 16:46:02.278474967 +0000
-+++ libxslt-1.1.28/configure.in 2014-05-13 16:53:56.510472561 +0000
-@@ -376,6 +376,8 @@
- AC_SUBST(PYTHON_SUBDIR)
- AC_SUBST(PYTHON_LIBS)
-
-+PKG_PROG_PKG_CONFIG
-+
- AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
- WITH_CRYPTO=0
- if test "$with_crypto" = "no" ; then
-@@ -391,26 +393,13 @@
- WITH_CRYPTO=1
- ;;
- *)
-- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
-- if test "$LIBGCRYPT_CONFIG" != "no" ; then
-- LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
-- if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
-- then
-- LIBGCRYPT_CFLAGS=""
-- LIBGCRYPT_LIBS=""
-- echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.'
-- else
-- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
-- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
-- AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
-- echo 'Crypto extensions will be available.'
-+ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [
-+ AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
-+ echo 'Crypto extensions will be available.'
- WITH_CRYPTO=1
-- fi
-- else
-- LIBGCRYPT_CFLAGS=""
-- LIBGCRYPT_LIBS=""
-- echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.'
-- fi
-+ ], [
-+ echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.'
-+ ])
- esac
- fi
- AC_SUBST(WITH_CRYPTO)
-@@ -471,24 +460,8 @@
- dnl some tweaking - David Härdeman 30/10/2001
- dnl
-
--LIBXML_CONFIG_PREFIX=""
- LIBXML_SRC=""
-
--AC_ARG_WITH(libxml-prefix,
-- [ --with-libxml-prefix=[PFX] Specify location of libxml config],
-- LIBXML_CONFIG_PREFIX=$withval
--)
--
--AC_ARG_WITH(libxml-include-prefix,
-- [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
-- LIBXML_CFLAGS="-I$withval"
--)
--
--AC_ARG_WITH(libxml-libs-prefix,
-- [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
-- LIBXML_LIBS="-L$withval"
--)
--
- AC_ARG_WITH(libxml-src,
- [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)],
- LIBXML_SRC="$withval"
-@@ -551,28 +524,9 @@
- fi
- fi
-
--dnl
--dnl make sure xml2-config is executable,
--dnl test version and init our variables
--dnl
--
--if ${XML_CONFIG} --libs print > /dev/null 2>&1
--then
-- XMLVERS=`$XML_CONFIG --version`
-- if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
-- then
-- AC_MSG_RESULT($XMLVERS found)
-- else
-- AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
-- fi
-- LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`"
-- if test "x$LIBXML_SRC" = "x"; then
-- LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`"
-- fi
--else
-- AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
--fi
--
-+PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],,
-+ [AC_MSG_ERROR([Could not find libxml-2.0 >= $LIBXML_REQUIRED_VERSION anywhere, check ftp://xmlsoft.org/.])]
-+)
-
- AC_SUBST(CFLAGS)
- AC_SUBST(CPPFLAGS)
-@@ -597,7 +551,7 @@
-
- if test "$with_plugins" = "yes" ; then
- AC_MSG_CHECKING([libxml2 module support])
-- WITH_MODULES="`$XML_CONFIG --modules`"
-+ WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
- if test "${WITH_MODULES}" = "1"; then
- AC_MSG_RESULT(yes)
- else
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb
deleted file mode 100644
index 23ac599de..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb
+++ /dev/null
@@ -1,50 +0,0 @@
-SUMMARY = "GNOME XSLT library"
-HOMEPAGE = "http://xmlsoft.org/XSLT/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
-
-SECTION = "libs"
-DEPENDS = "libxml2"
-
-SRC_URI = "ftp://xmlsoft.org/libxslt/libxslt-${PV}.tar.gz \
- file://pkgconfig_fix.patch \
- file://pkgconfig.patch \
- file://CVE-2015-7995.patch"
-
-SRC_URI[md5sum] = "9667bf6f9310b957254fdcf6596600b7"
-SRC_URI[sha256sum] = "5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c"
-
-UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
-
-S = "${WORKDIR}/libxslt-${PV}"
-
-BINCONFIG = "${bindir}/xslt-config"
-
-inherit autotools pkgconfig binconfig-disabled lib_package
-
-# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
-do_configure_prepend () {
- sed -i -e 's/ansidecl.h//' ${S}/configure.in
-
- # The timestamps in the 1.1.28 tarball are messed up causing this file to
- # appear out of date. Touch it so that we don't try to regenerate it.
- touch ${S}/doc/xsltproc.1
-}
-
-EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
-# older versions of this recipe had ${PN}-utils
-RPROVIDES_${PN}-bin += "${PN}-utils"
-RCONFLICTS_${PN}-bin += "${PN}-utils"
-RREPLACES_${PN}-bin += "${PN}-utils"
-
-
-do_install_append_class-native () {
- create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
-}
-
-FILES_${PN} += "${libdir}/libxslt-plugins"
-FILES_${PN}-dev += "${libdir}/xsltConf.sh"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb
new file mode 100644
index 000000000..be747e608
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.29.bb
@@ -0,0 +1,50 @@
+SUMMARY = "GNOME XSLT library"
+HOMEPAGE = "http://xmlsoft.org/XSLT/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
+
+SECTION = "libs"
+DEPENDS = "libxml2"
+
+SRC_URI = "ftp://xmlsoft.org/libxslt/libxslt-${PV}.tar.gz \
+ file://pkgconfig_fix.patch \
+ file://0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch \
+ "
+
+SRC_URI[md5sum] = "a129d3c44c022de3b9dcf6d6f288d72e"
+SRC_URI[sha256sum] = "b5976e3857837e7617b29f2249ebb5eeac34e249208d31f1fbf7a6ba7a4090ce"
+
+UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
+
+S = "${WORKDIR}/libxslt-${PV}"
+
+BINCONFIG = "${bindir}/xslt-config"
+
+inherit autotools pkgconfig binconfig-disabled lib_package
+
+# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
+do_configure_prepend () {
+ sed -i -e 's/ansidecl.h//' ${S}/configure.in
+
+ # The timestamps in the 1.1.28 tarball are messed up causing this file to
+ # appear out of date. Touch it so that we don't try to regenerate it.
+ touch ${S}/doc/xsltproc.1
+}
+
+EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
+# older versions of this recipe had ${PN}-utils
+RPROVIDES_${PN}-bin += "${PN}-utils"
+RCONFLICTS_${PN}-bin += "${PN}-utils"
+RREPLACES_${PN}-bin += "${PN}-utils"
+
+
+do_install_append_class-native () {
+ create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
+}
+
+FILES_${PN} += "${libdir}/libxslt-plugins"
+FILES_${PN}-dev += "${libdir}/xsltConf.sh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch b/import-layers/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch
deleted file mode 100644
index 61fa7e569..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-# HG changeset patch
-# User Kirill Simonov <xi@resolvent.net>
-# Date 1417197312 21600
-# Node ID 2b9156756423e967cfd09a61d125d883fca6f4f2
-# Parent 053f53a381ff6adbbc93a31ab7fdee06a16c8a33
-Removed invalid simple key assertion (thank to Jonathan Gray).
-
-The patch comes from
-
-https://bitbucket.org/xi/libyaml/commits/2b9156756423e967cfd09a61d125d883fca6f4f2
-
-Upstream-Status: Backport
-CVE: CVE-2014-9130
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
-
-diff -r 053f53a381ff -r 2b9156756423 src/scanner.c
---- a/src/scanner.c Wed Mar 26 13:55:54 2014 -0500
-+++ b/src/scanner.c Fri Nov 28 11:55:12 2014 -0600
-@@ -1106,13 +1106,6 @@
- && parser->indent == (ptrdiff_t)parser->mark.column);
-
- /*
-- * A simple key is required only when it is the first token in the current
-- * line. Therefore it is always allowed. But we add a check anyway.
-- */
--
-- assert(parser->simple_key_allowed || !required); /* Impossible. */
--
-- /*
- * If the current position may start a simple key, save it.
- */
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb b/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb
deleted file mode 100644
index b0155774d..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "LibYAML is a YAML 1.1 parser and emitter written in C."
-DESCRIPTION = "LibYAML is a C library for parsing and emitting data in YAML 1.1, \
-a human-readable data serialization format. "
-HOMEPAGE = "http://pyyaml.org/wiki/LibYAML"
-SECTION = "libs/devel"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17"
-
-SRC_URI = "http://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
- file://libyaml-CVE-2014-9130.patch \
- "
-
-SRC_URI[md5sum] = "5fe00cda18ca5daeb43762b80c38e06e"
-SRC_URI[sha256sum] = "7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749"
-
-S = "${WORKDIR}/yaml-${PV}"
-
-inherit autotools
-
-BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb b/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb
new file mode 100644
index 000000000..5c422ef11
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb
@@ -0,0 +1,20 @@
+SUMMARY = "LibYAML is a YAML 1.1 parser and emitter written in C."
+DESCRIPTION = "LibYAML is a C library for parsing and emitting data in YAML 1.1, \
+a human-readable data serialization format. "
+HOMEPAGE = "http://pyyaml.org/wiki/LibYAML"
+SECTION = "libs/devel"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17"
+
+SRC_URI = "http://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
+ "
+
+SRC_URI[md5sum] = "1abf45bd3a96374fa55ca63b32f9f2f9"
+SRC_URI[sha256sum] = "8088e457264a98ba451a90b8661fcb4f9d6f478f7265d48322a196cec2480729"
+
+S = "${WORKDIR}/yaml-${PV}"
+
+inherit autotools
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest
index 2ea7745f7..6acb89fc1 100644
--- a/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest
+++ b/import-layers/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest
@@ -1,8 +1,33 @@
#!/bin/sh
./lzotest -mavail -n10 -q /etc/services
+if [ $? -eq 0 ]; then
+ echo 'PASS: lzotest'
+else
+ echo 'FAIL: lzotest'
+fi
LZOTEST=./lzotest /bin/sh -e "./check.sh" "/etc"
./align
+if [ $? -eq 0 ]; then
+ echo 'PASS: align'
+else
+ echo 'FAIL: align'
+fi
./chksum
+if [ $? -eq 0 ]; then
+ echo 'PASS: chksum'
+else
+ echo 'FAIL: chksum'
+fi
./simple
+if [ $? -eq 0 ]; then
+ echo 'PASS: simple'
+else
+ echo 'FAIL: simple'
+fi
./testmini
+if [ $? -eq 0 ]; then
+ echo 'PASS: testmini'
+else
+ echo 'FAIL: testmini'
+fi
diff --git a/import-layers/yocto-poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch b/import-layers/yocto-poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch
new file mode 100644
index 000000000..72b33970e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch
@@ -0,0 +1,37 @@
+gcc-6 has additional errors e.g.
+
+./test.c:1:12: error: variably modified '__acc_cta' at file scope
+ extern int __acc_cta[1-2*!((1l << (8*8 -1)) < 0)];
+ ^~~~~~~~~
+
+This is rightly pointed out since that index is undefined
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+--- a/src/miniacc.h.orig 2016-02-10 16:09:23.247315866 +0100
++++ a/src/miniacc.h 2016-02-10 16:12:14.973297054 +0100
+@@ -4469,12 +4469,12 @@
+ #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
+ #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
+ #else
+- ACCCHK_ASSERT((1 << (8*SIZEOF_INT-1)) < 0)
++ ACCCHK_ASSERT((int)(1u << (8*SIZEOF_INT-1)) < 0)
+ #endif
+ ACCCHK_ASSERT((1u << (8*SIZEOF_INT-1)) > 0)
+ #if 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
+ #else
+- ACCCHK_ASSERT((1l << (8*SIZEOF_LONG-1)) < 0)
++ ACCCHK_ASSERT((long)(1ul << (8*SIZEOF_LONG-1)) < 0)
+ #endif
+ ACCCHK_ASSERT((1ul << (8*SIZEOF_LONG-1)) > 0)
+ #if defined(acc_int16e_t)
+@@ -4703,7 +4703,7 @@
+ #elif 1 && (ACC_CC_LCC || ACC_CC_LCCWIN32) && !defined(ACCCHK_CFG_PEDANTIC)
+ #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
+ #elif !(ACC_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1)
+- ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
++ ACCCHK_ASSERT( (int)((unsigned int)((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
+ #endif
+ #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560))
+ # pragma option pop
diff --git a/import-layers/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb b/import-layers/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb
index 07d628908..649e7243e 100644
--- a/import-layers/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb
@@ -15,15 +15,15 @@ SRC_URI = "http://www.lzop.org/download/${BP}.tar.gz \
file://acinclude.m4 \
file://x32_abi_miniacc_h.patch \
file://0001-use-static-inlines-as-the-external-inline-definition.patch \
+ file://lzop-1.03-gcc6.patch \
"
SRC_URI[md5sum] = "006c5e27fb78cdd14a628fdfa5aa1905"
SRC_URI[sha256sum] = "c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9"
inherit autotools
-do_configure () {
- ln -sf ../acinclude.m4 ${S}/acinclude.m4
- autotools_do_configure
+do_configure_prepend () {
+ install -Dm 0644 ${WORKDIR}/acinclude.m4 ${S}/acinclude.m4
}
BBCLASSEXTEND += "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr-3.1.3/long-long-thumb.patch b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch
index ca7100eb2..ca7100eb2 100644
--- a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr-3.1.3/long-long-thumb.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch
diff --git a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb
deleted file mode 100644
index ee8a23893..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require mpfr.inc
-
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
- file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6"
-DEPENDS = "gmp"
-
-SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz \
- file://long-long-thumb.patch \
- "
-
-SRC_URI[md5sum] = "6969398cd2fbc56a6af570b5273c56a9"
-SRC_URI[sha256sum] = "6835a08bd992c8257641791e9a6a2b35b02336c8de26d0a8577953747e514a16"
-
-UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/"
-
-S = "${WORKDIR}/mpfr-${PV}"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.4.bb b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.4.bb
new file mode 100644
index 000000000..230a86208
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.4.bb
@@ -0,0 +1,18 @@
+require mpfr.inc
+
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6"
+DEPENDS = "gmp"
+
+SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz \
+ file://long-long-thumb.patch \
+ "
+SRC_URI[md5sum] = "064b2c18185038e404a401b830d59be8"
+SRC_URI[sha256sum] = "761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5"
+
+UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/"
+
+S = "${WORKDIR}/mpfr-${PV}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
index d4df0a3a8..ae8e3119f 100644
--- a/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
@@ -1,6 +1,6 @@
require nettle.inc
-LICENSE = "LGPLv2.1 & GPLv2"
+LICENSE = "LGPLv2.1+ & GPLv2"
LICENSE_${PN} = "LGPLv2.1+"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
diff --git a/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.2.bb b/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.2.bb
index 1b3962e64..66aa3474b 100644
--- a/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/npth/npth_1.2.bb
@@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "\
file://COPYING;md5=751419260aa954499f7abaabaa882bbe\
file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6\
"
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/npth/npth-${PV}.tar.bz2 \
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/npth/npth-${PV}.tar.bz2 \
file://pkgconfig.patch \
"
diff --git a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb
index 168341bc0..fa6d52357 100644
--- a/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb
@@ -147,6 +147,9 @@ TESTS = " \
inherit autotools
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
do_compile_prepend() {
oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export
}
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch
deleted file mode 100644
index cb3ad0068..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 8758c6a4508a5ca01505a8d69a269c912ce10bee Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Mon, 18 Jan 2016 18:26:16 +0000
-Subject: [PATCH] Fix build failure on opensuse 13.1
-
-Upstream-Status: Inappropriate [gcc 4.8 specific issue]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- nss/cmd/modutil/install-ds.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/nss/cmd/modutil/install-ds.h b/nss/cmd/modutil/install-ds.h
-index 3a3afb3..433efe0 100644
---- a/nss/cmd/modutil/install-ds.h
-+++ b/nss/cmd/modutil/install-ds.h
-@@ -243,7 +243,7 @@ struct Pk11Install_Info_str {
- Pk11Install_Info*
- Pk11Install_Info_new();
- void
--Pk11Install_Info_init();
-+Pk11Install_Info_init(Pk11Install_Info* _this);
- void
- Pk11Install_Info_delete(Pk11Install_Info* _this);
- /*// Returns NULL for success, error message if parse error.*/
---
-1.8.4.5
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
new file mode 100644
index 000000000..86b1b6055
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
@@ -0,0 +1,33 @@
+clang 3.9 add this warning to rightly flag undefined
+behavior, we relegate this to be just a warning instead
+of error and keep the behavior as it was. Right fix would
+be to not pass enum to the function with variadic arguments
+as last named argument
+
+Fixes errors like
+ocsp.c:2220:22: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
+ va_start(ap, responseType0);
+ ^
+ocsp.c:2200:43: note: parameter of type 'SECOidTag' is declared here
+ SECOidTag responseType0, ...)
+
+see
+https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start
+for more details
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: nss-3.24/nss/coreconf/Werror.mk
+===================================================================
+--- nss-3.24.orig/nss/coreconf/Werror.mk
++++ nss-3.24/nss/coreconf/Werror.mk
+@@ -54,7 +54,7 @@ ifndef WARNING_CFLAGS
+ ifdef CC_IS_CLANG
+ # -Qunused-arguments : clang objects to arguments that it doesn't understand
+ # and fixing this would require rearchitecture
+- WARNING_CFLAGS += -Qunused-arguments
++ WARNING_CFLAGS += -Qunused-arguments -Wno-error=varargs
+ # -Wno-parentheses-equality : because clang warns about macro expansions
+ WARNING_CFLAGS += $(call disable_warning,parentheses-equality)
+ ifdef BUILD_OPT
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
index 866de07ea..181c69adb 100644
--- a/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
@@ -16,11 +16,11 @@ Upstream-Status: Pending
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
===================================================
-diff --git a/nss/coreconf/nsinstall/Makefile b/nss/coreconf/nsinstall/Makefile
-index 1850bcb..5aee84f 100644
---- a/nss/coreconf/nsinstall/Makefile
-+++ b/nss/coreconf/nsinstall/Makefile
-@@ -18,6 +18,12 @@ INTERNAL_TOOLS = 1
+Index: nss-3.24/nss/coreconf/nsinstall/Makefile
+===================================================================
+--- nss-3.24.orig/nss/coreconf/nsinstall/Makefile
++++ nss-3.24/nss/coreconf/nsinstall/Makefile
+@@ -18,6 +18,13 @@ INTERNAL_TOOLS = 1
include $(DEPTH)/coreconf/config.mk
@@ -29,6 +29,7 @@ index 1850bcb..5aee84f 100644
+# to clean the '-m64' from ARCHFLAG and LDFLAGS.
+ARCHFLAG =
+LDFLAGS =
++CFLAGS =
+
ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
PROGRAM =
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/import-layers/yocto-poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
new file mode 100644
index 000000000..9caaaeb95
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
@@ -0,0 +1,23 @@
+nss does not build on mips with clang because wrong types are used?
+
+pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
+ if (addend < MP_DIGIT_MAX) {
+ ~~~~~~ ^ ~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: nss-3.24/nss/lib/freebl/pqg.c
+===================================================================
+--- nss-3.24.orig/nss/lib/freebl/pqg.c
++++ nss-3.24/nss/lib/freebl/pqg.c
+@@ -322,8 +322,8 @@ generate_h_candidate(SECItem *hit, mp_in
+
+ static SECStatus
+ addToSeed(const SECItem * seed,
+- unsigned long addend,
+- int seedlen, /* g in 186-1 */
++ unsigned long long addend,
++ int seedlen, /* g in 186-1 */
+ SECItem * seedout)
+ {
+ mp_int s, sum, modulus, tmp;
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.21.bb b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.21.bb
deleted file mode 100644
index d2e24112d..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.21.bb
+++ /dev/null
@@ -1,240 +0,0 @@
-SUMMARY = "Mozilla's SSL and TLS implementation"
-DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
-designed to support cross-platform development of \
-security-enabled client and server applications. \
-Applications built with NSS can support SSL v2 and v3, \
-TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
-v3 certificates, and other security standards."
-HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
-SECTION = "libs"
-
-LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
-
-LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
- file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
- file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
-
-SRC_URI = "\
- http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_21_RTM/src/${BP}.tar.gz \
- file://nss-fix-support-cross-compiling.patch \
- file://nss-no-rpath-for-cross-compiling.patch \
- file://nss-fix-incorrect-shebang-of-perl.patch \
- file://nss-fix-nsinstall-build.patch \
- file://0001-Fix-build-failure-on-opensuse-13.1.patch \
- file://nss.pc.in \
- file://signlibs.sh \
-"
-
-SRC_URI[md5sum] = "3c8b2ed880dd3a8d86c9e0151afe6eba"
-SRC_URI[sha256sum] = "3f7a5b027d7cdd5c0e4ff7544da33fdc6f56c2f8c27fff02938fd4a6fbe87239"
-
-UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
-UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
-
-inherit siteinfo
-
-DEPENDS = "sqlite3 nspr zlib nss-native"
-DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
-RDEPENDS_${PN}-smime = "perl"
-
-TD = "${S}/tentative-dist"
-TDS = "${S}/tentative-dist-staging"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_configure_prepend_libc-musl () {
- sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
-}
-
-do_compile_prepend_class-native() {
- export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
- export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
-}
-
-do_compile_prepend_class-nativesdk() {
- export LDFLAGS=""
-}
-
-do_compile_prepend_class-native() {
- # Need to set RPATH so that chrpath will do its job correctly
- RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
-}
-
-do_compile() {
- export CROSS_COMPILE=1
- export NATIVE_CC="gcc"
- export BUILD_OPT=1
-
- export FREEBL_NO_DEPEND=1
- export FREEBL_LOWHASH=1
-
- export LIBDIR=${libdir}
- export MOZILLA_CLIENT=1
- export NS_USE_GCC=1
- export NSS_USE_SYSTEM_SQLITE=1
- export NSS_ENABLE_ECC=1
-
- export OS_RELEASE=3.4
- export OS_TARGET=Linux
- export OS_ARCH=Linux
-
- if [ "${TARGET_ARCH}" = "powerpc" ]; then
- OS_TEST=ppc
- elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
- OS_TEST=ppc64
- elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
- OS_TEST=mips
- else
- OS_TEST="${TARGET_ARCH}"
- fi
-
- if [ "${SITEINFO_BITS}" = "64" ]; then
- export USE_64=1
- elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
- export USE_X32=1
- fi
-
- export NSS_DISABLE_GTESTS=1
-
- # We can modify CC in the environment, but if we set it via an
- # argument to make, nsinstall, a host program, will also build with it!
- #
- export CC="${CC} -g"
- make -C ./nss CCC="${CXX} -g" \
- OS_TEST=${OS_TEST} \
- RPATH="${RPATH}"
-}
-
-
-do_install_prepend_class-nativesdk() {
- export LDFLAGS=""
-}
-
-do_install() {
- export CROSS_COMPILE=1
- export NATIVE_CC="gcc"
- export BUILD_OPT=1
-
- export FREEBL_NO_DEPEND=1
-
- export LIBDIR=${libdir}
- export MOZILLA_CLIENT=1
- export NS_USE_GCC=1
- export NSS_USE_SYSTEM_SQLITE=1
- export NSS_ENABLE_ECC=1
-
- export OS_RELEASE=3.4
- export OS_TARGET=Linux
- export OS_ARCH=Linux
-
- if [ "${TARGET_ARCH}" = "powerpc" ]; then
- OS_TEST=ppc
- elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
- OS_TEST=ppc64
- elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
- OS_TEST=mips
- else
- OS_TEST="${TARGET_ARCH}"
- fi
- if [ "${SITEINFO_BITS}" = "64" ]; then
- export USE_64=1
- elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
- export USE_X32=1
- fi
-
- export NSS_DISABLE_GTESTS=1
-
- make -C ./nss \
- CCC="${CXX}" \
- OS_TEST=${OS_TEST} \
- SOURCE_LIB_DIR="${TD}/${libdir}" \
- SOURCE_BIN_DIR="${TD}/${bindir}" \
- install
-
- install -d ${D}/${libdir}/
- for file in ${S}/dist/*.OBJ/lib/*.so; do
- echo "Installing `basename $file`..."
- cp $file ${D}/${libdir}/
- done
-
- for shared_lib in ${TD}/${libdir}/*.so.*; do
- if [ -f $shared_lib ]; then
- cp $shared_lib ${D}/${libdir}
- ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
- fi
- done
- for shared_lib in ${TD}/${libdir}/*.so; do
- if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
- cp $shared_lib ${D}/${libdir}
- fi
- done
-
- install -d ${D}/${includedir}/nss3
- install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
-
- install -d ${D}/${bindir}
- for binary in ${TD}/${bindir}/*; do
- install -m 755 -t ${D}/${bindir} $binary
- done
-}
-
-do_install_append() {
- # Create empty .chk files for the NSS libraries at build time. They could
- # be regenerated at target's boot time.
- for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
- touch ${D}/${libdir}/$file
- chmod 755 ${D}/${libdir}/$file
- done
- install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
-
- install -d ${D}${libdir}/pkgconfig/
- sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
- sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
-}
-
-do_install_append_class-target() {
- # Create a blank certificate
- mkdir -p ${D}${sysconfdir}/pki/nssdb/
- touch ./empty_password
- certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
- chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
- rm ./empty_password
-}
-
-pkg_postinst_${PN} () {
- if [ -n "$D" ]; then
- for I in $D/${libdir}/lib*.chk; do
- DN=`dirname $I`
- BN=`basename $I .chk`
- FN=$DN/$BN.so
- shlibsign -i $FN
- if [ $? -ne 0 ]; then
- exit 1
- fi
- done
- exit 0
- fi
- signlibs.sh
-}
-
-PACKAGES =+ "${PN}-smime"
-FILES_${PN}-smime = "\
- ${bindir}/smime \
-"
-FILES_${PN} = "\
- ${sysconfdir} \
- ${bindir} \
- ${libdir}/lib*.chk \
- ${libdir}/lib*.so \
- "
-FILES_${PN}-dev = "\
- ${libdir}/nss \
- ${libdir}/pkgconfig/* \
- ${includedir}/* \
- "
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.25.bb b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.25.bb
new file mode 100644
index 000000000..eff09ebbd
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/nss/nss_3.25.bb
@@ -0,0 +1,242 @@
+SUMMARY = "Mozilla's SSL and TLS implementation"
+DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
+designed to support cross-platform development of \
+security-enabled client and server applications. \
+Applications built with NSS can support SSL v2 and v3, \
+TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
+v3 certificates, and other security standards."
+HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
+SECTION = "libs"
+
+LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
+
+LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
+ file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
+ file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
+
+SRC_URI = "\
+ http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_25_RTM/src/${BP}.tar.gz \
+ file://nss-fix-support-cross-compiling.patch \
+ file://nss-no-rpath-for-cross-compiling.patch \
+ file://nss-fix-incorrect-shebang-of-perl.patch \
+ file://nss-fix-nsinstall-build.patch \
+ file://disable-Wvarargs-with-clang.patch \
+ file://pqg.c-ULL_addend.patch \
+ file://nss.pc.in \
+ file://signlibs.sh \
+"
+SRC_URI[md5sum] = "23169c406adc8ac3672d34bf9ea2433d"
+SRC_URI[sha256sum] = "5d1ad475da19d0c033a716350dc5f8a747999d3eba5ac07ee0368c5bad6e2359"
+
+UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
+UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
+
+inherit siteinfo
+
+DEPENDS = "sqlite3 nspr zlib nss-native"
+DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
+RDEPENDS_${PN}-smime = "perl"
+
+TD = "${S}/tentative-dist"
+TDS = "${S}/tentative-dist-staging"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_configure_prepend_libc-musl () {
+ sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
+}
+
+do_compile_prepend_class-native() {
+ export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
+ export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
+ export NSS_ENABLE_WERROR=0
+}
+
+do_compile_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_compile_prepend_class-native() {
+ # Need to set RPATH so that chrpath will do its job correctly
+ RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
+}
+
+do_compile() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="gcc"
+ export NATIVE_FLAGS="${HOST_CFLAGS}"
+ export BUILD_OPT=1
+
+ export FREEBL_NO_DEPEND=1
+ export FREEBL_LOWHASH=1
+
+ export LIBDIR=${libdir}
+ export MOZILLA_CLIENT=1
+ export NS_USE_GCC=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+
+ export OS_RELEASE=3.4
+ export OS_TARGET=Linux
+ export OS_ARCH=Linux
+
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ OS_TEST=ppc
+ elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ OS_TEST=ppc64
+ elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+ OS_TEST=mips
+ else
+ OS_TEST="${TARGET_ARCH}"
+ fi
+
+ if [ "${SITEINFO_BITS}" = "64" ]; then
+ export USE_64=1
+ elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+ export USE_X32=1
+ fi
+
+ export NSS_DISABLE_GTESTS=1
+
+ # We can modify CC in the environment, but if we set it via an
+ # argument to make, nsinstall, a host program, will also build with it!
+ #
+ export CC="${CC} -g"
+ make -C ./nss CCC="${CXX} -g" \
+ OS_TEST=${OS_TEST} \
+ RPATH="${RPATH}"
+}
+
+
+do_install_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_install() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="gcc"
+ export BUILD_OPT=1
+
+ export FREEBL_NO_DEPEND=1
+
+ export LIBDIR=${libdir}
+ export MOZILLA_CLIENT=1
+ export NS_USE_GCC=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+
+ export OS_RELEASE=3.4
+ export OS_TARGET=Linux
+ export OS_ARCH=Linux
+
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ OS_TEST=ppc
+ elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ OS_TEST=ppc64
+ elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+ OS_TEST=mips
+ else
+ OS_TEST="${TARGET_ARCH}"
+ fi
+ if [ "${SITEINFO_BITS}" = "64" ]; then
+ export USE_64=1
+ elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+ export USE_X32=1
+ fi
+
+ export NSS_DISABLE_GTESTS=1
+
+ make -C ./nss \
+ CCC="${CXX}" \
+ OS_TEST=${OS_TEST} \
+ SOURCE_LIB_DIR="${TD}/${libdir}" \
+ SOURCE_BIN_DIR="${TD}/${bindir}" \
+ install
+
+ install -d ${D}/${libdir}/
+ for file in ${S}/dist/*.OBJ/lib/*.so; do
+ echo "Installing `basename $file`..."
+ cp $file ${D}/${libdir}/
+ done
+
+ for shared_lib in ${TD}/${libdir}/*.so.*; do
+ if [ -f $shared_lib ]; then
+ cp $shared_lib ${D}/${libdir}
+ ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
+ fi
+ done
+ for shared_lib in ${TD}/${libdir}/*.so; do
+ if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
+ cp $shared_lib ${D}/${libdir}
+ fi
+ done
+
+ install -d ${D}/${includedir}/nss3
+ install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
+
+ install -d ${D}/${bindir}
+ for binary in ${TD}/${bindir}/*; do
+ install -m 755 -t ${D}/${bindir} $binary
+ done
+}
+
+do_install_append() {
+ # Create empty .chk files for the NSS libraries at build time. They could
+ # be regenerated at target's boot time.
+ for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
+ touch ${D}/${libdir}/$file
+ chmod 755 ${D}/${libdir}/$file
+ done
+ install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
+
+ install -d ${D}${libdir}/pkgconfig/
+ sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
+}
+
+do_install_append_class-target() {
+ # Create a blank certificate
+ mkdir -p ${D}${sysconfdir}/pki/nssdb/
+ touch ./empty_password
+ certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
+ chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
+ rm ./empty_password
+}
+
+pkg_postinst_${PN} () {
+ if [ -n "$D" ]; then
+ for I in $D/${libdir}/lib*.chk; do
+ DN=`dirname $I`
+ BN=`basename $I .chk`
+ FN=$DN/$BN.so
+ shlibsign -i $FN
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ done
+ exit 0
+ fi
+ signlibs.sh
+}
+
+PACKAGES =+ "${PN}-smime"
+FILES_${PN}-smime = "\
+ ${bindir}/smime \
+"
+FILES_${PN} = "\
+ ${sysconfdir} \
+ ${bindir} \
+ ${libdir}/lib*.chk \
+ ${libdir}/lib*.so \
+ "
+FILES_${PN}-dev = "\
+ ${libdir}/nss \
+ ${libdir}/pkgconfig/* \
+ ${includedir}/* \
+ "
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb b/import-layers/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
index a4efff161..38fa09bf9 100644
--- a/import-layers/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
@@ -2,7 +2,7 @@ SUMMARY = "Provides a way to load and enumerate PKCS#11 modules"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50"
-inherit autotools gettext pkgconfig upstream-version-is-even
+inherit autotools gettext pkgconfig upstream-version-is-even gtk-doc
DEPENDS = "libtasn1 libffi"
@@ -12,6 +12,26 @@ SRC_URI[sha256sum] = "ef3a339fcf6aa0e32c8c23f79ba7191e57312be2bda8b24e6d121c2670
EXTRA_OECONF = "--without-trust-paths"
+# This recipe does not use the standard gtk-doc m4 macros, and so the ./configure flags
+# that control gtk-doc build are non-standard
+EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-doc --enable-doc-html --disable-doc-pdf', \
+ '--disable-doc', d)} "
+
+# When building native recipes, disable gtkdoc, as it is not necessary,
+# pulls in additional dependencies, and makes build times longer
+EXTRA_OECONF_prepend_class-native = "--disable-doc "
+EXTRA_OECONF_prepend_class-nativesdk = "--disable-doc "
+
+UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-gtk-doc-html --disable-gtk-doc-pdf --enable-gtk-doc --disable-gtk-doc"
+
+# p11-kit relies on these two being copied from source tree
+# instead of being regenerated by gtkdoc-scan, but doesn't setup
+# dependencies correctly when there is a parallel build. Let's pre-copy
+# them instead.
+do_compile_prepend () {
+ cp ${S}/doc/manual/p11-kit-overrides.txt ${S}/doc/manual/p11-kit-sections.txt ${B}/doc/manual/
+}
+
FILES_${PN} += " \
${libdir}/p11-kit-proxy.so \
${libdir}/pkcs11/*.so \
diff --git a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb
index d6b713020..d315a99d4 100644
--- a/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb
@@ -12,7 +12,8 @@ inherit autotools
DEPENDS = "gettext-native"
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2"
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2"
SRC_URI[md5sum] = "f51d454f921111b5156a2291cbf70278"
SRC_URI[sha256sum] = "fd8bc1592ceb22bb492b07cb29b1b140bb882c859e6503b974254c0a4b4134d1"
diff --git a/import-layers/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch b/import-layers/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
index 91bca96a5..7d74aadff 100644
--- a/import-layers/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
+++ b/import-layers/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
@@ -4,7 +4,7 @@ This patch avoids this error with automake 1.12:
| configure.ac:49: error: automatic de-ANSI-fication support has been removed
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
2012/05/02
Index: popt-1.16/configure.ac
diff --git a/import-layers/yocto-poky/meta/recipes-support/popt/popt_1.16.bb b/import-layers/yocto-poky/meta/recipes-support/popt/popt_1.16.bb
index cb13a815e..478288f9b 100644
--- a/import-layers/yocto-poky/meta/recipes-support/popt/popt_1.16.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/popt/popt_1.16.bb
@@ -6,6 +6,8 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"
PR = "r3"
+DEPENDS = "virtual/libiconv"
+
SRC_URI = "http://rpm5.org/files/popt/popt-${PV}.tar.gz \
file://pkgconfig_fix.patch \
file://popt_fix_for_automake-1.12.patch \
diff --git a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb
index 7081afbeb..9d4551389 100644
--- a/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb
@@ -7,8 +7,8 @@ HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
-SRCREV = "8bfdf946e784f4d5757bebee1fbc4b4a3d7a95c4"
-PV = "2.0+git${SRCPV}"
+SRCREV = "e2aa4256745377b784c8691f546041b59f6e046b"
+PV = "2.0.1+git${SRCPV}"
SRC_URI = "git://git.yoctoproject.org/ptest-runner2"
S = "${WORKDIR}/git"
@@ -22,5 +22,5 @@ do_compile () {
}
do_install () {
- install -D -m 0755 ${WORKDIR}/git/ptest-runner ${D}${bindir}/ptest-runner
+ install -D -m 0755 ${S}/ptest-runner ${D}${bindir}/ptest-runner
}
diff --git a/import-layers/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb b/import-layers/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb
index b5059d546..c498d9097 100644
--- a/import-layers/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb
@@ -1,11 +1,13 @@
SUMMARY = "High-Performance Asynchronous HTTP Client Library"
-SRC_URI = "${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.gz \
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/s/${BPN}/${BPN}_${PV}.orig.tar.gz \
file://norpath.patch \
file://env.patch"
SRC_URI[md5sum] = "713beaf05d7f3329de121e218e2fcb93"
SRC_URI[sha256sum] = "77134cd5010664ca023585bce50978bd4005906ed280ff889f591f86df7c59e4"
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/s/serf/"
+
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
diff --git a/import-layers/yocto-poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch b/import-layers/yocto-poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch
new file mode 100644
index 000000000..b0aa5d173
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch
@@ -0,0 +1,30 @@
+From 9aa01fd5f9d8b2b98c34684dc8f68115750ef41c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 12 Jul 2016 17:15:13 +0300
+Subject: [PATCH] source-highlight.pc.in: do not add Boost's libraries and
+ includes
+
+This breaks when compiling in sysroots; a proper way is to use Depends
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ source-highlight.pc.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/source-highlight.pc.in b/source-highlight.pc.in
+index 79ab63e..64114a7 100644
+--- a/source-highlight.pc.in
++++ b/source-highlight.pc.in
+@@ -7,6 +7,6 @@ Name: libsource-highlight
+ Description: GNU Source-highlight library.
+ URL: http://www.gnu.org/software/src-highlite/
+ Version: @VERSION@
+-Libs: -L${libdir} -lsource-highlight @BOOST_LDFLAGS@ @BOOST_REGEX_LIB@
+-Cflags: -I${includedir} @BOOST_CPPFLAGS@
++Libs: -L${libdir} -lsource-highlight
++Cflags: -I${includedir}
+
+--
+2.8.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb b/import-layers/yocto-poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb
new file mode 100644
index 000000000..85923e475
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Syntax highlight utility"
+DESCRIPTION = "Source-highlight converts source code to formatted text with syntax highlighting."
+HOMEPAGE = "https://www.gnu.org/software/src-highlite/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ff95bfe019feaf92f524b73dd79e76eb"
+
+SRC_URI = "${GNU_MIRROR}/src-highlite/${BPN}-${PV}.tar.gz \
+ file://0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch"
+SRC_URI[md5sum] = "3243470706ef5fefdc3e43b5306a4e41"
+SRC_URI[sha256sum] = "01336a7ea1d1ccc374201f7b81ffa94d0aecb33afc7d6903ebf9fbf33a55ada3"
+
+inherit autotools
+
+DEPENDS_append = " boost"
+
+DEPENDS_append_class-target = " source-highlight-native"
+
+EXTRA_OECONF = "--with-boost=yes --with-boost-libdir=${STAGING_DIR_TARGET}${libdir}"
+
+BBCLASSEXTEND = "native"
+
+# source-highlight is using its own binary from the build tree to make documentation
+# let's substitute the native binary instead
+do_configure_prepend_class-target () {
+ sed -i -e 's,^SRCHILITEEXE = $(top_builddir).*,SRCHILITEEXE = source-highlight,' ${S}/doc/Makefile.am
+}
+
+RDEPENDS_source-highlight += "bash"
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/files/0001-revert-ad601c7962-that-brings-2-increase-of-build-ti.patch b/import-layers/yocto-poky/meta/recipes-support/sqlite/files/0001-revert-ad601c7962-that-brings-2-increase-of-build-ti.patch
new file mode 100644
index 000000000..26540b241
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/sqlite/files/0001-revert-ad601c7962-that-brings-2-increase-of-build-ti.patch
@@ -0,0 +1,56 @@
+From 4b286b441e8efa9a34eb0db8227748ebffd91c35 Mon Sep 17 00:00:00 2001
+From: Jianxun Zhang <jianxun.zhang@linux.intel.com>
+Date: Thu, 13 Oct 2016 09:24:21 -0700
+Subject: [PATCH] revert ad601c7962 that brings 2% increase of build time.
+
+The comment of the change in sqlite fossil project is:
+"For in-memory databases, it does not matter if pcache
+entries are marked "clean" or "writable"."
+
+Upstream Status: Inappropriate
+
+Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
+---
+ sqlite3.c | 12 +++---------
+ 1 file changed, 3 insertions(+), 9 deletions(-)
+
+diff --git a/sqlite3.c b/sqlite3.c
+index ccddfe6..ecae550 100644
+--- a/sqlite3.c
++++ b/sqlite3.c
+@@ -13146,7 +13146,7 @@ struct PgHdr {
+ sqlite3_pcache_page *pPage; /* Pcache object page handle */
+ void *pData; /* Page data */
+ void *pExtra; /* Extra content */
+- PgHdr *pDirty; /* Transient list of dirty sorted by pgno */
++ PgHdr *pDirty; /* Transient list of dirty pages */
+ Pager *pPager; /* The pager this page is part of */
+ Pgno pgno; /* Page number for this page */
+ #ifdef SQLITE_CHECK_PAGES
+@@ -43504,13 +43504,7 @@ bitvec_end:
+ /* #include "sqliteInt.h" */
+
+ /*
+-** A complete page cache is an instance of this structure. Every
+-** entry in the cache holds a single page of the database file. The
+-** btree layer only operates on the cached copy of the database pages.
+-**
+-** A page cache entry is "clean" if it exactly matches what is currently
+-** on disk. A page is "dirty" if it has been modified and needs to be
+-** persisted to disk.
++** A complete page cache is an instance of this structure.
+ **
+ ** pDirty, pDirtyTail, pSynced:
+ ** All dirty pages are linked into the doubly linked list using
+@@ -48314,7 +48308,7 @@ static int pager_end_transaction(Pager *pPager, int hasMaster, int bCommit){
+ pPager->pInJournal = 0;
+ pPager->nRec = 0;
+ if( rc==SQLITE_OK ){
+- if( pagerFlushOnCommit(pPager, bCommit) ){
++ if( MEMDB || pagerFlushOnCommit(pPager, bCommit) ){
+ sqlite3PcacheCleanAll(pPager->pPCache);
+ }else{
+ sqlite3PcacheClearWritable(pPager->pPCache);
+--
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch
deleted file mode 100644
index 6f39ae266..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From ede5db83e38cc8ad8c9be291cd8985f7ad99f291 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy <armccurdy@gmail.com>
-Date: Tue, 16 Feb 2016 14:00:00 -0800
-Subject: [PATCH] fix --disable-static-shell
-
-Upstream sqlite seems to be moving further and further away from
-allowing the sqlite3 command line tool to be dynamically linked with
-sqlite.
-
-The --disable-static-shell configure option added in 3.10.0 no longer
-has any effect in 3.11.0. For now patch things up and make it work.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
----
- Makefile.am | 13 +++++++++++--
- configure.ac | 2 +-
- 2 files changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 0e09cfc..608c0fd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -6,9 +6,18 @@ libsqlite3_la_SOURCES = sqlite3.c
- libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
-
- bin_PROGRAMS = sqlite3
--sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h
--sqlite3_LDADD = @READLINE_LIBS@
-+sqlite3_SOURCES = shell.c sqlite3.h
-+EXTRA_sqlite3_SOURCES = sqlite3.c
-+sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@
- sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@
-+
-+# Warning: Adding SQLITE_ENABLE_EXPLAIN_COMMENTS to sqlite3_CFLAGS doesn't
-+# actually have any effect if we link the sqlite3 command line tool with the
-+# libsqlite3.so shared library (which will contain a version of sqlite3.c
-+# compiled with the default AM_CFLAGS above). If SQLITE_ENABLE_EXPLAIN_COMMENTS
-+# debug is required, then sqlite3 must not be configured with
-+# --disable-static-shell
-+
- sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- include_HEADERS = sqlite3.h sqlite3ext.h
-diff --git a/configure.ac b/configure.ac
-index 8e7fd69..ada559e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -130,7 +130,7 @@ AC_ARG_ENABLE(static-shell, [AS_HELP_STRING(
- [statically link libsqlite3 into shell tool [default=yes]])],
- [], [enable_static_shell=yes])
- if test x"$enable_static_shell" == "xyes"; then
-- EXTRA_SHELL_OBJ=sqlite3.$OBJEXT
-+ EXTRA_SHELL_OBJ=sqlite3-sqlite3.$OBJEXT
- else
- EXTRA_SHELL_OBJ=libsqlite3.la
- fi
---
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb
deleted file mode 100644
index 992d20cd5..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require sqlite3.inc
-
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0"
-
-SRC_URI = "http://www.sqlite.org/2016/sqlite-autoconf-${SQLITE_PV}.tar.gz \
- file://fix-disable-static-shell.patch \
-"
-
-SRC_URI[md5sum] = "a6cdc3e0a6e5087d620037ae0c48720d"
-SRC_URI[sha256sum] = "508d4dcbcf7a7181e95c717a1dc4ae3c0880b3d593be0c4b40abb6c3a0e201fb"
diff --git a/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.14.1.bb b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.14.1.bb
new file mode 100644
index 000000000..7c8fa4052
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.14.1.bb
@@ -0,0 +1,12 @@
+require sqlite3.inc
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0"
+
+SRC_URI = "\
+ http://www.sqlite.org/2016/sqlite-autoconf-${SQLITE_PV}.tar.gz \
+ file://0001-revert-ad601c7962-that-brings-2-increase-of-build-ti.patch \
+ "
+
+SRC_URI[md5sum] = "3634a90a3f49541462bcaed3474b2684"
+SRC_URI[sha256sum] = "bc7182476900017becb81565ecea7775d46ab747a97281aa610f4f45881c47a6"
diff --git a/import-layers/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb b/import-layers/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb
index 13ba67733..81817d1e2 100644
--- a/import-layers/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb
@@ -21,7 +21,6 @@ do_install() {
FILES_${PN} = "${sysconfdir}/dbus-1/system.d/system-xuser.conf"
USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system shutdown"
USERADD_PARAM_${PN} = "--create-home \
--groups video,tty,audio,input,shutdown,disk \
--user-group xuser"
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch b/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch
deleted file mode 100644
index 9b9980397..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-Upstream-Status: Backport
-CVE: CVE-2012-2738
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From e524b0b3bd8fad844ffa73927c199545b892cdbd Mon Sep 17 00:00:00 2001
-From: Christian Persch <chpe@gnome.org>
-Date: Sat, 19 May 2012 19:36:09 +0200
-Subject: [PATCH 1/2] emulation: Limit integer arguments to 65535
-
-To guard against malicious sequences containing excessively big numbers,
-limit all parsed numbers to 16 bit range. Doing this here in the parsing
-routine is a catch-all guard; this doesn't preclude enforcing
-more stringent limits in the handlers themselves.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=676090
----
- src/table.c | 2 +-
- src/vteseq.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/table.c b/src/table.c
-index 140e8c8..85cf631 100644
---- a/src/table.c
-+++ b/src/table.c
-@@ -550,7 +550,7 @@ _vte_table_extract_numbers(GValueArray **array,
- if (G_UNLIKELY (*array == NULL)) {
- *array = g_value_array_new(1);
- }
-- g_value_set_long(&value, total);
-+ g_value_set_long(&value, CLAMP (total, 0, G_MAXUSHORT));
- g_value_array_append(*array, &value);
- } while (i++ < arginfo->length);
- g_value_unset(&value);
-diff --git a/src/vteseq.c b/src/vteseq.c
-index 7ef4c8c..10991db 100644
---- a/src/vteseq.c
-+++ b/src/vteseq.c
-@@ -557,7 +557,7 @@ vte_sequence_handler_multiple(VteTerminal *terminal,
- GValueArray *params,
- VteTerminalSequenceHandler handler)
- {
-- vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXLONG);
-+ vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXUSHORT);
- }
-
- static void
---
-2.4.9 (Apple Git-60)
-
-
-From cf1ad453a8def873c49cf6d88162593402f32bb2 Mon Sep 17 00:00:00 2001
-From: Christian Persch <chpe@gnome.org>
-Date: Sat, 19 May 2012 20:04:12 +0200
-Subject: [PATCH 2/2] emulation: Limit repetitions
-
-Don't allow malicious sequences to cause excessive repetitions.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=676090
----
- src/vteseq.c | 25 ++++++++++++++++++-------
- 1 file changed, 18 insertions(+), 7 deletions(-)
-
-diff --git a/src/vteseq.c b/src/vteseq.c
-index 10991db..209522f 100644
---- a/src/vteseq.c
-+++ b/src/vteseq.c
-@@ -1392,7 +1392,7 @@ vte_sequence_handler_dc (VteTerminal *terminal, GValueArray *params)
- static void
- vte_sequence_handler_DC (VteTerminal *terminal, GValueArray *params)
- {
-- vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_dc);
-+ vte_sequence_handler_multiple_r(terminal, params, vte_sequence_handler_dc);
- }
-
- /* Delete a line at the current cursor position. */
-@@ -1785,7 +1785,7 @@ vte_sequence_handler_reverse_index (VteTerminal *terminal, GValueArray *params)
- static void
- vte_sequence_handler_RI (VteTerminal *terminal, GValueArray *params)
- {
-- vte_sequence_handler_multiple(terminal, params, vte_sequence_handler_nd);
-+ vte_sequence_handler_multiple_r(terminal, params, vte_sequence_handler_nd);
- }
-
- /* Save cursor (position). */
-@@ -2777,8 +2777,7 @@ vte_sequence_handler_insert_lines (VteTerminal *terminal, GValueArray *params)
- {
- GValue *value;
- VteScreen *screen;
-- long param, end, row;
-- int i;
-+ long param, end, row, i, limit;
- screen = terminal->pvt->screen;
- /* The default is one. */
- param = 1;
-@@ -2796,7 +2795,13 @@ vte_sequence_handler_insert_lines (VteTerminal *terminal, GValueArray *params)
- } else {
- end = screen->insert_delta + terminal->row_count - 1;
- }
-- /* Insert the new lines at the cursor. */
-+
-+ /* Only allow to insert as many lines as there are between this row
-+ * and the end of the scrolling region. See bug #676090.
-+ */
-+ limit = end - row + 1;
-+ param = MIN (param, limit);
-+
- for (i = 0; i < param; i++) {
- /* Clear a line off the end of the region and add one to the
- * top of the region. */
-@@ -2817,8 +2822,7 @@ vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params)
- {
- GValue *value;
- VteScreen *screen;
-- long param, end, row;
-- int i;
-+ long param, end, row, i, limit;
-
- screen = terminal->pvt->screen;
- /* The default is one. */
-@@ -2837,6 +2841,13 @@ vte_sequence_handler_delete_lines (VteTerminal *terminal, GValueArray *params)
- } else {
- end = screen->insert_delta + terminal->row_count - 1;
- }
-+
-+ /* Only allow to delete as many lines as there are between this row
-+ * and the end of the scrolling region. See bug #676090.
-+ */
-+ limit = end - row + 1;
-+ param = MIN (param, limit);
-+
- /* Clear them from below the current cursor. */
- for (i = 0; i < param; i++) {
- /* Insert a line at the end of the region and remove one from
---
-2.4.9 (Apple Git-60)
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch b/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch
deleted file mode 100644
index 6763d3754..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=691545]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd vte-0.28.2/gnome-pty-helper/configure.in vte-0.28.2/gnome-pty-helper/configure.in
---- vte-0.28.2/gnome-pty-helper/configure.in 2010-07-15 20:08:44.000000000 +0300
-+++ vte-0.28.2/gnome-pty-helper/configure.in 2013-01-11 14:50:34.971027440 +0200
-@@ -8,7 +8,6 @@
- AC_ISC_POSIX
- AC_PROG_CC
- AC_STDC_HEADERS
--AM_PROG_CC_STDC
-
- if test -z "$enable_maintainer_mode"; then
- enable_maintainer_mode=yes
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte.inc b/import-layers/yocto-poky/meta/recipes-support/vte/vte.inc
deleted file mode 100644
index 8565cc2ad..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/vte/vte.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "Virtual terminal emulator GTK+ widget library"
-BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
-LICENSE = "LGPLv2.0"
-DEPENDS = " glib-2.0 gtk+ intltool-native ncurses"
-RDEPENDS_libvte = "vte-termcap"
-
-inherit gnome gtk-doc distro_features_check upstream-version-is-even gobject-introspection
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-EXTRA_OECONF = "--disable-python"
-
-PACKAGES =+ "libvte vte-termcap"
-FILES_libvte = "${libdir}/*.so.* ${libexecdir}/gnome-pty-helper"
-FILES_vte-termcap = "${datadir}/vte/termcap-0.0"
-
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch b/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch
new file mode 100644
index 000000000..1c5630ed9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch
@@ -0,0 +1,119 @@
+From 08ca1c48b25c332b75bba2a6b5d757da006e955b Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 7 Oct 2016 16:27:57 +0300
+Subject: [PATCH] Add m4/vapigen.m4
+
+Building without vala will fail if we don't have a vapigen.m4.
+
+Upstream-Status: Pending
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ m4/vapigen.m4 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 96 insertions(+)
+ create mode 100644 m4/vapigen.m4
+
+diff --git a/m4/vapigen.m4 b/m4/vapigen.m4
+new file mode 100644
+index 0000000..f2df12f
+--- /dev/null
++++ b/m4/vapigen.m4
+@@ -0,0 +1,96 @@
++dnl vapigen.m4
++dnl
++dnl Copyright 2012 Evan Nemerson
++dnl
++dnl This library is free software; you can redistribute it and/or
++dnl modify it under the terms of the GNU Lesser General Public
++dnl License as published by the Free Software Foundation; either
++dnl version 2.1 of the License, or (at your option) any later version.
++dnl
++dnl This library is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++dnl Lesser General Public License for more details.
++dnl
++dnl You should have received a copy of the GNU Lesser General Public
++dnl License along with this library; if not, write to the Free Software
++dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++
++# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT])
++# --------------------------------------
++# Check vapigen existence and version
++#
++# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
++AC_DEFUN([VAPIGEN_CHECK],
++[
++ AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0])
++ AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0])
++
++ AC_ARG_ENABLE([vala],
++ [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
++ AS_IF([test "x$4" = "x"], [
++ enable_vala=auto
++ ], [
++ enable_vala=$4
++ ])
++ ])
++
++ AS_CASE([$enable_vala], [no], [enable_vala=no],
++ [yes], [
++ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
++ AC_MSG_ERROR([Vala bindings require GObject Introspection])
++ ])
++ ], [auto], [
++ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
++ enable_vala=no
++ ])
++ ], [
++ AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
++ ])
++
++ AS_IF([test "x$2" = "x"], [
++ vapigen_pkg_name=vapigen
++ ], [
++ vapigen_pkg_name=vapigen-$2
++ ])
++ AS_IF([test "x$1" = "x"], [
++ vapigen_pkg="$vapigen_pkg_name"
++ ], [
++ vapigen_pkg="$vapigen_pkg_name >= $1"
++ ])
++
++ PKG_PROG_PKG_CONFIG
++
++ PKG_CHECK_EXISTS([$vapigen_pkg], [
++ AS_IF([test "$enable_vala" = "auto"], [
++ enable_vala=yes
++ ])
++ ], [
++ AS_CASE([$enable_vala], [yes], [
++ AC_MSG_ERROR([$vapigen_pkg not found])
++ ], [auto], [
++ enable_vala=no
++ ])
++ ])
++
++ AC_MSG_CHECKING([for vala])
++
++ AS_CASE([$enable_vala],
++ [yes], [
++ VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen`
++ VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen
++ AS_IF([test "x$2" = "x"], [
++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen`
++ ], [
++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen`
++ ])
++ ])
++
++ AC_MSG_RESULT([$enable_vala])
++
++ AC_SUBST([VAPIGEN])
++ AC_SUBST([VAPIGEN_VAPIDIR])
++ AC_SUBST([VAPIGEN_MAKEFILE])
++
++ AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
++])
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch b/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch
new file mode 100644
index 000000000..fcfc55975
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch
@@ -0,0 +1,29 @@
+From b0a579d83e355545b64742c997fe8b1d58bf4207 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Mon, 13 Jun 2016 11:05:00 +0300
+Subject: [PATCH] Don't enable stack-protection by default
+
+These are set by security_flags.inc.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 068d072..d580f84 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -138,8 +138,6 @@ m4_define([compiler_flags_common],[ dnl
+ -fno-common dnl
+ -fdiagnostics-show-option dnl
+ -fno-strict-aliasing dnl
+- -fstack-protector dnl
+- -fstack-protector-strong dnl
+ -fno-semantic-interposition dnl
+ -Wno-deprecated-declarations dnl
+ ])
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb
deleted file mode 100644
index 74087ca83..000000000
--- a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require vte.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-
-PR = "r6"
-
-SRC_URI += "file://obsolete_automake_macros.patch \
- file://cve-2012-2738.patch \
- "
-
-CFLAGS += "-D_GNU_SOURCE"
-
-SRC_URI[archive.md5sum] = "497f26e457308649e6ece32b3bb142ff"
-SRC_URI[archive.sha256sum] = "86cf0b81aa023fa93ed415653d51c96767f20b2d7334c893caba71e42654b0ae"
-
-RECIPE_NO_UPDATE_REASON = "matchbox-terminal needs to be ported over to new vte first"
diff --git a/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.44.2.bb b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.44.2.bb
new file mode 100644
index 000000000..a0b671e05
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/vte/vte_0.44.2.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Virtual terminal emulator GTK+ widget library"
+BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
+LICENSE = "LGPLv2.1+"
+DEPENDS = "glib-2.0 gtk+3 intltool-native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+inherit gnomebase gtk-doc distro_features_check upstream-version-is-even gobject-introspection
+
+# vapigen.m4 is required when vala is not present (but the one from vala should be used normally)
+SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch \
+ ${@bb.utils.contains('PACKAGECONFIG', 'vala', '', 'file://0001-Add-m4-vapigen.m4.patch', d) } \
+ "
+SRC_URI[archive.md5sum] = "eca8f8a9d9f9bb8e9d592d0acfeec015"
+SRC_URI[archive.sha256sum] = "a1ea594814bb136a3a9a6c7656b46240571f6a198825c1111007fe99194b0949"
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+# Instead of "inherit vala" we do the relevant settings here so we can
+# set DEPENDS based on PACKAGECONFIG.
+
+# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
+export STAGING_DATADIR
+# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files
+export XDG_DATA_DIRS = "${STAGING_DATADIR}"
+
+# Package additional files
+FILES_${PN}-dev += "${datadir}/vala/vapi/*"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[vala] = "--enable-vala,--disable-vala,vala-native vala"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+
+CFLAGS += "-D_GNU_SOURCE"
+
+EXTRA_OECONF = "--disable-test-application"
+
+# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds.
+# Use libtool-cross (which has a hack to prevent that) instead.
+EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
+
+PACKAGES =+ "libvte"
+FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*"
diff --git a/import-layers/yocto-poky/meta/site/arm-common b/import-layers/yocto-poky/meta/site/arm-common
index a3c979fe0..198c98c6a 100644
--- a/import-layers/yocto-poky/meta/site/arm-common
+++ b/import-layers/yocto-poky/meta/site/arm-common
@@ -113,7 +113,6 @@ rsync_cv_HAVE_SHORT_INO_T=${rsync_cv_HAVE_SHORT_INO_T=no}
rsync_cv_HAVE_UNSIGNED_CHAR=${rsync_cv_HAVE_UNSIGNED_CHAR=no}
rsync_cv_HAVE_BROKEN_READDIR=${rsync_cv_HAVE_BROKEN_READDIR=no}
rsync_cv_HAVE_GETTIMEOFDAY_TZ=${rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-rsync_cv_HAVE_C99_VSNPRINTF=${rsync_cv_HAVE_C99_VSNPRINTF=yes}
rsync_cv_HAVE_SECURE_MKSTEMP=${rsync_cv_HAVE_SECURE_MKSTEMP=yes}
rsync_cv_REPLACE_INET_NTOA=${rsync_cv_REPLACE_INET_NTOA=no}
rsync_cv_REPLACE_INET_ATON=${rsync_cv_REPLACE_INET_ATON=no}
diff --git a/import-layers/yocto-poky/meta/site/common-linux b/import-layers/yocto-poky/meta/site/common-linux
index 0a752a40e..295871639 100644
--- a/import-layers/yocto-poky/meta/site/common-linux
+++ b/import-layers/yocto-poky/meta/site/common-linux
@@ -61,3 +61,6 @@ ac_cv_have_long_long_format=yes
# apache
ac_cv_o_nonblock_inherited=${ac_cv_o_nonblock_inherited=no}
+
+# rsync
+rsync_cv_HAVE_C99_VSNPRINTF=${rsync_cv_HAVE_C99_VSNPRINTF=yes}
diff --git a/import-layers/yocto-poky/meta/site/ix86-common b/import-layers/yocto-poky/meta/site/ix86-common
index 23b8e8bc2..f4cf0b8db 100644
--- a/import-layers/yocto-poky/meta/site/ix86-common
+++ b/import-layers/yocto-poky/meta/site/ix86-common
@@ -154,7 +154,6 @@ rsync_cv_HAVE_SHORT_INO_T=${rsync_cv_HAVE_SHORT_INO_T=no}
rsync_cv_HAVE_UNSIGNED_CHAR=${rsync_cv_HAVE_UNSIGNED_CHAR=no}
rsync_cv_HAVE_BROKEN_READDIR=${rsync_cv_HAVE_BROKEN_READDIR=no}
rsync_cv_HAVE_GETTIMEOFDAY_TZ=${rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-rsync_cv_HAVE_C99_VSNPRINTF=${rsync_cv_HAVE_C99_VSNPRINTF=yes}
rsync_cv_HAVE_SECURE_MKSTEMP=${rsync_cv_HAVE_SECURE_MKSTEMP=yes}
rsync_cv_REPLACE_INET_NTOA=${rsync_cv_REPLACE_INET_NTOA=no}
rsync_cv_REPLACE_INET_ATON=${rsync_cv_REPLACE_INET_ATON=no}
diff --git a/import-layers/yocto-poky/meta/site/mips64el-linux b/import-layers/yocto-poky/meta/site/mips64el-linux
index 8b61eb0f3..680171d5e 100644
--- a/import-layers/yocto-poky/meta/site/mips64el-linux
+++ b/import-layers/yocto-poky/meta/site/mips64el-linux
@@ -35,6 +35,7 @@ glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
ac_cv_alignof_guint32=4
ac_cv_alignof_guint64=8
ac_cv_alignof_unsigned_long=8
+ac_cv_sizeof_ssize_t=8
# libpcap
ac_cv_linux_vers=${ac_cv_linux_vers=2}
diff --git a/import-layers/yocto-poky/meta/site/mipsisa32r6-linux b/import-layers/yocto-poky/meta/site/mipsisa32r6-linux
new file mode 100644
index 000000000..72a54f95e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/mipsisa32r6-linux
@@ -0,0 +1,79 @@
+# general
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+
+# bash
+ac_cv_c_long_double=${ac_cv_c_long_double=no}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
+
+# openssh
+ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
+ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
+ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
+ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
+ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
+
+# fget
+compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
+
+# glib
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
+glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
+
+# libpcap
+ac_cv_linux_vers=${ac_cv_linux_vers=2}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
+
+# libidl
+libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ncftp
+wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
+wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
+
+# db
+db_cv_align_t=${db_cv_align_t='unsigned long long'}
+db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
+db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
+db_cv_sprintf_count=${db_cv_sprintf_count=yes}
+
+# rrdtool
+rd_cv_ieee_works=${rd_cv_ieee_works=yes}
+# ac_cv_path_PERL=${ac_cv_path_PERL=no}
+
+# gettext
+am_cv_func_working_getline=${am_cv_func_working_getline=yes}
+
+# samba
+samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
+
+# vim
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+
+# intercom
+ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
+
+# lmbench
+ac_cv_uint=${ac_cv_unit=yes}
+
+# D-BUS
+ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
+
+# evolution-data-server
+ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
+
diff --git a/import-layers/yocto-poky/meta/site/mipsisa32r6el-linux b/import-layers/yocto-poky/meta/site/mipsisa32r6el-linux
new file mode 100644
index 000000000..696b1beeb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/mipsisa32r6el-linux
@@ -0,0 +1,79 @@
+# general
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+
+# bash
+ac_cv_c_long_double=${ac_cv_c_long_double=no}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
+
+# openssh
+ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
+ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
+ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
+ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
+ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
+
+# fget
+compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
+
+# glib
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
+glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
+
+# libpcap
+ac_cv_linux_vers=${ac_cv_linux_vers=2}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
+
+# libidl
+libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ncftp
+wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
+wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
+wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes}
+
+# db
+db_cv_align_t=${db_cv_align_t='unsigned long long'}
+db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
+db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
+db_cv_sprintf_count=${db_cv_sprintf_count=yes}
+
+# rrdtool
+rd_cv_ieee_works=${rd_cv_ieee_works=yes}
+# ac_cv_path_PERL=${ac_cv_path_PERL=no}
+
+# gettext
+am_cv_func_working_getline=${am_cv_func_working_getline=yes}
+
+# samba
+samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
+
+# vim
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+
+# intercom
+ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
+
+#lmbench
+ac_cv_uint=${ac_cv_unit=yes}
+
+# D-BUS
+ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
+
+# evolution-data-server
+ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
diff --git a/import-layers/yocto-poky/meta/site/mipsisa64r6-linux b/import-layers/yocto-poky/meta/site/mipsisa64r6-linux
new file mode 100644
index 000000000..ed0fbbe65
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/mipsisa64r6-linux
@@ -0,0 +1,83 @@
+# general
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+
+# bash
+ac_cv_c_long_double=${ac_cv_c_long_double=no}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
+
+# openssh
+ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
+ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
+ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
+ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
+ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
+
+# fget
+compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
+
+# glib
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
+glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
+ac_cv_sizeof_ssize_t=8
+
+# libpcap
+ac_cv_linux_vers=${ac_cv_linux_vers=2}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
+
+# libidl
+libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ncftp
+wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
+wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
+
+# db
+db_cv_align_t=${db_cv_align_t='unsigned long long'}
+db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
+db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
+db_cv_sprintf_count=${db_cv_sprintf_count=yes}
+
+# rrdtool
+rd_cv_ieee_works=${rd_cv_ieee_works=yes}
+# ac_cv_path_PERL=${ac_cv_path_PERL=no}
+
+# gettext
+am_cv_func_working_getline=${am_cv_func_working_getline=yes}
+
+# samba
+samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
+
+# vim
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+
+# intercom
+ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
+
+# lmbench
+ac_cv_uint=${ac_cv_unit=yes}
+
+# D-BUS
+ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
+
+# eds-dbus
+ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
+
diff --git a/import-layers/yocto-poky/meta/site/mipsisa64r6el-linux b/import-layers/yocto-poky/meta/site/mipsisa64r6el-linux
new file mode 100644
index 000000000..680171d5e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/site/mipsisa64r6el-linux
@@ -0,0 +1,83 @@
+# general
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+
+# bash
+ac_cv_c_long_double=${ac_cv_c_long_double=no}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
+
+# openssh
+ac_cv_have_accrights_in_msghdr=${ac_cv_have_accrights_in_msghdr=no}
+ac_cv_have_broken_snprintf=${ac_cv_have_broken_snprintf=no}
+ac_cv_have_control_in_msghdr=${ac_cv_have_control_in_msghdr=yes}
+ac_cv_have_openpty_ctty_bug=${ac_cv_have_openpty_ctty_bug=no}
+ac_cv_have_space_d_name_in_struct_dirent=${ac_cv_have_space_d_name_in_struct_dirent=yes}
+
+# fget
+compat_cv_func_snprintf_works=${compat_cv_func_snprintf_works=yes}
+
+# glib
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+glib_cv_has__inline=${glib_cv_has__inline=yes}
+glib_cv_has__inline__=${glib_cv_has__inline__=yes}
+glib_cv_hasinline=${glib_cv_hasinline=yes}
+glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+glib_cv_rtldglobal_broken=${glib_cv_rtldglobal_broken=no}
+glib_cv_sane_realloc=${glib_cv_sane_realloc=yes}
+glib_cv_sizeof_gmutex=${glib_cv_sizeof_gmutex=24}
+glib_cv_sizeof_system_thread=${glib_cv_sizeof_system_thread=4}
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+glib_cv_uscore=${glib_cv_uscore=no}
+
+# glib-2.0
+glib_cv_stack_grows=${glib_cv_stack_grows=no}
+utils_cv_sys_open_max=${utils_cv_sys_open_max=1015}
+glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
+ac_cv_sizeof_ssize_t=8
+
+# libpcap
+ac_cv_linux_vers=${ac_cv_linux_vers=2}
+
+# startup-notification
+lf_cv_sane_realloc=${lf_cv_sane_realloc=yes}
+
+# libidl
+libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ncftp
+wi_cv_struct_timeval_tv_sec=${wi_cv_struct_timeval_tv_sec=long}
+wi_cv_struct_timeval_tv_usec=${wi_cv_struct_timeval_tv_usec=long}
+wi_cv_unix_domain_sockets=${wi_cv_unix_domain_sockets=yes}
+
+# db
+db_cv_align_t=${db_cv_align_t='unsigned long long'}
+db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
+db_cv_fcntl_f_setfd=${db_cv_fcntl_f_setfd=yes}
+db_cv_sprintf_count=${db_cv_sprintf_count=yes}
+
+# rrdtool
+rd_cv_ieee_works=${rd_cv_ieee_works=yes}
+# ac_cv_path_PERL=${ac_cv_path_PERL=no}
+
+# gettext
+am_cv_func_working_getline=${am_cv_func_working_getline=yes}
+
+# samba
+samba_cv_HAVE_GETTIMEOFDAY_TZ=${samba_cv_HAVE_GETTIMEOFDAY_TZ=yes}
+
+# vim
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+
+# intercom
+ac_cv_func_fnmatch_works=${ac_cv_func_fnmatch_works=yes}
+
+#lmbench
+ac_cv_uint=${ac_cv_unit=yes}
+
+# D-BUS
+ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
+
+# eds-dbus
+ac_cv_libiconv_utf8=${ac_cv_libiconv_utf8=yes}
diff --git a/import-layers/yocto-poky/meta/site/nios2-linux b/import-layers/yocto-poky/meta/site/nios2-linux
index 95c09d3b4..2f4e570fa 100644
--- a/import-layers/yocto-poky/meta/site/nios2-linux
+++ b/import-layers/yocto-poky/meta/site/nios2-linux
@@ -171,7 +171,6 @@ rsync_cv_HAVE_SHORT_INO_T=${rsync_cv_HAVE_SHORT_INO_T=no}
rsync_cv_HAVE_UNSIGNED_CHAR=${rsync_cv_HAVE_UNSIGNED_CHAR=no}
rsync_cv_HAVE_BROKEN_READDIR=${rsync_cv_HAVE_BROKEN_READDIR=no}
rsync_cv_HAVE_GETTIMEOFDAY_TZ=${rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-rsync_cv_HAVE_C99_VSNPRINTF=${rsync_cv_HAVE_C99_VSNPRINTF=yes}
rsync_cv_HAVE_SECURE_MKSTEMP=${rsync_cv_HAVE_SECURE_MKSTEMP=yes}
rsync_cv_REPLACE_INET_NTOA=${rsync_cv_REPLACE_INET_NTOA=no}
rsync_cv_REPLACE_INET_ATON=${rsync_cv_REPLACE_INET_ATON=no}
diff --git a/import-layers/yocto-poky/meta/site/sh-common b/import-layers/yocto-poky/meta/site/sh-common
index 5cbf36a79..fc4d6ad79 100644
--- a/import-layers/yocto-poky/meta/site/sh-common
+++ b/import-layers/yocto-poky/meta/site/sh-common
@@ -216,7 +216,6 @@ rsync_cv_HAVE_SHORT_INO_T=${rsync_cv_HAVE_SHORT_INO_T=no}
rsync_cv_HAVE_UNSIGNED_CHAR=${rsync_cv_HAVE_UNSIGNED_CHAR=no}
rsync_cv_HAVE_BROKEN_READDIR=${rsync_cv_HAVE_BROKEN_READDIR=no}
rsync_cv_HAVE_GETTIMEOFDAY_TZ=${rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes}
-rsync_cv_HAVE_C99_VSNPRINTF=${rsync_cv_HAVE_C99_VSNPRINTF=yes}
rsync_cv_HAVE_SECURE_MKSTEMP=${rsync_cv_HAVE_SECURE_MKSTEMP=yes}
rsync_cv_REPLACE_INET_NTOA=${rsync_cv_REPLACE_INET_NTOA=no}
rsync_cv_REPLACE_INET_ATON=${rsync_cv_REPLACE_INET_ATON=no}
OpenPOWER on IntegriCloud